yashsingh1/xdaforums huggingface dataset:
[Touch Pro2, Tilt 2 Android Development] highlandsun:
No, running in fake GSM won't help because the Android GSM phone handler does things completely differently from the Android CDMA phone handler.

But please give me another logcat from your current run.
[Touch Pro2, Tilt 2 Android Development] Starfox:
I ended up making a shell script to make my life easier using 4 sed.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Signal strength is now working in the newest ril.

Roaming Indicator requires editing eri.xml; apparently a fairly generic one is provided in XDAndroid and usually it is customized for each carrier.

mizofizo: can you dig out the eri.xml from your phone? It will be contained in /system/framework/framework-res.apk (a zip file) and called res/xml/eri.xml. This one is usually a binary file. On CyanogenMod builds, you can override it with a text file in /data/eri.xml, I don't know if that will work on our XDAndroid builds.

This http://cleanimport.xda/index.php?threads/866553/ has some useful info on customizing this file.

I'm not sure if this is needed too

http://forum.cyanogenmod.com/topic/...r-carrier-name/page__view__findpost__p__59988

ro.build.brand=sprint
ro.com.google.clientidbase=android-sprint-us
ro.cdma.home.operator.numeric=310120
ro.cdma.home.operator.alpha=Sprint

Can you post the output from getprop on your phone, for those properties?
[Touch Pro2, Tilt 2 Android Development] manekineko:
I can confirm on CDMA Rhod400 running GRX0A latest that CDMA data and signal strength are both working on ril-0f52385.zip. :D
[Touch Pro2, Tilt 2 Android Development] manekineko:
After installing the latest RIL (ril-0f52385) I'm seeing an odd quirk, possibly a coincidence? Anyone else seeing this?

There's a gap in my Android status bar now, as if there is an invisible black icon that's supposed to be there. It appears to the left of the data indicator, but to the right of the wifi or sync indicators. Thus, when I'm on 3G only, it's not discernible, but if the phone is syncing or I turn on wifi, the gap is visible.

First time I ever saw it was after installing the RIL, and it's surviving reboots, could it be some type of missing icon indicating something signal related?
[Touch Pro2, Tilt 2 Android Development] Starfox:
Not sure if this will work but I have the ERI from the Optimus S. Signal strength seems to be working and Roaming is on. Nyanko is probably seeing the invisible roaming triangle.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] pdawg17:
When trying to enter the sqlite commands for CDMA on my rhod400 I get an error on the second command:

SQ error: Not an error

Any ideas?
[Touch Pro2, Tilt 2 Android Development] Starfox:
Means that you didn't su before running the command. Although I'm not sure that command has effect because getprop still returns default_network = 0.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
There are multiple settings involved. The ro.ril property is only used on a fresh install, when none of the other settings DBs have been created yet. Which is why I specifically said that option is for a fresh data.img.

Might as well document this here for posterity...

