Notices


Reply
Thread Tools
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.
Yes, this app is very similar to a gps-based application, but...

what i did:

* hcitool scan
and find reader's bt address , OK
* rfcomm connect 0 [BT ADDRESS] 1 &
and connect to bt reader creating /dev/rfcomm0 , OK

I have to use a perl script to open the serial port, but there's something wrong...

I think it's a serial port setting problem: how can i set flow control, speed etc.?

BtPlugin and other tool do automatically, but i have to do it using command line or using perl.

My perl script (php too) worked well on windows/linux uding mode/setserial using a pcmcia device on a serial port...

Can you help me?
Thank you in advance,
mbertazz
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#2
The advice I can give to you off the bat is to double-check your channel. Different channels connect to different services.

Other than that I had no problem talking to my cellphone using Python and RFCOMM.
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#3
Probably even easier with Python and PyBluez, too.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Originally Posted by mbertazz
I think it's a serial port setting problem: how can i set flow control, speed etc.?
Such parameters make no sense with bluetooth. They can be set but they are ignored. Problem is probably somewhere else (local or remote rfcomm channel number). You can't use same local port for more connections so choose something unique on n770 side. Also try sdptool browse to check what ports/services are available on the remote device.
 
Posts: 7 | Thanked: 1 time | Joined on Mar 2006
#5
thank you very much: i don't care about i/o settings and i see is a permission problem, resolved with nochroot and/or chmod on /dev/rfcomm0

bye
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:19.