All of lore.kernel.org
 help / color / mirror / Atom feed
* Replacement for rfcomm.conf
@ 2015-01-11 12:55 Stefan Wiehler
  2015-01-11 22:41 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Wiehler @ 2015-01-11 12:55 UTC (permalink / raw)
  To: linux-bluetooth

Hello everybody,

I recently added a Bluetooth dongle to a RS232 device to get readouts
from a remote location. This is working fine as long as I execute
"rfcomm bind" after each restart.

However, when I wanted to automate this process by using a rfcomm.conf
file as suggested by several guides on the web [1], I realized that the
corresponding code has been removed from the rfcomm tool several years
ago [2].

I tried to use udev as a replacement by writing a rule which executes
rfcomm after pairing, but it seems like sysfs does not expose
information about coupled devices (udevadm info -a -p
/sys/class/bluetooth/hci0).

Is it possible to solve that problem using udev? Or are there any other
best practices? Thank you for your consideration.

Kind regards,

Stefan Wiehler

[1] http://askubuntu.com/a/252235
[2] 
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=5bec57420bd57f86d61b2919450d182f3407facf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Replacement for rfcomm.conf
  2015-01-11 12:55 Replacement for rfcomm.conf Stefan Wiehler
@ 2015-01-11 22:41 ` Marcel Holtmann
  2015-01-12  5:08   ` Stefan Wiehler
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2015-01-11 22:41 UTC (permalink / raw)
  To: Stefan Wiehler; +Cc: linux-bluetooth

Hi Stefan,

> I recently added a Bluetooth dongle to a RS232 device to get readouts
> from a remote location. This is working fine as long as I execute
> "rfcomm bind" after each restart.
> 
> However, when I wanted to automate this process by using a rfcomm.conf
> file as suggested by several guides on the web [1], I realized that the
> corresponding code has been removed from the rfcomm tool several years
> ago [2].
> 
> I tried to use udev as a replacement by writing a rule which executes
> rfcomm after pairing, but it seems like sysfs does not expose
> information about coupled devices (udevadm info -a -p
> /sys/class/bluetooth/hci0).
> 
> Is it possible to solve that problem using udev? Or are there any other
> best practices? Thank you for your consideration.

just create an init script of systemd service file and run the rfcomm bind command manually. As long as you know the remote BD_ADDR of the device you want to connect to and the RFCOMM channel of the SSP service on that device, you can create a binding. No local controller has to be present to create a RFCOMM binding.

Regards

Marcel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Replacement for rfcomm.conf
  2015-01-11 22:41 ` Marcel Holtmann
@ 2015-01-12  5:08   ` Stefan Wiehler
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Wiehler @ 2015-01-12  5:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

 > just create an init script of systemd service file and run the rfcomm
 > bind command manually. As long as you know the remote BD_ADDR of the
 > device you want to connect to and the RFCOMM channel of the SSP
 > service on that device, you can create a binding. No local controller
 > has to be present to create a RFCOMM binding.

How embarrassing that I didn't realize that by myself. Indeed this was
the simplest solution for the problem. Thank you for your help!

Kind regards,

Stefan Wiehler

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-12  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-11 12:55 Replacement for rfcomm.conf Stefan Wiehler
2015-01-11 22:41 ` Marcel Holtmann
2015-01-12  5:08   ` Stefan Wiehler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.