Connect a Laptop with Windows to Peripheral UART example

Sure, my question is very stupid, but after one day I found nothing to explain the principle of the situation, I decided to ask.

I have a laptop with built-in Bluetooth 5.2 and Windows 11. It runs a terminal testing program.

I have nRF5340 DK with the example Peripheral UART installed (nRF Connect SDK1.8.0). The board works normally, I tested it with a phone with Android and nRF Connect for Mobile. Everything is working fine. The board is connected to a desktop computer on which a terminal program is running and connected to COM port ( not USB).

Windows (laptop), sees the board. After pressing adding device (on Win), the LED on the board (connected) lights up for 1 second, Windows thinks about 5 seconds, and says try again. I imagine that it will connect to the board, and a window will appear to install a serial port to which I can connect through the terminal program. No PIN display window appears. I tried to quickly press button 1, possibly to confirm, nothing. I can transmit data over the phone without the board being BONDED. Let me just say that I've been doing Nordic for 6 months, and I've learned some things. But here I can't even imagine what should happen. Google didn't help either. Does anything else need to be installed on the board?

In the final version, it should be a remote device to which with any laptop with Bluetooth 5.2, to be able to connect and through a terminal program to exchange data via serial port.

Parents
  • Hi again

    After testing this on my end on my work laptop (Windows 10 device) I think I see what the issue is. When I try connecting to the Nordic_UART_Service device the PC will initiate a pairing procedure it seems, and thus the board follows the pairing procedure, displays a pin code and prompts the computer to accept this pin. Then you need to press button 1 on the DK to confirm, or button 2 to reject. If I don't press any buttons I see the same behavior as what you explain, I wait for a few seconds and get a message to try connecting again. I can press button 1 to accept and thus connect to the device.

    I'm sorry, I'm not sure I understand what exactly you did to make the pairing happen. Was it sufficient to do an erase all in SEGGER and program the NET and APP cores?

    What device/DK are you using as a sniffer device, as the sniffer trace did not look to pick up any advertisements what so ever. 

    The NET core is indeed not available from the nRFConnect programmer app. 

    Finally, I also asked a colleague with a Windows 11 machine with BLE to test. They used the standard peripheral_uart sample project and did not have any issues. So there goes my theory. Here are logs of the standard application (defaulting to numeric comparison):

    [00:00:00.017,883] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:00.017,883] <inf> peripheral_uart: Bluetooth initialized
    [00:00:45.050,933] <inf> peripheral_uart: Connected 18:56:80:9D:AD:EF (public)
    [00:00:45.478,698] <inf> peripheral_uart: Passkey for 18:56:80:9D:AD:EF (public): 423061
    [00:00:45.478,698] <inf> peripheral_uart: Press Button 1 to confirm, Button 2 to reject.
    [00:00:49.498,657] <inf> peripheral_uart: Numeric Match, conn 0x20001870
    [00:00:54.162,170] <inf> peripheral_uart: Security changed: 18:56:80:9D:AD:EF (public) level 4
    [00:00:54.315,338] <inf> peripheral_uart: Pairing completed: 18:56:80:9D:AD:EF (public), bonded: 1
    [00:00:57.791,290] <inf> peripheral_uart: Disconnected: 18:56:80:9D:AD:EF (public) (reason 19)

    Here's a log when connecting with a passkey:

    [00:01:02.485,290] <inf> peripheral_uart: Connected 18:56:80:9D:AD:EF (public)
    [00:01:02.888,763] <inf> peripheral_uart: Passkey for 18:56:80:9D:AD:EF (public): 149895
    [00:01:22.012,695] <inf> peripheral_uart: Security changed: 18:56:80:9D:AD:EF (public) level 4
    [00:01:22.120,452] <inf> peripheral_uart: Pairing completed: 18:56:80:9D:AD:EF (public), bonded: 1
    [00:01:25.146,789] <inf> peripheral_uart: Disconnected: 18:56:80:9D:AD:EF (public) (reason 19)

    Best regards,

    Simon

  • Board - nRF5340 DK

    Sniffer - nRF52840 Dongle

    Laptop - HP Envy x360 15-eu0023nn , support.hp.com/.../c07650663

    Windows 11 Home 64 bit

    Pairing, from last post:

    “The PIN code confirmation window appears in Windows. I press it, then press button 1 on the board. And the connection falls again. I tried several times, the same.”

    Software:

    Before updating all Nordic software, the version I was working with was 1.7.1 nRF Connect SDK. I suspect that this version is installed in the net core.

    Then everything was updated to the latest version nRF Connect SDK 1.8.0. From here I program the example - standard peripheral_uart sample.

    NRF Connect Programmer became version 2.2.0, and no longer sees the net core. As far as I found, it neither programs nor erases it.

    Unfortunately, apparently it is not erased through the SEGGER either (connect to J-link-> Erase all).

    If I could somehow erase it (net core), when programming the example in SEGGER, the LED would flash, but there would be no Bluetooth. However, this does not happen, there is always Bluetooth.

    The only way I know how to program the net core is from the NRF Connect Programmer, to put the HEX file and program it. This is not working at the moment with 2.2.0.

    I don't know what VSC is programming, one or both cores. There is no debugging information and nothing can be seen.

    The HEX files there are different (VSC/ SEGGER), which is very strange to me, because the example is the same. In general, which file is actually programmed?

     

    SEGGER

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build_nrf5340dk_nrf5340_cpuapp\zephyr

    merged_domains.hex - 838k

    merged.hex - 374k  -> APP CORE

    zephyr.hex - 374k ( != merged.hex)

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build_nrf5340dk_nrf5340_cpuapp\hci_rpmsg\zephyr

    app.hex - 465k

    merged_CPUNET.hex - 465k ( = app.hex)  ->NET CORE

    zephyr.hex - 465k ( != merged_CPUNET.hex)

     

    VSC

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build\zephyr

    GENERATED_CP_APPLICATION_merged_domains.hex - 458k

    GENERATED_CP_NETWORK_merged_domains.hex - 465k ( same as merged_CPUNET.hex from SEGGER

    )

    merged_domains.hex - 922k

    merged.hex - 458k ( = GENERATED_CP_APPLICATION_merged_domains.hex)

    zephyr.hex - 458k (!= merged.hex)

    Here maybe:

    merged.hex / GENERATED_CP_APPLICATION_merged_domains.hex  -> APP CORE

    GENERATED_CP_NETWORK_merged_domains.hex - I don't know if it's being programmed to NET CORE

     

    Why ?  SEGGER/merged.hex - 374k  and    VSC/merged.hex - 458k                    -> APP CORE

    The laptop is not updated and there is no internet before the last tests for which I wrote about in the previous post. The window for the PIN code appeared, after programming the board in debug mode in SEGGER, why I do not know. It didn't exist before. After programming in VSC, why this window remained, I also do not know. I suspect that something is not reprogrammed but left from SEGGER, otherwise I have no idea.

    That's why I want the NRF Connect Programmeo work to make sure the chip is erased before I program anything. I do not want to go back to old versions, as described in the colleague's topic that I mentioned in the last post.

    ===

    From last post : [00:04:25.029,693] [0m<inf> peripheral_uart: Numeric Match, conn 0x20000a60[0m.

    so button 1 is detected correctly.

Reply
  • Board - nRF5340 DK

    Sniffer - nRF52840 Dongle

    Laptop - HP Envy x360 15-eu0023nn , support.hp.com/.../c07650663

    Windows 11 Home 64 bit

    Pairing, from last post:

    “The PIN code confirmation window appears in Windows. I press it, then press button 1 on the board. And the connection falls again. I tried several times, the same.”

    Software:

    Before updating all Nordic software, the version I was working with was 1.7.1 nRF Connect SDK. I suspect that this version is installed in the net core.

    Then everything was updated to the latest version nRF Connect SDK 1.8.0. From here I program the example - standard peripheral_uart sample.

    NRF Connect Programmer became version 2.2.0, and no longer sees the net core. As far as I found, it neither programs nor erases it.

    Unfortunately, apparently it is not erased through the SEGGER either (connect to J-link-> Erase all).

    If I could somehow erase it (net core), when programming the example in SEGGER, the LED would flash, but there would be no Bluetooth. However, this does not happen, there is always Bluetooth.

    The only way I know how to program the net core is from the NRF Connect Programmer, to put the HEX file and program it. This is not working at the moment with 2.2.0.

    I don't know what VSC is programming, one or both cores. There is no debugging information and nothing can be seen.

    The HEX files there are different (VSC/ SEGGER), which is very strange to me, because the example is the same. In general, which file is actually programmed?

     

    SEGGER

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build_nrf5340dk_nrf5340_cpuapp\zephyr

    merged_domains.hex - 838k

    merged.hex - 374k  -> APP CORE

    zephyr.hex - 374k ( != merged.hex)

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build_nrf5340dk_nrf5340_cpuapp\hci_rpmsg\zephyr

    app.hex - 465k

    merged_CPUNET.hex - 465k ( = app.hex)  ->NET CORE

    zephyr.hex - 465k ( != merged_CPUNET.hex)

     

    VSC

    \SDK\ncs\v1.8.0\nrf\samples\bluetooth\peripheral_uart\build\zephyr

    GENERATED_CP_APPLICATION_merged_domains.hex - 458k

    GENERATED_CP_NETWORK_merged_domains.hex - 465k ( same as merged_CPUNET.hex from SEGGER

    )

    merged_domains.hex - 922k

    merged.hex - 458k ( = GENERATED_CP_APPLICATION_merged_domains.hex)

    zephyr.hex - 458k (!= merged.hex)

    Here maybe:

    merged.hex / GENERATED_CP_APPLICATION_merged_domains.hex  -> APP CORE

    GENERATED_CP_NETWORK_merged_domains.hex - I don't know if it's being programmed to NET CORE

     

    Why ?  SEGGER/merged.hex - 374k  and    VSC/merged.hex - 458k                    -> APP CORE

    The laptop is not updated and there is no internet before the last tests for which I wrote about in the previous post. The window for the PIN code appeared, after programming the board in debug mode in SEGGER, why I do not know. It didn't exist before. After programming in VSC, why this window remained, I also do not know. I suspect that something is not reprogrammed but left from SEGGER, otherwise I have no idea.

    That's why I want the NRF Connect Programmeo work to make sure the chip is erased before I program anything. I do not want to go back to old versions, as described in the colleague's topic that I mentioned in the last post.

    ===

    From last post : [00:04:25.029,693] [0m<inf> peripheral_uart: Numeric Match, conn 0x20000a60[0m.

    so button 1 is detected correctly.

Children
No Data
Related