The ro.telephony.default_network property is used to initialize the system. Once initialized, the value is stored in the secure.preferred_network_mode settings DB. This is done somewhere inside the telephony framework. The com.android.phone app reads this setting (or the property, if the setting doesn't exist yet) and then decides, based on this mode, whether to start the GSM phone code or the CDMA phone code. The default value (0) means GSM/WCDMA (WCDMA preferred). The value 4 means CDMA and EvDO, with choice depending on the phone's PRL (preferred roaming list). There are other settings of course, but I won't document them here.

There is an option in the Phone Settings menu to select what mode you want. It's been disabled by default in previous builds, but I think the latest Gingerbread image has it enabled. You can also get to it by dialing *#*#INFO#*#*, which works in all builds. If you try to set a mode your phone doesn't support, it will simply return you to the last mode you were in.

Anyway, after the GSM or CDMA phone code initializes itself, it sets yet another property gsm.current.phone-type to tell which mode is active. It took me a long time to unwind this sequence of events in the framework, but now the ril code checks this property to see which mode to run in.

The upshot of all this is that, in the near future, we should be able to phase out the force_cdma option in the STARTUP.TXT file, and just use the Android GUI to control all of this. But as I noted before, I haven't yet implemented all of the mode switching logic. Right now you can switch between GSM settings while in GSM mode, or between CDMA settings while in CDMA mode, but you can't switch between GSM and CDMA on the fly.
[Touch Pro2, Tilt 2 Android Development] rpierce99:
I did verify that throwing a properly formed eri.xml into /data does work. The Roaming Indicator value you need in the file comes from your network, though. You have to look at your log and see what the roaming indicator it is giving is, and then use that value in your xml file.
[Touch Pro2, Tilt 2 Android Development] Starfox:
Would you mind posting a eri for Sprint? I think something is amiss with the eri from the Optimus, since it doesn't seem to be a proper xml.

Another issue is that any SMS that the network tries to deliver seems to be blackholed, instead of being re-queued when the phone is off. What would we need to get SMS receive to work (so messages aren't lost), because my rildbg shows nothing in the log.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] mizofizo:
Here are the eri.xml and getprop output files. This is from CM7-03022011-Nightly.
[Touch Pro2, Tilt 2 Android Development] rpierce99:
That eri.xml won't work in /data/eri.xml I don't think. This is what I threw in eri.xml and adb pushed to /data/

<EriFile VersionNumber="1357" NumberOfEriEntries="1" EriFileType="1">
<CallPromptId Id="0" CallPromptText="CallPromptId0" />
<CallPromptId Id="1" CallPromptText="CallPromptId1" />
<CallPromptId Id="2" CallPromptText="CallPromptId2" />
<EriInfo RoamingIndicator="1" IconIndex="1" IconMode="0" EriText="Sprint" CallPromptId="0" AlertId="0" />
</EriFile>

Note that RoamingIndicator="1" might need to change depending on what your logs say your carrier is setting your Roaming Indicator to.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
I thought we already mentioned in this thread that SMS is not implemented for CDMA mode. Don't use CDMA mode right now if you need SMS.

In fact, it says to expect things to blow up in CDMA mode. You should be surprised that anything works, not surprised when something doesn't work.
[Touch Pro2, Tilt 2 Android Development] tomdeaap:
Just testing this one on Rhod100 (gsm). I know this your targeting CDMA problems mostly, but perhaps nice to have some feedback from a gsm user. It works beautifully! So far no probs, and it seems that calls actually seem to be initialized more quickly (from the time I press 'call' to the time the other side starts ringing)? Or is that just my imagination?

Perhaps slight OT, but:

would it be possible to add a HSDPA (3,5 or 3G+) icon (H) in a similar fashion? I'd be glad to try stuff out if anyone could give me a couple of tips on how to start? I know that the hero for instance has the ability to distinguish between HSDPA and 3G.
[Touch Pro2, Tilt 2 Android Development] DmK75:
deleted, my mistake.
[Touch Pro2, Tilt 2 Android Development] Christiaan91:
Icon H should be visible in FRX06, but they made a minor mistake. So next upgrade it will be there, i think
[Touch Pro2, Tilt 2 Android Development] tomdeaap:
Cheers, thats an easy fix :D
[Touch Pro2, Tilt 2 Android Development] Starfox:
I understand, but from experience the network queues any unreceived SMSes when the phone doesn't acknowlege receipt. This is most apparent when the phone is off, I've had times when the network resent a SMS when the phone recovered from a crash right after getting the same SMS. I'd like to be testing this RIL, but if my gf sends an SMS during that time and it just goes into the bitbucket in the sky, you can understand what ends up happening. I'd just like a way for the phone to just not acknowlege the "un"received SMS so when I go back to WM it resends, but I'm not quite sure how SMS is actually implemented on CDMA, apart from the fact that it needs to use CDMA2000 1x to do it. As opposed to GSM where SMS is part of the protocol in the sideband channel.

Perhaps when Sprint/GV integration happens, and from what I've read GV can be assigned the Sprint # and can archive SMS, I won't have to worry so much. I appreciate the improvement made to the RIL and do want to help you as much as possible.

P.S. I did think the phone did blow up. Apparently Sprint thought my phone was "temporarily out of service" after it was back in WM, and I seem to have issues with SMS now. I'lll update this post when I find out more.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] Entropy512:
Remember that in the case of most smartphones, the "phone" actually has two major components - the radio/baseband processor and the applications processor.

When the phone is off, neither are active. When it's on, both are active. The radio receives an SMS from the network and hands it off to the apps processor. While the network has handshaking to ensure that the radio portion acked the message, I'm not sure if there are provisions for the applications processor to ack an SMS that comes up from the radio stack.

Will look at this over the weekend. Packing up laptop to hit the road in 5 min. :)
[Touch Pro2, Tilt 2 Android Development] highlandsun:
SMS implemented

OK, I know a lot of you have been waiting for this. CDMA SMS send/receive is now implemented.
[Touch Pro2, Tilt 2 Android Development] vnes1984:
Great news!
[Touch Pro2, Tilt 2 Android Development] Starfox:
Not to sound ungrateful or anything, but I noticed that you split the code for the SMS function, the source file being GPL and you licensed it under Apache 2.0. Not sure if that sort of thing is allowed.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] Ltilt2:
So how do I implement this to the conf.? I have read the instructions and I have no idea, cause I open conf with text editor and does the command go after everything else?

