Can someone please point me to an example of the bind, listen, and
accept structures and parameters for setting up an RFCOMM socket using
file descriptor (fd) received from the NewConnection() method in
profile-api.txt?
I tried the setup in "Bluetooth Essentials for Programmers," omitting
the socket() call (since bluez provides the fd) but it's crashing right
at the bind() call (never reaches the "bt 0.1" fprintf()). See
attachment.
--
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com
Thanks!
--Randy
Luiz Augusto von Dentz <[email protected]> writes:
> Hi Randy,
>
> On Mon, Mar 4, 2013 at 6:42 PM, Randy Yates <[email protected]> wrote:
>> Can someone please point me to an example of the bind, listen, and
>> accept structures and parameters for setting up an RFCOMM socket using
>> file descriptor (fd) received from the NewConnection() method in
>> profile-api.txt?
>>
>> I tried the setup in "Bluetooth Essentials for Programmers," omitting
>> the socket() call (since bluez provides the fd) but it's crashing right
>> at the bind() call (never reaches the "bt 0.1" fprintf()). See
>> attachment.
>
> You don't have to bind, the socket is already in connected state so
> you can already do read/write operations. Btw, don't forget to respond
> to NewConnection otherwise it will timeout and bluetoothd will
> probably disconnect the fd.
--
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com
Hi Randy,
On Mon, Mar 4, 2013 at 6:42 PM, Randy Yates <[email protected]> wrote:
> Can someone please point me to an example of the bind, listen, and
> accept structures and parameters for setting up an RFCOMM socket using
> file descriptor (fd) received from the NewConnection() method in
> profile-api.txt?
>
> I tried the setup in "Bluetooth Essentials for Programmers," omitting
> the socket() call (since bluez provides the fd) but it's crashing right
> at the bind() call (never reaches the "bt 0.1" fprintf()). See
> attachment.
You don't have to bind, the socket is already in connected state so
you can already do read/write operations. Btw, don't forget to respond
to NewConnection otherwise it will timeout and bluetoothd will
probably disconnect the fd.
--
Luiz Augusto von Dentz