* Exchanging data over Bluetooth Classic
@ 2017-01-26 17:25 Dario Teixeira
2017-02-01 19:51 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Dario Teixeira @ 2017-01-26 17:25 UTC (permalink / raw)
To: linux-bluetooth
Hi,
Here's the situation: I want to use a smart phone to communicate with
a small embedded device (ED). Unfortunately the ED is running a very
old kernel (3.10.93) which does not support Bluetooth Low Energy.
Therefore, if I am to use Bluetooth it will have to be BT Classic.
The communication is pretty straightforward: just a couple of RPC
calls using JSON. Both the requests and the replies are reasonably
short. The entire exchange can be summarised as follows:
Phone: Here's request #1 (JSON text).
ED: Okay, here's reply #1 (JSON text).
Phone: Here's request #2 (JSON text).
ED: Okay, here's reply #2 (JSON text).
Now, I have a couple of related questions:
a) I presume there's no other option than using RFCOMM, right?
b) I know that the first Google hit for "Bluetooth programming"
is hopelessly out of date [1], because Bluez now uses DBus.
However, where's the Bluez documentation for RFCOMM via DBus?
I could only find this page for Bluez documentation [2],
but RFCOMM is not mentioned.
Thanks in advance for your time!
Best regards,
Dario Teixeira
[1] https://people.csail.mit.edu/albert/bluez-intro/
[2] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exchanging data over Bluetooth Classic
2017-01-26 17:25 Exchanging data over Bluetooth Classic Dario Teixeira
@ 2017-02-01 19:51 ` Marcel Holtmann
2017-02-06 14:13 ` Dario Teixeira
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2017-02-01 19:51 UTC (permalink / raw)
To: Dario Teixeira; +Cc: linux-bluetooth
Hi Dario,
> Here's the situation: I want to use a smart phone to communicate with
> a small embedded device (ED). Unfortunately the ED is running a very
> old kernel (3.10.93) which does not support Bluetooth Low Energy.
> Therefore, if I am to use Bluetooth it will have to be BT Classic.
>
> The communication is pretty straightforward: just a couple of RPC
> calls using JSON. Both the requests and the replies are reasonably
> short. The entire exchange can be summarised as follows:
>
> Phone: Here's request #1 (JSON text).
> ED: Okay, here's reply #1 (JSON text).
> Phone: Here's request #2 (JSON text).
> ED: Okay, here's reply #2 (JSON text).
>
> Now, I have a couple of related questions:
>
> a) I presume there's no other option than using RFCOMM, right?
>
> b) I know that the first Google hit for "Bluetooth programming"
> is hopelessly out of date [1], because Bluez now uses DBus.
> However, where's the Bluez documentation for RFCOMM via DBus?
> I could only find this page for Bluez documentation [2],
> but RFCOMM is not mentioned.
you can use L2CAP or RFCOMM sockets to transfer data. Or you can use OBEX as provided by obexd if it is more file related transfer you are after.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exchanging data over Bluetooth Classic
2017-02-01 19:51 ` Marcel Holtmann
@ 2017-02-06 14:13 ` Dario Teixeira
0 siblings, 0 replies; 3+ messages in thread
From: Dario Teixeira @ 2017-02-06 14:13 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi,
> you can use L2CAP or RFCOMM sockets to transfer data. Or you can use
> OBEX as provided by obexd if it is more file related transfer you are
> after.
Thanks for the reply. What is the most convenient way to programatically
use L2CAP or RFCOMM? There is one guide [1], but I reckon it's out of
date
since Bluez made the transition to DBUS. I heard it's possible to
create
a character device for RFCOMM sockets; using them programatically them
reduces to the usual open/read/write/close of a file descriptor. Is this
still possible? (Mind you, Bluez docs are laconic in the extreme!)
Best regards,
Dario Teixeira
[1] https://people.csail.mit.edu/albert/bluez-intro/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-06 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-26 17:25 Exchanging data over Bluetooth Classic Dario Teixeira
2017-02-01 19:51 ` Marcel Holtmann
2017-02-06 14:13 ` Dario Teixeira
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.