Please someone help this noob. :D

Thank you so much!!!
[Touch Pro2, Tilt 2 Android Development] rpierce99:
In CDMA mode you also get notifications of new MMS messages with a handy download button, but something in userland (aka not the RIL that's being tested) makes that download fail. So we are getting close to having full MMS capability.
[Touch Pro2, Tilt 2 Android Development] Starfox:
I just tested the new RIL. Incoming SMS works fine but outgoing fails and Android throws an error. Attached is the log. And since I wasn't sure about the code, that was the only reason I mentioned it.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Yeah, thanks for the report. Working on it.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
I split out my code, which I can license any way I want. And the majority of this code is Apache licensed, so I figured that was the way to go. (E.g. htcgeneric-ril.c) If there's a license conflict, it was there before, I haven't contributed to that problem.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Helping newbies install test releases would be inappropriate. If you are too new to know how to install it based on the information provided, then you're just going to cause more harm than good. Test releases are for experienced users who can dig into their systems and provide detailed feedback on the problems that they encounter. They are not expected to run smoothly, and if you can't handle the bumps along the way you should steer clear.
[Touch Pro2, Tilt 2 Android Development] Starfox:
bump see last post edit.

I wish xda app allowed attachments, right now I'm having to go attach files from within WM because the app doesn't want to and the android browser hates the upload window...

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
New update posted, pretty sure sending is fixed now. ril-2ecbdad.
[Touch Pro2, Tilt 2 Android Development] Christiaan91:
Your free thx:p

Install dropbox in android. It's upload the file and give you a link that you can copy in your reply.
[Touch Pro2, Tilt 2 Android Development] Starfox:
I think with the latest test kernel+RIL the phone is not running as hot. Okay, let's try dropbox.

http://db.tt/vhB8Iqc

Only other thing is that *#*#info#*#* thinks that it's on Rev.0. Not sure if that's a function of RIL, or if that the tower is not Rev.A.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] odz:
Couple things i noticed

1) In CDMA mode there is noticeable static noise in calls that doesn't happen in Fake gsm mode.

2) Also i noticed that i cant login to google services? It either says I have no data connection or that i have an unreliable connection. Interesting enough logcat shows that the phone is reporting a invalid MEID to google.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
The RIL was never under the GPL... it was always Apache AFAIK.

Great work hyc, seems you've made a lot of progress! Gotta try this again...
[Touch Pro2, Tilt 2 Android Development] Entropy512:
It looks like at the top of sms.c, it was written by someone named Martin Johnson, and has the three letters "GPL" in one comment.

However, just saying GPL like this is not consistent with the guidelines for the GPL. What version? Is it really the GNU General Public License or some random license named GPL? The guidelines for labeling each file within a GPLed program are reasonably clear, and just having the three letters GPL in a comment is not sufficient.

Also, assuming that sms.c was written with the intent of using it with this RIL, what was Martin thinking? Most if not all of the Android AOSP userland stack is under the Apache license, that includes this RIL.
[Touch Pro2, Tilt 2 Android Development] Starfox:
Using new RIL, have it stuck at 1x. Also I noticed that the HFA gets called often during reboots to WM now. Is something being written into the radio nvram to cause it to happen?

http://db.tt/eSbVVFw

