Re: [Bluez-users] trying to send data at HCI level

Marcel Holtmann
2005-02-22T09:56:21Z

Hi Mohan,

> Thank you for your valuable information. I am new to
> Bluetooth. Anyhow I have written L2CAP level send & recv program
> successfully. In the L2CAP level, on the sending end, I created a
> socket and transmitted the data using "send" function. Whereas on recv
> side I created a small server program, which listens for connection
> and receives the data using "read" function. I am trying to use the
> same functions in the HCI level also.
> Can I use the same send and recv functions in the HCI
> level after creating the HCI RAW sockets? If it is not possible, could
> you please tell me which function I have to use to send and recv the
> data in the HCI level?

this won't work, because HCI is a raw socket and L2CAP is sequential
packet socket. If you wanna use HCI then you have to conform to the H:4
specification and send everything in this format.