====== PIDflight Lap ====== ===== How to connect to Bluetooth with the GUI application for Linux ===== This guide should apply to most Linux distributions, this was specifically performed on Ubuntu 18.04. - Pair to the Bluetooth module (e.g. HC-06/HC-05/HM-10) using ''bluetoothctl''. - Type ''scan on'' to discover the Bluetooth module and MAC address. - Type ''pair '' to pair, enter pin/pass code when/if prompted. - Type ''exit'' to leave Bluetooth control utility. $ bluetoothctl [NEW] Controller B8:D1:3F:07:76:AE CMengler [default] Agent registered [bluetooth]# scan on Discovery started [CHG] Controller B8:D1:3F:07:76:AE Discovering: yes [NEW] Device 20:17:01:12:21:09 PIDFLIGHT [bluetooth]# pair 20:17:01:12:21:09 Attempting to pair with 20:17:01:12:21:09 [CHG] Device 20:17:01:12:21:09 Connected: yes Request PIN code [PID..agent] Enter PIN code: 1234 [CHG] Device 20:17:01:12:21:09 UUIDs: 00001101-0000-1000-8000-00805f9b34fb [CHG] Device 20:17:01:12:21:09 ServicesResolved: yes [CHG] Device 20:17:01:12:21:09 Paired: yes Pairing successful [CHG] Device 20:17:01:12:21:09 ServicesResolved: no [CHG] Device 20:17:01:12:21:09 Connected: no [bluetooth]# exit Agent unregistered - Bind to your paired Bluetooth module with **RFCOMM**. - 0 refers to the device (e.g. /dev/rfcomm0 will be created in this case). - 20:17:01:12:21:09 is the MAC address of the paired Bluetooth module. - 1 is the channel to use. sudo rfcomm bind 0 20:17:01:12:21:09 1 - Open the GUI lap timing app. - Select 'Manual selection' from the drop down menu. - Enter ''/dev/rfcomm0'' in the 'Ports' field.{{ :pidflightlap:pidflightlap_gui_bluetooth_linux.png?nolink |}} - Click 'Connect'. When you have finished with the Bluetooth connection, type the following to release the rfcomm0 device. sudo rfcomm release 0