Serial Monitor in Arduino IDE outputting garbled output

I obtained a Losant Builder Kit from Codestock2016. I have followed the instructions to setup the environment and am working on the tutorial. I have gotten to the point where I upload the sketch to the device and all seems to go well in the IDE:

When I open the serial monitor I obtain the image at the bottom of the post. I have triple checked that the baud matches in both the sketch and the Serial Monitor and can find no obvious problems with the installation. I am working on Windows 10 with Arduino IDE 1.6.9. This is my first experience with any kind of device like this and any insights would be greatly appreciated.

.

The device will print some garbage to the serial output when it first boots up. If you scroll back to the left it should then start printing some readable text about connecting to wifi and Losant. Are you seeing that at all?

Unfortunately, I do not see any output at all other than the garbled text. I have also tried simple sketches that print statements or simply cause the onboard light to blink. These also seem to fail and produce the garbled results.

If you press the RST (reset) button on the device a few times, does the serial output continue to print additional garbage output? I want to make sure the serial output is connected to the correct port.

Yes, pressing the RST button on the device will produce more garbage output.

I apologize. I should have mentioned that in the first post.

Please remove the device from the breadboard so that the only thing connected to it is the USB cable. Attempt to flash it again, do you see any different result?

Ah, good idea (should have thought of that). After a few exceptions and some strange behavior, the program seems to be working as expected. It seems that it wanted me to test out the RST button a lot…

A rousing success so far! Thank you for your help!!

Can you double-check the version of ESP8266 in the board manager? We’ve seen issues with 2.3.0 and you mentioning “exceptions” might point to that. 2.2.0 seems to work a little better.

I am using 2.2.0. I think I spoke too soon with the success. It was not a repeatable. Here is the latest error message. Should we start a new thread? I think the garbage output on the Serial Monitor is understood now.

Running Workshop 1 Firmware.


Connecting to Bifrost2

WiFi connected
IP address: 
192.168.1.19

Connecting to Losant...Connected!

This device is now ready for use!
Button Pressed!

Exception (0):
epc1=0x40207c45 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys 
sp: 3ffffdd0 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff70:  4021baf4 3ffef218 3ffef240 01d78f4a  
3fffff80:  40207676 3fffdab0 00000000 3fff03c0  
3fffff90:  4020702b 3fffdab0 00000000 40204c97  
3fffffa0:  3ffea0c8 40000f49 3fffdab0 40000f49  
<<<stack<<<

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x0f
csum 0x0f
~ld

Running Workshop 1 Firmware.


Connecting to Bifrost2

WiFi connected
IP address: 
192.168.1.19

Connecting to Losant...Connected!

This device is now ready for use!
Button Pressed!

How often is it throwing an exception? It looks like it restarted ok, so that’s good. There’s a known issue in the underlying TLS library on the ESP8266 Arduino core that can cause issues in rare cases. I thought it was fixed in 2.3.0, but I was having many issues on 2.3.0 that I haven’t had a chance to investigate yet.

Hmm, also seeing “Button Pressed” immediately on boot is a strong indication the button is wired incorrectly. When you acquired the kit, did you get a boxed one, or one from a bag? They are actually two different modules with different instructions.

Instructions for boxed kit: https://docs.losant.com/getting-started/losant-iot-dev-kits/builder-kit/

Instructions for bagged kit: https://docs.losant.com/getting-started/losant-iot-dev-kits/builder-kit-nodemcu/

I have the kit from the bag. I have been using the instructions at this link., and the one time that things worked appropriately the button worked as expected. I should have mentioned that the screen grab was when I had the board disconnected from the button.

It throws an exception almost every time at this point. I am also back to simply getting the garbage text in the Serial Monitor. I have also tried version 2.3.0 but that does not seem to have any effect on the exceptions. Every so often it will get into an infinite loop of fatal exceptions that cause the blue LED on the device to be constantly on.

I did some digging on the board and found this site. This suggests that the setup for the Flash Mode should be DIO instead of QIO. I made the switch and things are more robust now. I have trouble connecting to the network and the Losant website, but have an overall more success than failure. With no exceptions as of yet.

Send your address to support@losant.com and we’ll send over a new board. We don’t typically see this many issues. Looking more and more like a board issue.

Sir I too get a same problem. When I compile the program my serial port in arduino shows the garbaged output… I need the answer as soon as possible since I need to finalize it my today sir …plse help me sir…

In most cases, unreadable output on a serial monitor is because the baud rate configured on the device does not match the baud rate configured on the serial monitor. They must be set to the same number, i.e. 9600, 115200, etc.