Printable Version of Topic

Click here to view this topic in its original format

OESF Portables Forum _ Gemini PDA - Linux _ Debian TP2 + LTE in the UK

Posted by: iJacks Jun 4 2018, 02:13 PM

Hi guys, I got my Gemini a few weeks ago (hard to believe that I've had it that long already!) - and on day two I decided to get it dual booting with Debian. It took some doing, the official instructions are - to be blunt - garbage, but I got there in the end. I then followed all the setup instructions and have a mostly working Linux environment - great!

Now, I know that the ofono 'support' is very experimental and full of holes right now - but I have ran into a brick wall and was wondering if anybody could point me in the right direction on this specific issue.

At the end of the instructions on the https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP page it goes on about ofono/mobile data.

I can't get the LTE/Modem to work at all. It enables, but it will not find a network. I think I know what the problem is, I installed the ofono-scripts and ran both the "./scan-for-operators" and "./get-operators" scripts - but it only lists Vodafone, O2 and EE - my network, Three, is not listed at all.

I know the phone application won't work at the moment, but it would be nice to get mobile data working. Does anybody have any ideas how to add Three to the list of known networks? Or is this a case of suck it up and wait for further updates kinda issue?

Any help you can offer will be most welcome. Thank in advance!

Posted by: Adam Boardman Jun 22 2018, 12:07 AM

I've switched the gemian builds from ubports-ofono to sailfish-ofono and patched connman+cmst to a degree. So now I'm able to test SMS in+out, and Mobile Data.

I've updated the bottom of the DebianTP page: https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP#mobile

Posted by: galodoido Jun 22 2018, 09:59 AM

QUOTE(Adam Boardman @ Jun 22 2018, 05:07 AM) *
I've switched the gemian builds from ubports-ofono to sailfish-ofono and patched connman+cmst to a degree. So now I'm able to test SMS in+out, and Mobile Data.

I've updated the bottom of the DebianTP page: https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP#mobile


Mine didn't work . Only phone dialer without audio. Didn't tried sms. But I suppose like the older version is OK.
And cellular status is always off in connman. ( even after check power and mobile data enabled in the tab and after your new instructions )
I've tried manually and a message appears saying that gprs is not attached ( when activating context 2 ). I've did this command ./enable-gprs and it is OK )
My network is APN gprs.oi.com.br user : oi , password oi. ( Brazil ).
For my own reasons and to facilitate the use of my usb modem 3g I've installed network-manager-gnome and removed connman. ( It is a problem with this new version of connman and resolving names with pppconfig ( I'm using to connect my usb modem 3g ) - I don't know why this dns problem with connman and pppconfig. I think it is possible to use ofono and network-manager, right ? But up to now no mobile connections are displayed in network-manager-gnome (like when I plug my old usb modem 3g ). Thank you again

Posted by: Adam Boardman Jun 23 2018, 01:26 AM

> Only phone dialer without audio.

Thats a known issue, I encourage you to read the full info, sms+mobile data are testable('works for me') state. Phone calls need help with audio routing and other fixes as explained.

> Even after check power and mobile data enabled in the tab

Well the things to check are that you have an APN with 'Type = internet' (from ofono/scripts/list-contexts). Then that you have in cmst - Details Tab - service pick your APN - Auto Connect: On/Yes. Then from status if you turn off Wifi it should auto connect Cellular. Connman won't connect another technology if you've already got a connection. The priority list (PreferredTechnologies) is in /etc/connman/main.conf

> It is a problem with this new version of connman and resolving names with pppconfig.

Possibly related to using a newer connman from upstream that had a dependency on ppp 2.4.7-2 (we have 2.4.7-1 in stretch), you could try updating that to see if it helps. The reason why I didn't is that 'apt-cache rdepends ppp' listed quite a few things that would also need re-building due to possible binary breaks evident by the changes in the symbol files.

> ofono and network-manager

You need to re-build network-manager with ofono enabled, we've done this on buster and could do the same on stretch if wanted, for now I'd suggest you try building https://github.com/gemian/network-manager or apply the same patch to the stretch version to see if that helps. Would be good to know if there are any version dependency reasons for not building the buster version on stretch as it would save branching.

Posted by: galodoido Jun 23 2018, 06:48 AM



I've checked and type=internet is ok, but active=0. When tried to power on cellular :
I received a dbus reply message indicating an error
error name : net.connman.error.alreadyenabled
error message : already enabled

Sometimes cellular is powered on at boot up

In Details Tab - service my APN is not listed.

the error when activating context 2 persists

