Get systemd installed in a Balena image

Hey there, can you send me a private message with the device(s) UUID(s) so we can take a look?

Sent!

Hi @scarson if we need to restart the running service or the device is this ok?

Also as extra info do you have any other bluetooth devices connected? Like a USB bluetooth adapter?

Hi, I noticed that on the unit you shared, you are using OS version 2.38.0+rev1. Starting with OS version v2.40.0+rev1 we have a new driver for bluetooth. Can you upgrade some units the latest OS release available for the Balena Fin and see if you still get this problem?

@mbalamat Yup, feel free to reboot and do whatever you need! No extra Bluetooth devices connected.

@floion Interesting… We’ve updated some devices to 2.46.1+rev3 and have had issues with WiFi Connect, so we’ve reverted. I haven’t noticed if this has been fixed in that version for us- I’ll do some checking to see if that’s the case and post back in here.

@floion Unfortunately, it looks like this issue happens in 2.46.1+rev3 as well. If you guys want access to a device running that OS version, let me know and I’ll grant it.

Yes please, if we can get access to a device running 2.46.1+rev3 that would be great. Can you enable support access and share a device UUID so we can take a look?

@garethtdavies I upgraded another of ours to 2.46.1+rev3 (for a total of three now) and once one of them encounters the issue, I’ll send you the UUID and enable support access.

Hey folks, any news on this front?

Sorry, your mail did not get forwarded, so no. I have forwarded the UUID to @floion and he will be looking into it…

Hi. So can you do the following changes to a machine? Try to disable auto power save mode by doing this from your container:

echo “psmode=0” > /proc/mbt/hci0/config

and then

echo “pscmd=1” > /proc/mbt/hci0/config

Let us know if disabling auto powersaving changes anything

I did the changes on the machine you shared support for until you manage to do them from the container

Hi, it looks like that machine has been rebooted and the changes that I did were not meant to be persistent between reboots so now auto powersave mode is enabled again. So please do as I suggested above and let the machine run the code for longer so we can see if that made the issue go away.

@floion we’ll make some changes for that and get back to ya on whether or not it works. Thanks!

Hi. So can you do the following changes to a machine? Try to disable auto power save mode by doing this from your container:

echo “psmode=0” > /proc/mbt/hci0/config

and then

echo “pscmd=1” > /proc/mbt/hci0/config

Let us know if disabling auto powersaving changes anything

@floion - I attempted to execute the commands above in my docker container via the docker RUN command.

RUN echo "psmode=0" > /proc/mbt/hci0/config
RUN echo “pscmd=1” > /proc/mbt/hci0/config

While testing on a local development Fin I noticed the second command setting pscmd=1 did not take. I tried it out myself while sshd into the container and confirmed. Any guidance? I can change psmode, but not pscmd.

Toggling psmode:

root@2179fe0:/app# more /proc/mbt/hci0/config
drvdbg=0x7
idle_timeout=0x3e8
psmode=1
pscmd=0
hsmode=0
hscmd=0
gpio_gap=0xffff
hscfgcmd=0
sdio_pull_cfg=0xffffffff
sdio_pull_ctrl=0
test_mode=0
root@2179fe0:/app# echo "psmode=0" > /proc/mbt/hci0/config
root@2179fe0:/app# more /proc/mbt/hci0/config
drvdbg=0x7
idle_timeout=0x3e8
psmode=0
pscmd=0
hsmode=0
hscmd=0
gpio_gap=0xffff
hscfgcmd=0
sdio_pull_cfg=0xffffffff
sdio_pull_ctrl=0
test_mode=0

Attempting to toggle pscmd:

root@2179fe0:/app# echo "pscmd=1" > /proc/mbt/hci0/config
root@2179fe0:/app# more /proc/mbt/hci0/config
drvdbg=0x7
idle_timeout=0x3e8
psmode=0
pscmd=0
hsmode=0
hscmd=0
gpio_gap=0xffff
hscfgcmd=0
sdio_pull_cfg=0xffffffff
sdio_pull_ctrl=0
test_mode=0

@scarson iirc that won’t toggle but nevertheless you need to export pscmd too in order to see psmode changed in /proc/mbt/hci0/status

And as an aside, you should not do these from RUN but rather from a startup script or executable you have in CMD

@floion thanks for the help- we’ll be deploying these changes across our fleet today and we’ll keep an eye on stuff to see how it goes. Stay tuned!

Hi. Did these changes help with the issue you were having?

Hi, circling back to this. Did the changes help?