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

Unable to connect iOS nRF connect/toolbox apps to eval kit

Could not connect to the nRF52840 preview DK eval kit running the ble_peripheral/ble_app_uart firmware to iOS 11 device running the nRF connect or toolbox apps.
We tried on iPhone 7 and 8. Connection does not get established, board keeps blinking.

Tried the app/connection on an Android phone running same apps - works perfectly.

Also posted a github issue in the app repo:

https://github.com/NordicSemiconductor/IOS-nRF-Toolbox/issues/49

Please advise.

Many thanks!

Parents
  • Hi,

    This is caused by a bug in the s140 v.5.0.0-2 alpha softdevice, which was fixed in v.6.0.0-6. From the release notes:

    Fixed an issue where the BLE_GAP_DATA_LENGTH_AUTO value for p_dl_params->max_tx_octets and p_dl_params
    ->max_rx_octets
    in sd_ble_gap_data_length_update() might not work as expected on connections using a
    configuration with configured event length of 2, 3, or 4

    In other words, increasing the NRF_SDH_BLE_GAP_EVENT_LENGTH to >4 in sdk_config.h should fix the problem. The reason this will work on most Android phones and not iphone 7/8 is that iPhones supports data length extension.

  • Does it mean that I need to recompile SoftDevice v6.0.0 with above setting >4 or just flash existing HEX file for SD 6.0.0 to the evalkit ?

  • You can still use v.5.0.0-2, just make sure to increase the event length. v.6.0.0 has significant API changes, especially for the advertiser and scanner APIs (to support new features such as advertisement extensions) so is not drop-in compatible with sdk 14 examples. 

  • Oh OK understood, so just confirming: if I want to use the BLE peripheral UART example, I need to grab SD 5.0.0 and make the said changes, rebuild and flash, then reflash the example app via JLink.

    Wanted to ask: Can I also flash SoftDevice via JLink drop HEX file or must use CLI tools?

  • The BLE event length is configured by the application when it enables the softdevice, so it is the app that needs to be re-compiled with the new NRF_SDH_BLE_GAP_EVENT_LENGTH value. The softdevice is distributed as a pre-compiled binary, and can't be modified.  

    You can upload hex images using 'drag&drop'. Problem is that you can only program one hex file as flash is erased when a new .hex image is uploaded, even if they're linked to separate regions in flash. You can merge the softdevice and application to work around this limitation, but I think it's easier to just use the CLI tools. 

    Merged softdevice and ble_app_uart example with BLE event length set to 6 *1.25 ms: 

    uart_w_s140_v5.hex 

    Memory layout for applications that use Softdevice: 

  • This is awesome! Just verified that this now works on both iOS annd Android. Thank you very much!

    I'd like to work on a custom iOS app to communicate with the nRF52840 over UART/BLE, I wasn't able to find the source code for the nRF connect app for iOS nor an iOS SDK (only the nRF Toolbox app). Has it not been released?

Reply Children
Related