[DEV] GSM phone calls on Nexus 7 3G

Search This thread

Synman

Recognized Developer
ok, I hacked NetworkPolicyManager and am no longer crashing. Network time appears to be non-functional for the time-being. Network status is a little wonky too ... even though I have a good network signal the network icon never switches from gray to blue.


MMS send/receive is fully functional (with the exception of screwed up timestamps)

device-2012-12-05-231757.jpg
 

Attachments

  • device-2012-12-05-231757.jpg
    device-2012-12-05-231757.jpg
    15.9 KB · Views: 854

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
One more thing to try, change the PRODUCT_CHARACTERISTICS in build.prop to not indicate tablet. It seems that Phone.apk and TelephonyProvider.apk depend on this, at least for labeling.

Code:
PRODUCT_CHARACTERISTICS := tablet, nosdcard
Code:
PRODUCT_CHARACTERISTICS := nosdcard

This is from packages/providers/TelephonyProvider/res/values/strings.xml
Code:
    <!-- Official label of the TelephonyProvider, as seen in the "Manage
         Applications" UI.  This is the version of the label for tablet
         devices, where the TelephonyProvider stores configuration info
         about the mobile data network. [CHAR LIMIT=40] -->
    <string name="app_label" product="tablet">Mobile Network Configuration</string>

    <!-- Official label of the TelephonyProvider, as seen in the "Manage
         Applications" UI.  The TelephonyProvider stores configuration
         info about the carrier and cell network, and also provides
         storage for SMS and MMS messages. [CHAR LIMIT=25] -->
    <string name="app_label" product="default">Phone/Messaging Storage</string>

So I think it builds differently based on the product characteristics. Can someone confirm this? Either way, I'm going to try a clean build with this in a bit.

My money is that something like this is going to be what cracks it. This passes the smell test as being on the right track. I don't have any experience working with Android phones, I have always worked on tablets. So the data is a new function to me. But this tends to be how we unlock features on tablets that are usually only available on phones...get rid of the phone dependency or expand the tablet definition to include it.

That is how VOIP got working, that is how the tablet UI got enabled, etc. Once my sim card gets here I will test what you are working on. What steps are you taking? I saw you enabled voice and it looks like you have brought over the binary stack, perhaps.

Edit: Let me say I don't mean build.prop edits here but the source edits.
 

Synman

Recognized Developer
Pulled down master AOSP branch
Pulled down grouper binaries

working with grouper device

Modified device.mk
- use init.tilapia.rc
- use tilapia overlay
- remove SimpleSMS
- remove ro.carrier=wifi_only

Modified full-grouper.mk
- ref full_base_telephony in place of full_base
- added full apns

Modified device-common.mk
- added gsm permission

system.prop
replaced ref to libril-icera with libxgold

tilapia overlay
- removed single apn rules
- set voice-enabled
- added mms values

NetworkPolicyManager
- removed call to time.getMaxPeriod
 

Shinj1EVA

Member
Mar 4, 2008
45
43
Logcat