-- Starfox
[Touch Pro2, Tilt 2 Android Development] manekineko:
This one I've noticed as well.
[Touch Pro2, Tilt 2 Android Development] Jandyman:
Reporting On gsm, I often have the problem that when Id go through an area of bad coverage I get the error:selected network (-----) is not availible, message. But when I get back into coverage the message doesn't go away and it doesn't pick bak up signal.

Also when trying to switch in an out of airplane mode sometimes it freezes up in airplane mode and won't come back out of it. Have to restart then it let's me go out of airplane mode.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Problem reports like this are useless without a logcat taken when the problem occurred.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Someone ought to ask him. Our tree is forked from this one, which seems to have his original commits too.

https://github.com/vilord/dont_use_2/commits/master

Might ask "vilord" if he can still get hold of Martin, since his full email address isn't in the commit logs.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
By any chance, did you dial any keys while the call was active? I notice this on my rhod210 whenever I dial any digits while the call is active. It seems the phone does some audio routing of its own to generate DTMF tones; I don't know where or how that's controlled.
[Touch Pro2, Tilt 2 Android Development] Entropy512:
I believe this is one of the known issues, esp. for speakerphone.

You can disable the audible touch tones at:

Settings->Sound->Audible Touchtones

Hmm, that might explain why I got GSM buzz without speakerphone on a previous call...
[Touch Pro2, Tilt 2 Android Development] highlandsun:
The RIL was returning the entire MEID + checkdigit + SV digits and apparently it was only supposed to return the MEID. Fixed now, post updated.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
I don't know what HFA is. The RIL doesn't write anything to the radio NVRAM.

In your log, the signal strength reports look like this:

AT< $HTC_CSQ: 6,0

The first number is the CDMA signal strength, the second is EVDO. I.e., you got no EVDO signal at all, so you're stuck in 1xRTT.

Remember, this is *radio* - it's affected by weather, time of day, phase of the moon, sunspots, whatever. Don't go thinking there are software bugs here when it's simply the fact that you have no signal to receive.
[Touch Pro2, Tilt 2 Android Development] Starfox:
HFA = Hands Free Activation, aka OTA programming. Sprint's ROM calls it whenever it senses the Data Profile is null or corrupted.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] nickleby:
Hi highlandsun, big effort to give us a better ril!

It would be great to have a changelog in the first post! To follow all your work :)
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Click the link to the git repo.
[Touch Pro2, Tilt 2 Android Development] Starfox:
Does the latest RIL still require force_cdma on RHOD400? I was unable to connect without it.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Then there's your answer.

Getting rid of the force_cdma option will require some reorganizing of the init code. Haven't gotten to it yet. Of course I will post something about it when that changes.
[Touch Pro2, Tilt 2 Android Development] muziling:
Fake gsm mode, problem: (my carrier is CDMA)

1. make a call, works

2. send me a sms, not receive

3. make a call again, can not call out and hang down the call.
[Touch Pro2, Tilt 2 Android Development] muziling:
network_type=4, problems:

1. call has noise (the same with other members)

2. data connection can't use or establish?

3. eri.xml put to /data no effect, which effect at hero200 CDMA

BTW: ril version in logs maybe incorrect, I am sure ril version is the newest (2011-4-3 19e69fb)

SMS seems works great , support unicode text send and receive.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
What the heck is this? Your log shows

I never uploaded any build with that version, and I certainly wasn't touching this code back in May 2010.

The log shows that your data connection was set up successfully, but it took around 30 seconds. That's pretty unusual, but it also shows your signal strength fluctuating pretty widely, with dips to as low as 1 (out of 8). Doesn't look like any bug to me, and even if there's a bug, according to the version it's not in code that I wrote so I can't help you. If you go off and run strange old versions that's your own responsibility.

And no, it most definitely is not the same as my latest code. A 30-second sleep to establish data calls is a tell-tale of the old code, before I started working on it.
[Touch Pro2, Tilt 2 Android Development] muziling:
I download the tar.gz code, not use git tools, replace "asprintf(&imsi, "310995000000000");" line to my carrier value, re-compile.

So the version show is wrong.

Sorry for this ,I check it again now.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
You downloaded the wrong stuff. There's no way my current code would do what's in your log.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Looks like it got hung decoding the SMS, but I haven't touched any of the fake GSM SMS code.

Is anyone else seeing this problem? Frankly I'm not sure it's worth tracking down, because real CDMA mode is going to be better all around.
[Touch Pro2, Tilt 2 Android Development] muziling:
Strange:

