Android RIL GPRS MODEM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android RIL GPRS MODEM

1,643 Views
leonardoprates
Contributor III

I'm trying integrate a GPRS modem in Android 6.0.1 without sucess. Modem works well at hardware level and answer correctly AT commands. In Android UI I only see SIM card not present and not related do modem works.

In Android log I can see a lot of subId=-2, phoneId=-1, slotId=-1, I think my problem is because of this wrong numbers.

Someone with experience in Android RIL could help me to understand how this numbers are generate and where?

Thanks,

Leonardo

Labels (1)
0 Kudos
2 Replies

871 Views
leonardoprates
Contributor III

I discovered the root cause of the problem. The subid number is generate from iccid of simcard. Android gets it calling AT+CRSM=176,12258,0,0,15. In my case the problem is exactly this command, because modem doesn't accept P3 parameter as 15, the correct is 10 (AT+CRSM=176,12258,0,0,10). The solution in my case was change the P3 parameter inside reference-ril, when command is 12258. See below. Now Android can get iccid and subId, phoneId and slotId are correct and I can see the modem signal. Now I'm implementing the gsm0710muxd to get two channels, because Android needs one for command and another for data.

Inside this function: void requestSIM_IO(void *data, size_t datalen __unused, RIL_Token t)

Add:

if (modemModel & MDM_GL865){ // SEVA
   if (p_args->fileid == 0x2FE2) {
      if (p_args->command == 0xb0) {
         p_args->p3=10; //Change P3 from 15 to 10
      }
   }
}

0 Kudos

871 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Leonardo,

    Suggest you read the document or comare your steps with it to check if you forgot something, because GPRS module is not manufactured by us, I only give you some advice.

---See the link, please!

https://www.u-blox.com/sites/default/files/AndroidRIL-SourceCode_AppNote_(UBX-13002041).pdf

In addition, You can also get a lot of experience on how to integrate GPRS to android from internet.

 How to integrate GSM/2G Modem in Android – To establish data Connection | Linux & Android Blog 

Hope above information can help you!

Best Regards,

Weidong

0 Kudos