Topics

Zephyr Low Level BLE Radio question


steven ghekiere <stevenghekiere@...>
 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least.

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 


Marciano Preciado <marciano@...>
 

Hey Steven!

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

I hope somebody can help us out.

Best,
Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 
Hey there,
 
I’m a student working on a project using a Nordic nRF52840 device.
 
The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.
More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.
 
I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 
I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.
 
Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.
Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.
 
Looking forward to your answer,
Steven Ghekiere
 
 
p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.
 


steven ghekiere <stevenghekiere@...>
 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.



On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 


Chettimada, Vinayak Kariappa
 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 


steven ghekiere <stevenghekiere@...>
 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 


Chettimada, Vinayak Kariappa
 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 


steven ghekiere <stevenghekiere@...>
 

Hey Vinayak,

 

Sorry for the late reply, been busy working today

 

> There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

I dug a bit deeper into the code and I’m still confused.

 

Dyou mean the code on line 796:

aux_ptr->chan_idx = 0U;

 

So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Maybe I can make things more clear, I need to create my own frequency hopping algorithm. To do this my first step would be to send data over a set frequency (I thought). Afterwards I can add logic to the channel selection etc.

 

Thanks a lot, really!

 

Steven

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 5:30
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 

 


Chettimada, Vinayak Kariappa
 

> What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

Yes., thats against the specification and inter-operability.

 

> So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

You are welcome to contribute the implementation if you desire so.

 

-Vinayak

 

 

From: steven ghekiere <stevenghekiere@...>
Sent: 16 December 2020 19:02
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Vinayak,

 

Sorry for the late reply, been busy working today

 

> There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

I dug a bit deeper into the code and I’m still confused.

 

Dyou mean the code on line 796:

aux_ptr->chan_idx = 0U;

 

So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Maybe I can make things more clear, I need to create my own frequency hopping algorithm. To do this my first step would be to send data over a set frequency (I thought). Afterwards I can add logic to the channel selection etc.

 

Thanks a lot, really!

 

Steven

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 5:30
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 

 


steven ghekiere <stevenghekiere@...>
 

> Yes., thats against the specification and inter-operability.

 

Since I’m changing the behaviour of the BLE protocol quite a bit with this, this means that it won’t comply to the Bluetooth specs anyway? Meaning the first advertisement can be omitted if I’d really like so?

 

> Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

 

I’m not sure what ‘apply’ means. You’re sadv_uggesting I create a seperate “ull_adv_aux_ptr“ function and use this by changing the Zephyr code? Or creating another copy of the ll_aux.c and make sure I use that version?

 

And if you guys would be interested, I’d be happy to share this (once finished of course, if its worth anything).

It’s a bit more than just a frequency hopping change, but since this is the only low level thing, it’s been a blocker for weeks now.

 

Sorry for all the questions, I don’t really have any other person to ask such questions.

For sure first time dealing with such low level stuff…

 

Steven

 

 

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 19:12
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

Yes., thats against the specification and inter-operability.

 

> So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

You are welcome to contribute the implementation if you desire so.

 

-Vinayak

 

 

From: steven ghekiere <stevenghekiere@...>
Sent: 16 December 2020 19:02
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Vinayak,

 

Sorry for the late reply, been busy working today

 

> There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

I dug a bit deeper into the code and I’m still confused.

 

Dyou mean the code on line 796:

aux_ptr->chan_idx = 0U;

 

So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Maybe I can make things more clear, I need to create my own frequency hopping algorithm. To do this my first step would be to send data over a set frequency (I thought). Afterwards I can add logic to the channel selection etc.

 

Thanks a lot, really!

 

Steven

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 5:30
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 

 

 


steven ghekiere <stevenghekiere@...>
 

 

Hi there

 

Still waiting for your answer!

 

Thanks,

Steven

 

From: steven ghekiere
Sent: woensdag 16 december 2020 20:46
To: Chettimada, Vinayak
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> Yes., thats against the specification and inter-operability.

 

Since I’m changing the behaviour of the BLE protocol quite a bit with this, this means that it won’t comply to the Bluetooth specs anyway? Meaning the first advertisement can be omitted if I’d really like so?

 

> Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

 

I’m not sure what ‘apply’ means. You’re sadv_uggesting I create a seperate “ull_adv_aux_ptr“ function and use this by changing the Zephyr code? Or creating another copy of the ll_aux.c and make sure I use that version?

 

And if you guys would be interested, I’d be happy to share this (once finished of course, if its worth anything).

It’s a bit more than just a frequency hopping change, but since this is the only low level thing, it’s been a blocker for weeks now.

 

Sorry for all the questions, I don’t really have any other person to ask such questions.

