mbertazz
2006-08-23, 21:09
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
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