Changing baud rate doesn't allow second command
nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Mon Apr 25 18:09:15 CEST 2011
Am 25.04.2011 16:41, schrieb rjmccorkle:
> The code is fine but it seems it won't switch baud rates using
> pyserial. I have to initiate the first msg in 9600 to change the
> setting of the gps
> And then send the second command in 115200 because it's in
> configuration mode on the unit.
> I can see hooking two pcs together
> via null modem that the command is sent but I don't see the next msg
> go across.
The receiver changes speed as well, I suppose?
> I'll try sleeps but even w a 15 sec sleep after close
> connection to allow for configuration mode to set (Which only takes
> about 4 seconds) it wasn't sending the second command.
> My buddy suggested I make two files for the separate calls but I wouldn't
> think that would make a diff or be necessary...
Normally not, but it might worth trying.
Anyway, have you tried to use setBaudrate() instead of close() and
creating a new connection?
I can't see why it should make a difference, but I as well can't see why
your approach is not working, especially as it works if you do it
Maybe your target device expects to get something signalled via the
More information about the Python-list