For sure first time dealing with such low level stuff…

 

Steven

 

 

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 19:12
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

Yes., thats against the specification and inter-operability.

 

> So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

You are welcome to contribute the implementation if you desire so.

 

-Vinayak

 

 

From: steven ghekiere <stevenghekiere@...>
Sent: 16 December 2020 19:02
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Vinayak,

 

Sorry for the late reply, been busy working today

 

> There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

I dug a bit deeper into the code and I’m still confused.

 

Dyou mean the code on line 796:

aux_ptr->chan_idx = 0U;

 

So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Maybe I can make things more clear, I need to create my own frequency hopping algorithm. To do this my first step would be to send data over a set frequency (I thought). Afterwards I can add logic to the channel selection etc.

 

Thanks a lot, really!

 

Steven

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 5:30
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <
vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc:
users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <
marciano@...>
Cc:
users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.

 

 

 

 

 

 

 


Chettimada, Vinayak Kariappa
 

> Since I’m changing the behaviour of the BLE protocol quite a bit with this, this means that it won’t comply to the Bluetooth specs anyway? Meaning the first advertisement can be omitted if I’d really like so?

 

If you do not comply to Bluetooth standards, if your changes void backwards compatibility and interoperability, do not use the term to associate your changes.

 

> I’m not sure what ‘apply’ means. You’re sadv_uggesting I create a seperate “ull_adv_aux_ptr“ function and use this by changing the Zephyr code? Or creating another copy of the ll_aux.c and make sure I use that version?

 

I mean, assign the channel index derived from your algorithm in the function instead of the the now hardcoded value of 0, (the fixme comment thats present).

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 18 December 2020 21:04
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hi there

 

Still waiting for your answer!

 

Thanks,

Steven

 

From: steven ghekiere
Sent: woensdag 16 december 2020 20:46
To: Chettimada, Vinayak
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> Yes., thats against the specification and inter-operability.

 

Since I’m changing the behaviour of the BLE protocol quite a bit with this, this means that it won’t comply to the Bluetooth specs anyway? Meaning the first advertisement can be omitted if I’d really like so?

 

> Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

 

I’m not sure what ‘apply’ means. You’re sadv_uggesting I create a seperate “ull_adv_aux_ptr“ function and use this by changing the Zephyr code? Or creating another copy of the ll_aux.c and make sure I use that version?

 

And if you guys would be interested, I’d be happy to share this (once finished of course, if its worth anything).

It’s a bit more than just a frequency hopping change, but since this is the only low level thing, it’s been a blocker for weeks now.

 

Sorry for all the questions, I don’t really have any other person to ask such questions.

For sure first time dealing with such low level stuff…

 

Steven

 

 

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 19:12
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

Yes., thats against the specification and inter-operability.

 

> So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Not override, but apply the channel_index from your own frequency hopping algorithm here. This will be compliant as a implementation specific channel selection.

You are welcome to contribute the implementation if you desire so.

 

-Vinayak

 

 

From: steven ghekiere <stevenghekiere@...>
Sent: 16 December 2020 19:02
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Vinayak,

 

Sorry for the late reply, been busy working today

 

> There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

What you’re saying is sending only the bigger second part of the message is against Bluetooth’s specifications?

 

I dug a bit deeper into the code and I’m still confused.

 

Dyou mean the code on line 796:

aux_ptr->chan_idx = 0U;

 

So what you’re suggesting is that I somehow override this function, or change the behaviour myself?

 

Maybe I can make things more clear, I need to create my own frequency hopping algorithm. To do this my first step would be to send data over a set frequency (I thought). Afterwards I can add logic to the channel selection etc.

 

Thanks a lot, really!

 

Steven

 

From: Chettimada, Vinayak
Sent: woensdag 16 december 2020 5:30
To: steven ghekiere
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

> I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

There are no standard HCI interface to set application defined radio frequency, this will be against the Bluetooth specifications.

 

Refer to Bluetooth Specification V5.2, Vol 6, Part B, section 4.4.2.1 Advertising channel index selection:

 

Advertising events use three predefined primary advertising physical channels.

Primary advertising channel indices are either used or unused.

For AUX_ADV_IND and AUX_CHAIN_IND PDUs, the secondary advertising

channel index used in the Channel Index subfield of the AuxPtr field is

implementation specific. It is recommended that sufficient channel diversity is

used to avoid collisions.

 

In the Zephyr BLE controller, advertising extensions is experimental, and the function that fills the advertising channel can be found here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L788

 

 

>Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.

 

Correct.

 

>Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

These bits decide the `advertising event` on the primary channels, to use channel 37, 38, and 39. The `small header` is repeated in these channels inside a standard `advertising event`, and that is what is selected by these bits.

