yashsingh1/xdaforums huggingface dataset:
[Touch Pro2, Tilt 2 Android Development] pdawg17:
I'm trying to use CDMA mode and have made the edits in build.prop...the first post says that APN needs to be added for my Sprint ID...I followed the link to the other thread but did not see an answer there that would make data work...

Is there a solution to this yet?
[Touch Pro2, Tilt 2 Android Development] Starfox:
Yes, you did. But Android also "cloaks" the build.prop by mount --bind to the copy that gets changed in /tmp, then the system clears out /tmp leaving a deleted mount that I can't seem to dismount to edit the file in system.ext2. So short of mounting a system.ext2 on a Linux system, this was the quickest way for me to ensure I get a working CDMA RIL regardless of what happens in the foreseeable future.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] muziling:
Seems I resolved, just replace "killall pppd" to "killall -5 pppd", will test more.
[Touch Pro2, Tilt 2 Android Development] Starfox:
After managing to completely fubar my just-installed system, this is probably the safest way of ensuring out-of-box support for CDMA. Ideally some of this can be integrated back into init (where it detects CDMA phone type). I use the libhardware fix for the 0,0 GPS fix.

echo "ro.cdma.home.operator.alpha = Sprint" >> /etc/default.prop

echo "ro.cdma.home.operator.numeric = 31000" >> /etc/default.prop

sed -e 's%default_network = 0%default_network = 4%' -e 's%vm.execution-mode = int:fast%vm.execution-mode = int:jit%' /system/build.prop > /sdcard/build.prop

umount -f /system/build.prop; mount --bind /sdcard/build.prop /system/build.prop

umount -f /system/lib/libhardware_legacy.so; mount --bind /sdcard/libhardware_legacy.so /system/lib/libhardware_legacy.so

mount --bind /sdcard/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so

This way there should be no truncated build.prop due to fsck/rm /tmp race. I thought about changing the ril path in the prop, but it seems that mount --bind tolerates sourcw file open overwrites better than pointing to the ril path to sd.

-- Starfox
[Touch Pro2, Tilt 2 Android Development] xanathar:
Hi highlandsun,

RHOD100 owner here, on o2 germany (GSM). I've been using android for more than one year, and I never had data connected on a fresh boot, I always had to set the force 2G option or use the preferred network type option in *#*#4636#*#* menu to get a data connection. I'm currently using your ril and saw in the radio logs that the CGAATT (preferred network type) query returns a 0,1,1 which is an undefined value, and the network type in android shows as unknown, thus no data connection. I went ahead and added "AT+BANDSET=0" and "AT+CGAATT=2,1,1" (2G) to the initialization part in htcgeneric-ril.c, then recompiled the ril. This gives me instant data connection on boot. I think this is a common problem on o2 germany, as I saw some other people having the same problem. I'm constantly pulling your changes from git and recompiling and do not have any problems since a week. Do you know what the first value in a CGAATT command means?

Btw, here is a radio log from an unpatched ril that shows the problem. I entered the *#*#4636#*#* menu at line ~1380, which makes a network type query and then sets the network type as 2,1,1. After that, data connects automatically.

http://dl.dropbox.com/u/5179008/radio_0804_3.txt
[Touch Pro2, Tilt 2 Android Development] pdawg17:
I want to do the CDMA edits from the 2nd post but the FRX06 build.prop does not have the 2 ro.cdma lines...am I supposed to be downloading a specific build.prop from this site instead or do I just add those 2 lines?
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
Just add 'em.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Pretty sure 0 here means manual attach instead of automatic attach to GPRS service. But I don't have any real documentation on this to go by, just guessing based on other logs I've collected over the past couple weeks.

Your log is from a March 30 build, already quite old. 0,1,1 would not be "Unknown" in recent builds. If you pull from my initpppd branch you'll see that I've completely restructured initialization, and it will send AT+CGAATT=2,2,0 at startup. I hope to phase out the other branches as soon as this code gets merged back to the xdandroid repos.
[Touch Pro2, Tilt 2 Android Development] pdawg17:
The only way I know to edit build.prop would be with terminal emulator and doing a vi edit...problem is there is no "esc" key to switch to command mode...is there another way to do it?
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
adb pull/push? Not sure. I just pulled the build.prop, made the changes, and then bind mount it.

