cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Bluetooth for Linux

wach_1503866
New Contributor


root@localhost:~# .
/brcm_patchram_plus -d --patchram bcm43438a1.hcd --no2bytes --baudrate 115200 --tosleep 200000 /dev/ttymxc2

root@localhost:~# hciattach /dev/ttymxc2 any 115200

root@localhost:~# hciconfig hci0 up

root@localhost:~# bluetoothctl

Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent on
Too many arguments
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 00:E9:3A:7E:1E:46 Discoverable: yes
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Device E0:DC:FF:C8:38:60 Connected: yes
Request confirmation
[agent] Confirm passkey 633804 (yes/no): yes
[CHG] Device E0:DC:FF:C8:38:60 Connected: no
[bluetooth]#

wach_1503866_0-1629769948097.png

使用其它设备和板子蓝牙连接,蓝牙连接上后,立马断开连接。

 

0 Likes
10 Replies
Zhengbao_Zhang
Moderator
Moderator

hello:

root@localhost:~# ./brcm_patchram_plus -d --patchram bcm43438a1.hcd --no2bytes --baudrate 115200 --tosleep 200000 /dev/ttymxc2

Did you get any logs or values of return to see if the download was successful?

0 Likes
wach_1503866
New Contributor
 Thank you for your reply. 
 
root@localhost:~# ./brcm_patchram_plus -d --patchram bcm43438a1.hcd --no2bytes --baudrate 115200 --tosleep 200000 /dev/ttymxc2
 
    The complete log is attached。
0 Likes
Zhengbao_Zhang
Moderator
Moderator

Did you try to set 

--baudrate 3000000 to see if it can work well?

0 Likes
wach_1503866
New Contributor

--baudrate 3000000  it can work

0 Likes
Zhengbao_Zhang
Moderator
Moderator

got some info from i.MX application document, seems they are using hciattch to load the firmware , and set the working baudrate to 3M.

First boot the platform and login as “root”.
$ cd /etc/firmware
$ mv CYW4345C0.1MW.hcd BCM4345C0.1MW.hcd
$ hciattach /dev/ttymxc1 bcm43xx 3000000 flow -t 20 ç “/dev/ttymxc1” is correct UART for i.MX6UL(L) EVK
$ hciconfig hci0 up
$ hcitool scan

0 Likes
wach_1503866
New Contributor

root@localhost:/etc/firmware# hciattach /dev/ttymxc2 bcm43xx 3000000 flow -t 20
bcm43xx_init
Set Controller UART speed to 3000000 bit/s
Flash firmware /etc/firmware/BCM43430A1.hcd
Set Controller UART speed to 3000000 bit/s
Device setup complete
root@localhost:/etc/firmware# hciconfig hci0 up
root@localhost:/etc/firmware# hcitool scan
Scanning ...
E0:CC:F8:AE:A2:EA n/a
root@localhost:/etc/firmware# bluetoothctl
Agent registered
[CHG] Controller 00:E9:3A:7E:1E:46 Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 00:E9:3A:7E:1E:46 Discoverable: yes
[bluetooth]# show
Controller 00:E9:3A:7E:1E:46 (public)
Name: BlueZ 5.61
Alias: BlueZ 5.61
Class: 0x00000000
Powered: yes
Discoverable: yes
DiscoverableTimeout: 0x000000b4
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d053D
Discovering: no
[NEW] Device E0:DC:FF:C8:38:60 mi k20pro
Request confirmation
[agent] Confirm passkey 804620 (yes/no): yes
[CHG] Device E0:DC:FF:C8:38:60 Modalias: bluetooth:v038Fp1200d1436
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001115-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001116-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device E0:DC:FF:C8:38:60 UUIDs: 98b97136-36a2-11ea-8467-484d7e99a198
[CHG] Device E0:DC:FF:C8:38:60 ServicesResolved: yes
[CHG] Device E0:DC:FF:C8:38:60 Paired: yes
[CHG] Device E0:DC:FF:C8:38:60 ServicesResolved: no
[CHG] Device E0:DC:FF:C8:38:60 Connected: no
[bluetooth]#

0 Likes
Zhengbao_Zhang
Moderator
Moderator

hello:

  两种bringup 方式的结果是一样吗, 还是连上去会断开?

0 Likes
wach_1503866
New Contributor

是的。现象是一样的

0 Likes
Zhengbao_Zhang
Moderator
Moderator

有没有办法搞一个sniffer,我有点怀疑是和lpm相关的问题。

0 Likes
wach_1503866
New Contributor

我们目前没有sniffer,我们保存了 Bluez HCI log 在附件中。

0 Likes