Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3986
| From | Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Changing baud rate doesn't allow second command |
| Date | 2011-04-25 18:09 +0200 |
| Organization | A newly installed InterNetNews server |
| Message-ID | <ip46bb$fkn$1@r03.glglgl.eu> (permalink) |
| References | <224f6621-2fc4-4827-8a19-3a12371f39b1@l14g2000pre.googlegroups.com> <ip3rkc$747$1@r03.glglgl.eu> <a35afd40-2467-44a1-b2ac-539aea795b3d@x37g2000prb.googlegroups.com> |
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. Ok. > 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. mmm... strange. > 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 manually... Maybe your target device expects to get something signalled via the status lines? Thomas
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Changing baud rate doesn't allow second command rjmccorkle <robert.mccorkle@gmail.com> - 2011-04-25 05:46 -0700
Re: Changing baud rate doesn't allow second command Roy Smith <roy@panix.com> - 2011-04-25 09:01 -0400
Re: Changing baud rate doesn't allow second command Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 15:06 +0200
Re: Changing baud rate doesn't allow second command rjmccorkle <robert.mccorkle@gmail.com> - 2011-04-25 07:41 -0700
Re: Changing baud rate doesn't allow second command Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 18:09 +0200
Re: Changing baud rate doesn't allow second command rjmccorkle <robert.mccorkle@gmail.com> - 2011-04-25 14:09 -0700
csiph-web