[DEV] GSM phone calls on Nexus 7 3G

Synman

Recognized Developer
Nov 2, 2010
826
547
0
Outside Philadelphia
www.shellware.com
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)

 

Attachments

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
0
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
Nov 2, 2010
826
547
0
Outside Philadelphia
www.shellware.com
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
0
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 [email protected] }
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 [email protected] }
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
Nov 2, 2010
826
547
0
Outside Philadelphia
www.shellware.com
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
Nov 2, 2010
826
547
0
Outside Philadelphia
www.shellware.com
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
0
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
Nov 2, 2010
826
547
0
Outside Philadelphia
www.shellware.com
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