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

nRF Connect->BLE won't allow "Server Setup" to work.

Trying to run the "Alert Notification Application" example in nRF SDK v15.3.0 on either a Windows 10 system or a Ubuntu 18.04 LTS system.  Following the instructions, I can start a terminal on either and see the serial activity, but I cannot perform Step 3 (Create Alert Notification Services) step using nRF Connect.

On Windows 10 systems, running nRF Connect->BLE, Select Device fails if a terminal window has the COM port open (RealTerm).  When I close the port, "Select Device" seems to work, but then nRF Connect goes completely blank, showing nothing but a solid white screen.  Obviously at this point I cannot press "Server Setup" as directed in the instructions, and pressing this before "Select device" does nothing, as I would expect.

On Ubuntu, choosing "Select Device" superficially seems to work, although an error message appears in the log.  The "Select device" dropdown shows the board, which makes it look like a connection has been made.  Yet choosing "Server Setup" does nothing.

The PCB itself seems to be working just fine.  I can see status messages from the COM port on both systems, and I can connect and pair using a smartphone.

I am blocked on Step 3 because neither system can get to the "Server Setup" menu successfully.

Parents
  • The problem with nRF Connect going to a white screen was apparently caused by the firmware build under Segger Emnbedded Studio.  When I use nRF Connect to burn the pre-made HEX file onto the board, nRF Connect works as expected.

    This is disturbing.  It means that the Segger build *almost* worked but failed without warning.  What might cause this?

  • Hi Jim,

    It seems you wanted to run nRF Connect BLE app in the same DK you flashed with the Alert Notification example. You need to use nRF Connect for desktop in conjuction with a another nRF52/nRF52840 DK (or a nRF52840 dongle). If you are not familiar with the nRF Conenct Bluetooth Low energy app I recommend taking a look at the user guide here.

    For testing this example your setup should look something like this:

    - One nRF52840 DK running the alert notification example, with its COM port open in a terminal window like PuTTY.

    - Another DK or nRF52840 dongle connected to nRF Connect for desktop BLE app, which will act as your Alert notification server.

    From the User guide:

    The nRF Connect Bluetooth Low Energy app requires a serial port connection to a local development kit or dongle. The nRF SoC (System on Chip) on the device is controlled by the app which sends serialized commands to it over a serial port.

    That's why you will get an "access denied" error if the COM port of the device you are connecting to is already open in a terminal window. Make sure you select the COM port for the right device, then you will get a pop-up window asking to reprogram your device, click yes and your device should show up like this:

     

    Jim Peschke said:
    The problem with nRF Connect going to a white screen was apparently caused by the firmware build under Segger Emnbedded Studio.  When I use nRF Connect to burn the pre-made HEX file onto the board, nRF Connect works as expected.

    About your last comment, I am not sure what you mean by a "white screen"? Could you post a screenshot of the error messages you are getting so I can understand you better?

    Jim Peschke said:
    This is disturbing.  It means that the Segger build *almost* worked but failed without warning.  What might cause this?

    Did you get any error when building the project on Segger? What do you mean by "Segger build *almost* worked but failed without warning"? Can you elaborate and be more specific about what you mean?

    Best regards,

    Marjeris

     

  • Marjeris,

    Thanks for that informative answer.

    Taking a new board, I flashed SoftDevice 140 onto the PCB.  Then I started Segger Embedded Studio and built/ran the application.

    With the board connected to the COM port, I see messages, and the LEDs blink correctly.  However, when I run nRF Connect and attempt to select the board, this is the "white window" I was referring to:

    If I take this same board, erase the flash completely, and reprogram it with the HEX file included with the SDK, it seems to work fine.  Is there something I have to do in the Segger project to link the SoftDevice properly?

    I got no warnings or errors during build after a "clean".

    I'll try the other steps soon.  Do you know why I might be getting the error message when trying to connect to the PCB under Ubuntu?

  • To add more, what I mean by "Segger build almost worked but failed without warning", it seems clear that there is something about the Segger build that causes nRF Connect to produce the white window when I'm trying to connect to the board.  This white window only happens when I connect a board loaded with code I built under Segger Embedded Studio.  When the board is loaded from the SDK's precompiled HEX file, nRF Connect seems to work fine.

    Segger built firmware seems to otherwise work - It issues COM messages, blinks the LEDs, and other BLE devices can see the board.  That's what I mean by *almost* worked.

  • Hi Jim,

    I am not sure I completely understand what you are attempting, the Bluetooth low energy app only works together with a firmware built by us so either way the device you connect will need to be reprogrammed. The correct behaviour will be to get a message like this one after selecting the device:



    Jim Peschke said:
    If I take this same board, erase the flash completely, and reprogram it with the HEX file included with the SDK, it seems to work fine. 

    Is this what you mean with "worked fine"? But instead of this message you are getting a white screen when the previous program in the DK is built in Segger right?


    A white screen in nRF Connect for Desktop will happen when a native component (that is a low level component that is used, but not written in the application itself) has crashed.

    If you think the problem is related to Segger, it could be that operations with the low level Jlink libraries are affected, maybe there might be a conflicit in use of the same resources related to Jlink.

    I think if you could give us a step by step reproducible scenario it would be easier for us to look into this matter. What are the steps you are using to build and flash from Segger?


    For the Ubuntu error message: Did you check if you are using the latest nRF Connect for desktop?

    Best regards,

    Marjeris

  • Marjeris,

    Thank you.  Now the picture is becoming much clearer.  The example instructions did a very poor job of conveying much of this detail.  I will try doing a build on SES for my target board and verify that it works fine when built on the Segger platform.

    Still, if you'd like some insight on how this "white screen" might have happened, here are the exact steps:

    1) Attach nRF52840 PCB to PC using USB cable.

    2) Run nRF Connect.  Launch Programmer.

    3) Select device from top menu.

    4) Click "Erase All".

    5) Select "Add HEX File" and choose \components\softdevice\s140\hex\s140_nrf52_6.1.1_softdevice.hex

    6) Select "Write".

    7) Close nRF Connect.

    8) Open Segger Embedded Studio and load project examples\ble_peripheral\ble_app_alert_notification\pca10056\s140\ses\ble_app_alert_notification_pca10056_s140

    9) Click "Build and Run"

    10) Close Segger Embedded Studio.

    11) Run nRF Connect.  Select "Bluetooth Low Energy"

    12) Click "Select device" and select the board.

    13) White screen.

    I'm not sure whats happening now, because this time it seemed to work fine.

Reply
  • Marjeris,

    Thank you.  Now the picture is becoming much clearer.  The example instructions did a very poor job of conveying much of this detail.  I will try doing a build on SES for my target board and verify that it works fine when built on the Segger platform.

    Still, if you'd like some insight on how this "white screen" might have happened, here are the exact steps:

    1) Attach nRF52840 PCB to PC using USB cable.

    2) Run nRF Connect.  Launch Programmer.

    3) Select device from top menu.

    4) Click "Erase All".

    5) Select "Add HEX File" and choose \components\softdevice\s140\hex\s140_nrf52_6.1.1_softdevice.hex

    6) Select "Write".

    7) Close nRF Connect.

    8) Open Segger Embedded Studio and load project examples\ble_peripheral\ble_app_alert_notification\pca10056\s140\ses\ble_app_alert_notification_pca10056_s140

    9) Click "Build and Run"

    10) Close Segger Embedded Studio.

    11) Run nRF Connect.  Select "Bluetooth Low Energy"

    12) Click "Select device" and select the board.

    13) White screen.

    I'm not sure whats happening now, because this time it seemed to work fine.

Children
No Data
Related