Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth error on Raspi 4b+ when updating Twister OS #26

Open
raf401 opened this issue Jul 28, 2021 · 7 comments
Open

Bluetooth error on Raspi 4b+ when updating Twister OS #26

raf401 opened this issue Jul 28, 2021 · 7 comments

Comments

@raf401
Copy link

raf401 commented Jul 28, 2021

Anyone having same error when full-upgrading Twister OS?

Job for hciuart.service failed because the control process exited with error code.
See "systemctl status hciuart.service" and "journalctl -xe" for details.

I get it back when command systemctl restart hciuart.service but everytime I restart it, is the same story.

@pelwell
Copy link
Member

pelwell commented Jul 28, 2021

Have you looked at the suggested details? What do they say?

@raf401
Copy link
Author

raf401 commented Jul 28, 2021

Yeah.

journalctl -xe does not say anything about hciuart or any bluetooth adaptor. And bellow is hciuart service status.

hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset:
Active: inactive (dead)
lines 1-3/3 (END)

I have seen many people having problem with it on different OS and also as I said I solve it temporarily when I command systemctl restart hciuart.service but service doesnt switch on when I restart raspi.

@bokkiedog
Copy link

bokkiedog commented Aug 10, 2021

I have a very similar issue on a pi 400 running latest stable buster. With me, though, restarting the service doesn't work. On boot, bluetooth shows no devices, and that error message in the log. When I try to restart the service, the restart times out and fails:

Aug 10 15:13:43 dinky bthelper[490]: Can't init device hci0: Invalid argument (22)
Aug 10 15:13:43 dinky systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Aug 10 15:13:43 dinky systemd[1]: [email protected]: Failed with result 'exit-code'.
Aug 10 15:13:43 dinky systemd[1]: Failed to start Raspberry Pi bluetooth helper.

Then, trying things manually:

root@dinky:/etc# /usr/bin/btuart
bcm43xx_init
Initialization timed out.

btuart correctly works out the hciattach commandline, which it runs thus:

root@dinky:/var/log# hciattach /dev/serial1 bcm43xx 3000000 flow -
bcm43xx_init
Initialization timed out.

Then, via strace, you can see it times out waiting here:

setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=10, tv_usec=0}}, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}) = 0
openat(AT_FDCWD, "/dev/serial1", O_RDWR|O_NOCTTY) = 3
ioctl(3, TCFLSH, TCIOFLUSH)             = 0
ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, TCIOFLUSH)             = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
brk(NULL)                               = 0x132d000
brk(0x134e000)                          = 0x134e000
write(1, "bcm43xx_init\n", 13bcm43xx_init
)          = 13
write(3, "\1\3\f\0", 4)                 = 4
read(3,0xbe955fcc, 1)                  = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---

@Zelex
Copy link

Zelex commented Aug 18, 2021

This occurs when doing and apt-upgrade from a base buster install. Something wrong with that.

@Zelex
Copy link

Zelex commented Sep 13, 2021

bump

@pelwell
Copy link
Member

pelwell commented Sep 13, 2021

It was discovered recently that attempting to restart Bluetooth as part of the update was failing because there is nothing to reset the BT modem hardware, which causes the firmware download to fail. At some point the pi-bluetooth package will be modified to not restart the services, but until then this error is to be expected and Bluetooth may have limited functionality until the next reboot.

If you are claiming that there are errors after the reboot then this report should be reworded.

@Zelex
Copy link

Zelex commented Sep 21, 2021

It happens after a reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants