<p>I have a Prolite LED sign that I like to set up to show scrolling search queries from a apache logs and other fun statistics. The problem is, my G5 does not have a serial port, so I have to use a usb to serial dongle. It shows up as /dev/cu.usbserial and /dev/tty.usbserial . </p>

<p>When i do this everything seems to be hunky-dory:</p>

<pre><code>stty -f /dev/cu.usbserial
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb
</code></pre>

<p>Everything also works when I use the <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/24024" rel="noreferrer">serial port tool</a> to talk to it.</p>

<p>If I run this piece of code while the above mentioned serial port tool, everthing also works. But as soon as I disconnect the tool the connection gets lost. </p>

<pre><code>#!/usr/bin/python

import serial

ser = serial.Serial('/dev/cu.usbserial', 9600, timeout=10) 
ser.write("&lt;ID01&gt;&lt;PA&gt; \r\n") 
read_chars = ser.read(20)
print read_chars

ser.close()
</code></pre>

<p>So the question is, what magicks do I need to perform to start talking to the serial port without the serial port tool? Is that a permissions problem? Also, what's the difference between /dev/cu.usbserial and /dev/tty.usbserial?</p>

<hr>

<p>Nope, no serial numbers. The thing is, the problem persists even with sudo-running the python script, and the only thing that makes it go through if I open the connection in the gui tool that I mentioned.</p>

[{'answer_id': 4128, 'author': 'Nick Berardi', 'author_id': 17, 'author_profile': 'https://Stackoverflow.com/users/17', 'pm_score': 0, 'selected': False, 'text': '<p>have you tried watching the traffic between the GUI and the serial port to see if there is some kind of special command being sent across?  Also just curious, Python is sending ASCII and not UTF-8 or something else right?  The reason I ask is because I noticed your quote changes for the strings and in some languages that actually is the difference between ASCII and UTF-8.</p>\n'}, {'answer_id': 4162, 'author': 'Lily Ballard', 'author_id': 582, 'author_profile': 'https://Stackoverflow.com/users/582', 'pm_score': 3, 'selected': False, 'text': '<p><code>/dev/cu.xxxxx</code> is the "callout" device, it\'s what you use when you establish a connection to the serial device and start talking to it. <code>/dev/tty.xxxxx</code> is the "dialin" device, used for monitoring a port for incoming calls for e.g. a fax listener.</p>\n'}]
['https://Stackoverflow.com/questions/3976', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/556/']