Serial Commands used by our Satellite transciever.

We will need the crc16 python code library :

http://code.google.com/p/pycrc16/downloads

tar -xzf crc16-0.1.1.tar.gz
cd crc16-0.1.1
python setup.py build
sudo python setup.py install

 

import serial
import struct

ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=9600
)

print(ser.isOpen())

thestring = "\xAA\x05\x01\x50\xD5"

ser.write(thestring)
s = ser.read(20)
print(s)
ser.close()
Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.