There are two boards, Raspberry PI4 and nRF52840-DK. The task is for the nRF52840-DK on zephyr hci-uart firmware:
to operate in HCI-UART (HCI only driver) mode, and Raspberry PI4 to operate in host mode. On the host side, the version 5.50 BlueZ is installed. The boards are connected via UART interface, at 921600Kb/s speed. After connecting and initializing nRF52840 using the hciattach command, the device initializes and connects and even scans (hcitool lescan) and sees other LE devices, but when trying to connect to them or get information about them (leinfo), an error occurs for the first time:
Could not create connection: Connection timed out
An error occurs during further attempts:
Could not create connection: Input/output error
There is a similar problem with setting the device name. An error occurred while trying to read or set the name (hciconfig hci* name):
Can't read local name on hci1: Input/output error (5)
At the same time, the oscillograph shows that the exchange between the devices is in both directions… There were also attempts to change speed and flow control - but, they did not give results.
As a result, we have: you can scan and watch visible devices, but you can't get anything, connect or change anything. Only scan and device list - that's all.
Boards Connection:
RPI4 (PIN27) <-> NRFDK (P0.08); RPI4(PIN28) <-> NRFDK (P0.06); RPI4 (GND) <-> NRFDK (GND)
Raspberry PI4 board configuration and params:
OS: Raspbian (32bit), V: 1.4
BlueZ: 5.50
UART: UART2
TXD -> GPIO0 -> PIN27
RXD -> GPIO1 -> PIN28
UART Speed: 1000000 / 921600 / 115200 Kb/s (variants of test)
Flow Control: None
RX/TX TTL Voltage: 3.3V
nRF52840-DK board configuration and params:
FW: HCI-UART (Zephyr Bluetooth: HCI UART sample)
nRF Connect SDK: 1.5.0
Project name: hci-uart
Build: zephyr.elf
UART: UART0
UART Speed: 1000000 / 921600 / 115200 Kb/s (variants of test)
Flow Control: None
Bluez device attach command string (for variant of 921600Kb/s):
sudo hciattach -t 5 -s 921600 /dev/ttyAMA1 any 921600 noflow nosleep