These are chat archives for SmingHub/Sming

16th
Aug 2016
psychegr
@psychegr
Aug 16 2016 06:58
@hreintke on this project i have to use all the pins that i have available, Hspi, uart0 and some gpio to toggle stuff and as CS for spi. Uart0 will be used for communication with another device so all the debug has to go through telnet. I think that i can make a wrapper function for the os_install_putc() . That way all the debugf should go to the telnet. Am i wrong?
hreintke
@hreintke
Aug 16 2016 07:24
@psychegr :
Yes you are. See my reply from aug 15.
that will not be possible. to many debugf in the code. when using telnet the debug output to telnet creates new debugf output. there is no option for selecting. that is the reason for creating debug class.
psychegr
@psychegr
Aug 16 2016 08:47
@hreintke maybe you ve been at the same position as me before. I had the impression from reading the SDK that the os_install_putc1() redirects the debugf characters to what ever function we want, regardless of being uart0 or telnet. Is there some piece of code where i can see the new debugf in the telnet part? I am asking because even if i use the new debug class, i dont get the same debug lines in telnet as in the uart.
hreintke
@hreintke
Aug 16 2016 11:16
@psychegr :
You can see in the debug & telnet class how Sming handles the debug output to telnet but as I stated before, that is not the debugf but a separate debug class implementation.
But : and that is the last time I will mention it.
-> You cannot just forward all debugf to telnet without getting into a recursive loop !
zhivko
@zhivko
Aug 16 2016 12:22
@hreintke: how can I do something like poll on sming rtos? http://linux.die.net/man/2/poll - I would like to use libzmtp within smingrtos - and https://github.com/zeromq/libzmtp uses poll.h ...
psychegr
@psychegr
Aug 16 2016 12:39
@hreintke so this is the main issue with the debugf. Is this an issue just in sming or is it an issue of the SDK? This is what i am trying to figure out. If i disable the debugf, i will loose all the debug stuff that use the debugf and this is not what i want. Will I have the same issue if i redirect the debugf to send packet for example in a udp connection, or is it only related to the telnet stuff? I dont want to lose the debugf from the SDK and also i want to use the serial uart0 for another function. Can i do that? Or not?
zhivko
@zhivko
Aug 16 2016 15:04
@hreintke: ok found it - there is select() in rtos
hreintke
@hreintke
Aug 16 2016 19:50
@psychegr :
Of course you will have the same issue when using UDP, hope you finally understand the problem using debugf.
There is a recursive loop when using ANY network connection and the debugf output in the network.
Is it Sming or SDK ? It is the combination of both but you can only use both.