EDIT: Oops forgot to post app...

https://play.google.com/store/apps/deta ... Controller
Code: Select all
sudo nano /etc/systemd/system/dbus-org.bluez.service
Code: Select all
ExecStart=/usr/lib/bluetooth/bluetoothd -C
ExecStartPost=/usr/bin/sdptool add SP
Code: Select all
sudo rfcomm watch hci0
Wow, seriously? A search for 'pyserial' returns this (and hundreds of thousands others) : https://pythonhosted.org/pyserial/. PySerial comes installed in Raspbian, for Python 2, anyways.blaablaaguy wrote:Google revealed nothing...
I had followed your suggestions.Douglas6 wrote:You'll need to add the SP profile to the Pi. Edit this file:Add the compatibility flag, ' -C', at the end of the 'ExecStart=' line. Add a new line after that to add the SP profile. The two lines should look like this:Code: Select all
sudo nano /etc/systemd/system/dbus-org.bluez.service
Save the file and reboot. Pair and trust your Pi and phone with bluetoothctl.Code: Select all
ExecStart=/usr/lib/bluetooth/bluetoothd -C ExecStartPost=/usr/bin/sdptool add SP
Now, in a terminal on the Pi, enter the following:Now you can connect from the app and send text or macros.Code: Select all
sudo rfcomm watch hci0
1. Not sure what you mean. Yes, you will want to keep the rfcomm watch command running.baruchli wrote: 1. Should I keep Pi Serial interface enabled in this configuration?
2. What port I should config on Pi minicom to observe and send serial data? Is it /dev/rfcomm0? Are there any serial port parameters I should set on minicom for successful data exchange?
3. What is connection between /dev/rfcomm0 and hci0
Code: Select all
minicom -D /dev/rfcomm0
I speak about this GUI option:1. Not sure what you mean.
So I should add commandYes, you will want to keep the rfcomm watch command running.
Code: Select all
sudo rfcomm watch hci0
Thank you! Meantime I managed to send bytes back and forward2. Yes, tell minicom to use the /dev/rfcomm0 port.You may need to set the baud rate with the -b flag.Code: Select all
minicom -D /dev/rfcomm0
3. hci0 is the Bluetooth adapter. /dev/rfcomm0 is the virtual serial device you told rfcomm to create using that adapter. Since it is the first one, it got named with a zero.