Peter 5 роки тому
батько
коміт
31012bed46
1 змінених файлів з 77 додано та 1 видалено
  1. 77 1
      software/BananaPiM2+/doku.md

+ 77 - 1
software/BananaPiM2+/doku.md

@@ -65,6 +65,82 @@ sudo nano /etc/dbus-1/system.d/bluetooth.conf
 
 sudo reboot
 
-
+rfkill list
+
+0: sunxi-bt: Bluetooth
+	Soft blocked: no
+	Hard blocked: no
+1: phy0: Wireless LAN
+	Soft blocked: yes
+	Hard blocked: no
+2: brcmfmac-wifi: Wireless LAN
+	Soft blocked: yes
+	Hard blocked: no
+4: hci0: Bluetooth
+	Soft blocked: yes
+	Hard blocked: no
+
+rfkill unblock bluetooth
+
+0: sunxi-bt: Bluetooth
+	Soft blocked: no
+	Hard blocked: no
+1: phy0: Wireless LAN
+	Soft blocked: yes
+	Hard blocked: no
+2: brcmfmac-wifi: Wireless LAN
+	Soft blocked: yes
+	Hard blocked: no
+4: hci0: Bluetooth
+	Soft blocked: no
+	Hard blocked: no
+
+bluetoothctl
+
+power on
+
+agent on
+
+scan on
+
+# wait few seconds
+
+scan off
+
+pair 00:0B:CE:04:F6:66
+
+#Attempting to pair with 00:0B:CE:04:F6:66
+#Request PIN code
+#[blue1m[agent] Enter PIN code: 0000
+
+#[CHG] Device 00:0B:CE:04:F6:66 Connected: yes
+#[CHG] Device 00:0B:CE:04:F6:66 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
+#[CHG] Device 00:0B:CE:04:F6:66 ServicesResolved: yes
+#[CHG] Device 00:0B:CE:04:F6:66 Paired: yes
+#Pairing successful
+
+info 00:0B:CE:04:F6:66
+
+#Device 00:0B:CE:04:F6:66 (public)
+#	Name: BAmobile
+#	Alias: BAmobile
+#	Class: 0x00001f00
+#	Paired: yes
+#	Trusted: no
+#	Blocked: no
+#	Connected: no
+#	LegacyPairing: yes
+#	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
+
+sudo rfcomm bind 0 00:0B:CE:04:F6:66
+
+sudo rfcomm show /dev/rfcomm0 0
+#rfcomm0: 00:0B:CE:04:F6:66 channel 1 clean
+
+#test send
+sudo python3 -c 'print("\26\01\62\65\72\6c\69\6e")' > /dev/rfcomm
+
+#test empfang
+cat /dev/rfcomm0
 
 ```