2015-02-10 13:52:25

by Ujjal Roy

[permalink] [raw]
Subject: Query: HCI_RAW mode in Kernel 3.18

I have a question regarding RAW mode.

Is it still possible to use RAW mode in Kernel 3.18? If so how to use
the RAW mode? Please help me. I had an app which used to change the
the mode to RAW (HCISETRAW command). This feature is removed from
Kernel. Please reply and help me if there is any way to use the RAW
mode.

Thanks,
UjjaL Roy


2015-02-12 19:20:15

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Query: HCI_RAW mode in Kernel 3.18

Hi Ujjal,

>> what you want is to use the HCI User Channel if you need direct access to the HCI layer of a controller. Look at tools/3dsp.c and tools/ibeacon.c for examples on how to use it. In src/shared/hci.c you find the internal details of the HCI User Channel. It is a lot cleaner way of using a controller's HCI interface exclusively.
>
> So, can you please help me to write an app? Is it possible to compile
> an app without using the bluez? I mean without placing and compiling
> the app inside bluez source code.
> If I want to create an app then what library should I have to include
> to compile successfully. Please suggest a way to build my own app to
> use user channel.

look at src/shared/hci.c and the bt_hci_new_user_channel(). That shows you on how to open the HCI User Channel. If you have it, you can send H:4 framed HCI commands, events, ACL and SCO data. It is one packet per read() / write() and thus pretty simple straight forward.

You can easily do this outside of bluez.git. The advantage of src/shared/hci.c is that it gives you the basic HCI command + event handling. However you do not have to use it.

Regards

Marcel


2015-02-12 09:02:20

by Ujjal Roy

[permalink] [raw]
Subject: Re: Query: HCI_RAW mode in Kernel 3.18

> what you want is to use the HCI User Channel if you need direct access to=
the HCI layer of a controller. Look at tools/3dsp.c and tools/ibeacon.c fo=
r examples on how to use it. In src/shared/hci.c you find the internal deta=
ils of the HCI User Channel. It is a lot cleaner way of using a controller'=
s HCI interface exclusively.
>
> Regards
>
> Marcel
>

So, can you please help me to write an app? Is it possible to compile
an app without using the bluez? I mean without placing and compiling
the app inside bluez source code.
If I want to create an app then what library should I have to include
to compile successfully. Please suggest a way to build my own app to
use user channel.

2015-02-10 14:21:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Query: HCI_RAW mode in Kernel 3.18

Hi Ujjal,

> I have a question regarding RAW mode.
>
> Is it still possible to use RAW mode in Kernel 3.18? If so how to use
> the RAW mode? Please help me. I had an app which used to change the
> the mode to RAW (HCISETRAW command). This feature is removed from
> Kernel. Please reply and help me if there is any way to use the RAW
> mode.

what you want is to use the HCI User Channel if you need direct access to the HCI layer of a controller. Look at tools/3dsp.c and tools/ibeacon.c for examples on how to use it. In src/shared/hci.c you find the internal details of the HCI User Channel. It is a lot cleaner way of using a controller's HCI interface exclusively.

Regards

Marcel