The repository https://github.com/gemian/network-manager is incomplete. When tried to compile I've noticed some missing files in the source. Most of them are with the status aplying patches . I will compile directly with sources from debian , but in ./configure , I will put --with-ofono ( the original compilation was not compiled with ofono support ).

Thank you so much again.

Posted by: galodoido Jun 23 2018, 05:40 PM


WORKED !
Changed my sim card to my operator "oi" to another operator "VIVO" here in Brazil.

Only did ./activate context 1 ( to my operator VIVO ) and intenet is OK.

I've changed my operator "oi" to "VIVO " here in Brazil. Everything works fine.
Problem was with my other operator .(OI )

Thank you so much !

Posted by: bled82 Jun 26 2018, 06:25 AM

Having trouble getting verizon to connect , any tips or tricks I have tried the Debian TP walk through and the debugging mobile link on the github . Will cell connect if wifi on and can both be on ? Please let me know if there are any logs I can upload that might assist .

Posted by: galodoido Jun 26 2018, 07:34 AM

QUOTE(bled82 @ Jun 26 2018, 11:25 AM) *
Having trouble getting verizon to connect , any tips or tricks I have tried the Debian TP walk through and the debugging mobile link on the github . Will cell connect if wifi on and can both be on ? Please let me know if there are any logs I can upload that might assist .


Please, see the complete topic. ( already mentioned before by Adam )
Only wifi or celullar must be "on" to work correctly. If you disable wifi, celullar must be connected automatically. Or vice versa.



Posted by: bled82 Jun 26 2018, 09:27 AM

QUOTE(galodoido @ Jun 26 2018, 10:34 AM) *
QUOTE(bled82 @ Jun 26 2018, 11:25 AM) *
Having trouble getting verizon to connect , any tips or tricks I have tried the Debian TP walk through and the debugging mobile link on the github . Will cell connect if wifi on and can both be on ? Please let me know if there are any logs I can upload that might assist .


Please, see the complete topic. ( already mentioned before by Adam )
Only wifi or celullar must be "on" to work correctly. If you disable wifi, celullar must be connected automatically. Or vice versa.


Ok wifi off and bluetooth off , "gemini@gemini:/usr/share/ofono/scripts$ ./list-contexts
[ /ril_0 ]
[ /ril_0/context1 ]
Username =
IPv6.Settings = { }
Active = 0
Settings = { }
AuthenticationMethod = none
Name = Internet
Password =
AccessPointName = internet
Type = internet
Protocol = dual

[ /ril_0/context2 ]
Username =
IPv6.Settings = { }
Active = 0
AccessPointName = mms
AuthenticationMethod = none
Name = MMS
Password =
Type = mms
Protocol = ip
Settings = { }
MessageProxy =
MessageCenter =

gemini@gemini:/usr/share/ofono/scripts$ ./activate-context
Error activating /ril_0/context1: org.ofono.Error.Failed: Operation failed
gemini@gemini:/usr/share/ofono/scripts$ ./activate-context 1
Error activating /ril_0/context1: org.ofono.Error.Failed: Operation failed "

Also if I move to next step I get " connmanctl> connect cellular_311480309857487_context1
Error /net/connman/service/cellular_311480309857487_context1: Operation aborted
connmanctl> "

and CMST displays "The agent request failed before a reply was returned"


Posted by: galodoido Jun 26 2018, 09:46 AM


Maybe a problem with verizon.
In my case here in Brazil I had to change from my operator "oi" to "VIVO" .
So, you can use a pre-paid sim card only to test.
Adam also can help you if he has an answer for your question.
Good luck !

Posted by: Adam Boardman Jun 26 2018, 10:21 AM

Sorry I'm new to debugging this, so no specific answer.

If you want to debug further you need to also get the output from journalctl, it might also help to stop the ofono service and starting ofonod manually with debug logging turned on so you can see more details. There is info related to these options on the debugging pages.

The other interesting thing to try is using it on Sailfish as we are using the same ofono so a category of possible bugs will be shared with them. If it works there but not on Debian then that might help narrow down where to look too.

Posted by: bled82 Jun 26 2018, 12:32 PM

QUOTE(Adam Boardman @ Jun 26 2018, 01:21 PM) *
Sorry I'm new to debugging this, so no specific answer.

If you want to debug further you need to also get the output from journalctl, it might also help to stop the ofono service and starting ofonod manually with debug logging turned on so you can see more details. There is info related to these options on the debugging pages.

The other interesting thing to try is using it on Sailfish as we are using the same ofono so a category of possible bugs will be shared with them. If it works there but not on Debian then that might help narrow down where to look too.



Sailfish works once the APN is set to the correct VZWINTERNET , not sure where that helps ? I ran ./create-internet-context VZWINTERNET "" "" and rebooted to debian again with no success on cellular .

