MMS workaround for users with separate APN
#1
Hello!

I find out quite good workaround for MMS if you have separate APN for Data and MMS.

If you wan't to find out more about this original issue see here:
https://gitlab.com/kop316/mmsd/-/issues/5
https://gitlab.freedesktop.org/NetworkMa...issues/958

So there is option in elogind that it will do something right before and/ord after suspending and this is what I am now using.

Firs you need to create bash script and for me this works:
Code:
#!/bin/bash
case $1/$2 in
pre/*)
nmcli c up mms
;;
post/*)
sleep 5 && nmcli c up internet
;;
esac

You can just open gedit and paste it there but notice that you have change "mms" and "internet" (right after nnmcli c up) to match your own apn names.
Then save file for example mms.sh and put it in your home folder

Now open terminal and type:
Code:
sudo cp mms.sh /usr/libexec/elogind/system-sleep/
Code:
sudo chmod +x /usr/libexec/elogind/system-sleep/mms.sh


And reboot.
Now right before your phone suspends it will switch to MMS APN so your arriving MMS messages does not get expired (only thing you have to remember is suspend atleast once a day Smile ). You will also receive notification because it is MMS.
When suspend stops (you open phone or receive call,sms or mms) it will wait 5 seconds and switch back to DATA APN.

Make sure you have correct apn settings in System settings AND in Chatty Smile

I am trying to learn more on this MMS thing but right now this is ok solution.

Ps. This should work also on Mobian, Arch and Manjaro but the file goes to different place and the command might be little bittle different.
  Reply
#2
And if you want more easier way to send MMS:

install gnome-terminal
Code:
sudo apk add gnome-terminal

Open gedit and paste this there (make sure you have correct apn name)
Code:
[Desktop Entry]
Version=1.0
Name=Chatty MMS
Comment=Change to MMS apn and open Chatty
Exec=bash -c 'nmcli c up mms && chatty'
Icon=sm.puri.Chatty
Terminal=falce
Type=Application


Save the file to /home/user/.local/share/applications/ and name for example mms.desktop

Now you have desktop shortcut (Chatty icon and name Chatty MMS) which will first change apn to MMS and then open Chatty Smile.
If you want to use internet you have to manually change back to data APN (or if you use workaround from my first message it will switch back to data apn after resuming from suspend - so you have to just wait for suspend).
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)