Dialing a number:
Code:
D/GSM     (  946): isTwoDigitShortCode
D/GSM     (  946): dialing w/ mmi 'null'...
D/GSM     (  946): [GSMConn] acquireWakeLock
D/RILJ    (  946): [0263]> SET_MUTE false
D/RIL     ( 3054): onRequest: SET_MUTE
D/AT      ( 3054): AT> AT+CMUT=0
D/RILJ    (  946): [0264]> DIAL
D/AT      ( 3054): AT< +CME ERROR: 4
D/RIL     ( 3054): onRequest: DIAL
D/AT      ( 3054): AT> ATD0542808961;
D/RILJ    (  946): [0263]< SET_MUTE 
D/AT      ( 3054): AT< +CME ERROR: 4
D/RILJ    (  946): [0264]< DIAL 
D/GSM     (  946): [GsmDCT] handleMessage msg={ what=270343 when=-129ms obj=android.os.AsyncResult@411dc808 }
D/GSM     (  946): [GsmDCT] onVoiceCallStarted
D/RILJ    (  946): [0265]> GET_CURRENT_CALLS
D/RIL     ( 3054): onRequest: GET_CURRENT_CALLS
D/AT      ( 3054): AT> AT+CLCC
D/AT      ( 3054): AT< OK
D/RILJ    (  946): [0265]< GET_CURRENT_CALLS  
D/RILJ    (  946): [0266]> SET_MUTE false
D/RIL     ( 3054): onRequest: SET_MUTE
D/AT      ( 3054): AT> AT+CMUT=0
D/RILJ    (  946): [0267]> SET_MUTE false
D/AT      ( 3054): AT< +CME ERROR: 4
D/RILJ    (  946): [0266]< SET_MUTE 
D/RIL     ( 3054): onRequest: SET_MUTE
D/AT      ( 3054): AT> AT+CMUT=0
D/GSM     (  946): Pending MO dropped before poll fg state:DIALING
D/RILJ    (  946): [0268]> LAST_CALL_FAIL_CAUSE
D/AT      ( 3054): AT< +CME ERROR: 4
D/RILJ    (  946): [0267]< SET_MUTE 
D/RIL     ( 3054): onRequest: LAST_CALL_FAIL_CAUSE
D/AT      ( 3054): AT> AT+CEER
D/AT      ( 3054): AT< +CEER: "CC setup error", 19, "User alerting, no answer"
D/AT      ( 3054): AT< OK
D/RILJ    (  946): [0268]< LAST_CALL_FAIL_CAUSE {19}
D/PHONE   (  946): VM: PhoneSubInfo.getVoiceMailNUmber: 
D/GSM     (  946): [GSMConn] releaseWakeLock
D/GSM     (  946): [GsmDCT] handleMessage msg={ what=270344 when=-94ms obj=android.os.AsyncResult@411b39c8 }
D/GSM     (  946): [GsmDCT] onVoiceCallEnded

Dialing an MMI Code:
Code:
D/GSM     (  946): dialing w/ mmi 'GsmMmiCode {State=PENDING action=*# sc=111 poundString=*#111#}'...
D/RILJ    (  946): [0319]> SEND_USSD *#111#
D/RIL     ( 3054): onRequest: SEND_USSD
D/AT      ( 3054): AT> AT+CUSD=1, "*#111#"
D/AT      ( 3054): AT< +CME ERROR: 4
D/RILJ    (  946): [0319]< SEND_USSD error: com.android.internal.telephony.CommandException: GENERIC_FAILURE
D/RILJ    (  946): [0320]> SET_MUTE false
D/RIL     ( 3054): onRequest: SET_MUTE
D/AT      ( 3054): AT> AT+CMUT=0
D/AT      ( 3054): AT< +CME ERROR: 4
D/RILJ    (  946): [0320]< SET_MUTE

Sending a Text (Something that we know works):
Code:
D/RILJ    (  946): [0339]> SEND_SMS
D/RIL     ( 3054): onRequest: SEND_SMS
D/AT      ( 3054): AT> AT+CMGS=16
D/AT      ( 3054): atchannel: sms case, needs extra EOS
D/AT      ( 3054): AT< > 
D/AT      ( 3054): AT> 0001000a815024089816000004d4f29c0e^Z
D/AT      ( 3054): AT< +CMGS: 2
D/AT      ( 3054): AT< OK
D/RILJ    (  946): [0339]< SEND_SMS { messageRef = 2, errorCode = 0, ackPdu = null}

So what is CME ERROR 4? Operation not supported. It seems the Phone app on my build is communicating with the RIL, but the radio is stating that it does not support voice calls. It's not a driver thing, I believe it's a baseband issue. Perhaps someone with more knowledge could shed some light on this?

If you look at the Tab 10.1 3G patches, it's simply a framework-res.apk patch and flashing another radio.img.

Also, our radio is mounted on /dev/ttyACM0.. most likely as a USB 3G Modem.
 
Last edited:

Synman

Recognized Developer
Also dropping tablet from the product characteristics merely fixes apps from the store that prefer external if building from AOSP with gapps installed.

I tried the maguro radio last night and it didn't go well.