Posted by: Adam Boardman Jun 27 2018, 12:19 AM

So if you copy the list-contexts script to sailfish what does it list as the properties of this working APN on sailfish, and did you recreate exactly all the same properties on Debian?

Also to repeat, you'll need the debug logging once you've got identical APN's setup on both OS's, if its still broken and you want to debug further.

Something possibly worth pointing out, connman will take the first 'Type = internet' APN and attempt to use that, so if you have the auto-created one (context1 in your listings above) still there and you've added another one then the new one is unlikely to be used unless your manually activating it by number. You'd be better off changing the settings of your existing context than creating a new one, or delete+recreate etc.

[General request]: Could folk avoid quoting whole tracks of conversation, or at least trim any quotes to the relevant part if your afraid of people editing history and the context being lost.

Posted by: bled82 Jun 28 2018, 09:33 AM

Looks like ill either have to do some debugging or wait for a new release , the settings look to be identical but Debian side doesnt connect and sailfish does , Thanks maybe someone else with verizon wireless will jump in , Im not great at Linux yet still newbie . Thanks all .

Posted by: bled82 Jun 29 2018, 08:09 AM

After additional testing with a ATT sim I belive there is some sort of issue with the connman services and or ofono since the connman detects sim as att or verizo n but stays idle and does not allow activate step for context or to let the connect step for cellular , So is it possible to manually copy the files/program from sailfish and overwrite it to the debian image ? copy paste and set permission? or no ?

Posted by: bled82 Jul 2 2018, 02:44 PM

Made some progress the auto config populated more info on this fresh install , but I need to disable chap for the autheticationmethod , who ? It shouldnt be any per verizon .

[ /ril_0/context1 ]
Type = internet
Name = LTE - Verizon Internet
Username =
Password =
Active = 0
IPv6.Settings = { }
Protocol = ip
AuthenticationMethod = chap
AccessPointName = VZWINTERNET
Settings = { }

Posted by: bled82 Jul 3 2018, 10:02 AM

So debugging shows which just keeps repeating anyone have a clue ?




ofonod[2882]: drivers/ril/ril_network.c:ril_network_rat_to_mode() unexpected rat mode 4
ofonod[2882]: drivers/ril/ril_network.c:ril_network_query_pref_mode_cb() rat mode 4 (gsm)
ofonod[2882]: drivers/ril/ril_network.c:ril_network_check_pref_mode() rat mode 4, expected 9
ofonod[2882]: drivers/ril/ril_network.c:ril_network_set_rat() setting rat mode 9
2018-07-03 13:01:51 RIL< [000000a9] SET_PREFERRED_NETWORK_TYPE
2018-07-03 13:01:51 RIL< 0000: 49 00 00 00 a9 00 00 00 01 00 00 00 09 00 00 00 I....... ........
2018-07-03 13:01:51 RIL> [000000a9] OK
2018-07-03 13:01:51 RIL> 0000: 00 00 00 00 a9 00 00 00 00 00 00 00 ........ ....
2018-07-03 13:01:51 RIL< [000000aa] GET_PREFERRED_NETWORK_TYPE
2018-07-03 13:01:51 RIL< 0000: 4a 00 00 00 aa 00 00 00 J.......
2018-07-03 13:01:51 RIL> [000000aa] OK
2018-07-03 13:01:51 RIL> 0000: 00 00 00 00 aa 00 00 00 00 00 00 00 01 00 00 00 ........ ........
2018-07-03 13:01:51 RIL 0010: 04 00 00 00 ....
ofonod[2882]: drivers/ril/ril_network.c:ril_network_rat_to_mode() unexpected rat mode 4
ofonod[2882]: drivers/ril/ril_network.c:ril_network_query_pref_mode_cb() rat mode 4 (gsm)
ofonod[2882]: drivers/ril/ril_network.c:ril_network_check_pref_mode() rat mode 4, expected 9
ofonod[2882]: drivers/ril/ril_network.c:ril_network_set_rat() setting rat mode 9

Posted by: bled82 Jul 6 2018, 09:44 AM

Following these steps for verizon wireless in the US , MUST HAVE WORKING CELL SERVICE IN ANDROID .


Fresh flash of debian with flash tool
connect to wifi
connect via usb ssh to 10.15.19.82 for ease of keyboard cmds or run in term
on first login sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ofono-scripts
now disconnect from wifi
cd /usr/share/ofono/scripts
power on cellular from cmst
sudo ./create-internet-context vzwinternet "" ""
sudo reboot
remove sim and reinstert
sudo ./activate-context



updated 8/6 , Resualts not working with new android image and tp3 , missing something in the order .

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)