Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3979

Re: Changing baud rate doesn't allow second command

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 15:06 +0200
Organization A newly installed InterNetNews server
Message-ID <ip3rkc$747$1@r03.glglgl.eu> (permalink)
References <224f6621-2fc4-4827-8a19-3a12371f39b1@l14g2000pre.googlegroups.com>

Show all headers | View raw


Am 25.04.2011 14:46, schrieb rjmccorkle:
> hi - I need to open a serial port in 9600 and send a command followed
> by closing it, open serial port again and send a second command at
> 115200.  I have both commands working separately from the python
> command line but it won't work in the script.  Any idea why?

What does "won't work" mean? I can't see any issues in the code.

I suppose the string sent with 9600 tells the device to change the 
speed. Are you sure that it is received correctly?

Additionally, maybe you have output issues. E.g. you just write 
"ser.baudrate" instead of "print ser.baudrate", so that could be a 
source of behavioral differences.


> #import os
> #program = 'C:\Program Files\Program.exe'+'-start'
> #os.system(r'program)

I suppose this doesn't belong to the problem?


Thomas

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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