Thread
:
reading from rfcomm device
View Single Post
mbertazz
2006-08-23 , 21:09
Posts: 7 | Thanked: 1 time | Joined on Mar 2006
#
1
hi,
i'm writing a simple cmd-line application based on serial bt communication to a bt reader.
I'm using perl cause i have to call this script from opera browser (but same problem using this perl script with cmd-line).
Thanks to your help, no problem connecting to
/dev/rfcomm0:
# after setting up with "rfcomm connect... " and after opening connection
open ($fd, "+< /dev/rfcomm0") or die "cannot open serial port";
and no problem writing on it:
print $fd chr(0x03). chr(0x00). chr(0x01). chr(0x01). chr (0x03 ^ 0x00 ^ 0x01 ^ 0x01);
as written into device serial port communication manual, with this print, device beeps a special tone.
but...
on every request i send with a "print" my device have to do something and send me a response.
i can't read this response...
can you help me? other languages are welcome too.
thank you in advance,
mbertazz
Quote & Reply
|
The Following User Says Thank You to mbertazz For This Useful Post:
mbertazz
View Public Profile
Send a private message to mbertazz
Find all posts by mbertazz