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

Faulty DK-52?

Hi, Few days ago I received my DK-52, I set up the development environment based on Keil and started to compile some of the examples included into the SDK. I have not a Windows machine so I am working with Windows hosted in VirtualBox on OSX and iPhone 6 (iOS 9.3.2).

The first example I tested was ble_app_beacon that worked fine.

Then I tested ble_app_hrs and it works fine too. Using nRF Connect I see a peripheral named Nordic_HRM with 3 characteristics Heart Rate, Battery Service and Device Information. Looking at Heart Rate characteristic, I can see changing values. Using nRF Toolbox and HRM, I can see the graph as expected.

Then I tested ble_app_cscs. At the beginning nRF Connect still shows a Nordic_HRM peripheral. Turning on and off the board, eventually Nordic_CSC peripheral appears, but it still has the same characteristichs of ble_app_hrs (Heart Rate, Battery Service and Device Information). I tryed to erase the device using nRFgo but nothing changed.

Eventually I tested ble_app_bps, same behaviour of ble_app_cscs.

I have also tested with LightBlue just in case.

If I run the ble_app_beacon or ble_app_hrs they work as expected.

Is my DK-52 faulty? If not, what am I doing wrong?

Each time I upload from Keil, I see a message asking me to upgrade the Jlink. I tried to do that but I get an error. See below:

New firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17 Current firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Feb 12 2016 12:15:53 Starting bootloader... Waiting for emulator to detach... OK after 633ms. Waiting for emulator to attach... Timeout. ERROR: Communication timeout. Emulator did not re-enumerate. ERROR: Firmware update failed.

Could be this the reason of my problems uploading examples?

Thank you for any suggestion.

  • You will have problems updating J-link firmware where updater runs on virtual machine. During update process J-Link reboots and has to be manually attached to VM that's why upgrade fails at Waiting for emulator to attach... It's easiest to use real host with windows or linux to do this.

    As for your other problems please describe in detail how you are uploading programs to your board and what expected result in your opinion should be.

  • Hey Keton,

    Thank you for your prompt answer.

    Ok, I'll try to upgrade the J-link firmware from a real Windows machine or a linux one as soon as I have one available. I suspected that this was the issue and I tried to switch off and then on the board without success.

    I am uploading the programs directly from Keil, but I have tried to upload also using nRFgo. Erasing the device or not. Always the same result.

    What I expect is that different examples generate different services and characteristics, instead I see different peripheral's names but services and characteristics are always the same. This makes no much sense. In fact, the only part of nRF Toolbox that works is HRM.

  • It looks like a caching issue. I don't know iOS much but on Android if you are reconnecting to bonded peripheral device OS assumes that service map doesn't change and you must do a manual refresh by deleting bond and redoing service discovery. I also vaguely remember discussion on stackoverflow where people complained that iOS really likes bonding to BLE devices and something has to be done manually to do a refresh. But it was in iOS 8 era when I've done last BLE development for that platform.

    If you by any chance have access to android device I'd try recent version of Nordic nRF connect. After uploading new program to the DK select 'delete bond information' and 'refresh services' in 3 dots menu. I use this all the time during firmware development.

  • Hey Keyton, You are right. The iOS app takes some time read the new service. Killing the App and restarting Bluetooth helps.

Related