Be sure it's a new data.img as the network provider is stored here, and evidently doesn't get updated.
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Thanks...adb pull worked like a charm...forgot about that...
[Touch Pro2, Tilt 2 Android Development] F22:
escape key

If you're using my rootfs with terminal emulator or connectbot, a double-tap on the ctrl key (or whatever key is assigned to ctrl on your rhod model) should work as escape.
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Thanks! Didn't know that...will try it soon...
[Touch Pro2, Tilt 2 Android Development] toadlife:
no data

With your latest ril, my phone will not get any data. The phone works, but no data.

I first noticed it, I was running 04/16 rootfs with your ppp init changes and the appropriate ril

Logs: http://dl.dropbox.com/u/25754012/debuglogs2011-04-16_nodata_rootfs416.tar.gz

I rebooted and reverted back to the 02/24 rootfs, with your ppp into changes. Still no data.

Logs: http://dl.dropbox.com/u/25754012/debuglogs2011-04-16_nodata_rootfs0224.tar.gz

I then re-downloaded a fresh copy of the new 04/16 rootfs and re-downloaded the rootnew.zip you provided above and re-did the ppp init changes, but still got no data connection.

Logs: http://dl.dropbox.com/u/25754012/debuglogs2011-04-16_nodata_rootfs416_2.tar.gz
[Touch Pro2, Tilt 2 Android Development] toadlife:
I reverted to the stock 4/16 rootfs and stock ril and mobile data works now.
[Touch Pro2, Tilt 2 Android Development] xanathar:
Thanks! Just tried the initpppd branch and patched the f22 rootfs, and I'm getting the same error as toadlife.

Radio log: http://dl.dropbox.com/u/5179008/radio_20110417.txt

Edit: The sed command seems to fail as the logs contain an "unrecognized option 'PPPDEV'" error.

Edit 2: Changing the patched lines in /init to this solved the problem for me:

# fix PPP data device name
if [ -f /dev/smd7 ]; then
PPPDEV=\\/dev\\/smd7
else
PPPDEV=\\/dev\\/smd1
fi
sed -i 's/PPPDEV/'$PPPDEV'/' /etc/init.rc

Data now connects automatically on boot.
[Touch Pro2, Tilt 2 Android Development] toadlife:
Thanks! I've got my data back.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Oops. Sorry about that. I've fixed this now in my repo and the attachment. My fix was a little shorter:

# fix PPP data device name
if [ -f /dev/smd7 ]; then
PPPDEV=/dev/smd7
else
PPPDEV=/dev/smd1
fi
sed -i s,PPPDEV,$PPPDEV, /etc/init.rc
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Anyone else notice an "SMS character limit" with this RIL? I am in CDMA mode on my Sprint TP2 and if I ever send a "long" text (more than around 150 characters/spaces combined) it does not send...it times out and gives an error that the message could not be sent...
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Sounds about right. Any message is limited to 160 bytes, and I think 10 bytes or so would be used up by the destination phone number. Don't recall the details at the moment, whether the header counts against those 160 bytes or not.

As always, if you actually want anyone to investigate, post the logcat.
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Here's the logcat...the test SMS is towards the end of the log...thanks...
[Touch Pro2, Tilt 2 Android Development] webxplore:
I am on Sprint too with the latest RIL and am able to successfully send sms with more than 160 chars except that the message will be delivered in two parts (160 + rest).
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Are you using full cdma mode?
[Touch Pro2, Tilt 2 Android Development] copenhagen:
if we can help ... we are also working on this at the moment..

freekin ppp...

sigh... of note.. we are building gb for the hd2.

link in sig
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Could you be a bit more specific? What exactly are you working on at the moment? We have ppp working well now, with my latest round of patches:

ril+rootfs are the main elements just to get stability.

framework patches to get CDMA working with username+password from the APN database.

Phone patches to enable the APN menu for CDMA users.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
This log is useless. Please follow the directions in the first post.

I got a radio log from arrrghhh showing the problem, so your log is not needed. However, I'm not clear on what the correct behavior should be. Getting a log for the exact same message using winmo would help.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
I'd be willing to do that, but would it be easier/useful to get a log of it working in fake GSM mode?

I guess I'm unsure how to get you a log of this in WinMo... :confused:

Thanks hyc!
[Touch Pro2, Tilt 2 Android Development] pdawg17:
Sorry about the useless log...I forgot the specifics you want in the first post...I've been doing so many logs for other troubleshooting I forgot what you wanted...sorry!
[Touch Pro2, Tilt 2 Android Development] highlandsun:
http://cleanimport.xda/index.php?posts/12933504/

