Comments (4)
The unknown event types seems to be reported by Linux HCI socket interface:
I did a quick experiment and see that only lower 4 bits seems to be valid and changing code:
diff --git a/nimble/host/src/ble_hs_hci_evt.c b/nimble/host/src/ble_hs_hci_evt.c
index e7af2243..3096b4fc 100644
--- a/nimble/host/src/ble_hs_hci_evt.c
+++ b/nimble/host/src/ble_hs_hci_evt.c
@@ -481,7 +481,7 @@ ble_hs_hci_evt_le_adv_rpt(uint8_t subevent, const void *data, unsigned int len)
data += sizeof(rpt) + rpt->data_len + 1;
- desc.event_type = rpt->type;
+ desc.event_type = rpt->type & 0xF;
desc.addr.type = rpt->addr_type;
memcpy(desc.addr.val, rpt->addr, BLE_DEV_ADDR_LEN);
desc.length_data = rpt->data_len;
@@ -510,7 +510,7 @@ ble_hs_hci_evt_le_dir_adv_rpt(uint8_t subevent, const void *data, unsigned int l
desc.length_data = 0;
for (i = 0; i < ev->num_reports; i++) {
- desc.event_type = ev->reports[i].type;
+ desc.event_type = ev->reports[i].type & 0xF;
desc.addr.type = ev->reports[i].addr_type;
memcpy(desc.addr.val, ev->reports[i].addr, BLE_DEV_ADDR_LEN);
desc.direct_addr.type = ev->reports[i].dir_addr_type;
seems to solve the issue. I'm not sure if that is a correct solution
from mynewt-nimble.
Hi,
this is odd, 0xa1 doesn't even match report type from extended advertising report... what controller is this?
As for the patch, it looks OK, please send PR (we may discuss if this should be under some ifdef ie, for non-mynewt controllers only, but this can happen in PR itself)
from mynewt-nimble.
I will check the controller model. Actually in this case I'm running Ubuntu 20.04 on MacBook Pro :)
I will get the controller details and also will check if this is a driver issue. Also I will check if the same happens if I run exactly the same OS (installed on a portable SSD) on a Dell laptop.
from mynewt-nimble.
Seems to be Bluetooth driver instability when running Ubuntu on MacBook.
from mynewt-nimble.
Related Issues (20)
- reserved identifier violation HOT 1
- Where can I find documentation for known vulnerabilities
- NimBLE supports to disable BLE GATT client or server HOT 1
- NimBLE sample build error with apache-mynewt-core HOT 1
- Broken Link HOT 1
- How to trace function calls in controller code
- Document NimBLE Vendor specific HCI commands and events
- Is it possible to run Nimble auto-pts on linux? HOT 1
- Reducing MSYS_1_BLOCK_SIZE breaks SC Pairing DH key exchange HOT 5
- nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. HOT 4
- Ability for ble_gatts_notify_custom() to wait for new packet buffers
- Change Macro from min to MIN in lpn.c
- controller/iso: ISO broadcast support without encryption HOT 1
- Error code of ble_gap_adv_set_data function HOT 2
- Possibility to read IO capability of initiating device
- `ble_gatts_clt_cfg_access(...)` odd return values casted from `BLE_HS_E...` to `BLE_ATT_ERR_...` on storage overflow
- L2CAP COC: Removing a server HOT 7
- L2CAP COC: Preventing a race condition HOT 4
- linux_blemesh example HOT 8
- npl/linux: Callout gets stuck in active state
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mynewt-nimble.