

CryBaby
-
Posts
110 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by CryBaby
-
-
23 hours ago, redjr said:
I've been reading a bit about u-boot, but it is not clear(to me), how you easily access it via the P2.
Usually u-boot will pause briefly to allow you to interrupt it by hitting Enter or Ctrl-C (either on the console or serial terminal). You then get a command line. The boot order will be set in an 'environment variable' which you can view, edit and save. Useful commands are printenv, setenv, saveenv and help. The most interesting environment variable is bootcmd which you probably want to change to 'sdcard'. I think you are specifying a function here rather than a device so it will depend on what functions are available.
On 7/14/2021 at 8:25 AM, redjr said:If there's a way to clear the eMMC of Station OS(which I'm sure there is), then perhaps the SD card would be read and boot into Linux/Ubuntu 18.04. But in so doing are you also clearing out parts of the firmware, drivers, etc? I don't want to be too adventurous of fear of bricking this thing!
I would not assume that there is a boot order by default. If not then an empty eMMC might just mean no boot. It might even mean no u-boot.
On 7/14/2021 at 8:25 AM, redjr said:WIth Station OS running you simply can't SSH into the system and get to the /root of Linux. And I don't see a way within Station OS, to drop down to the LInux level.
I believe Station OS is a version of Android. If there is an app store maybe you can install an ssh server or terminal program from there. Alternatively, you may be able to get a shell using ADB from your PC.
-
Perusing the wiki again I get the impression that booting from the SD card is not something they expect people to do. The instructions are for using it to upgrade the firmware, ie. overwrite the eMMC with a new OS. The images they provide may therefore not be bootable.
On the other hand I just noticed an "SD Boot" option in their firmware upgrade tool. You might experiment with that, if you manage to download it.
-
The wiki vaguely describes a procedure for installing Ubuntu, the images are provided here:
http://en.t-firefly.com/doc/download/94.html
My P2 arrived today. Unfortunately I am in another country entirely and will be for about a month, or longer if Covid has its way. So let us know how you get on with it.
-
Looks like it has moved again: /sys/power/axp_pmu/ac on Armbian 21.08.0-trunk.77 Focal
The old battery info is at /sys/power/axp_pmu/axp20x-battery-power-supply/power_supply/axp20x-battery
"A foolish consistency is the hobgoblin of little minds."
-
Nah, using brcmfmac43362-sdio.bin and brcmfmac43362-sdio.cubietech,cubietruck.txt from linux-firmware with no hcd gives a (non-functioning) controller on cold boot only.
Adding in ap6210/bcm20710a1.hcd gives no controller.
Also, none of the 54 hcd files from github match ap6210/bcm20710a1.hcd
I don't know what to try next.
-
I have the same one:
/lib/firmware$ strings ap6210/fw_bcm40181a2.bin | grep 43362 43362a2-roml/sdio-g-pno-pktfilter-keepalive-wapi-wme-p2p-*unknown* Version: 5.90.195.0 CRC: b99a439d Date: Mon 2014-03-10 15:00:57 CST /lib/firmware$ ls -la brcm/brcmfmac43362* lrwxrwxrwx 1 root root 27 Jul 21 07:05 brcm/brcmfmac43362-sdio.bin -> ../ap6210/fw_bcm40181a2.bin -rw-r--r-- 1 root root 1121 Jul 20 21:15 brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt $ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 12.799205] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1
And it seems to be using it.
I think we've established that we can load what we think are the right firmware files, either by the new kernel style or the old userspace style, and it all looks fine (to the best of my knowledge, such as it is) but it still doesn't actually work.
I'm gong to try the linux-firmware files again. I suspect I may have screwed up before.
-
I removed the bluetooth stanza from the dt. Installed CT_Bluetooth and rebuilt the binaries. Set it to use /dev/ttyS2 and the systemd service from here. I had to link the hcd from ap6210/ to brcm/ to start the brcm40183-patch.service then I got a controller:
$ sudo systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-07-22 20:54:40 CST; 5s ago Docs: man:bluetoothd(8) Main PID: 1938 (bluetoothd) Status: "Running" Tasks: 1 (limit: 4553) Memory: 1.3M CGroup: /system.slice/bluetooth.service └─1938 /usr/lib/bluetooth/bluetoothd Jul 22 20:54:40 truck1 systemd[1]: Starting Bluetooth service... Jul 22 20:54:40 truck1 bluetoothd[1938]: Bluetooth daemon 5.53 Jul 22 20:54:40 truck1 systemd[1]: Started Bluetooth service. Jul 22 20:54:40 truck1 bluetoothd[1938]: Starting SDP server Jul 22 20:54:40 truck1 bluetoothd[1938]: Bluetooth management interface 1.14 initialized Jul 22 20:54:40 truck1 bluetoothd[1938]: Endpoint registered: sender=:1.45 path=/MediaEndpoint/A2DPSink/sbc Jul 22 20:54:40 truck1 bluetoothd[1938]: Endpoint registered: sender=:1.45 path=/MediaEndpoint/A2DPSource/sbc $ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 13.127350] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.430411] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 15.494788] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 15.499792] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Mar 10 2014 14:59:50 version 5.90.195.89.18 FWID 01-b13c09c7 [ 35.495118] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 35.508654] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5 [ 1334.088176] Bluetooth: Core ver 2.22 [ 1334.088375] Bluetooth: HCI device and connection manager initialized [ 1334.088404] Bluetooth: HCI socket layer initialized [ 1334.088417] Bluetooth: L2CAP socket layer initialized [ 1334.088451] Bluetooth: SCO socket layer initialized [ 1334.172727] Bluetooth: HCI UART driver ver 2.3 [ 1334.172743] Bluetooth: HCI UART protocol H4 registered [ 1334.172747] Bluetooth: HCI UART protocol BCSP registered [ 1334.172851] Bluetooth: HCI UART protocol LL registered [ 1334.172857] Bluetooth: HCI UART protocol ATH3K registered [ 1334.172915] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 1334.173218] Bluetooth: HCI UART protocol Intel registered [ 1334.173422] Bluetooth: HCI UART protocol Broadcom registered [ 1334.173477] Bluetooth: HCI UART protocol QCA registered [ 1334.173483] Bluetooth: HCI UART protocol AG6XX registered [ 1334.173542] Bluetooth: HCI UART protocol Marvell registered [ 1334.524690] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 1334.524703] Bluetooth: BNEP filters: protocol multicast [ 1334.524728] Bluetooth: BNEP socket layer initialized [ 1334.991299] Bluetooth: RFCOMM TTY layer initialized [ 1334.991339] Bluetooth: RFCOMM socket layer initialized [ 1334.991379] Bluetooth: RFCOMM ver 1.11 $ hciconfig -a hci0: Type: Primary Bus: UART BD Address: 43:29:B1:E6:A1:02 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:730 acl:0 sco:0 events:48 errors:0 TX bytes:3697 acl:0 sco:0 commands:48 errors:0 Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'truck1' Class: 0x0c0000 Service Classes: Rendering, Capturing Device Class: Miscellaneous, HCI Version: 4.0 (0x6) Revision: 0x1000 LMP Version: 4.0 (0x6) Subversion: 0x220e Manufacturer: Broadcom Corporation (15)
/dev/ttyS2 has not disappeared. Device not detected.
Looking at the service file it seems I shouldn't have to link the hcd. Hmm.
A cold reboot and the service didn't start. Doing it manually works though:
$ sudo systemctl status brcm40183-patch.service ● brcm40183-patch.service - Patch firmware for brcm40183 Bluetooth adapter Loaded: loaded (/etc/systemd/system/brcm40183-patch.service; enabled; vendor preset: enabled) Active: inactive (dead) martin@truck1:~$ sudo systemctl start brcm40183-patch.service martin@truck1:~$ sudo systemctl status brcm40183-patch.service ● brcm40183-patch.service - Patch firmware for brcm40183 Bluetooth adapter Loaded: loaded (/etc/systemd/system/brcm40183-patch.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-07-22 21:16:26 CST; 2s ago Process: 1846 ExecStartPre=/usr/local/bin/brcm_bt_reset /dev/${PORT} (code=exited, status=0/SUCCESS) Process: 1847 ExecStartPre=/bin/echo -en > /dev/${PORT} (code=exited, status=0/SUCCESS) Process: 1848 ExecStartPre=/usr/local/bin/brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --no2bytes --tosleep 1000 --bd_addr ${MAC_ADDR} /dev/${PORT} (code=exited> Main PID: 1849 (hciattach) Tasks: 1 (limit: 4562) Memory: 708.0K CGroup: /system.slice/brcm40183-patch.service └─1849 /usr/bin/hciattach -n /dev/ttyS2 any Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: DCD = 0 Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: Waiting for 1 bytes...7 done Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: received 7 Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: 04 0e 04 01 01 fc 00 Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: F/W load done Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: option patchram with arg /lib/firmware/ap6210/bcm20710a1.hcd Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: option no2bytes Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: option tosleep with arg 1000 Jul 22 21:16:26 truck1 brcm_patchram_plus[1848]: option bd_addr with arg 43:29:B1:E6:A1:02 Jul 22 21:16:26 truck1 systemd[1]: Started Patch firmware for brcm40183 Bluetooth adapter.
It looks like everything works except the radio part. I set the cubietruck to discoverable and my phone didn't see it though it picked up my R1 and even my laptop at five times the distance past the cubie.
-
My phone is not detected and it doesn't detect the cubietruck.
-
Using ap6210/nvram_ap6210.txt loses the controller again.
Using ap6210/nvram.txt and the newer brcmfmac43362-sdio.bin from linux-firmware has a controller after a cold boot but not after a warm boot. No device detected.
$ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 12.866616] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.871351] Bluetooth: Core ver 2.22 [ 13.871648] Bluetooth: HCI device and connection manager initialized [ 13.871674] Bluetooth: HCI socket layer initialized [ 13.871688] Bluetooth: L2CAP socket layer initialized [ 13.871725] Bluetooth: SCO socket layer initialized [ 14.143274] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 14.233200] Bluetooth: HCI UART driver ver 2.3 [ 14.233214] Bluetooth: HCI UART protocol H4 registered [ 14.233219] Bluetooth: HCI UART protocol BCSP registered [ 14.233321] Bluetooth: HCI UART protocol LL registered [ 14.233326] Bluetooth: HCI UART protocol ATH3K registered [ 14.233381] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 14.233618] Bluetooth: HCI UART protocol Intel registered [ 14.233864] Bluetooth: HCI UART protocol Broadcom registered [ 14.233920] Bluetooth: HCI UART protocol QCA registered [ 14.233925] Bluetooth: HCI UART protocol AG6XX registered [ 14.234008] Bluetooth: HCI UART protocol Marvell registered [ 14.234194] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 14.234422] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 14.659780] Bluetooth: hci0: BCM: chip id 63 [ 14.660457] Bluetooth: hci0: BCM: features 0x07 [ 14.666130] Bluetooth: hci0: BCM20702A [ 14.666152] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000 [ 14.666475] bluetooth hci0: Direct firmware load for brcm/BCM20702A1.hcd failed with error -2 [ 14.666488] bluetooth hci0: Falling back to sysfs fallback for: brcm/BCM20702A1.hcd [ 15.180796] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 16.225530] Bluetooth: hci0: BCM: Patch brcm/BCM20702A1.hcd not found [ 26.307828] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 26.307841] Bluetooth: BNEP filters: protocol multicast [ 26.307869] Bluetooth: BNEP socket layer initialized [ 49.502878] Bluetooth: RFCOMM TTY layer initialized [ 49.502915] Bluetooth: RFCOMM socket layer initialized [ 49.502982] Bluetooth: RFCOMM ver 1.11
Adding the hcd from ap6210 loses the controller again.
So the best result seems to be the firmware and nvram.txt from ap6210/ with no hcd. That gives a controller after a warm boot. Nothing detects my device. The only other working bt device I have is my phone. Maybe that is worth trying tomorrow.
-
Removing the line from the dtb gives me a new line in the log:
[ 14.709455] hci_uart_bcm serial0-0: No reset resource, using default baud rate
But there are no RFCOMM messages and no bt controller after two cold boots.
Next I moved the old firmware and NVRAM and linked the new firmware:
$ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 12.781584] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 12.819250] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt failed with error -2 [ 12.819266] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt [ 13.819752] Bluetooth: Core ver 2.22 [ 13.819935] Bluetooth: HCI device and connection manager initialized [ 13.819962] Bluetooth: HCI socket layer initialized [ 13.819973] Bluetooth: L2CAP socket layer initialized [ 13.820005] Bluetooth: SCO socket layer initialized [ 14.323565] Bluetooth: HCI UART driver ver 2.3 [ 14.323580] Bluetooth: HCI UART protocol H4 registered [ 14.323585] Bluetooth: HCI UART protocol BCSP registered [ 14.323745] Bluetooth: HCI UART protocol LL registered [ 14.323758] Bluetooth: HCI UART protocol ATH3K registered [ 14.323827] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 14.324126] Bluetooth: HCI UART protocol Intel registered [ 14.324390] Bluetooth: HCI UART protocol Broadcom registered [ 14.324445] Bluetooth: HCI UART protocol QCA registered [ 14.324450] Bluetooth: HCI UART protocol AG6XX registered [ 14.324496] Bluetooth: HCI UART protocol Marvell registered [ 14.324878] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 14.325026] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 14.325188] hci_uart_bcm serial0-0: No reset resource, using default baud rate [ 15.262320] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43362-sdio.txt failed with error -2 [ 15.262337] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43362-sdio.txt [ 16.646909] Bluetooth: hci0: command 0x0c03 tx timeout [ 17.131392] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 24.806876] Bluetooth: hci0: BCM: Reset failed (-110) [ 27.310936] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 27.310948] Bluetooth: BNEP filters: protocol multicast [ 27.310975] Bluetooth: BNEP socket layer initialized
The brcmf_sdio_htclk message is new. The NVRAM file it wants is brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
I copied ap6210/nvram.txt to brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt and warm rebooted.
$ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 12.919648] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.229163] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 14.000161] Bluetooth: Core ver 2.22 [ 14.000317] Bluetooth: HCI device and connection manager initialized [ 14.000375] Bluetooth: HCI socket layer initialized [ 14.000389] Bluetooth: L2CAP socket layer initialized [ 14.000427] Bluetooth: SCO socket layer initialized [ 14.500633] Bluetooth: HCI UART driver ver 2.3 [ 14.500648] Bluetooth: HCI UART protocol H4 registered [ 14.500652] Bluetooth: HCI UART protocol BCSP registered [ 14.500765] Bluetooth: HCI UART protocol LL registered [ 14.500770] Bluetooth: HCI UART protocol ATH3K registered [ 14.500826] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 14.501114] Bluetooth: HCI UART protocol Intel registered [ 14.501455] Bluetooth: HCI UART protocol Broadcom registered [ 14.501522] Bluetooth: HCI UART protocol QCA registered [ 14.501527] Bluetooth: HCI UART protocol AG6XX registered [ 14.501590] Bluetooth: HCI UART protocol Marvell registered [ 14.501679] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 14.501817] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 14.501956] hci_uart_bcm serial0-0: No reset resource, using default baud rate [ 15.400349] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 15.444079] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Mar 10 2014 14:59:50 version 5.90.195.89.18 FWID 01-b13c09c7 [ 16.775221] Bluetooth: hci0: command 0x0c03 tx timeout [ 24.807255] Bluetooth: hci0: BCM: Reset failed (-110) [ 26.513785] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 26.513798] Bluetooth: BNEP filters: protocol multicast [ 26.513824] Bluetooth: BNEP socket layer initialized [ 37.223098] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 37.236472] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5
A cold reboot gives the same log and still no controller.
I replaced the original dtb and warm rebooted.
$ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 12.983575] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.273307] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.711672] Bluetooth: Core ver 2.22 [ 13.711814] Bluetooth: HCI device and connection manager initialized [ 13.711841] Bluetooth: HCI socket layer initialized [ 13.711853] Bluetooth: L2CAP socket layer initialized [ 13.711887] Bluetooth: SCO socket layer initialized [ 14.242778] Bluetooth: HCI UART driver ver 2.3 [ 14.242793] Bluetooth: HCI UART protocol H4 registered [ 14.242797] Bluetooth: HCI UART protocol BCSP registered [ 14.243063] Bluetooth: HCI UART protocol LL registered [ 14.243070] Bluetooth: HCI UART protocol ATH3K registered [ 14.243154] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 14.243408] Bluetooth: HCI UART protocol Intel registered [ 14.243668] Bluetooth: HCI UART protocol Broadcom registered [ 14.243729] Bluetooth: HCI UART protocol QCA registered [ 14.243734] Bluetooth: HCI UART protocol AG6XX registered [ 14.243789] Bluetooth: HCI UART protocol Marvell registered [ 14.243977] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 14.244142] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 14.744480] Bluetooth: hci0: BCM: chip id 63 [ 14.745148] Bluetooth: hci0: BCM: features 0x07 [ 14.747710] Bluetooth: hci0: BCM20702A [ 14.747731] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000 [ 14.747903] bluetooth hci0: Direct firmware load for brcm/BCM20702A1.hcd failed with error -2 [ 14.747912] bluetooth hci0: Falling back to sysfs fallback for: brcm/BCM20702A1.hcd [ 15.317964] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 15.322966] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Mar 10 2014 14:59:50 version 5.90.195.89.18 FWID 01-b13c09c7 [ 16.188328] Bluetooth: hci0: BCM: Patch brcm/BCM20702A1.hcd not found [ 25.282073] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 25.282083] Bluetooth: BNEP filters: protocol multicast [ 25.282111] Bluetooth: BNEP socket layer initialized [ 36.966865] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 36.985529] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5 [ 50.223896] Bluetooth: RFCOMM TTY layer initialized [ 50.223937] Bluetooth: RFCOMM socket layer initialized [ 50.223979] Bluetooth: RFCOMM ver 1.11
The controller is there. It doesn't see my device.
cd /lib/firmware/brcm
sudo ln -s ../ap6210/bcm20710a1.hcd BCM20702A1.hcd
warm reboot- no controller:
[ 15.922697] Bluetooth: hci0: BCM: chip id 63 [ 15.923514] Bluetooth: hci0: BCM: features 0x07 [ 15.926102] Bluetooth: hci0: BCM20702A [ 15.926125] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000 [ 16.116317] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 16.122494] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Mar 10 2014 14:59:50 version 5.90.195.89.18 FWID 01-b13c09c7 [ 16.659233] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000 [ 16.659974] Bluetooth: hci0: BCM: Using default device address (20:70:02:a0:00:00)
Cold reboot- no change.
To summarise:
It doesn't look like removing the reset from the dtb helps.
Using the WiFi firmware and NVRAM from ap6210/ gives us a controller even after a warm reboot.
Using the hcd from ap6210/ takes it away again although its log messages look better.
No device detection yet.
-
I'll give it a go when I get back from work in about 9 hours.
-
A cold reboot and the controller is back, and the RFCOMM messages. It still does not see my device though.
-
It still doesn't find my device even with a full charge and it sitting on top of the cubietruck.
I did an apt upgrade and reboot. Now there is no bluetooth controller again. The RFCOMM messages are gone too.
Either the upgrade broke something or there is an element of luck involved.
-
I thought I'd better start with a fresh install. Armbian_20.05.4_Cubietruck_focal_current_5.4.45_desktop.img same as before.
I set up locale and other basics using armbian-config. I disabled the desktop and installed bluetooth. I did not install full firmware or do an apt upgrade.
I didn't mess with the firmwares at all. After the second boot I get this:
$ dmesg | grep -iE "bluetooth|bcm|brcm|uart|firmware" [ 14.107368] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 14.124398] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt failed with error -2 [ 14.124415] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt [ 14.971356] Bluetooth: Core ver 2.22 [ 14.971491] Bluetooth: HCI device and connection manager initialized [ 14.971517] Bluetooth: HCI socket layer initialized [ 14.971528] Bluetooth: L2CAP socket layer initialized [ 14.971560] Bluetooth: SCO socket layer initialized [ 15.559057] Bluetooth: HCI UART driver ver 2.3 [ 15.559071] Bluetooth: HCI UART protocol H4 registered [ 15.559075] Bluetooth: HCI UART protocol BCSP registered [ 15.577995] Bluetooth: HCI UART protocol LL registered [ 15.578005] Bluetooth: HCI UART protocol ATH3K registered [ 15.578095] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 15.578343] Bluetooth: HCI UART protocol Intel registered [ 15.578594] Bluetooth: HCI UART protocol Broadcom registered [ 15.578653] Bluetooth: HCI UART protocol QCA registered [ 15.578657] Bluetooth: HCI UART protocol AG6XX registered [ 15.578728] Bluetooth: HCI UART protocol Marvell registered [ 15.579197] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 15.579343] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 16.003897] Bluetooth: hci0: BCM: chip id 63 [ 16.004556] Bluetooth: hci0: BCM: features 0x07 [ 16.007117] Bluetooth: hci0: BCM20702A [ 16.007139] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000 [ 16.007337] bluetooth hci0: Direct firmware load for brcm/BCM20702A1.hcd failed with error -2 [ 16.007349] bluetooth hci0: Falling back to sysfs fallback for: brcm/BCM20702A1.hcd [ 16.498239] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 17.197704] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 17.202654] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d [ 17.232956] Bluetooth: hci0: BCM: Patch brcm/BCM20702A1.hcd not found [ 27.449547] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 27.449560] Bluetooth: BNEP filters: protocol multicast [ 27.449606] Bluetooth: BNEP socket layer initialized [ 36.327143] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 36.340517] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5 [ 679.526274] Bluetooth: RFCOMM TTY layer initialized [ 679.526315] Bluetooth: RFCOMM socket layer initialized [ 679.526375] Bluetooth: RFCOMM ver 1.11
This is pretty much what I had before, except the RFCOMM is new.
$ rfkill ID TYPE DEVICE SOFT HARD 0 bluetooth hci0 unblocked unblocked 1 wlan phy0 unblocked unblocked $ bluetoothctl devices $ bluetoothctl list Controller 08:A7:A4:C6:5D:A5 truck1 [default] $ hciconfig -a hci0: Type: Primary Bus: UART BD Address: 08:A7:A4:C6:5D:A5 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:1926 acl:0 sco:0 events:87 errors:0 TX bytes:3896 acl:0 sco:0 commands:87 errors:0 Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'truck1' Class: 0x0c0000 Service Classes: Rendering, Capturing Device Class: Miscellaneous, HCI Version: 4.0 (0x6) Revision: 0x1000 LMP Version: 4.0 (0x6) Subversion: 0x220e Manufacturer: Broadcom Corporation (15)
This does look like it is working, despite not finding the firmware.
$ bluetoothctl Agent registered [CHG] Controller 08:A7:A4:C6:5D:A5 Pairable: yes [bluetooth]# scan on Discovery started [CHG] Controller 08:A7:A4:C6:5D:A5 Discovering: yes [bluetooth]#
It doesn't find my device (a Magicsee R1 minijoystick thingy which works with my Deban laptop and Android phone). Might be a bit run down, I'll charge it up while I go for lunch and try again later.
-
WiFi seems to be fully functional. There is an error about p2p but I don't think it is significant.
$ bluetoothctl devices No default controller available $ hciconfig -a hci0: Type: Primary Bus: UART 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:14 acl:0 sco:0 commands:2 errors:0 Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DH1 HV1 Link policy: Link mode: SLAVE ACCEPT
I think there's a way to go before I need to worry about 'features'. I am only really interested in HID devices anyway.
$ dmesg | grep -iE "bluetooth|hci|brcm|uart|firmware|patch" [ 13.026900] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.336492] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43362-sdio for chip BCM43362/1 [ 13.999486] Bluetooth: Core ver 2.22 [ 13.999624] Bluetooth: HCI device and connection manager initialized [ 13.999648] Bluetooth: HCI socket layer initialized [ 13.999661] Bluetooth: L2CAP socket layer initialized [ 13.999692] Bluetooth: SCO socket layer initialized [ 14.453847] Bluetooth: HCI UART driver ver 2.3 [ 14.453869] Bluetooth: HCI UART protocol H4 registered [ 14.453873] Bluetooth: HCI UART protocol BCSP registered [ 14.454015] Bluetooth: HCI UART protocol LL registered [ 14.454060] Bluetooth: HCI UART protocol ATH3K registered [ 14.454149] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 14.454436] Bluetooth: HCI UART protocol Intel registered [ 14.454792] Bluetooth: HCI UART protocol Broadcom registered [ 14.454877] Bluetooth: HCI UART protocol QCA registered [ 14.454883] Bluetooth: HCI UART protocol AG6XX registered [ 14.454943] Bluetooth: HCI UART protocol Marvell registered [ 14.455439] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator [ 14.455589] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator [ 15.450901] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available [ 15.473035] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43362/1 wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d [ 16.742840] Bluetooth: hci0: command 0xfc18 tx timeout [ 24.806758] Bluetooth: hci0: BCM: failed to write update baudrate (-110) [ 24.806771] Bluetooth: hci0: Failed to set baudrate [ 26.268609] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 26.268621] Bluetooth: BNEP filters: protocol multicast [ 26.268649] Bluetooth: BNEP socket layer initialized [ 26.923039] Bluetooth: hci0: command 0x0c03 tx timeout [ 35.046796] Bluetooth: hci0: BCM: Reset failed (-110) [ 36.166697] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 36.185858] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5
What is missing is the lines github says indicate a successful firmware load:
Bluetooth: hci1: BCM: chip id 63 Bluetooth: hci1: BCM20702A Bluetooth: hci1: BCM20702A1 (001.002.014) build 0000 Bluetooth: hci1: BCM20702A1 (001.002.014) build 1467 Bluetooth: hci1: Broadcom Bluetooth Device
-
I think I already tried linking the old file. I just tried it again and while the loading error is gone otherwise there is no change. Unfortunately this doesn't tell me whether the firmware is wrong or there is some other problem.
The github says:
QuoteThese devices requires two kinds of firmware - first for WiFi, and second for Bluetooth. Without WiFi firmware Bluetooth will not initialize and will not work properly. Firmware for WiFi already included to kernel, but you may need to do additional work to place correct NVRAM.
I haven't tested the WiFi at all so I'll do that. I see no info on NVRAM for uart based devices.
-
Well, I have learned something. Disabling the non-functional desktop helps, you can find stuff in the logs now.
Firstly: the firmware file. The old page I referenced earlier used the file /lib/firmware/ap6210/bcm20710a1.hcd
but in my log it said this:
[ 15.336274] bluetooth hci0: Direct firmware load for brcm/BCM20702A1.hcd failed with error -2 [ 15.336285] bluetooth hci0: Falling back to sysfs fallback for: brcm/BCM20702A1.hcd
The wrong file is in armbian-firmware, the right file is not. I downloaded one from github and renamed it to match the message. It seemed to load successfully after that. It didn't work though, trouble is there is about 50 files that start with BCM20702A1 and no clue as to the right one.
[ 15.104357] Bluetooth: hci0: unexpected event for opcode 0x06c4 [ 25.318761] Bluetooth: hci0: BCM: failed to write update baudrate (-110) [ 25.332570] Bluetooth: hci0: Failed to set baudrate [ 26.926352] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 26.926365] Bluetooth: BNEP filters: protocol multicast [ 26.926393] Bluetooth: BNEP socket layer initialized [ 27.366710] Bluetooth: hci0: command 0x0c03 tx timeout [ 35.558743] Bluetooth: hci0: BCM: Reset failed (-110) [ 35.571171] Bluetooth: hci0: hardware error 0x00 [ 36.742620] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred [ 36.756228] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-5 [ 37.606706] Bluetooth: hci0: command 0xfc18 tx timeout [ 45.798600] Bluetooth: hci0: BCM: failed to write update baudrate (-110) [ 45.812862] Bluetooth: hci0: Failed to set baudrate [ 47.846607] Bluetooth: hci0: command 0x0c03 tx timeout [ 56.033010] Bluetooth: hci0: BCM: Reset failed (-110)
Secondly: The tty.
[ 2.565468] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 51, base_baud = 1500000) is a U6_16550A [ 2.565660] serial serial0: tty port ttyS2 registered
But /dev/ttyS2 no longer exists. Maybe attaching the hci to it is supposed to remove it?
Thirdly: uboot/overlays. I have no errors relating to overlays in my uboot output.
$ rfkill ID TYPE DEVICE SOFT HARD 0 bluetooth hci0 unblocked unblocked 1 wlan phy0 unblocked unblocked
$ bluetoothctl devices No default controller available
So, possibly a step closer but not there yet.
-
Now I'm wondering if the overlays are a red herring. Looking at my /boot none of the ones in joafl's log are there, just a sun7i-a20-cubietruck.dtb which if my reading of boot.cmd is correct, is getting loaded as the default that uboot is falling back to. Also, my armbianEnv.txt has no list of overlays, just a prefix.
It looks like I'm going to have to install the kernel sources to get the dt source, which means I'm going to have to expand my filesystem as that did not happen on first run. And connect my cubietruck to a proper monitor so I can see the boot messages and maybe fiddle with uboot.
Good job the weekend is coming.
-
So we shouldn't need to delve into kernel code, just figure out why the overlays aren't loading. Hopefully they already describe the hardware correctly. Unfortunately, uboot is also a bit beyond my ken...
-
Not sure about detaching. What I have gleaned is that bt.load figures out which tty is attached to uart2 then sends the firmware to it. bt.init resets the chip via a couple of GPIO pins. The systemd service then attaches an hci device to the tty. This is what bluetooth clients use.
Now this is all handled by the kernel and I am just assuming that it does pretty much the same thing. In which case not having /dev/ttyS1 is a problem. Using the right GPIOs will also be key. I get the impression that both tty and GPIOs can change between kernels. So we need all the overlays to load (some might provide power etc.) and they need to match the kernel in terms of the tty and GPIO numbers it is expecting.
I'm afraid that device tree and kernel code are a little beyond my ken.
-
I have been following this page:
It's out of date but I deduce from it that we should be seeing a tty directory in /sys/devices/platform/soc/1c28800.serial/
Do you have that now?
-
Same for me on Focal with 5.4.45. I suspect the bluetooth firmware is not being loaded. It is installed with armbian-firmware, the file is bcm20710a1.hcd. It should be sent via uart2 somehow, but it seems there is no tty for it.
-
I tried Focal: https://dl.armbian.com/cubietruck/nightly/Armbian_20.05.0-trunk.145_Cubietruck_focal_current_5.4.42.img.xz
I'll have a go with Bullseye.
Update: Bullseye 145 boots but it doesn't resize the filesytem. I went through armbian-config and everything else seems OK. Need more space to try out a desktop though.
-
I just tried this on my Cubietruck. uBoot doesn't like the initrd image:
Verifying Checksum ... Bad Data CRC
Disk image is corrupt or invalid
Then it tries to load from TFTP.
The image sha256sum verified OK and the card mounts on my PC OK.
Board Bring Up Station P2 rk3568, M2 rk3566
in Rockchip
Posted
Thank you balbes150, my P2 is running nicely with your image. I would like to get DVB running too but the modules don't seem to be included (my DVB tuner is listed by lsusb).
So i'm trying to build the kernel myself. I am following https://docs.armbian.com/Developer-Guide_Build-Preparation/ using https://github.com/150balbes/build but it doesn't offer any rk3568 kernel options. What else should I be doing?