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
  • Yes, it's a recording of the connection from the board' s point of view, correct? The disconnect message points to the disconnect being caused by the remote user (the computer in your case). Does the computer not report any reason what so ever as to why it disconnects from the nRF?

    Again, from your description this sounds like the issues reported for BLE not working as intended on Windows 11. Can you upload the sniffer log as well. To "follow" a peripheral into a connection it should be sufficient to select the board from the device list in Wireshark during advertiisng, and then connect the central to that same peripheral.

    Best regards,

    Simon

  • There are no messages or windows from Windows. Just click on add this device, it thinks 3-5 seconds, and writes try to connect this device again.

    In capture:

    1. Start capture.

    2. Choose Nordic_UART_service.

    3. Click 3 times to Add device in Windows.

    4. Stop Capture.

    LaptopW11_01.zip

    -------------------------

    There are new things, after a whole day guessing what's going on.

    I use VSC (last version for all), there is no debug information at all. I decided that I don't know what version is installed in the Net core. It is also not at all clear what and where the VSC programs, whether only the App core or both cores. I decided to delete the Net core, securely and manually, and reprogram it. I launched NRF Programmer, and there after two hours I found out that it is not clear what is happening. I press Erase all. I program again with VSC. Surprisingly, Bluetooth works (with phone). Therefore, the VSC programs both cores. However, for sure I decided to do the same project and program it with SEGGER Embedded studio, at least there I know that only the app core can be programmed. So again, Erase all in NRF Programmer, Program with SEGGER, and … Bluetooth works (with phone), what??? At that moment I realized that the NRF Programmer does not see or delete the net core at all. However, it is difficult for me to give up, there is a connect to J-link-> Erase all in SEGGER. Program again and … Bluetooth works (with phone). Obviously, the net core is not deleted here either. However, I decided to launch a debug (with the laptop already!!)., some information may appear, and miracles:

     

    [00:04:17.606,475] [0m<inf> peripheral_uart: Connected 5C:FB:3A:53:9C:3A (public)[0m

    [00:04:18.180,725] [0m<inf> peripheral_uart: Passkey for 5C:FB:3A:53:9C:3A (public): 929526[0m

    [00:04:18.180,725] [0m<inf> peripheral_uart: Press Button 1 to confirm, Button 2 to reject.[0m

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

    [00:04:27.963,836] [1;33m<wrn> peripheral_uart: Security failed: 5C:FB:3A:53:9C:3A (public) level 1 err 9[0m

    [00:04:27.963,958] [0m<inf> peripheral_uart: Pairing failed conn: 5C:FB:3A:53:9C:3A (public), reason 9[0m

    [00:04:27.964,263] [0m<inf> peripheral_uart: Disconnected: 5C:FB:3A:53:9C:3A (public) (reason 8)[0m

     

    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.

    I programmed without debugging with SEGGER. No debugging information, but the PIN window appears again and then the connection breaks down.

    I closed the SEGGER and opened the VSC, programming directly. The PIN window reappears, and breaks down.

    I don't know why PIN window appears.

     

    I finally realized that it is not clear which program is programming what. In Windows, nothing has been changed or updated. In VSC and SEGGER I program the same project (one common project directory, and two separate ones for each program.) without changing anything, the standard example.

     

    I decided that despite the stupid question of where the net core is in the NRF programmer /2.2.0/, I will have to ask in the forum. After about half an hour of searching, I came across this topic / NRF Connect Programmer 2.2.0 Broken for nrf53 / from 10 days ago, it has already been asked. For another hour, I didn't know how to register for this topic /subscribe !! not for notification/. In the user's control panel, these are two different things. It was enough for me.

     

    Once you've fixed the NRF programmer, and I'm sure the net core has been erased and programmed with the latest version, then I'll keep guessing. At least one thing to be certain.

     

    For now, I'm stopping pretending to be a fortune teller, that's not the way to work.

Reply
  • There are no messages or windows from Windows. Just click on add this device, it thinks 3-5 seconds, and writes try to connect this device again.

    In capture:

    1. Start capture.

    2. Choose Nordic_UART_service.

    3. Click 3 times to Add device in Windows.

    4. Stop Capture.

    LaptopW11_01.zip

    -------------------------

    There are new things, after a whole day guessing what's going on.

    I use VSC (last version for all), there is no debug information at all. I decided that I don't know what version is installed in the Net core. It is also not at all clear what and where the VSC programs, whether only the App core or both cores. I decided to delete the Net core, securely and manually, and reprogram it. I launched NRF Programmer, and there after two hours I found out that it is not clear what is happening. I press Erase all. I program again with VSC. Surprisingly, Bluetooth works (with phone). Therefore, the VSC programs both cores. However, for sure I decided to do the same project and program it with SEGGER Embedded studio, at least there I know that only the app core can be programmed. So again, Erase all in NRF Programmer, Program with SEGGER, and … Bluetooth works (with phone), what??? At that moment I realized that the NRF Programmer does not see or delete the net core at all. However, it is difficult for me to give up, there is a connect to J-link-> Erase all in SEGGER. Program again and … Bluetooth works (with phone). Obviously, the net core is not deleted here either. However, I decided to launch a debug (with the laptop already!!)., some information may appear, and miracles:

     

    [00:04:17.606,475] [0m<inf> peripheral_uart: Connected 5C:FB:3A:53:9C:3A (public)[0m

    [00:04:18.180,725] [0m<inf> peripheral_uart: Passkey for 5C:FB:3A:53:9C:3A (public): 929526[0m

    [00:04:18.180,725] [0m<inf> peripheral_uart: Press Button 1 to confirm, Button 2 to reject.[0m

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

    [00:04:27.963,836] [1;33m<wrn> peripheral_uart: Security failed: 5C:FB:3A:53:9C:3A (public) level 1 err 9[0m

    [00:04:27.963,958] [0m<inf> peripheral_uart: Pairing failed conn: 5C:FB:3A:53:9C:3A (public), reason 9[0m

    [00:04:27.964,263] [0m<inf> peripheral_uart: Disconnected: 5C:FB:3A:53:9C:3A (public) (reason 8)[0m

     

    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.

    I programmed without debugging with SEGGER. No debugging information, but the PIN window appears again and then the connection breaks down.

    I closed the SEGGER and opened the VSC, programming directly. The PIN window reappears, and breaks down.

    I don't know why PIN window appears.

     

    I finally realized that it is not clear which program is programming what. In Windows, nothing has been changed or updated. In VSC and SEGGER I program the same project (one common project directory, and two separate ones for each program.) without changing anything, the standard example.

     

    I decided that despite the stupid question of where the net core is in the NRF programmer /2.2.0/, I will have to ask in the forum. After about half an hour of searching, I came across this topic / NRF Connect Programmer 2.2.0 Broken for nrf53 / from 10 days ago, it has already been asked. For another hour, I didn't know how to register for this topic /subscribe !! not for notification/. In the user's control panel, these are two different things. It was enough for me.

     

    Once you've fixed the NRF programmer, and I'm sure the net core has been erased and programmed with the latest version, then I'll keep guessing. At least one thing to be certain.

     

    For now, I'm stopping pretending to be a fortune teller, that's not the way to work.

Children
No Data
Related