No, a log from fake GSM mode wouldn't help.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
Ah, I completely forgot about that post. I'll get one now, thanks.
[Touch Pro2, Tilt 2 Android Development] mizofizo:
I switched to the CDMA RIL with F22's latest rootfs. However, I'm not getting a data connection. I did all of the steps outlined in posts 2 and 6. Voice calls work however the sound has a lot of static. Log is attached...
[Touch Pro2, Tilt 2 Android Development] toadlife:
This is a problem with F22's rootfs - not the ril. See the rootfs thread for details.
[Touch Pro2, Tilt 2 Android Development] Starfox:
There is a bug in the 0419 rootfs. Put the following line at the end of froyo.user.conf to bypass the bug for now:

sed -e 's%PPPDEV%/dev/smd7%' -i /etc/init.rc

-- Starfox
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Regarding the static issue - I found that turning the speaker on and then off again (while in a call) made the static disappear for me. Give that a try.
[Touch Pro2, Tilt 2 Android Development] mizofizo:
Thanks! That did the trick. I was thinking that the 0419 update fixed the problem in init. I didn't see the posts after that.

Strangely, once data was fixed the static went away.
[Touch Pro2, Tilt 2 Android Development] wmg316:
Do I add this in the custom shell commands section inside the {}?
[Touch Pro2, Tilt 2 Android Development] nasapunk88:
F22 has updated the rootfs to fix the problem. Check that thread since this doesn't have to do with RIL.
[Touch Pro2, Tilt 2 Android Development] manny05:
im going to give this a try.so far its looking good. however the lights on my call, menu, back and end button is lit up and it wont turn off..but ill restart my phone to see if it fixes the issues.

EDIT: it did fix it.ill see if i can find any other bug
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
Uhm, you do know the RIL would have absolutely, positively, nothing to do with the button lights right!?!
[Touch Pro2, Tilt 2 Android Development] Entropy512:
That has absolutely nothing to do with the RIL. It's also a known issue in the FAQ that control of those lights was not implemented so they would stay in whatever state they were in when haret was started.

WisTilt2's latest kernels fix this anyway.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Now that F22 has posted a rootfs with my changes incorporated, I plan to stop updating the old-style ril and only work on the new-style from here on out.
[Touch Pro2, Tilt 2 Android Development] slapshot30:
Just to make sure I am getting this right... I must copy and paste the code in the first post of this thread into the only file in the conf folder. I open it with notepad, and paste it after the custom shell part. Can I paste it right in front of the final } ? I put the file in your post in my andboot folder so I change the first part of the code to sdcard/andboot/"filename" ?
[Touch Pro2, Tilt 2 Android Development] wmg316:
Extract 'ril-1877434.zip' from the 1st post...the file inside = libhtcgeneric-ril.so

If you want to put this in the andboot folder, do so.

In the conf folder, you have the file: froyo.user.conf

Edit this file with notepad...at the bottom, you will see the "custom shell commands". Place the "mount command" in this section.

An example where the 'libhtcgeneric-ril.so' is directly in the andboot folder would be:

Hope this helps!
[Touch Pro2, Tilt 2 Android Development] slapshot30:
Thanks, that reallyy helps with the whole RIL thing. So right now I am using the latest wistilt2 kernal (modules + zImage) and the latest F22 rootfs that supports this RIL. But when I run haret, it says failed to find rootfs. I know I named it right and everything, and my startup.txt is directing it to andboot...

EDIT: Haha I am utterly ashamed of myself. I rechecked everything just to make sure, and then I thought, "Hey, since my startup.txt stayed the same, maybe I named the folder incorrectly." Sure enough, there the folder was on my SD card named 'anboot'. lol oh jeez. Anyways, thanks a ton for all the help! I got it working. The whole RIL thing and the conf confused me a bit but you nabbed it.
[Touch Pro2, Tilt 2 Android Development] wmg316:
Oops...I sent you a PM...just disregard since you got it working.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Something to keep in mind, everyone: the instructions for CDMA use posted in this thread have been evolving over time because we've been gradually discovering how CDMA is actually supported in Android. (In some places, the answer is "poorly"...) The steps documented here only reflect the in-progress nature of the work. When all of the necessary changes are merged into the next FRX release, most of these steps will be quite different.

