Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow control not working in hci_uart on nRF52832 #83046

Closed
kjs-eir opened this issue Dec 16, 2024 · 7 comments
Closed

Flow control not working in hci_uart on nRF52832 #83046

kjs-eir opened this issue Dec 16, 2024 · 7 comments
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug

Comments

@kjs-eir
Copy link

kjs-eir commented Dec 16, 2024

When using the zephyr/samples/bluetooth/hci_uart sample project with the nRF52DK eval kit (with nRF52832) the UART flow control is not function. RX and TX lines responed correctly when commands are transmitted and received, but when sending longer commands, the RX response before the TX has completed transmission. I have verified that CTS and RTS stays low during transmission with my scope. The only thing i modified is the baudrate in the nrf52dk_nrf52832.overlay file, i modified it to 115200.
I am transmitting and receiving commands via the COM port when connecting the nRF52DK to my laptop.

To Reproduce

  1. Modify baudrate from 1.000.000 to 115.200
  2. Build hci_uart for nrf52dk_nrf52832: west build -p always -b nrf52dk/nrf52832 samples\bluetooth/hci_uart
  3. Connect nRF52DK, and ensure that SW7 is set to ON (to ensure flow control from the interface MCU)
  4. Connect scope to pins P0.5, P0.6, P0.7 and P0.8
  5. Flash the hci_uart image onto the nRF52832
  6. Modify the COM-port to match the correct one on your laptop, and run the python-script (see under addtional info)
  7. Watch if RTS and CTS lines being constantly low during the transmission.
  8. Additionally the HCI_UART examples fails to correctly respond to the generic HCI commands (I assume this is due to issue with flow control)

Expected behavior

Impact
This is a showstopper for me. I need the HCI_UART example, as I have changed to a fanstel BC832 bluetooth controller, and I am not very skilled in zephyr. So I need a quick way to configure BC832 (based on the nRF52832) as a bluetooth controllor.

Logs and console output

Environment (please complete the following information):

I am running zephyr v. 3.6.99 and west v. 1.2.0.

Additional context
See the python file: send_HCI_commands.txt
(changed to .txt because git does not accept .py file)

@kjs-eir kjs-eir added the bug The issue is a bug, or the PR is fixing a bug label Dec 16, 2024
Copy link

Hi @kjs-eir! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@nordicjm
Copy link
Collaborator

nordicjm commented Dec 16, 2024

There is no flow control on the nrf52dk, you need to use a USB <-> UART chip that supports flow control like an FTDI, the onboard jlink does not (hardware flow control is not supported in the USB CDC specification)

@kjs-eir
Copy link
Author

kjs-eir commented Dec 16, 2024 via email

@nordicjm
Copy link
Collaborator

The lines are connected, the PC will completely ignore them. Yes flow control should work when communicating with an actual UART device that does support it, but you need to have hw-flow-control; set in dts for the UART, have you done that?

@kjs-eir
Copy link
Author

kjs-eir commented Dec 16, 2024

Thanks for clarification. But yes I got hw-flow-control set in my overlay file in the hci-uart project.

@jhedberg jhedberg added the platform: nRF Nordic nRFx label Dec 17, 2024
@jhedberg jhedberg removed their assignment Dec 17, 2024
@github-project-automation github-project-automation bot moved this to To triage in nRF platform Dec 17, 2024
@kartben kartben added the priority: low Low impact/importance bug label Dec 17, 2024
@alwa-nordic
Copy link
Collaborator

If you open a ticket on Nordic DevZone they will be able to help you debug and find a solution quickly.

@kjs-eir
Copy link
Author

kjs-eir commented Jan 6, 2025

Hi @nordicjm

I have acquired a FTDI (FT232) and has this hooked-up to my nRF52832 on the nRF52DK. Flow control is working properly. But i am unable to make the controller to start advertising? the nRF52832 is flashed with "HCI_uart" sample

I am transmitting the following sequence to the controller, and the response is verified on my scope:
"01030C00", # HCI Reset
"01010C08FFFFFFFFFFFFFFFF", # HCI Set Event Mask
"0106200F0064006400000000000000000000000700", # HCI LE Set Advertising Parameters
"010820070201060654657374", # HCI LE Set Advertising Data ("Test")
"010A200101" # HCI LE Enable Advertising

Is it correctly understood that i should be able the make the controller advertise with the correct set of HCI commands? If yes, what am i missing?

@zephyrproject-rtos zephyrproject-rtos locked and limited conversation to collaborators Jan 9, 2025
@alwa-nordic alwa-nordic converted this issue into discussion #83744 Jan 9, 2025
@github-project-automation github-project-automation bot moved this from To triage to Done in nRF platform Jan 9, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug
Projects
Status: Done
Development

No branches or pull requests

5 participants