2005-09-29 17:47:35

by Robert Wlaschin

[permalink] [raw]
Subject: RE: [Bluez-users] Trouble communicating to a non-discoverable BT device

I am able to get the rfcomm tool to connect with this message:
rfcomm0: 00:A0:96:0D:3B:80 channel 1 config [tty-attached]

but when I attempt to echo commands like this:
echo Send Me > /dev/rfcomm0

I get this error: ./detectbluetoothdevice.sh: 108: cannot create
/dev/rfcomm0: Host is down

How do I find out why I am getting this error?


-----Original Message-----
From: Robert Wlaschin [mailto:[email protected]]
Sent: Wednesday, September 28, 2005 5:04 PM
To: '[email protected]'
Subject: [Bluez-users] Trouble communicating to a non-discoverable BT devi
ce




I have a slightly different problem than what I've seen posted in the
mailing list thus far, please point me in the right direction if I have
misspoke. I am attempting to create an Ash script (on Busybox, Arm
processor -- uClib cross compile, Deb Kernel 2.6.10) w/ bluez-libs-2.19, and
bluez-utils-2.19. The system I am using is semi-embedded and has a limited
amount of space for various utilities.

My BT device is non-discoverable, I am unable to change this. Therefore, I
am forced to wait until I am signaled by the device to attempt a connection.
This device is also battery operated and the Manufacturer designed it to
conserve power by allowing only a minimal time slice for the device to link
with my system. Once I have a connection I have to read the data by sending
ACK's back across the device.

I was attempting to create a script that watched the system log messages
dumped by hcid and sdpd. I was able to create a script using rfcomm's bind
and connect, which allowed me to read from /dev/rfcomm0 but I was unable to
send without receiving a 'Host is down' error. I did some reading and it
was suggested that both the devices were setup as clients and this was why I
was receiving this message. Another suggestion was to use rfcomm's listen
to setup the device. I have attempted an implementation of that but I
receive a Disconnect extremely quickly and I am having difficulty detecting
when the listen connects to my device so I can extract the BT address and
other pertinent data.

First off am I even heading in the correct direction, should I use the
rfcomm listen command, instead of the connect? Is there an easier way to do
what I need to get done, using already created tools I don't know about? Do
I need to run the sdptool and add the SP interface? Where are the doc's
that explain how to use the rfcomm and sdptool utils -- the man pages have
various information/knowledge gaps?

Thanks,
Robert