💾 Archived View for yaky.dev › notes › pinephone captured on 2024-08-31 at 12:28:39. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-06-20)
-=-=-=-=-=-=-
In Phosh: Settings / Mobile Network / Access Point Names
Name: T-Mobile US
APN: fast.t-mobile.com
In Phosh: Chats / Preferences / SMS and MMS Settings
MMSC: http://mms.msg.eng.t-mobile.com/mms/wapenc
APN: fast.t-mobile.com
Short Message Service (SMS)
SMS Email: 10digitmobile@tmomail.net
SMS center: 1-206-313-0004
Email center: 500
Voicemail: 1-805-637-7243 (1-805-MESSAGE)
Source:
Get latest firmware (package.tar.gz) release from GitHub
wget <link to package.tar.gz> tar xzvf package.tar.gz sudo ./flashall
I ran the automatic script several months ago, but updated to newest release manually (see source link), just to be sure.
Upgrade ADSP
According to some people on Pine64 forums, T-Mobile requires ADSP 01.003
Run as root:
wget https://github.com/Biktorgj/quectel_eg25_recovery/raw/EG25GGBR07A08M2G_01.003.01.003/update/NON-HLOS.ubi echo -ne "AT+QFASTBOOT\r" > /dev/ttyUSB2 fastboot flash modem NON-HLOS.ubi fastboot reboot
After properly updating ADSP, my modem stays connected and seems to connect to both 4G and 2G.
Sources:
PinePhone modem repo on GitHub
Mention of correct ADSP for T-Mobile
Install Geary:
sudo apk add geary
Build and install Proton Bridge, utility that locally encrypts and decrypts Proton Mail:
sudo apk add make git go gcc libsecret-dev libc-dev git clone https://github.com/ProtonMail/proton-bridge cd proton-bridge make build-nogui
Move executables to directory under $PATH:
cp bridge ~/.local/bin/ cp proton-bridge ~/.local/bin/
Configure via CLI interface:
proton-bridge --cli
Login:
>>> login Username: Password: Authenticating... Account ***** was added successfully. >>> A sync has begun for username A sync has finished for username.
Get and save the IMAP/SMTP info:
>>> info Configuration for antonyak@pm.me IMAP Settings Address: 127.0.0.1 IMAP port: 1143 Username: username@proton.me Password: a1b2c3d4e5f6g7h8i9j0k1 Security: STARTTLS SMTP Settings Address: 127.0.0.1 SMTP port: 1025 Username: username@proton.me Password: a1b2c3d4e5f6g7h8i9j0k1 Security: STARTTLS
Run Geary.
Enter username and password from info above.
In my case, Geary automatically connected to localhost, which is correct.
For me, Geary was very slow, and some emails were missing. Proton Bridge claims to take up to half of all RAM. At this point, creating a service would be a drain on resources. I could write a script to start Proton Bridge
Exit the Proton Bridge CLI
>>> exit
Create a service:
sudo touch /etc/init.d/proton-bridge sudo chmod +x /etc/init.d/proton-bridge sudo $EDITOR /etc/init.d/proton-bridge
#!/sbin/openrc-run name="proton-bridge" description="Proton Bridge" command_user="user" command="/home/user/.local/bin/proton-bridge" command_args="--cli"
Sources:
sudo apk add flatpak sudo apk add gnome-software-plugin-flatpak flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.gnome.Fractal
Reboot for path changes and such to take effect
https://man.archlinux.org/man/extra/geoclue/geoclue.5.en
Location from modem:
mmcli --modem 0 --location-get
(needs SIM)
Location from geoclue:
/usr/libexec/geoclue-2.0/demos/where-am-i
Enable GPS?
mmcli --modem 0 --location-enable-gps-nmea
GPS is on /dev/ttyUSB1
Desktop files are found in
/usr/share/applications/, /usr/local/share/applications/ (and /var/lib/flatpak/exports/share/applications for Flatpak apps).
https://forum.pine64.org/showthread.php?tid=11680&page=2&highlight=modem+sleep
I got things working in the end.
It seemed to help when I used the following command to start the GPS.
AT+QGPS=1,255,1000,0,10
$EDITOR /usr/lib/udev/rules.d/80-modem-eg25.rules
For me, the change had to be done on line 6:
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/control}="on"
$EDITOR /usr/share/alsa/ucm2/Allwinner/A64/PinePhone/PinePhone.conf
Set capture volume to 80% - 100%
cset "name='AIF ADC Capture Volume' 80%"
gnome-session-inhibit command # inhibit suspend and keep screen on until command finishes gnome-session-inhibit --inhibit suspend command # inhibit suspend, but let screen turn off until command finishes gnome-session-inhibit --inhibit-only # inhibit suspend and keep screen on indefinitely
https://gitlab.gnome.org/GNOME/calls/-/issues/605#note_1906818
30.006.30.006 STOCK firmware
/usr/share/eg25-manager/pine64,pinephone-1.2.toml
modem_udev = false
After trying both Biktor's open-source firmware, and the updated stock firmware, here are my findings.
Stock firmware (30.006):
Biktor's open-source firmware (0.7.4):
Send stuff to modem?
mmcli -m 0 --command='AT+QMBNCFG="list"'
Via Minicom
sudo minicom -D /dev/ttyUSB2
Ctrl+Z, E to enable local echo (see what you are typing)
AT OK
ATI Quectel EG25 Revision: EG25GGBR07A08M2G OK
Digital Audio Interface Configure
Response: +QDAI: <io>[,<mode>,<fsync>,<clock>,<format>,<sample>,<num_slots>,<slot_mapping>]
<io>:
<mode>:
<fsync>:
<clock>:
<format>
<sample>
<num_slots>
<slot_mapping>
Result on my fresh 01.002.01.002 firmware
https://github.com/Biktorgj/quectel_eg25_recovery/tree/EG25GGBR07A08M2G_01.002.01.002
AT+QDAI? +QDAI: 1,1,0,1,0,0,1,1 OK
Megi recommends to run
AT+QDAI=1,0,0,2,0,1,1,1
once per modem and reboot.
https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)
Setting up modem for voice calling
This involves updating the kernel?
sudo apk add waydroid sudo rc-update add cgroups default # optional sudo rc-service cgroups start sudo apk add iptables dnsmasq
On PinePhone, check which kernel it is using: (/boot/vmlinuz is the compressed kernel)
apk info --who-owns /boot/vmlinuz
Copy the result. In my case, it was "linux-postmarketos-allwinner-6.4.7_git20230731-r3".
On your main machine set up pmbootstrap and edit the kernel config:
pmbootstrap kconfig edit linux-postmarketos-allwinner-6.4.7_git20230731-r3 --arch aarch64
Uncheck General setup ─> Control Group Support ─> CPU controller ─> Group scheduling for SCHED_RR/FIFO
Exit.
Build the kernel:
pmbootstrap build --force linux-postmarketos-allwinner-6.4.7_git20230731-r3 --arch aarch64
Init Waydroid (it will take a while to download the Android image):
sudo waydroid init
Start the container:
sudo rc-service waydroid-container start
Container needs to be started every time, or add it to OpenRC:
sudo rc-update add waydroid-container default
Run Waydroid from the Phosh icon.
Enable networking on Waydroid:
sudo apk add waydroid-nftables
Restart, or find a way to execute the nftables config.
Find which IP4 address waydroid0 interface is connected to (inet4):
nmcli
In my case, it is 192.168.240.1
Add default gateway to Android:
echo "ip route add default via 192.168.240.1" | sudo waydroid shell
Check that Waydroid has network access by launching an Android browser, or check that IP address is set in Waydroid status:
waydroid status
Desktop entries (icons) for Waydroid apps are stored in .local/share/applications. If you don't want them to show in Phosh, add this to the .desktop file:
NoDisplay=true
https://wiki.debian.org/Mobian/Tweaks
(C) 2024 CC BY yaky.dev