Jump to content

rawaaw

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. >>I activated UART in the armbian-config As i understood you have opi 3 board. Wifi/BT is AP6255 and pins for connecting BT part to CPU the same as on opi lite2. http://www.orangepi.org/downloadresources/OrangePi3/2019-01-23/orangepi3_b1a3a5d8f07c69d0da699e77d6.html Did you enabled uart1 with overlay ? Default .dtb for opi lite2 (i don't know what about opi3 board) already has uart1. You should not activate uart1 overlay in this case. You may check this for your board with dtc -I dtb -O dts /boot/dtb-xxx-sunxi64/allwinner/sun50i-h6-xxx.dtb Check lines in the output like this: .... uart1-pins { pins = "PG6", "PG7"; function = "uart1"; phandle = <0x1d>; }; uart1-rts-cts-pins { pins = "PG8", "PG9"; function = "uart1"; phandle = <0x1e>; }; ... Also you may check pin assignment with cat /sys/kernel/debug/pinctrl/*/pinmux-pins If uart1 initialized you can see lines: ... pin 198 (PG6): 5000400.serial (GPIO UNCLAIMED) function uart1 group PG6 pin 199 (PG7): 5000400.serial (GPIO UNCLAIMED) function uart1 group PG7 pin 200 (PG8): 5000400.serial (GPIO UNCLAIMED) function uart1 group PG8 pin 201 (PG9): 5000400.serial (GPIO UNCLAIMED) function uart1 group PG9 ... Did you load hci_uart module with modprobe before enable BT chip and hciattach ? PS: What result of 'hciconfig hci0' command ?
  2. >>root@orangepilite2:~# hciattach /dev/ttyS1 bcm43xx 921600 noflow - When i tried attach 6255 by this way BT adapter hangs up. So i set mac address with brcm_patchram_plus and do attach adapter as generic hci device with hciattach /dev/ttyS1 any see my previous post for detailes
  3. >>Have you tried if it is actually working? actually I use this board for working with BLE devices. i use armbian: Linux orangepilite2 5.2.5-sunxi64 #5.92 SMP Fri Aug 2 07:51:38 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux Ubuntu 18.04.3 LTS \n \l also check user 'data' post at april 27 cd /lib/firmware/brcm cp brcmfmac43455-sdio.txt brcmfmac43455-sdio.xunlong,orangepi-lite2.txt also i compilted brcm_patchram_plus for change mac address. https://github.com/phelum/CT_Bluetooth/blob/master/brcm_patchram_plus.c gcc -o brcm_patchram_plus brcm_patchram_plus.c #/bin/sh echo 388 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio388/direction echo 1 >/sys/class/gpio/gpio388/value sleep 1 /root/brcm_patchram_plus --bd_addr 11:22:33:44:55:66 /dev/ttyS1 sleep 1 hciattach /dev/ttyS1 any hciconfig hci1 up hciconfig hci1 exit 0 root@orangepilite2:~# ./hci.sh Device setup complete hci1: Type: Primary Bus: UART BD Address: 11:22:33:44:55:66 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:668 acl:0 sco:0 events:34 errors:0 TX bytes:423 acl:0 sco:0 commands:34 errors:0 BLE actually working: root@orangepilite2:~# hcitool -i hci1 lescan LE Scan ... EB:98:F8:C0:XX:XX (unknown) EB:98:F8:C0:XX:XX Mi Band 3 EE:1A:6E:72:YY:YY (unknown) EE:1A:6E:72:YY:YY Mi Smart Band 4 root@orangepilite2:~# gatttool -t random -i hci1 -b EB:98:F8:C0:XX:XX -I [EB:98:F8:C0:XX:XX][LE]> connect Attempting to connect to EB:98:F8:C0:XX:XX Connection successful [EB:98:F8:C0:XX:XX][LE]> char-desc handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb .....
  4. Seems i found some workaround for OPi Lite2 board under latest armbian image for OPi lite2 (Linux orangepilite2 5.2.5-sunxi64 #5.92). uart1 is configured properly by board DTB (no loaded uart1 overlay!) but bt chip on ttyS1 not answered. Board schematics (OrangePi_Lite2_Schematics_v2.0.pdf) is strange: BT-RST-N pulled up to vcc (R139 on schematics) and pulled down to GND (R147). After boot pin PM4 (BT-REG-ON -> BT-RST-N) is unclaimed and seems BT-RST-N actually has low level. cat /sys/kernel/debug/pinctrl/*/pinmux-pins pin 388 (PM4): UNCLAIMED 1. Try pull up this pin: echo 388 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio388/direction echo 1 >/sys/class/gpio/gpio388/value 2. load hci_uart module and do attach to uart1: modprobe hci_uart hciattach /dev/ttyS1 any 3. now i see two hci devices: root@orangepilite2:~# hciconfig hci1: Type: Primary Bus: UART BD Address: AA:AA:AA:AA:AA:AA ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:712 acl:0 sco:0 events:38 errors:0 TX bytes:464 acl:0 sco:0 commands:44 errors:0 hci0: Type: Primary Bus: SDIO BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:0 acl:0 sco:0 events:0 errors:0 TX bytes:0 acl:0 sco:0 commands:0 errors:0 4. try to up hci1: hciconfig hci1 up 5. hci1 up and running now. root@orangepilite2:~# hciconfig hci1 hci1: Type: Primary Bus: UART BD Address: AA:AA:AA:AA:AA:AA ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:1410 acl:0 sco:0 events:74 errors:0 TX bytes:895 acl:0 sco:0 commands:80 errors:0 root@orangepilite2:~# hciconfig hci1 version hci1: Type: Primary Bus: UART BD Address: AA:AA:AA:AA:AA:AA ACL MTU: 1021:8 SCO MTU: 64:1 HCI Version: 4.1 (0x7) Revision: 0x0 LMP Version: 4.1 (0x7) Subversion: 0x6119 Manufacturer: Broadcom Corporation (15)
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines