Page 1 of 1

msp implement help

Posted: Wed Mar 20, 2013 12:57 am
by hackers365
I want to implement multiwii serial protocol by pyserial

import pyserial
import struct
ser = serial.Serial('/dev/ttyUSB0', 115200)
str = struct.pack('!cccBBB', 'M', '$', '<', 0, 100, 155) # simple MSP_IDENT
print ser.write(str)
print ser.read(3)


above program hang in ser.read.....can you help me?

Re: msp implement help

Posted: Wed Mar 20, 2013 6:04 am
by hackers365
i sloved it self


import pyserial
import struct
ser = serial.Serial('/dev/ttyUSB0', 115200)
str = struct.pack('cccBBB', '$', 'M', '<', 0, 100, 100) # simple MSP_IDENT
print ser.write(str)
ser.flush()
print ser.read(3)