tickerguy
Android Enthusiast
Ok, here's the deal.
To get the RIL to come up you need to deal with the following problems:
1. The Qualcomm code likes to CLAIM it has a RUIM in it that is not ready. A RUIM is a SIM for CDMA phones, basically. The problem is that there is no socket for that in the phone at all -- in other words, it doesn't exist. This will cause the phone to be torn down and reset when it comes up the stack. Needless to say that's bad.
To fix this you have to change the base code. In CM7 I patched RIL.java around line 2020 with the radio state (look in ril.h for the defines) for State 2, and if the class is Triumph I change the state to RadioState.NV_READY instead of RadioState.SIM_NOT_READY.
This same code is in the ICS build and must be fixed.
2. In the routine processUnsolicited there are a number of upcalls that have to be there. It appears that ICS picked up all but one. Add that one (VOICE_RADIO_TECH_CHANGED)
3. RILConstants appears to be fixed, so you should be ok there.
4. cdma/CdmaServiceStateTracker.java has a BUNCH of changes that have to be pulled over. You're going to have to go through this code in the ICS tree as it looks materially different. One place I know you have to fix is in EVENT_POLL_STATE_CDMA_SUBSCRIPTION -- you need to add the code from my CM7 build that checks for a Triumph and if so DOES NOT attempt to pull the PRL from the upcall packet -- it's missing on the Triumph and if you reference that 5th element in the array the code will fault and blow up. What I did here temporarily was to stuff a "fake" PRL in the data table.
5. Same file, look at CASE_SIM_LOCKED_OR_ABSENT. This is one of those async upcalls that on the Triumph CANNOT be allowed to fall through to the next state (it does in the base code.) If it does, you're dead as the code then turns the radio off! This is generated from the RUIM message; see what I did in the CM7 build to fix this (basically ignore it if it's a Triumph)
6. The poll for the ACTUAL PRL is in the default case in this same statement. Again, see my CM7 code, same file, and look at the other PRL related changes to that same file (they're not in the ICS version at all.)
That should get the RIL to come up. You NEED all of the radio parameters (including the PRL, MEID and such) to load before Android will allow a data connection to start. Thus, all this has to be fixed for data to work.
Once you have that you get to have fun with MMS, which will also require patching......
There's probably more I'm missing but this should get you either working or damn close.
To get the RIL to come up you need to deal with the following problems:
1. The Qualcomm code likes to CLAIM it has a RUIM in it that is not ready. A RUIM is a SIM for CDMA phones, basically. The problem is that there is no socket for that in the phone at all -- in other words, it doesn't exist. This will cause the phone to be torn down and reset when it comes up the stack. Needless to say that's bad.
To fix this you have to change the base code. In CM7 I patched RIL.java around line 2020 with the radio state (look in ril.h for the defines) for State 2, and if the class is Triumph I change the state to RadioState.NV_READY instead of RadioState.SIM_NOT_READY.
This same code is in the ICS build and must be fixed.
2. In the routine processUnsolicited there are a number of upcalls that have to be there. It appears that ICS picked up all but one. Add that one (VOICE_RADIO_TECH_CHANGED)
3. RILConstants appears to be fixed, so you should be ok there.
4. cdma/CdmaServiceStateTracker.java has a BUNCH of changes that have to be pulled over. You're going to have to go through this code in the ICS tree as it looks materially different. One place I know you have to fix is in EVENT_POLL_STATE_CDMA_SUBSCRIPTION -- you need to add the code from my CM7 build that checks for a Triumph and if so DOES NOT attempt to pull the PRL from the upcall packet -- it's missing on the Triumph and if you reference that 5th element in the array the code will fault and blow up. What I did here temporarily was to stuff a "fake" PRL in the data table.
5. Same file, look at CASE_SIM_LOCKED_OR_ABSENT. This is one of those async upcalls that on the Triumph CANNOT be allowed to fall through to the next state (it does in the base code.) If it does, you're dead as the code then turns the radio off! This is generated from the RUIM message; see what I did in the CM7 build to fix this (basically ignore it if it's a Triumph)
6. The poll for the ACTUAL PRL is in the default case in this same statement. Again, see my CM7 code, same file, and look at the other PRL related changes to that same file (they're not in the ICS version at all.)
That should get the RIL to come up. You NEED all of the radio parameters (including the PRL, MEID and such) to load before Android will allow a data connection to start. Thus, all this has to be fixed for data to work.
Once you have that you get to have fun with MMS, which will also require patching......
There's probably more I'm missing but this should get you either working or damn close.