Some fixme in bluetooth.c #6794
Replies: 1 comment
-
Posted at 2017-11-17 by @gfwilliams Yes, I ifdef'd the code because I was trying to do a big refactor quite quickly and was trying to make as few breaking changes as possible - so you'd have an easier way to get started with your port :) It would definitely make sense to move those to calls in For the functions, I would just google the function name in the nordic docs...
Sets the raw data packet that the device should advertise.
Work out what the raw advertising data should actually be, based on what is fed in. The ESP32 SDK probably has something similar. However this is actually platform independent code, and is actually pretty simple if you look inside adv_data_encode (once you get past all the checks and call soup). It would make a lot more sense to do all the encoding inside For instance there's a decoder for that same advertising data on line 1300 ( Posted at 2017-11-20 by JumJum After digging through ADV-functions for esp32 I found these only :
As expected esp_ble_adv_data_t is different to ble_advdata_t. There is some overlapping and I'm sure to find a way to get it working But I cannot find anything like adv_data_encode. Looks like it happens behind the curtain. Posted at 2017-11-20 by @gfwilliams
It calls into other functions to include the relevant advertising bits and bobs. They're all pretty simple once you strip away all the checks though - for example services is this: https://github.com/espruino/Espruino/blob/059eb0a3e6031e065dea5bc1101561d4b95b8e9c/targetlibs/nrf5x/components/ble/common/ble_advdata.c#L451 So it just adds an array that's So yes, you'd need to rebuild Posted at 2017-11-23 by JumJum Thanks for the feedback, each information is its own step for my (hopefully better) understanding. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-11-16 by JumJum
Working on NRF.setAdvertizing there are some FIXME on the road (jswrap_bluetooth.c)
Actually I reach these:
For the first one, there is an idea what to do.
The others are some more questionmarks on a long long way.
Generally, I would prefer not to have device related code seperated by #if in a core file
@gordon, whats your point to that, could we move them to bluetooth.c ?
Beta Was this translation helpful? Give feedback.
All reactions