Translating Android APN to Ubuntu Touch APN
On my old Android phone, the APN has the following fields:
APN roaming protocol
My Ubuntu Touch phone has far fewer fields:
How to these fields correspond to each other? Some are obvious (Name, APN, MMSC) but what about proxy and proxy port. Does MMS Proxy correspond to Proxy and MMS Port to Proxy Port?
The carrier is AT&T prepaid.
Flohack last edited by
no in Ubuntu Touch there should be 2 APN entries, one for Internet, one for MMS. So Proxy = Proxy and MMS Proxy = MMS proxy but in the other setting ^^ and both should be activated with the echeckmark probably.
... but in the other setting ^^ and both should be activated with the echeckmark probably.
Not sure what that means.
I finally activated my Nexus 5 with a mobile carrier, and I have instantly run into some huge "WTFs." This Ubuntu Touch APN interface is one of the major WTFs.
Here are the APN settings from the carrier:
Name: Red Pocket
Proxy: Not set
Port: Not set
Username: Not set
Password: Not set
Server: Not set
MMS proxy: proxy.mobile.att.net
MMS port: 80
Authentication Type: None
APN type: default,mms,supl
APN protocol: IPv4
How do I enter these simple, straightforward settings into the Ubuntu Touch APN interface? Currently, I've got three entries under the main "APN" heading:
ATT Phone; ATT WAP; and the custom one that I created. Each of those three APN headings seems to include four sub-headings: Internet and MMS; Internet; MMS; and LTE. What do all these headings and sub-headings mean, and what do I do?
Also, how does one make the settings take -- I enter the settings, and then they disappear. WTF!
This APN interface could be so much simpler than it is. I found a post by the apparent "architect" of the Ubuntu Touch APN interface: https://athoneycutt.wordpress.com/2015/06/09/apn-changes-for-ubuntu-touch/#comment-2link url. I am not sure why he tried to "reinvent the wheel," but his reasoning sounds a little pretentious. It's hard to understand how his peculiar interface is more "efficient" -- I can't get my APN settings entered!
This could be a deal breaker. Help!
There are two (or maybe the two is only one) file from where APN values seem to come from:
root@ubuntu-phablet:/home/phablet# ls -l /var/lib/lxc/android/rootfs/system/etc/apns-conf.xml /android/system/etc/apns-conf.xml
-rw-r--r-- 1 root root 661850 Jun 6 2016 /android/system/etc/apns-conf.xml
-rw-r--r-- 1 root root 661850 Jun 6 2016 /var/lib/lxc/android/rootfs/system/etc/apns-conf.xml
Thank you! That is very helpful.
It is straightforward to enter variables/values directly into an xml file -- the Ubuntu Touch APN interface is much more perplexing.
If I create an entry in these files for my carrier, how do I get that entry to appear in the Ubuntu Touch APN user interface?
Thanks, but it appears that those files are compiled into binaries at build time. Consequently, those files are read-only. It would be great if one could write to those files, as my problem (no and/or spotty data) would likely be solved.
However, there has to be a file somewhere to which the custom APN settings are written. Does anybody know where that file might be? If it is a text or xml file, then I probably am "golden."
What's funny is no "4G" icon nor data indicator appears on the task bar at the top of the desktop, but when I swipe down on task bar and open the network settings it shows my carrier's name with a "4G" next to it.
Phone calls and texting seem to work. I just want to enable 4G and LTE.
By the way, I have enabled the development channel, and installed the latest development version.
If the APN interface were only broken down into a single simple list, I probably would be okay.
As far as I understand, the files are only some kind of database and the concrete APN settings are calculated from the SIM's MCC (Mobile Country Code) and MNC (Mobile Network Code). See also
for more hints.
Thank you for the two links!
I managed to get 4G working by fiddling with the settings in the Ubuntu Touch UI, but I didn't really understand what I had done.
However, your two links led me to a lot of helpful pages that made me better understand the Ubuntu Touch APN interface and which led me to discover where the APN settings are saved.
The current APN settings are found in a text file: /var/lib/ofono/<your_imsi_number>/gprs, as mentioned in this message.
Unfortunately, one cannot directly edit these files merely by being root with "sudo su", as they are inside the "read-only" file system. On the other hand, the linked message above also details a quick method of manually editing the APN settings within the file. I tried that method by making an innocuous change (inserted a space) in the gprs file, but when I restarted ofono, I found that I lost 4G for awhile. Perhaps it was because the service was merely overburdened at that moment.
You can also edit these and most other files read-only files by changing the mounted read-only file system to "read-write." At the adb phablet-shell prompt, use "sudo mount -o remount,rw /". Make your changes to the file(s), and then do "sudo mount -o remount,ro /" to change the file system back to read-only. You might have to restart ofono ("sudo restart ofono"?) after you make any changes to its files.
I tried this remounting method to edit a normally read-only file (but not an ofono file) with an innocuous change, and the phone didn't blow-up. Other than merely having root read-write access, if there are any inherent dangers in converting the mounted filesystem to read-write and then back to read-only, somebody please warn me now.
By the way, if you had other sim cards inserted in your phone, you might find multiple "IMSI" directories in /var/lib/ofono. There are several ways to find out the IMSI number of your current sim card. One easy way do so is to run /usr/share/ofono/scripts/list-modems and look for "SubscriberIdentity = <your_current_IMSI_number>" near the end of the output.
You links also led me to what is perhaps the "proper" way to manually set a custom APN, using the ofono scripts.
If anyone is interested in the designer's thinking (overthinking) behind the Ubuntu Touch APN interface, I followed your links to this page and this page with development sketches and discussion on the layout. I briefly scanned these two pages which helped me understand the interface a little better, but I think I will eventually use the manual read-write mount method to clean up the APN settings, if there are no dangers involved in doing so.
@tupp were you able to modify the APN settings after all? I ran into the same confusing situation in the API settings on the phone.
I never edited the /var/lib/ofono/<your_imsi_number>/gprs directly, but I got the APN settings to work by manually entering them into the "System Settings > Cellular > Carrier & APN > APN" section of the UT menu.
I played around with the entries until it worked. Right now, I have one APN heading/settings for "Internet and MMS" and another heading/settings for "LTE." Not sure if LTE is actually working, as I have never seen "LTE" appear on the top task bar.
I did get "4G" to finally appear on the top task bar. One reason why this icon did not initially appear is evidently because my cellular provider is slow or I have bad reception.