This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51 to nRF52 migration, can't discover services

Hi. I have some nRF51 firmware I'm migrating to the nRF52. It's a peripheral with bunch of vendor specific services, using SDK 13.0.0 and SD 132 v4.0.2.

My code builds and runs and the device advertises OK. I can see it in the nRF Connect app for Android, and in my own Android app. But when I connect to it and try to discover services, nothing happens.

I've been through the migration guide (infocenter.nordicsemi.com/index.jsp and can't see anything I've missed.

How do I debug the service discovery/connection issue? How do I get logging out of the BLE sources in the SDK? There are no log flags for these in sdk_config.h.

The BLE_GAP_EVT_CONNECTED event is happening, I can see that much.

Edit: Adding two Wireshark captures, one when connecting from our custom Android app, the other when connecting from the nRF Connect Android app.

bike-tracker-nRF52-discovery-from-custom-android-app-2017-07.pcapng

bike-tracker-nRF52-discovery-from-nrf-connect-android-app-2017-07.pcapng

Edit: Adding two more Wireshark captures.

Capture 3: Connection from the nRF Connect Android app to our (Bike Tracker) peripheral app. Same as above, but another attempt at getting a good capture. Shows nothing but empty PDUs after the CONNECT_REQ in this case.

bike-tracker-nRF52-discovery-from-nrf-connect-android-app-2017-07-b.pcapng

Capture 4: Connection from the nRF Connect Android app to the ble_app_hrs example app in SDK 13.0.0. For comparison. Shows service discovery starting right after the connection.

ble_app_hrs-nRF52-discovery-from-nrf-connect-android-app-2017-07.pcapng

Parents
  • I have to go for caching as well - there's nothing on the nordic side in those traces, the connection has been made, the peripheral is responding on time when requested, it's the central which has sent out no single packet to ask any questions.

    @endnode to remove bonding on iPhone you just select the one device in the list and say 'forget this device', no need to remove all connections, I've done this a lot

    @eliot simple test - generate yourself a random MAC address before starting up the stack and set it, then test, if it's caching that'll prove it, if it's not I'm fairly out of ideas.

Reply
  • I have to go for caching as well - there's nothing on the nordic side in those traces, the connection has been made, the peripheral is responding on time when requested, it's the central which has sent out no single packet to ask any questions.

    @endnode to remove bonding on iPhone you just select the one device in the list and say 'forget this device', no need to remove all connections, I've done this a lot

    @eliot simple test - generate yourself a random MAC address before starting up the stack and set it, then test, if it's caching that'll prove it, if it's not I'm fairly out of ideas.

Children
No Data
Related