python - Getting two Blue DongleRS232s to talk using pyserial -


i new pyserial , trying 2 blue dongle rs232s talk each other

i have 1 of them connected /dev/ttyusb0 , other /dev/ttyusb1

both of them configured connected each other when connected using @ commands. sending "hello" message usb0 dongle usb1 dongle on bluetooth link.

here code

import serial  ser0 = serial.serial()` ser0.port = '/dev/ttyusb0' ser0.baudrate = 57600 ser0.bytesize = 8 ser0.parity = serial.parity_none ser0.stopbits = serial.stopbits_one  ser1 = serial.serial() ser1.port = '/dev/ttyusb0' ser1.baudrate = 57600 ser1.bytesize = 8 ser1.parity = serial.parity_none ser1.stopbits = serial.stopbits_one  try:     ser0.open()     print "connected usb0" except serial.serialutil.serialexception:     print "cannot connect usb0"     ser0.close()  try:     ser1.open()     print "connected usb1" except serial.serialutil.serialexception:     print "cannot connect usb0"     ser1.close()  cmd = "hello!!!\r" ser0.write(cmd.encode()) print "sent hello" response = ser1.readline()        # tried ser1.read(64) print response  ser0.close() ser1.close() 

here output: connected usb0 connected usb1 sent hello

it prints upto line -> print "sent hello" code gets stuck after , there no response generated

what doing wrong here?

thanks in advance! --aneesh


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -