Add Bluetooth to A13-OLinuXino-WIFI with MOD-BT


Image

To add Bluetooth connectivity to A13-OLinuXino is very easy with MOD-BT as both have UEXT connector.

To tune MOD-BT is a bit tricky though as by default on UEXT UART is conected the console so all console messages will go through MOD-BT and vice versa all messages from MOD-BT will go as commands to the console.

Here is the correct sequence to enable Bluetooth on A13-OLinuXino with MOD-BT:

1. Make sure you have ssh enabled

# /etc/init.d./ssh start

2. Reboot A13 WITHOUT MOD-BT

3. Connect via ssh

#ssh root@192.168.0.xxx

4. Disable the console to UEXT UART

#nano /etc/inittab
and comment "T0:23:respawn:/sbin/getty -L -a root ttyS0 115200 vt102"
then restart inittab
#init q

5. Connect MOD-BT to UEXT end enter the following commantds:

#echo AT+BTAUT=1,0 > /dev/ttyS0
#echo AT+BTSRV=1 > /dev/ttyS0

these commands initialize MOD-BT to enable Serial UART Bluetooth profile, i.e. from now on all input stream received by MOD-BT will be transmitted to the paired device and all messages received will be sent to the UART

this way you can use remote device to connect to A13-OLinuXino via Bluetooth COM port

6. On other PC or PHONE connect to MOD-BT and start virtual COM port

7. Enable again the console now which will be seen by the Bluetooth device

#nano /etc/inittab
Uncomment "T0:23:respawn:/sbin/getty -L -a root ttyS0 115200 vt102"
#init q

that’s it now your console is again enabled but your MOD-BT is configured to send and receive the messages through Bluetooth Serial Port Profile to the paired Bluetooth device

Leave a comment