[SOLVED] Getting a serial port error all the sudden



  • Everything worked last night. Then I came home on lunch today and when I tried to open the serial monitor to my gateway, I get nothing in the screen and this error:

    Error while setting serial port parameters: 155,200 n 8 1

    I tried reseating the usb cable on both ends, reset the gateway, restarted the computer, and reuploading the sketch, and even uninstalled arduino and reinstalled -- none of that did anything. I have the board set correctly to "Nano" and the com port correct (verified by removing, checking, and reattaching). The 155,200 is obviously the baud, and I've always used that for the gateway. I tried a few other bauds (9600, etc) and still nothing.

    I haven't tried a few other things like trying it on another computer yet because I ran out of time and am now back at work.

    I literally didn't even touch the gateway, it just started doing this, does anyone know what this error is?



  • Nevermind, I figured it out (sort of). I deleted the serial port from device manager and then checked for hardware updates which reinstalled it. It then worked just fine for one iteration, but the serial monitor showed BinarySwitchSleepSensor output instead of gateway output. And then stopped working. I deleted it again, reinstalled the port, and immediately uploaded the gateway sketch back to it. Now it works great. My guess is that the binary sketch somehow messed up the serial comm when on the Nano? Not sure, but that fixed it. I must have forgotten to switch the port # when I was reuploading the binary sketch to my node and accidentely uploaded it to the gateway port.


 

308
Online

7.9k
Users

8.8k
Topics

93.8k
Posts