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

What do I need to do to get a sample program in the SDK to advertise?

Hello,

I have just purchased the nRF51 Development Kit and I am having extreme difficulty getting any of the sample programs to function.

There are the specifications at this point:

IDE uVision V5.24.2.0

SDK nRF5_SDK_11.0.0

nrf SoftDevice s130_nrf51_2.0.0

Device arm_startup_nrf51.s(startup)

For example, I have loaded the project in this path: examples/ble_peripheral/ble_app_template/pca10028/arm5_no_packs/ble_app_template_s130_pca10028

I can build the project, flash it, and start a debug session and set a breakpoint and see it reach the breakpoint, so I know that the device is working. From looking at the code in the main routine, it should at very least advertise the DEVICE_NAME , however, a scanning app on my Android phone does not see this device.

I have performed various internet searches, and tried everything I could think of and although I have not tried all the example programs, none of the ones I have tried have advertised the DEVICE_NAME.

Your assistance would be very much appreciated.

Sincerely, Brian Fleming

  • Hi Brian!
    That's strange. You can't make any of the examples in the SDK work?
    Could you try to erase the DK, and then try to use one of the pre-compiled hex-files in the SDK?
    If you could test the HRS-example, the pre-compiled hex-file can be found here: sdk_root/examples/ble_peripheral/ble_app_hrs/hex/ble_app_hrs_s130_pca10028.hex.
    This file includes both the application AND the softdevice, so you only have to download that file to your board.
    You can use nRFGo Studio or nrfjprog to erase and download the hex-file. Best regards.

  • Hello, thank you for your reply.

    I am completely new at this IDE, so I have never used the nRFGo Studio, so I don’t know at this time how to load a file and send it to the nRF51 development board. However, I do recall somewhere reading that the .Hex files could be copied and pasted into the device directly, so I took a chance and with Windows File Explorer copied and pasted the file to the JLINK folder, after erasing the device in Keil. The LED 1 blinks at a rate of 0.5Hz and my BluetoothLE ‘sniffer’ app now displays Nordic_HRM which confirms that the radio is working.

    Prior to the above, I tried flashing etc, the HRM program in Keil, and the device did not advertise.

    I hope this helps, because I really need to get some work done again.

    Cheers, Brian Fleming

    P.S. is email the correct method of replying to your support responses?

  • Hi again Brian.

    Yes, you are correct. I forgot to mention that you can also drag-and-drop the hex file to the removable drive that appears.
    But as the pre-compiled hex file is working, we can rule out any HW issues.

    You haven't made any modifications to the examples you are testing?
    My guess would be that the softdevice is not being downloaded to your DK.
    The softdevice can be found as a hex-file in the SDK;
    sdk_root/components/softdevice/s130/hex

    This file doesn't need to be built or modified, you can simply flash it directly to your DK.
    This can be done by using nRFGo Studio, like I mentioned in my comment. nRFGo Studio is a software solution provided by Nordic Semiconductor and can be used for programming nRF5x devices through SEGGER J-LinkRegistered. After the softdevice is on your board, you can flash your application.

    You should take a look at our tutorials page here on devzone.
    There we have a Getting started with the nRF51 or nRF52 Development Kit tutorial that I'm sure will be helpful.

    Note; I will get a notification when you reply here on devzone, so there is no need to send an e-mail.

    Best regards,
    Joakim.

  • Hello,

    I got it working last night, but I have no idea what I did differently.

    I had a suspicion that the soft device was the problem, and I tried the batch build to build only the soft device and flash it first, but the IDE would not allow me to do it. It seems to work now though, although I have to close the IDE, and start again sometimes.

    No, I have not made any changes to the examples at this point. I am not smart enough to attempt that, later I hope.

    Thank you for the link to the tutorial, I need all the help I can get.

    Cheers, Brian Fleming

  • Ok, I'm glad you sort of got it to work.
    So you can see your device advertising now?
    If you don't have any more questions at this point, I'd appreciate it if you could close the case by marking the answer as correct.
    You are of course welcome to post another question at a later point if you face any more problems.
    Cheers.

Related