I am trying to use the BluePy Scanner on a Raspberry Pi 3 B+ with a nRF52840-Dongle programmed as a Bluetooth: HCI-uart.
I am able to get the Bluepy Scanner code to work with the onboard BLE, but I am so far unable to get it to communicate with the Bluetooth HCI dongle that is attached to the UART0 (/dev/ttyS0). I have connected UART0_TXD (GPIO14), UART0_RXD (GPIO15), UART0_CTS (GPIO16), and UART0_RTS (GPIO17).
How can I attach and use a nRF52840-Dongle, programmed with the HCI_uart example, with a Raspberry Pi 3 B+?
Following are my nrf52840dongle_nrf52840.overlay and proj.conf files for the HCI_uart.
nrf52840dongle_nrf52840.overlay
proj.conf
I following DT overlays in on my Raspberry Pi, uart_ctsrts and krnbt_baudrate=1000000.
From the command line I try
btattach -B /dev/ttyS0 -P bcm -S 1000000 -R &
and I get the following message.
hciconfig status returns the following for the onboard BLE
hci0: Type: Primary Bus: UART
BD Address: B8:27:EB:EE:6C:BD ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:13508 acl:0 sco:0 events:562 errors:0
TX bytes:2402 acl:0 sco:0 commands:124 errors:0
However, when I use the HCI_USB example I see the hci1 entry for the dongle. I realize that the USB will auto mount, unlike ttyS0, this is just to evidence that the dongle is functional.