For further details please refer to Bluetooth specifications.

 

-Vinayak

 

From: steven ghekiere <stevenghekiere@...>
Sent: 15 December 2020 20:51
To: Chettimada, Vinayak <vinayak.kariappa.chettimada@...>; Marciano Preciado <marciano@...>
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

 

Hey Vinayak,

 

Thanks for the reply!

 

I had a quick look at the extended advertising links you mentioned.

 

I assumed the general GAP protocol does similar stuff (as you showed) but doubted that it could just set data on a set channel.

I still do not see any parameter where I can set my own frequency… This is the main part that I have been working on for a while now.

Does this mean I DO have to use the ll_sw files?

 

(Wrote this as I was reading through your provided documentation)

As I understand, the ‘bt_le_adv_param parameter of the create method’ has a 32 bit options field (0-17 actually used?).

In these options we have:

  • Bit 10 telling to make use of the extended advertising (which I assume are the 255 byte payload messages). It usually sends a smaller header packet first on the primary channels that points to the actual data packet.
  • Bit 15-17 disable the advertising on the normal advertising channels. Does this mean that the previous process behaves differently? Or just skip the first ‘small header’ part?

 

 

Thanks!

 

Steven

 

 

From: Chettimada, Vinayak
Sent: dinsdag 15 december 2020 20:17
To: stevenghekiere@...; Marciano Preciado
Cc: users@...
Subject: RE: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hi,

 

If you are building a Bluetooth Low Energy application using Zephyr, then you should use the public APIs, not call internal subsystem functions unless you know what you are doing.

 

I think you are looking for the below mentioned options when calling bt_le_ext_adv_create (https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.bt_le_ext_adv_create)

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

https://docs.zephyrproject.org/latest/reference/bluetooth/gap.html#c.@...

 

These are for the primary advertising channels, auxiliary PDU channels selection is controller implementation specific.

 

If you are not using Bluetooth Low Energy stack, then you should refer to nRF52840 product specification for implementing your proprietary radio protocol.

 

>The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too

 

Contributions to improve the code, comments and add new features are always welcome.

 

Regards,

Vinayak

 

 

From: users@... <users@...> On Behalf Of steven ghekiere via lists.zephyrproject.org
Sent: 15 December 2020 19:48
To: Marciano Preciado <marciano@...>
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Marciano,

 

Thanks for the quick reply!

I’d have to agree on the acronyms and such.

 

What do you mean that ‘somebody can help us’?

 

Thanks

 

Steven

 

 

 

From: Marciano Preciado
Sent: dinsdag 15 december 2020 19:15
To: stevenghekiere@...
Cc: users@...
Subject: Re: [Zephyr-users] Zephyr Low Level BLE Radio question

 

Hey Steven!

 

I’d have to agree! The low-level bluetooth controller is tragic. I’m sure it’s incredibly useful, but the use of nicknames and acronyms at every corner are not useful. Perhaps if there were comments that could help too, but there aren’t. 😭

 

I hope somebody can help us out.

 

Best,

Marciano Preciado
Embedded Systems Engineer
PassiveLogic Inc.
Mobile 801-800-1184

This e-mail and any files transmitted with it may contain confidential or legally privileged information of PassiveLogic and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.

 

On Dec 15, 2020, at 7:11 AM, steven ghekiere via lists.zephyrproject.org <stevenghekiere=hotmail.com@...> wrote:

 

 

Hey there,

 

I’m a student working on a project using a Nordic nRF52840 device.

 

The past month or so I’ve been trying countless times to implement some BLE low level methods, first using Nordic SDK and now Zephyr.

More specific, I’d like to be able to set and receive the frequency to transmit data using the bigger 255 byte non-connectable broadcast beacons.

 

I asked about this on the Nordic SDK QA, which pointed me to use the newer low level BLE Zephyr API. (https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/bluetooth/controller/ll_sw/nordic)

I got some advice in the #Bluetooth channel in the Zephyr Project Slack, who pointed me to use the “lll_chan_set()” method.

However documentation is lacking, to say the least. 

I’ve been struggling and doing this the trial-and-error way but I simply cannot make sure I send something correctly if I can’t receive anything.

 

Therefore, I would really really appreciate it for some clear guidelines, documentation, code snippets, or maybe even a chat on Slack with someone who knows how this works.

Since I’m working with deadlines I’m getting quite stressed and agitated so I REALLY would appreciate some help 😊.

 

Looking forward to your answer,

Steven Ghekiere

 

 

p.s: You can find me on the Zephyr Project Slack (email steven.ghekiere@..., name Steven Ghekiere). Feel free to respond there if this seems easier.