Eventually someone will need to write corresponding patches for the GBX build. As of now, that someone is not me; I have no near term plans to switch to Gingerbread. I started down this path to make Froyo stable for me, on my GSM phone. I accomplished that goal already, weeks ago, so I'm well past done with all of this stuff.
[Touch Pro2, Tilt 2 Android Development] wmg316:
Is the "old-style" the post #1 RIL and the new-style the RIL2 from post #6?

The RIL2 from post #6 has been EXCELLENT for me!! (Tilt 2, RHOD300)

Thanks for all you do!!
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Yes.

Glad to hear it. GSM has been rock solid for me for a few weeks now.

So here's the roadmap as I see it, for the next FRX release:

merge this ril code into xdandroid build, into /system/lib/libhtcgeneric-ril.so

that will eliminate the need for any bind mounts of this file.

delete the current bindmounts that the rootfs init script does for this file

should also delete the bindmount for libhardware_legacy.so while we're at it

merge my other rootfs patches, as F22 has already done

merge my framework/base patches into xdandroid

that will make CDMA data sessions use the APN database correctly

merge my Phone.apk patches into xdandroid

that will allow CDMA users to use the APN edit menu, and will allow worldphone users to switch between CDMA and GSM on the fly.

add a rootfs init patch to copy /sdcard/local.prop to /data/local.prop

that will allow CDMA users on a fresh install to define all the required properties without having to muck around with mounting images and such.

So far arrrghhh is the only other person who has tested #4 and #5 (besides me), but hopefully all of this gets merged soon.

With the Phone.apk patches, the interesting properties for /data/local.prop are

ro.telephony.world_phone = true
ro.telephony.default_network = 4
ro.cdma.home.operator.alpha = Sprint
ro.cdma.home.operator.numeric = 310120
[Touch Pro2, Tilt 2 Android Development] vnes1984:
Yes, I'm waiting patiently for all this to merge as well. Great information. Thanks
[Touch Pro2, Tilt 2 Android Development] manekineko:
Thanks for all your work on this, it'll be sad not to have your exciting development style around anymore on this. It was really fun being able to logon hourly and see improvements to try.

Other than CDMA long SMS splitting, are there any other known issues remaining or is this the RIL pretty much complete?

Out of curiosity, how stable is your phone now?
[Touch Pro2, Tilt 2 Android Development] highlandsun:
My phone is running great. Haven't had any hangs or crashes in several days. The only thing that's kind of slow is 3G netloc for me, because I have no other 3G neighbors where I live. When I'm driving in the city it works pretty quickly, and when I switch to 2G it syncs up very quickly.

Looking at the code and ril.h I'd say almost all ril functions are now implemented correctly (barring any new testing feedback). Some notable exceptions are PUK/PIN2 unlock codes, which are not implemented.

Also, we still have no success reports for world phone mode switching, or CDMA MMS receive. (But again, the MMS receive is not likely a ril issue at this point.)
[Touch Pro2, Tilt 2 Android Development] yelped:
Thanks for all the great work you did here.

I'm having problems editing the build.prop file for CDMA. I'm using the latest rootfs plus the latest RIL. I currently have no connection. If I edit the build.prop to add those lines for Sprint, it gets lost on boot. I tried using various apps to cut it and paste it back edited, without success.

Do you have any suggestions?

Thanks!
[Touch Pro2, Tilt 2 Android Development] highlandsun:
Put them in /data/local.prop instead.
[Touch Pro2, Tilt 2 Android Development] yelped:
Thanks! Let me give it a try. By the way do I have to build a new Data image?

Ummm... Ok. So I didn't have a local.prop so I copied build.prop to Data using Super Manager and then renamed it to local.prop and added those lines for Sprint CDMA and still no service. This was done building a Data.img