download from http://gitorious.org/~hyc/xdandroid/hycs-hardware_xdandroid-ril/commits/androidhtc1

what I do is just replace

to

Will test for your compiled ril.so

I note this version, MMS can show me an download button, wow
[Touch Pro2, Tilt 2 Android Development] muziling:
OK, find out why data connection not work.

The APN settings lost after replace ril.so

Can not add APN, use your compiled ril, logs
[Touch Pro2, Tilt 2 Android Development] pdawg17:
I just started running this ril in CDMA mode on my rhod400...instead of it saying "Sprint" it says "Roaming Indicator On"...from what I understand I need to go into my log and transfer that info to my eri.xml file...

Is there any hurry in doing that or should my phone run fine otherwise?
[Touch Pro2, Tilt 2 Android Development] highlandsun:
The APN that gets used is based on the operator ID. Since you changed the operator ID, you needed to add a new APN to match it.
[Touch Pro2, Tilt 2 Android Development] muziling:
I try to set MMC=310,MNC=995, can not add

my carrier value,MMC=460,MNC=03 can not add

I think, operator ID detected may be error for me

MMC detect is right, 460

but MNC detect wrong , detect to 00, this is a GSM carrier

set

then, my previous APN settings come back

I don't know why? my APN setting has value,may be cdma mode diff with GSM.

"Roaming Indicator On" this problem resoved :)

what is "+1717618" mean?

128(red color) is Roaming Indicator? but set to 0, this is why eri.xml not take effect.
[Touch Pro2, Tilt 2 Android Development] Christiaan91:
Haven´t had any SoD after mounting this RIL.

Can GSM people also help or do you only need CDMA people?
[Touch Pro2, Tilt 2 Android Development] tomdeaap:
I've been running this RIL on GSM for the past 4 or 5 days, and have noticed that SMS messages that were sent while my phone was turned off do not arrive when turning on the phone.
[Touch Pro2, Tilt 2 Android Development] Entropy512:
holy crap you're fast at clicking haret!

I'll try to test this tonight, but I'm usually not fast enough at clicking haret - usually winmo grabs the texts.
[Touch Pro2, Tilt 2 Android Development] tomdeaap:
ROFL, I turn off my phone, log in at my provider on the net and send an sms through there. Wait at least 10 min, then turn on my phone and wait for a message :D
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Yes, but unless you boot with winmo in airplane mode, it's most likely that winmo picked up the sms before android got started.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
I use this every day on my GSM phone. You're welcome to use it and report any problems you might see, but for the most part it appears to be correct. I've fixed the signal strength levels, network location reporting, and a few other things but it's mostly the same as it was before. It also shouldn't hang in low signal situations any more, or when switching between 2G/3G. If you can test that, that'd be nice.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Sounds like you are trying too many different things and getting confused. Can't help you if you're changing many things at random.

True, in real CDMA mode there are no APNs. APNs are only a GSM concept.

OK. That's the latitude of your base station, the '+' needs to be omitted. I'll fix this in a little while.

New RIL posted with this bit fixed.
[Touch Pro2, Tilt 2 Android Development] rpierce99:
It looks like your carrier is sending +1717618 in a situation that most carriers send just a number, like 717618 (without the +), seems the RIL will have to strip out the plus if it exists at the beginning of the number. Until then if you want to change your ERI you'd do it with RoamingIndicator="0" because that's what android is being sent. You could even edit the xml to support both 128 and 0 and then you wouldn't have to change it later.
[Touch Pro2, Tilt 2 Android Development] rpierce99:
The Roaming Indicator On text doesn't do anything, so you can run forever without modifying your eri.xml, it's just a nice customization piece, you can make it say whatever you want.
[Touch Pro2, Tilt 2 Android Development] tomdeaap:
Of course DOH! :o

I checked, 1 of 3 test messages was indeed captured by Winmo. The rest seems to be gone :(
[Touch Pro2, Tilt 2 Android Development] muziling:
+1717618, this numeric is mmc&mnc? my mmc=460,mnc=03.

Without APNs, where to set pppd user and password, ##778# not work for XDAndroid build, I see MMS can be work for this ril, and where can I set MMS proxy,port,etc.