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

Example question using nRF52840 inside nRF9160DK

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.1.0/nrf/samples/bluetooth/peripheral_lbs/README.html

I'm talking about the above.
SW5 switched to nRF52.
However, the LED does not light up. It also receives no signal from nRF for mobile.
Why can't I get a BLE signal from the smartphone application?

When I try to run, "stop with vector catch" appears.
Is this right?

  • Hello!

    The nRF52840 on the nRF9160DK is acting as the board controller of the kit, and should not be used for standalone samples. It does not have trivial access to LEDs, buttons, GPIO and so on. However, it can be used as a network processor, meaning that you can use it to enable BLE functionality for the nRF9160. You can have a look at the LTE Sensor Gateway sample, which enables the nRF9160DK to connect to a Thingy:52 over BLE and send sensor data to the cloud.

    Notice that there are quite a lot of configuration that must be done in order to make this function correctly. Notably, UART2 must be made Non-Secure by SPM and be enabled in the nRF9160 overlay. In addition you will need some configuration for the nRF9160. All of this should be present in the sample I linked above, but I have also attached a functioning peripheral_lbs sample that you can build and flash to the nRF9160 (note that the HCI UART sample must be flashed to the nRF52840 first). You can build the sample with the following command:

    west build -b nrf9160dk_nrf9160ns -p -- -DOVERLAY_CONFIG='nrf9160dk-overlay.conf'


    4370.peripheral_lbs_nrf9160.zip

    Best regards,
    Carl Richard
     

  • I want to control LED by communicating with BLE using two nRF9160DKs.

    Because I bought two nRF9160DKs.

    [First nRF9160DK]

    SW5-> nRF91

    Peripheral Pound Build

    SW5-> nRF52

    Build HCI UART Example

    [Second nRF9160DK]

    Same as above

    Can I turn the LED on and off like this? or this is impossible ?

    To sum up, Is it possible to BLE communicate with each other using two nRF9160DKs or is nRF9160DK and thingy:51 necessary?

  • Hi!

    Yes, BLE communication between two nRF9160DKs is possible. However, the peripheral_lbs sample is meant to interface with a phone/tablet running a compatible application (as described in the requirements for the sample).

    For implementing your desired application you would need modify one of the central samples so that it can handle the LED Button Service(LBS) and make that run on the other nRF9160DK. The peer will have to subscribe to the LBS device and implement callbacks for button notifications so that a LED can be turned on. I suggest that you base your code on the Central HRS monitor sample. You need to modify the sample to scan, connect and subscribe to the LBS peripheral.

    Best regards,
    Carl Richard

Related