-
Notifications
You must be signed in to change notification settings - Fork 0
/
bluetooth_command
51 lines (26 loc) · 1.03 KB
/
bluetooth_command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#To discover available device and theri positions.
$ hcitool scan
#To pair the device
$ sudo rfcomm bind device_number device_mac_address channel_number
#To remove bluetooth devices
$ bluetoothctl
$ remove device_mac_address
or
$ bluetoothctl remove device_mac_address
##python using serial package to see paired device
from serial.tools import list_ports
x = list(list_ports.comports())
print(x)
or
import serial.tools.list_ports
plist = list(serial.tools.list_ports.comports())
print(plist)
##https://makersportal.com/blog/2018/2/25/python-datalogger-reading-the-serial-output-from-arduino-to-analyze-data-using-pyserial
## To list availabe serial ports
import serial.tools.list_ports
a=serial.tools.list_ports.comports()
print(a)
or
python3 -m serial.tools.list_ports
bluetooth module connection and data sending video: https://www.youtube.com/watch?v=3tcn496oxnk&list=PLEKKh7ssoVZxbm4Dgu-v-LKG9TobkgJSX&index=22&t=0s
bluetooth module connection and data sending git-hub: https://github.com/LessonStudio/Arduino_Bluetooth