This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using an nRF52 Dev Kit to communicate to an Android phone via BLE

I am very new to this product and Bluetooth technology in general.  I am trying to determine what I have done wrong.  I have purchased the nRF52 dev kit and downloaded and installed the Segger Embedded Studio.  I have downloaded and installed the nRF5_SDK_17.1.0 package and have successfully compiled the peripheral examples and interacted with them on the dev kit.  My next attempt was to try a simple Bluetooth application with the dev kit and see if I could get my android phone to interact with dev kit board.  So, I downloaded the soft device S132 since I am working with the PCA10040 and my target SOC is going to be the nRF52832.  I downloaded the nRFgo Studio and installed it and uploaded the soft device S132 into the dev board.  I compiled the ble_app_interactive_s132_pca10040 application using the Segger studio and then uploaded the hex file using nRFgo Studio.  Verified all images and ran the application.  While using the terminal program, I can type scan on <CR> and the LED1 does turn on.  I type devices<CR> and it seems that the dev board does nothing after that.  On my phone I do not see any new available devices showing up and the only thing the interactive application seems to do is allow me to toggle the LED1 on and off using the scan on and scan off commands.  Can anyone guide me as to what I am doing wrong or give suggestions as to where to go from here?  Any help would be greatly appreciated.

  • Hi

    When using SEGGER Embedded Studios and our example projects, it's not necessary to flash the SoftDevice separately. I would recommend using the nRFConnect app on your Android phone, as nRFgo Studio is very old at this point.

    After that building and flashing most BLE peripheral example projects in the nRF5 SDK v17.1.0 should be able to connect to an Android phone using nRFConnect. I would suggest the ble_app_uart example, which lets you print messages to a UART terminal from the phone using the Nordic UART Service?

    Best regards,

    Simon

  • Hello Simon,

    The ble_app_uartdid compile in the Segger Studio and the output hex file was only 47K.  The application did not work when the hex file was placed on the USB Drive for the Dev Kit.  However,  the precompiled version that was sent with the SDK, the hex file size is 498K.  When I put that hex file into the Dev Kit USB Drive, it worked.  That brings up the question, why did the S132 not compile with the project and how do I make it do that?  Also, my project requires to come up from a sleep mode, send out the battery level and then go back to sleep.  I wanted to make the interval time programmable from 5 to 9 seconds.  Is there an example project of something similar that I could look at for ideas?

    Thanks,

    Allen

  • Hi

    The output file will indeed not include the SoftDevice. To get one full output file you can use the nRF Command Line Tools mergehex command to merge .hex files. The SoftDevice .hex files can be found under /YOUR_SDK_FOLDER/components/softdevice you can then merge your project's output file with the SoftDevice to have one .hex file.

    Regarding your application, please check out the battery service that is included in numerous example projects in the nRF5 SDK, for example the heart rate application, where the device sends heart rate notifications every second and battery level notifications every 2 seconds. If you use just the battery level notifications, you can set the interval between this to whatever you'd like and set the device to sleep in the meantime. Waking up every X second/minute to notify the central of its battery level.

    Best regards,

    Simon

Related