GATT 133 connection error with nimple_gatt example

Hi all

I get a EBYTE E105-BT5010a-TB and I’m using it to study RIOT-OS.

I’m building nimple_gatt example with:

make BOARD=e104-bt5010a-tb examples/nimple_scanner

It builds, loads and starts fine. Using a Mi6 Android phone ( Android version 9 ) and nRF_Connact app I’m able to get the “NimBLE on RIOT” in my list. But as I try to connect I get GATT ERR 133.

Adding a little bit of printf in the example code I can see gap_event_cb called twice: BLE_GAP_EVENT_CONNECT at first and a DISCONNECT immediately after that.

At this point I’m a little bit stuck as I have not a clear idea about how to debug this problem from here. For example, I’m not able to activate or generally speaking how to use BLE_HS_LOG. I have the phone side nRf_Connect log but it does not say so match.

Any suggestions?

Thanks in advance for any possible support and for the amazing work made here

Michele

Apparently that is an error you get when the device is out of range. I haven’t tried nimble_scanner yet. I am not sure, if you are supposed to be able to connect to it. I don’t see anything implemented in the scanner to handle connects to the device. Or did you add something to the example? If you want to tinker with NimBLE in an easy way, I highly recommend to use the IPv6 over BLE stack. It’s quite easy to connect your linux machine to your MCU and interact with it. The IPv6 stack is also quite easy to use.

If you want to go the IPv6 over BLE route: Take gnrc_networking and flash it to your MCU. It should take NimBLE, since it is the only available stack. On the MCUs shell, you just need to use ble adv and you can connect from Linux to it. There is a tutorial for it: https://github.com/RIOT-OS/RIOT/blob/master/pkg/nimble/README.ipv6-over-ble.md

Many thanks about the ipv6 suggestion, I know about that example and I’ll give it a try soon. What about BLE_HS_LOG macros used in NimBLE: is it possible to activate them as building the Nimble from a RIOT-OS example? How to do that?