No output from pyserial
<p>I am trying to write a code wit pyserial (v2.6) that should wait indefinitely for any input from the port specified using <code>inWaiting()</code> and then read it using <code>read()</code> but there's no luck and no output at all. What am I doing wrong? The program just doesn't print anything at all! </p>

<p>Edit: both the program and the port are running on a virtual machine of Contiki OS </p>

<p>Edit2: z1 mote is the device connected to the port. I found out that pyserial is used to write to it (I can't upgrade pyserial to the latest version because it won't workout with the z1 motes)</p>

<p>The full code: </p>

<pre><code>import pyserial
baudrate = 115200
port = '/dev/ttyUSB0' 
ser = serial.Serial(port,baudrate)

while 1:
    time.sleep(1)
    coming_data = ser.inWaiting()
    if coming_data != 0:
        data = ser.read(coming_data)
        print data

# the output from the port is (which should be the output of this program)
# abcd::abcd:0:0:c9 2293 6 -3 243 -23 108 
# abcd::abcd:0:0:c9 2337 8 -4 242 -27 108
</code></pre>