~chrichri/librem5-bm818-watchmodem

Watch the state of the bm818 lte modem in the Librem5 phone. If one of the known issues is encountered, recover the modem from its unusable state.
470c0640 — Chris Vogel 1 year, 8 months ago
corrections
c2c1c4dc — Chris Vogel 1 year, 8 months ago
build: version for artifact corrected
42f1f994 — Chris Vogel 1 year, 8 months ago
debian: added postinst script

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~chrichri/librem5-bm818-watchmodem
read/write
git@git.sr.ht:~chrichri/librem5-bm818-watchmodem

You can also use your local clone with git send-email.

#Goals

  • make the bm818 modem in the Librem5 more reliable to the user
  • minimum impact on the system if not needed (anymore)
  • works on postmarketOS and PureOS

#workaround for

#bug in xhci-usb that makes the whole usb hub disappear from the bus

Since the brief disconnects of the Modem seem to be fixed (see 'https://source.puri.sm/Librem5/linux/-/merge_requests/672' above) it is unlikely that this bug will trigger.

#other issues

Please look at the development branch for a list and ongoing work to find workaround for those.

#Dependencies

Dependencies should be pulled in by the package manager, if not installed manually.

  • udev - catch events of hardware disappearing
  • at - run long running script from udev rule
  • daemontools - setlock to ensure scripts run only one instance at time (postmarketOS: only in edge repository)
  • kmod - modprobe, rmmod
  • bsdutils (logger) - logging
  • libnotify-bin - sending notifications using notify-send
  • util-linux - su for notification

#Feedback/Issues

Issues and general feedback can be filed here: https://todo.sr.ht/~chrichri/librem5-bm818-watchmodem

#Installation (until packaging is done)

#PureOS/Debian package

can be found here: builds.sr.ht status

#manual installation in PureOS

  • install dependencies: sudo apt-get install udev at daemontools kmod bsdutils libnotify-bin util-linux
  • copy these two files from this repo
    • udev/42-librem5-watch-xhci-usb.rules → /etc/udev/rules.d/42-librem5-watch-xhci-usb.rules
    • script/librem5-recover-xhci-usb.sh → /usr/local/sbin/librem5-recover-xhci-usb.sh
  • copy xpub.sh from https://github.com/Ventto/xpub to /usr/local/sbin
  • run sudo udevadm control -R

#manual installation in postmarketOS

  • still missing - you care to share what did different from the steps above ;-) ?