Sent from my Galaxy Nexus using Tapatalk 2
 

Synman

Recognized Developer
Unless I screwed up build.prop the maguro radio is a dud. Will pull down the N4 images and see about extracting its radio now.

Getting MMS to work is, unfortunately, a bit more involved then a patch to framework-res. With telephony completely missing from the build a lot of jars will need to be replaced to "patch in place".
 
Last edited:
  • Like
Reactions: punshkin

Shinj1EVA

Member
Mar 4, 2008
45
43
Unless I screwed up build.prop the maguro radio is a dud. Will pull down the N4 images and see about extracting its radio now.

Getting MMS to work is, unfortunately, a bit more involved then a patch to framework-res. With telephony completely missing from the build a lot of jars will need to be replaced to "patch in place".

I tried building with maguro radio and flashing the /dev/block/mmcblk0p4 with the galaxy nexus radio as well, but no go, couldn't start the modem. Baseband still reporting 1231_0.10.0_1021. I'm thinking we could get dialing to work, but we have to flash the baseband with something that allows voice dialing.

---------- Post added at 08:18 AM ---------- Previous post was at 08:13 AM ----------

The chip itself is found in several smartphones afaik.
As I understand it, the voice capable chip is MOUNTED AS a modem.

On the smartphones (like maguro), it's mounted at ttyS01 as a serial device. Not sure why the difference, just something to look at.
 
  • Like
Reactions: punshkin

Synman

Recognized Developer
I had to change a bunch of stuff with the maguro modem and it's very possible I didnt' do something right. I could never get it to report a baseband at all... even with the radio installed you won't see the baseband info until the ril hal can get to it.

flash new radio
build.prop needs to point to libsec-ril
grouper init usb rc needs to exclude scanning of the tty port
tilapia init rc needs the additional mappings too

Those are things I've found along the way... may not be 100%
 
  • Like
