daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Feb 14th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sudo rfcomm bind 0 rfcomm0
  2.    
  3. import serial
  4.  
  5. ser = serial.Serial('/dev/rfcomm0',9600)
  6. myhex = bytearray([0x01,0x13,0x20,0x0e,0x40,0x00,...]) #17 bytes, trimmed for brevity
  7. ser.write(myhex)
  8. print("Written!") #this line does display, so at least the write occurs
  9. while 1:
  10.     print(ser.read())
  11.    
  12. SerialException('device reports readiness to read but returned no data')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top