I’ve been able to use an Arduino Nano 33 BLE and create a UART connection to the unit with an iPhone (using Bluefruit Connect). I can send and receive messages; this is great. Relatively simple setup.
Now, the trick is to do so with a Linux box (Ubuntu 20.04).
From what I gather, using ‘sudo hcitool -i hci0 lescan’ can do an LE Scan, and I can see the various devices around. For example:
The device I’ve been able to connect to via the phone, ‘MYDEV’ has two entries. The question is, how does one connect to this device (which has a UART capability) from the Linux command line? Again, a simple ‘Echo’ program (which is in the HardwareSerialBLE examples) works fine with the phone.
I’ve tried the gatttool command in interactive mode:
gatttool --device=.... -I
…and can connect to the device. I’ve tried some of the commands here:
The primary and characteristic commands show values that show that the serial communication stuff is there:
But what is the next step in connecting, so things can be sent back and forth?