Jump to content

sergvpurik

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by sergvpurik

  1. I've built Armbain (5.4.17-rockchip64) from sources with additing the next options CONFIG_BT_HCIUART_SERDEV=y,  CONFIG_BT_HCIUART_H4=y, CONFIG_BT_HCIUART_BCM=y to linux-rockchip64-current.config.

    And bluetooth is working.
     

    brcm_patchram_plus_rk3399[1446]: Done setting baudrate
    Feb  3 20:28:32 localhost kernel: [   99.787745] Bluetooth: Core ver 2.22
    Feb  3 20:28:32 localhost kernel: [   99.787784] NET: Registered protocol family 31
    Feb  3 20:28:32 localhost kernel: [   99.787787] Bluetooth: HCI device and connection manager initialized
    Feb  3 20:28:32 localhost kernel: [   99.787797] Bluetooth: HCI socket layer initialized
    Feb  3 20:28:32 localhost kernel: [   99.787802] Bluetooth: L2CAP socket layer initialized
    Feb  3 20:28:32 localhost kernel: [   99.787809] Bluetooth: SCO socket layer initialized
    Feb  3 20:28:32 localhost kernel: [   99.800667] Bluetooth: HCI UART driver ver 2.3
    Feb  3 20:28:32 localhost kernel: [   99.800672] Bluetooth: HCI UART protocol H4 registered
    Feb  3 20:28:32 localhost kernel: [   99.800829] Bluetooth: HCI UART protocol Broadcom registered
    Feb  3 20:28:32 localhost brcm_patchram_plus_rk3399[1446]: Done setting line discpline
    Feb  3 20:28:32 localhost systemd[1]: Starting Load/Save RF Kill Switch Status...
    Feb  3 20:28:32 localhost systemd[1]: Starting Bluetooth service...
    Feb  3 20:28:32 localhost systemd[1]: Started Load/Save RF Kill Switch Status.
    rock@rockpi:~$ hciconfig 
    hci0:	Type: Primary  Bus: UART
    	BD Address: 43:45:C5:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
    	UP RUNNING 
    	RX bytes:1186 acl:0 sco:0 events:77 errors:0
    	TX bytes:3609 acl:0 sco:0 commands:71 errors:0
    
    rock@rockpi:~$ sudo hcitool lescan
    LE Scan ...
    D8:2D:27:A6:53:45 (unknown)
    D8:2D:27:A6:53:45 Mi Smart Band 4
    F8:D8:37:3D:17:75 (unknown)
    F8:D8:37:3D:17:75 Mi Smart Band 4

    ... but only after a cold boot, as @piter75 said.

     

    Who knows what is a right way to make changes in Armbian sources to fix Linux kernel options for Rock Pi 4?
    I want to make pull request.

  2. Looks like the typo "--use_baudrate_for_downloade" is used to skip this brcm_patchram_plus_rk3399 option.

    I've tried to use brcm_patchram_plus_rk3399 without "--use_baudrate_for_downloade". I did power OFF/ON.

     

    Jan 31 19:28:46 localhost systemd[1]: Starting Bluetooth Rockpi...
    ...
    Jan 31 19:28:46 localhost brcm_patchram_plus_rk3399[1126]: proc_resetwriting
    Jan 31 19:28:46 localhost brcm_patchram_plus_rk3399[1126]: 01 03 0c 00
    Jan 31 19:28:46 localhost kernel: [   86.277578] ttyS0 - failed to request DMA
    ...
    Jan 31 19:28:46 localhost brcm_patchram_plus_rk3399[1126]: received 7
    Jan 31 19:28:46 localhost brcm_patchram_plus_rk3399[1126]: 04 0e 04 01 03 0c 00
    Jan 31 19:28:46 localhost brcm_patchram_plus_rk3399[1126]: writing
    ...
    Here're many "writing" and "received X" messages mixed with HEX dumps.
    ...
    Jan 31 19:28:50 localhost brcm_patchram_plus_rk3399[1126]: Done setting baudrate
    Jan 31 19:28:50 localhost kernel: [   90.111432] Bluetooth: Core ver 2.22
    Jan 31 19:28:50 localhost kernel: [   90.111479] NET: Registered protocol family 31
    Jan 31 19:28:50 localhost kernel: [   90.111481] Bluetooth: HCI device and connection manager initialized
    Jan 31 19:28:50 localhost kernel: [   90.111491] Bluetooth: HCI socket layer initialized
    Jan 31 19:28:50 localhost kernel: [   90.111495] Bluetooth: L2CAP socket layer initialized
    Jan 31 19:28:50 localhost kernel: [   90.111503] Bluetooth: SCO socket layer initialized
    Jan 31 19:28:50 localhost brcm_patchram_plus_rk3399[1126]: Can't set hci protocol
    Jan 31 19:28:50 localhost kernel: [   90.119645] Bluetooth: HCI UART driver ver 2.3
    ...
    Jan 31 19:28:55 localhost systemd[1]: Starting Bluetooth service...
    Jan 31 19:28:55 localhost bluetoothd[1729]: Bluetooth daemon 5.50
    Jan 31 19:28:55 localhost dbus-daemon[779]: [system] Successfully activated service 'org.bluez'
    Jan 31 19:28:55 localhost systemd[1]: Started Bluetooth service.
    Jan 31 19:28:55 localhost bluetoothd[1729]: Starting SDP server
    Jan 31 19:28:56 localhost bluetoothd[1729]: kernel lacks bnep-protocol support
    Jan 31 19:28:56 localhost bluetoothd[1729]: System does not support network plugin
    Jan 31 19:28:56 localhost bluetoothd[1729]: Bluetooth management interface 1.14 initialized
    Jan 31 19:28:56 localhost NetworkManager[806]: <info>  [1580498936.0221] bluez: use BlueZ version 5
    
      

    ... and no bluetooth.

    hciconfig doesn't show any device.

     

     I found there isn't any selected HCI protocol in /proc/config.gz.

    #
    # Bluetooth device drivers
    #
    # CONFIG_BT_HCIBTUSB is not set
    # CONFIG_BT_HCIBTSDIO is not set
    CONFIG_BT_HCIUART=m
    # CONFIG_BT_HCIUART_H4 is not set
    # CONFIG_BT_HCIUART_BCSP is not set
    # CONFIG_BT_HCIUART_ATH3K is not set
    # CONFIG_BT_HCIUART_INTEL is not set
    # CONFIG_BT_HCIUART_AG6XX is not set
    # CONFIG_BT_HCIBCM203X is not set
    # CONFIG_BT_HCIBPA10X is not set
    # CONFIG_BT_HCIBFUSB is not set
    # CONFIG_BT_HCIVHCI is not set
    # CONFIG_BT_MRVL is not set
    CONFIG_BT_MTKSDIO=m
    # end of Bluetooth device drivers

    It looks similar to Raspberry Pi bluetooth problem ( https://github.com/raspberrypi/linux/issues/2479 ).

    And the solution was enabling CONFIG_SERIAL_DEV_BUS=m, CONFIG_BT_HCIUART_SERDEV=y, CONFIG_BT_HCIUART_BCM=y options.

  3. Hello.


    I've Radxa Rock Pi 4 SBC.

     

    I've tried several latest Armbian Buster images with 5.x kernel and never got bluetooth working.

     

    I've tested your propose on Armbian_20.02.0-rc1_Rockpi-4b_buster_current_5.4.14_desktop...

     

    On 1/27/2020 at 3:27 PM, ot8 said:

    By the way, in the service file it uses "--use_baudrate_for_downloade", typo and should be "--use_baudrate_for_download"

     

     

    ... bluetooth doesn't work and I've got a flood in Rock Pi 4 syslog

    ...
    Jan 30 20:10:30 rockpi brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    Jan 30 20:10:34 rockpi brcm_patchram_plus_rk3399[1089]: writing
    Jan 30 20:10:34 rockpi brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    Jan 30 20:10:38 rockpi brcm_patchram_plus_rk3399[1089]: writing
    Jan 30 20:10:38 rockpi brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    Jan 30 20:10:42 rockpi brcm_patchram_plus_rk3399[1089]: writing
    Jan 30 20:10:42 rockpi brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    ....

     

    There're also interesting bluetooth related messages in Rock Pi 4 syslog:

    ...
    Jan 30 19:41:41 localhost systemd[1]: Starting Bluetooth Rockpi...
    
    ...
    Jan 30 19:41:50 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped.
    Jan 30 19:41:50 localhost brcm_patchram_plus_rk3399[1089]: writing
    Jan 30 19:41:50 localhost brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    Jan 30 19:41:54 localhost brcm_patchram_plus_rk3399[1089]: writing
    Jan 30 19:41:54 localhost brcm_patchram_plus_rk3399[1089]: 01 03 0c 00
    
    ...
    
    Jan 30 19:45:10 localhost dbus-daemon[803]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.44' (uid=1000 pid=1830 comm="/usr/lib/chromium/chromium --disable-smooth-scroll")
    Jan 30 19:45:10 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped.
    
    ...

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines