Can´t find my device when searching for bluetooth devices

Hi!

I followed this guide to turn my raspberry pi 3 b+ into a audio receiver with Balena Sound: https://www.balena.io/blog/turn-your-old-speakers-or-hi-fi-into-bluetooth-receivers-using-only-a-raspberry-pi/

Everything in the setup seems to work fine but I can´t find the device when I´m scanning for bluetooth devices.

Anyone experienced the same problem?

Hey there!
Can you share the version of BalenaOS you 're using? Also can you see any error logs?

Hey Mike!

Thanks for the fast reply!

I´m using balenaOS 2.43.0+rev1. When creating a new device in the Balena Cloud dashboard you´re not able the choose version, or are you?

Here´s a picture from the log:

Hello @crydestaahl
Looking at your logs, it seems like /usr/src/start.sh has issues, could you post its contents here?

Sorry if this is a stupid question but how do I get there? @zvin

I tried to go through the Host OS but commands like ls or dir doesn´t do anything :thinking:

What do you mean by “doesn’t do anything”?
Have you made any changes to https://github.com/balena-io-projects/balena-sound after cloning it?
The /usr/src/start.sh script is in the spotify container, you won’t see it from the host OS.

@zvin I mean that it doesn’t give me anything back when I write it and pressing enter. You know, typing “ls” inside a folder from the terminal will give you a list of the folders content.

Anyhow, I have not been making any changes to the code after cloning it.

Is it this file that we’re looking for? :

image

Could you please enable support access for this device and give us its uuid or dashboaad link?

@zvin

4sure, appreciate the help!

I’ve granted access for the next 16 h.

UUID: 7052b80

Hey, could you provide the full UUID please? (You can get this by clicking the “copy” button next to the short uuid on the dashboard)

Also which OS are you using? That \r in the error logs looks to me that perhaps a clone on windows has messed with line endings in the file.

@CameronDiver

I think you might be on to something here. The copy was made from -or on?- a windows computer.

This is the complete UUID: 7052b800e6a85359a87747f634cbd4d2

OS: balenaOS 2.43.0+rev1

Thanks for the help!

Yeah that’s likely the problem, you need to configure your git client to not check out with CRLF, alternatively you can download the zip archive from the github page and push that.

Well you’re a true legend @CameronDiver ! Look at this :slight_smile:

bild

Had no idea a git client could cause these kinds of problems.

Also thank you @zvin for taking your time!

Hey @crydestaahl, just a quick note that we merged the fix to balena-cli addressing the line ending conversion on Windows: https://github.com/balena-io/balena-cli/issues/1273

Next versions would be working here without the need for workaround. So please upgrade to the latest version of balena-cli in your next time.

Cheers…

Hello

I also have a problem on my device, the Bluetooth is not visible, can you help me please?

UUID: e6d14823b11e48750d67584df1e749d2

Hi @bura68, welcome to the forums.

Your device is offline at the moment, so we cannot access to it. Then I’d encourage you to do some investigation yourself to find the root cause. We have couple of knowledge base articles to help you with that like this blog post:

It’d help to dig the logs to find out the exact issue.

Next, I see couple of issues posted on the project repo when I search for bluetooth:

I’d advise you to take a look there as well to see if you have a similar issue. Perhaps another user posted a solution already.

Cheers…

Hello, My Rasberri Pi3 device is now online,
UUID : e6d14823b11e48750d67584df1e749d2

voici le journal :

Connecting to e6d14823b11e48750d67584df1e749d2…
Spawning shell…

Welcome to balenaOS

=============================================================
root@e6d1482:~# journalctl -u systemd-timesyncd
– Logs begin at Mon 2019-12-23 09:10:50 UTC, end at Thu 2020-03-26 14:00:55 UTC. –
– No entries –
root@e6d1482:~# dmesg | tail -n 100
[ 3.763676] resin-state: clean, 65/5136 files, 1901/20480 blocks

