By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,172 Members | 727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,172 IT Pros & Developers. It's quick & easy.

read and write in a serial port with python

P: 1
How can I read and write a radio connected to the computer with a serial port with python, the same way a hyperterminal does ?
I wrote this:

from Tkinter import *
import serial
se = serial.Serial()
se.baudrate = 9600
se.bytesize = 8
se.parities = 0
se.stopbits = 1
se.xonxoff = 0
se.rtscts = 0
se.timeout = 1
se.port = 0
print se.portstr
print se

It seems to work, but when I try to communicate using

I don't receive the expected answer, and it just reads what I wrote.

Someone can help me?
Apr 10 '08 #1
Share this Question
Share on Google+
3 Replies

P: 2
Hi Charlotte1,
I have the same problem! Have you resolved it?
Sep 25 '09 #2

Expert 100+
P: 391

I've used pySerial successfully in the past, though not with a radio. I found it to work pretty well in general, or at least the python part! Can you give us some more details? For example, what was the print out from the first bit of code you gave? Is there a particular reason for the parameters you choose there? Can you give us the exact print out for the second piece of code, and what you were expecting?
Sep 29 '09 #3

P: 2
I have resolved the problem. there was an error into the schematic of my board.
Sep 30 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.