Reactions: punshkin

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    BEFORE YOU POST HERE - Keep in mind this is now a DEV thread and only those with a glimpse of DEV knowledge should be posting.
    There is other thread with the same subject open to everybody discuss it.

    Please, this thread isn't related to VOIP, SIP calls or Tethering and
    It's only to 3G version of Nexus 7.


    What do you think is the possibility of us getting this function guys, even if its not officially supported.

    I've seen it built in on the 7" samsung galaxy tab 2.

    http://www.youtube.com/watch?v=wZ9RN...t=HL1351349133

    At the moment we know:

    1- The chipset Intel (Infineon) XMM6260 is built-in on Nexus 7 3G (the same chipset is in that rather long list of phones). It means no hardware limitations.

    http://xdaforums.com/showthread.php?p=34386544&highlight=6260#post34386544
    http://pdadb.net/index.php?m=specs&i...exus_7_3g_32gb
    http://xdaforums.com/show....php?t=1483053

    it also the same controller is in the following devices

    - Lava XOLO X900 [Phone]
    - Lenovo K800 [Tablet/Pad]
    - LG-P920 (LG ?) [Phone]
    - LG-P925 (LG Optimus 3D?) [Phone]

    - Huawei E369 (3G Hi-Universe) [USB 3G Modem]
    - Huawei MU733/MU739 [PC/CE Module]
    - Samsung Galaxy Nexus (I9200) [Phone]

    2- SMS texting works perfectely with the native mms.apk but MMS messages crash the app (missed mms APN + framework parameters?)
    http://xdaforums.com/showthread.php?t=1998702&page=4

    3- Modified framework-res.apk (by modifying bools.xml entry to name="config_voice_capable">true) shows up the native dialer (phone.apk) on the UI
    JB 4.2 http://xdaforums.com/showthread.php?t=1958686&page=12
    JB 4.2.1 http://xdaforums.com/showpost.php?p=34736932&postcount=314

    4- When placing calls trough the native dialer (phone.apk) with Skype app installed, it shows up a white menu asking "Do you want to complete this action using..." the options are "Mobile data" (w/ phone.apk blue icon) or "Skype" (w/ skype icon) and "Always" or "Just Once" (perhaps there is missing a "Phone" profile (or APN) as an option too)

    5- If Skype is chosen, the call is complete and everything goes well, but if "Mobile data" is chosen, we get a single sound (bip) and the call is not complete.

    6- Changing the DPI to 320 in build.prop file allow us to add a SIP account (SIP calls using native dialer is now possible), DPI could be restored after SIP account settings done.
    http://xdaforums.com/showthread.php?p=34752693&highlight=320#post34752693

    Detailed informations come from the thread in XDA developers at:
    http://xdaforums.com/showthread.php?t=1958686

    --------------------------------------------------------
    UPDATE 5th Dec 2012 by Synman

    ok, I hacked NetworkPolicyManager and am no longer crashing. Network time appears to be non-functional for the time-being. Network status is a little wonky too ... even though I have a good network signal the network icon never switches from gray to blue.
    MMS send/receive is fully functional (with the exception of screwed up timestamps)

    Pulled down master AOSP branch
    Pulled down grouper binaries

    working with grouper device

    Modified device.mk
    - use init.tilapia.rc
    - use tilapia overlay
    - remove SimpleSMS
    - remove ro.carrier=wifi_only

    Modified full-grouper.mk
    - ref full_base_telephony in place of full_base
    - added full apns

    Modified device-common.mk
    - added gsm permission

    system.prop
    replaced ref to libril-icera with libxgold

    tilapia overlay
    - removed single apn rules
    - set voice-enabled
    - added mms values

    NetworkPolicyManager
    - removed call to time.getMaxPeriod
    23
    Hallo! Bin über meinen Beruf in die tegra3 Struktur geraten und bin einer Lösung für Telefonanrufe sehr nahe! google hat eine Sperre zum Anmelden in die Zellen der Mobilfunkbetreiber gesetzt.
    Ich kann bis jetzt Anrufe im Vorwahlbereich meines Standortes führen (nur Festnetz), nur noch keine Anrufe erhalten oder zu Mobilnummern führen.

    Ich muß leider erstmal prüfen ob ich hier durch meinen Arbeitgeber oder anderen Firmen Probleme bekomme und hoffe bis Weihnachten meinen jetzigen Lösungsansatz mit Euch teilen zu können!?

    Rough Translation:
    Hello! Here at my job I work with tegra3 and I am very close to finding a solution to making calls. Google has a lock to log into the cells of the mobile operators.
    My progress so far: I can make outgoing calls to numbers with the same area code (landline only), but not receive incoming calls from mobile numbers (Possibly same area code only).

    I have to make sure I'm not breaking any NDAs with my company before I can post this half-working solution.

    Thanks meter is on the left :)
    19
    sorry, its german

    Hallo! Bin über meinen Beruf in die tegra3 Struktur geraten und bin einer Lösung für Telefonanrufe sehr nahe! google hat eine Sperre zum Anmelden in die Zellen der Mobilfunkbetreiber gesetzt.
    Ich kann bis jetzt Anrufe im Vorwahlbereich meines Standortes führen (nur Festnetz), nur noch keine Anrufe erhalten oder zu Mobilnummern führen.

    Ich muß leider erstmal prüfen ob ich hier durch meinen Arbeitgeber oder anderen Firmen Probleme bekomme und hoffe bis Weihnachten meinen jetzigen Lösungsansatz mit Euch teilen zu können!?
    16
    I'm done with framework hacks for a framework intentionally gimped.

    We are close!

    Sent from my Galaxy Nexus using Tapatalk 2
    12
    Pulled down master AOSP branch
    Pulled down grouper binaries

    working with grouper device

    Modified device.mk
    - use init.tilapia.rc
    - use tilapia overlay
    - remove SimpleSMS
    - remove ro.carrier=wifi_only

    Modified full-grouper.mk
    - ref full_base_telephony in place of full_base
    - added full apns

    Modified device-common.mk
    - added gsm permission

    system.prop
    replaced ref to libril-icera with libxgold

    tilapia overlay
    - removed single apn rules
    - set voice-enabled
    - added mms values

    NetworkPolicyManager
    - removed call to time.getMaxPeriod