[ 4.067868] mmcblk0: p1 p2 p3 p4 < p5 p6 >
[ 5.166609] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 5.211734] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 5.659058] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 5.681908] aufs au_opts_verify:1609:init[1]: dirperm1 breaks the protection by the permission bits on the lower branch
[ 6.056255] systemd[1]: System time before build time, advancing clock.
[ 6.230616] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[ 6.255065] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 6.458814] systemd[1]: /lib/systemd/system/chronyd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/chrony/chronyd.pid \xe2\x86\x92 /run/chrony/chronyd.pid; please update the unit file accordingly.
[ 6.645427] random: systemd: uninitialized urandom read (16 bytes read)
[ 6.695806] random: systemd: uninitialized urandom read (16 bytes read)
[ 6.741983] random: systemd: uninitialized urandom read (16 bytes read)
[ 9.106280] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[ 11.004715] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.023661] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 11.034724] [vc_sm_connected_init]: start
[ 11.044312] media: Linux media interface: v0.10
[ 11.053183] vc_sm_cma_vchi_init: failed to open VCHI service (-1)
[ 11.053194] [vc_sm_connected_init]: failed to initialize shared memory service
[ 11.125084] videodev: Linux video capture interface: v2.00
[ 11.177260] smsc95xx v1.0.6
[ 11.187911] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.204412] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.266235] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 11.272075] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.285057] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:5a:9c:59
[ 11.310406] usbcore: registered new interface driver smsc95xx
[ 11.334736] bcm2835_audio soc:audio: card created with 8 channels
[ 11.345538] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.349394] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.374554] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[ 11.381883] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[ 11.441047] cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ 11.467117] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 11.480419] cfg80211: failed to load regulatory.db
[ 11.617266] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 11.626340] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 11.640173] usbcore: registered new interface driver brcmfmac
[ 11.839284] random: crng init done
[ 11.846979] random: 7 urandom warning(s) missed due to ratelimiting
[ 11.861254] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 11.885955] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: May 2 2019 02:39:18 version 7.45.98.83 (r714225 CY) FWID 01-e539531f
[ 12.523269] uart-pl011 3f201000.serial: no DMA platform data
[ 16.184330] i2c /dev entries driver
[ 17.018603] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 17.123131] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
[ 17.137479] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 17.210614] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 17.264404] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 17.294032] brcmfmac: power management disabled
[ 17.353540] Bluetooth: Core ver 2.22
[ 17.357343] NET: Registered protocol family 31
[ 17.361971] Bluetooth: HCI device and connection manager initialized
[ 17.368547] Bluetooth: HCI socket layer initialized
[ 17.373619] Bluetooth: L2CAP socket layer initialized
[ 17.378883] Bluetooth: SCO socket layer initialized
[ 17.418051] Bluetooth: HCI UART driver ver 2.3
[ 17.422703] Bluetooth: HCI UART protocol H4 registered
[ 17.428166] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 17.442001] Bluetooth: HCI UART protocol Broadcom registered
[ 17.819744] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 17.825868] brcmfmac: power management disabled
[ 17.994222] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 17.999673] Bluetooth: BNEP filters: protocol multicast
[ 18.007294] Bluetooth: BNEP socket layer initialized
[ 18.130749] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 19.299106] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 19.305194] brcmfmac: power management disabled
[ 19.436206] Bridge firewalling registered
[ 19.971677] IPv6: ADDRCONF(NETDEV_UP): balena0: link is not ready
[ 20.190568] IPv6: ADDRCONF(NETDEV_UP): supervisor0: link is not ready
[ 20.432319] IPv6: ADDRCONF(NETDEV_UP): br-efe077477242: link is not ready
[ 26.838891] systemd-udevd[28]: starting version 232
[ 31.134397] brcmfmac: brcmf_update_bss_info: wl dtim_assoc failed (-52)
[ 31.141319] ------------[ cut here ]------------
[ 31.146536] WARNING: CPU: 1 PID: 318 at net/wireless/sme.c:752 __cfg80211_connect_result+0x3b0/0x414 [cfg80211]
[ 31.156868] Modules linked in: ip6_tables ipt_MASQUERADE nf_conntrack_netlink nfnetlink br_netfilter bnep hci_uart btbcm serdev bluetooth ecdh_generic xt_owner i2c_dev spidev brcmfmac brcmutil sha256_generic bcm2835_codec© bcm2835_v4l2© snd_bcm2835© raspberrypi_hwmon cfg80211 hwmon v4l2_mem2mem bcm2835_mmal_vchiq© smsc95xx snd_pcm v4l2_common videobuf2_dma_contig videobuf2_vmalloc usbnet rfkill videobuf2_memops snd_timer videobuf2_v4l2 videobuf2_common mii i2c_bcm2835 snd videodev media vc_sm_cma© spi_bcm2835 uio_pdrv_genirq fixed uio sch_fq_codel nls_ascii nls_cp437 vfat fat
[ 31.209898] CPU: 1 PID: 318 Comm: kworker/u8:2 Tainted: G C 4.19.71 #1
[ 31.217849] Hardware name: BCM2835
[ 31.218059] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 31.227464] [<801122f0>] (unwind_backtrace) from [<8010d5ac>] (show_stack+0x20/0x24)
[ 31.235334] [<8010d5ac>] (show_stack) from [<808c6d8c>] (dump_stack+0xcc/0x110)
[ 31.242766] [<808c6d8c>] (dump_stack) from [<80120e20>] (__warn.part.3+0xcc/0xe8)
[ 31.242775] [<80120e20>] (__warn.part.3) from [<80120fd0>] (warn_slowpath_null+0x54/0x5c)
[ 31.242960] [<80120fd0>] (warn_slowpath_null) from [<7f2b07ac>] (__cfg80211_connect_result+0x3b0/0x414 [cfg80211])
[ 31.269437] [<7f2b07ac>] (__cfg80211_connect_result [cfg80211]) from [<7f280488>] (cfg80211_process_wdev_events+0x104/0x160 [cfg80211])
[ 31.282058] [<7f280488>] (cfg80211_process_wdev_events [cfg80211]) from [<7f280524>] (cfg80211_process_rdev_events+0x40/0x98 [cfg80211])
[ 31.294782] [<7f280524>] (cfg80211_process_rdev_events [cfg80211]) from [<7f27a2e4>] (cfg80211_event_work+0x24/0x2c [cfg80211])
[ 31.306624] [<7f27a2e4>] (cfg80211_event_work [cfg80211]) from [<8013c114>] (process_one_work+0x23c/0x518)
[ 31.316433] [<8013c114>] (process_one_work) from [<8013d20c>] (worker_thread+0x60/0x5b8)
[ 31.324652] [<8013d20c>] (worker_thread) from [<80142cec>] (kthread+0x16c/0x174)
[ 31.332163] [<80142cec>] (kthread) from [<801010ac>] (ret_from_fork+0x14/0x28)
[ 31.339491] Exception stack(0xbb401fb0 to 0xbb401ff8)
[ 31.344616] 1fa0: 00000000 00000000 00000000 00000000
[ 31.352915] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 31.361212] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 31.368042] —[ end trace 094f803905bd470b ]—
[ 31.373913] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
root@e6d1482:~#

Merci beaucoup de votre aide

Hi, the log above shows a kernel warning on the wireless cfg80211 driver which may indicate some type of hardware problem. A typical problem with Raspberry Pi devices is running on slow or defective SD cards. Balena recommends to use Sandisk Extreme Pro (https://www.sandisk.co.uk/home/memory-cards/microsd-cards/extremepro-microsd-uhs-ii) as it’s the one that we validate with.

Aside, could you please run the “device diagnostics” from the dashboard as explained in https://www.balena.io/docs/learn/more/masterclasses/device-debugging/#22-device-diagnostics, and send us the report back.

Finally, could you please log into the application container using ssh and run:

bluetoothctl show

Thanks,

Hello,

Thank you for your quick return

here’s the “bluetoothctl show” results :
003

here’s the report “device diagnostics” :

Unfortunately I don’t see anything in the diagnostics that would explain why this is occurring. It might be worth trying to explicitly make the device discoverable with

bluetoothctl discoverable on

and try again. Let us know how this goes.