Thanks for the help.
[Touch Pro2, Tilt 2 Android Development] slapshot30:
Tried this out with gingerbread. For some reason my data is not working. Wifi does not work either, it connects to the access point but won't work. Is this RIL related or my wistilt2 test kernal or latest F22 rootfs?
[Touch Pro2, Tilt 2 Android Development] highlandsun:
The ril has nothing to do with wifi. For gingerbread you're on your own. IMO, if you have to ask, you're not the kind of person who should be running an obviously incomplete Alpha build.
[Touch Pro2, Tilt 2 Android Development] slapshot30:
I understand you didn't make this for gingerbread and that's okay, just seeing if anyone had the same issue and what was causing it. It's not just wifi, it's all data that won't work. Not sure what the problem with asking is... and what 'type' of people should and shouldn't run any of these builds? My understanding is that even the devs can use any type of person to test out their builds and report back and help out in any little way possible. My post wasn't a complaint, I am sorry if you saw it as one towards your work.
[Touch Pro2, Tilt 2 Android Development] daeinnor:
Highlandsun, amazing mind in accurately pinpointing the SOD & LCD not lighting issues in Rhodium as well as in my Raphael (raph100)! I applied the old ril with rootfs combo & it worked on FRX06 & Gingerbread bundles uploaded by arrghhh. Will test on the CWM roms using latest ril & roofs files in page 6 of this thread.

Big thanks once again.
[Touch Pro2, Tilt 2 Android Development] Gilliland:
So for those of us who aren't likely to compile our own Phone.apk, is there any way to get the operator.alpha and operator.numeric into our phones without rebuilding? Can they be stuffed into a DB like the default network value? My phone seems to work OK with the new ril2, but it always thinks it's roaming.

(CDMA, Sprint, Rhod400)
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
It's not really roaming, that's a trivial indicator at this point.

I'd just wait until the changes are merged. I don't really feel like releasing an image, as it kinda defeats the purpose of having an autobuild service.
[Touch Pro2, Tilt 2 Android Development] Gilliland:
That's fine, thanks. No, you (nor anyone else) certainly shouldn't go to any extra work for this. I just thought there might have been an easy way to insert the necessary data into my current config.
[Touch Pro2, Tilt 2 Android Development] muziling:
put eri.xml to directory /data, then it will not show roaming indicate anymore.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
Oh yea, if you are just trying to get rid of the roaming indicator, do this ^^. I thought you wanted all the changes, like the APN menu, etc ;).
[Touch Pro2, Tilt 2 Android Development] yelped:
Does anyone have any suggestions?
[Touch Pro2, Tilt 2 Android Development] Gilliland:
Thanks, that did it. Didn't even have to reboot, just switched in/out of airplane mode.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
Bind mount the build.prop?

This stuff is still in testing, so it might just be best to wait until it's integrated. I don't see much point in helping out every single person that wants to run this, when it's far from easy to use/troubleshoot. If you can't help troubleshoot real issues related to the RIL, there's no point in you running this in its current form - no offense, but that's the truth.
[Touch Pro2, Tilt 2 Android Development] yelped:
Thanks. Now it has a connection, just the data doesn't actually work. Voice works.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
The instructions for using this testing code were stated clearly in the first post of this thread. Posters that don't follow the instructions will be ignored.

All you kids get off my lawn!
[Touch Pro2, Tilt 2 Android Development] yelped:
I'm sorry. I read all the instructions and I didn't miss anything. Trying to reset the APN to default to make it load Sprint's setting doesn't work. And, as far as I know, Sprint doesn't require any APN settings.

Unless you meant that I should send you logs, in which case, I apoligize for not sending them, and will hopefully add them soon.
[Touch Pro2, Tilt 2 Android Development] fishingmedic:
Boot back to winmo and you can find it there. If you're using FRX05 or FRX06 it's in the main folder where haret is. Look in the conf folder and it's there, you can modify it using a text editor. I don't think you can modify it while your running android

IIRC correctly it's in all of the full zips that arrrghhh has put together.
[Touch Pro2, Tilt 2 Android Development] arrrghhh:
conf file has been included in all my bundles, GB and FRX :D.
[Touch Pro2, Tilt 2 Android Development] highlandsun:
rilspy ril wrapper

I've decided to take a step back for a second, and come at this from a different angle.

I've just created a new RIL wrapper tool whose only function is to log everything that the HTC RIL library does. You can find it here:

https://gitorious.org/rilspy/rilspy

The idea now is to install this on a native Android phone and see what commands it uses, and then copy the relevant knowledge into our RIL. I've already run this on my G1 and found a few new things for the GSM support. But obviously to make progress on the CDMA front, we need someone to use it on a native Android CDMA phone. Any volunteers?
[Touch Pro2, Tilt 2 Android Development] Starfox:
What am I supposed to do with the file? Am I supposed to bind it in /system/lib (that's what it seems to be looking for)? Do I need to run it at startup, and which RIL should I be using, your 1.6.x or the one that comes in /lib/froyo?

-- Starfox