Question on serial debugging
Hi folks,
I'm new to esp8266 firmware programming. I'm trying to start off by writing simple programs.
I'm using ubuntu linux with the esp-open-sdk. I can compile and flash simple programs (like blink) but I'm really stumped with printing debugging info to the console via the os_printf() function.
I have a simple user_init() function which includes two function calls.
- uart_init(115200,115200);
- os_printf("hello world");
I am expecting to see "hello world" printed on /dev/ttyUSB0 when I use the command "cat /dev/ttyUSB0".
I've already used stty to setup the serial port. I have it setup as such: "stty -F /dev/ttyUSB0 raw" and "stty -F /dev/ttyUSB0 115200".
I have my esp8266 wired properly to a ftdi usb to serial converter. Any ideas on what is going on?
Posted Apr 28, 2015, 3:30 AM UTC
If you want to use os_printf(), you're going to have to ask Espressif why it doesn't work. (Its their BS closed library.)
I just moved on and use uart_sendStr() (found it from some other websites.)
And currently, I've moved on to Arduino/esp8266. (Because "higher level" C libraries are nice, this also lets me call lower level direct esp8266 functions when needed.)
Thanks for the reply. What library did you find uart_sendStr()?Couldn't find it anywhere.
Thanks.
I wouldn't bother. Arduino esp8266 ftw. https://github.com/esp8266/Arduino