Plain Alpine? Nah. But Alpine as part of some other install, twice yes. One is as postmarketOS, the other is Bedrock.
Question for @Rex
Regarding your files for the uconsole-4g: there are 3 files, uconsole-4g
, uconsole-4g-cm4.sh
, and uconsole-4g-cm4.service
I assume that the first two go in the /usr/local/bin
directory, but what do I do with the service file? It doesn’t appear to be in the correct format for an OpenRC service file, so can I assume it is a Systemd service file? What would a proper file for OpenRC look like, and would it go under /etc/init.d
if used on this PostmarketOS image (built with pmtool)?
Thank you for the clarification.
Yes that’s a systemd file, not sure what a OpenRC one would look like. I moved from upstart to systemd and stuck with it.
Ok,
I will work with ChatGPT on getting a working conversion to OpenRC, and report back here with my results and the contents of the file for anyone else that wants to use it.
Thank again.
I have a working 4G LTE connection
This is what I did to get there
Start by getting the uconsole-4g
, and uconsole-4g-cm4.sh
files from @Rex via the Mega cloud folder he has posted above. Save these files under /usr/local/bin
and ensure you set the permissions to executable with doas chmod +x /usr/local/bin/uconsole-4*
There are a couple prerequisites that I truly don’t understand why they are not already in the image when it is built with pmbootstrap, but you need to install them or you can’t enable the modem.
doas apk add raspberrypi-utils
doas apk add modemmanager
Then you need to enable ModemManager to run as a service in the default runlevel. You can also start it manually right now if you don’t want to reboot.
rc-update add modemmanager default
rc-service modemmanager start
Now when you run mmcli
commands they will actually work.
Now that your prerequisites are out of the way, we can build the service file for uconsole-4g-cm4
to run automatically on boot. Create the following file - /etc/init.d/uconsole-4g-cm4
#!/sbin/openrc-run
description="uConsole raspberry pi cm4 4G control daemon"
command="/usr/local/bin/uconsole-4g-cm4.sh"
command_args=""
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
after net
need net
}
start() {
if [ -x "$command" ]; then
ebegin "Starting uconsole-4g-cm4"
$command enable
eend $?
else
eerror "$command is not executable"
return 1
fi
}
stop() {
if [ -x "$command" ]; then
ebegin "Stopping uconsole-4g-cm4"
$command disable
eend $?
else
eerror "$command is not executable"
return 1
fi
}
Make the service file executable: doas chmod +x /etc/init.d/uconsole-4g-cm4
Add the service to the default run level: doas rc-update add uconsole-4g-cm4 default
Start the service manually if you don’t want to reboot to test: rc-service uconsole-4g-cm4 start
Now give it a minute for the modem to enable and be findable, then you should see it if you run mmcli -L
on mine it showed up as:
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-H
At this point I could see the 4G option in the Network Manger control in the taskbar. It showed my carrier, but I did not yet have a connection. You can left click the icon and there should now be an option to use the GUI to create a new 4G connection. Just run through the wizard, and at least for me it worked.
Now might be a good time to reboot and see if it enables the modem automatically based on the service working or not. YMMV, but for me after reboot I had the following when I left clicked the Network Manager icon in the taskbar:
- ETHERNET NETWORK
– disconected- Wi-Fi NETWORK
– (My connected SSID) {SIGNAL BAR}
– Disconnect
– Available networks- MOBILE BROADBAND
– (My Carrier) {SIGNAL BAR greyed out}
--------------- Available --------------------------- (My Connection)
- Connect to Hidden Wi-Fi Network …
- Create New Wi-Fi Network …
.------------------------------------------------------
VPN Connections
When I clicked on (My Connection) in the “Available” list it connected immediately and the “MOBILE BROADBAND” now showed the active connection in parenthesis after it. Also the signal bar now reflected the current signal strength.
I hope this helps anyone else trying to get this working.
Not every uConsole comes with a 4G module. And not everyone appreciates preloaded utilities unless they serve a purpose. You know, bloat. It’s only fair to add this by yourself. There just needs to be higher visibility for additional instructions for stuff like this for those of us who availed of the module. (Oh, I dunno, a wiki?)
I’m gonna get this to work on my postmarketOS setup. Thanks for your effort.
I see what you are saying, but I feel you are looking at it from the wrong perspective. This is not the ClockworkPi build of Rasberry Pi OS, it is PostmarketOS which exists for the purpose of allowing old phones to continue to be useful after the OEM is no longer providing updates. So the assumption from the onset of this distro, for every device except for this one, is that an LTE modem exists. It literally is an exception made for only this device.
Your point is valid for a generic OS, but this is not a generic OS distro, it is a distro made specifically for phones, thus devices that should always have a modem. If you wanted a generic Alpine Linux, you would not choose PostmarketOS. It is marketed as an alternative to Android, not yet another Linux distro.
I would disagree with this assertion. It is true for the devices in the main category, all 6 of them, but in the community category, which includes the uConsole, the vast majority of devices (some 73 out of a total of around 101 devices) are not LTE equipped devices by default. I would imagine the majority of PostmarketOS don’t have LTE support by default rather than the uConsole being the only exception.
The PostmarketOS headline of today is “The Linux distribution for mobile devices and more…” Android itself is not a phone only OS, it is used on extensively on tablets. Alpine can also be seen as an alternative to ChromeOS as there are a large number of Chromebook devices support within the communty category. Indeed this is how I have chosen to use PostmarketOS in the past, on my Lenovo IdeaPad Duet Chromebook (another non LTE device). There are even community editions for a Microsoft Surface RT, a Lenovo ThinkPad X13s so if you wanted to really stretch the argument you could say a Windows alternative too! (ouch!)
I can understand your frustration but for me the uConsole is a device that has an LTE accessory available, not an LTE device by default. As such, for me, the decision to not to include LTE utilities by default is the correct one.
My guess is that whoever ported PostmarketOS to the uConsole didn’t have the cellular modem. The point of an open source community project is other developers get to improve on what’s there. If you want to add better support for cellular to the image, I think they’d welcome it.