0

Try to connect RPI gattool to nrf52840 fails
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Try to connect RPI gattool to nrf52840 fails

by gertAF on Wed Jun 15, 2022 9:56 pm

Hello All,

BLE noob here.

Getting started with nrf52840. I have it up and running and can use the android 'Bluefruit Connect' app to play with the UART functionality. Using the 'bleuart' sketch from the examples code. All that works OK. I can type text in both directions.

Now I want to do the same testing with RPI. I've the RPI3B with latest RPI OS 'Bullseye'.
Scanning for BLE devices shows the nrf52840.

Code: Select all | TOGGLE FULL SIZE
# hcitool -i hci0 lescan | grep Feather
E3:EF:DB:A9:14:BD Feather nRF52840 Express
E3:EF:DB:A9:14:BD Feather nRF52840 Express
E3:EF:DB:A9:14:BD Feather nRF52840 Express
E3:EF:DB:A9:14:BD Feather nRF52840 Express


So I am trying to follow instructions here https://askubuntu.com/questions/1335431/command-line-interface-to-ble-uart.

Using gattool the connect commands fails.

Code: Select all | TOGGLE FULL SIZE
# gatttool -i hci0 -b E3:EF:DB:A9:14:BD -I
[E3:EF:DB:A9:14:BD][LE]> connect
Attempting to connect to E3:EF:DB:A9:14:BD
Error: connect to E3:EF:DB:A9:14:BD: Connection refused (111)
[E3:EF:DB:A9:14:BD][LE]>


Please help debug.

Thanks,
Gert

gertAF
 
Posts: 18
Joined: Sun May 21, 2017 2:57 pm

Re: Try to connect RPI gattool to nrf52840 fails

by adafruit_support_mike on Thu Jun 16, 2022 8:03 pm

Try using ‘bluetoothctl’ instead of ‘hcitool’ and ‘gatttool’. I’ve seen some references that say those are the older tools and are now deprecated.

Here’s a reference for ‘bluetoothctl’:

https://www.makeuseof.com/manage-blueto ... etoothctl/

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Re: Try to connect RPI gattool to nrf52840 fails

by austin944 on Mon Jun 27, 2022 2:40 pm

I got it to work by adding the following gattool option:
Code: Select all | TOGGLE FULL SIZE
  -t random

I also put 'sudo' in front of the command.

austin944
 
Posts: 8
Joined: Sun Jan 17, 2021 8:45 pm

Re: Try to connect RPI gattool to nrf52840 fails

by adafruit_support_mike on Mon Jun 27, 2022 9:19 pm

Glad to hear you got things working. Happy hacking!

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Re: Try to connect RPI gattool to nrf52840 fails

by austin944 on Mon Jun 27, 2022 9:32 pm

adafruit_support_mike wrote:Glad to hear you got things working. Happy hacking!


The original poster may or may not have gotten theirs to work. Just saying...

austin944
 
Posts: 8
Joined: Sun Jan 17, 2021 8:45 pm

Please be positive and constructive with your questions and comments.