Dynamic switching RMNET and PPP without rebooting - HD2 Windows Mobile 6.5 Q&A, Help & Troubleshooting

Hey. Since PPP is faster than the two, it is the ideal connection. But it's not as reliable as RMNET. Well not for now at least. And it does not support wifi tethering (the only reason I am sticking to RMNET)...
So, has anyone been able to allow the phone to switch between RMNET and PPP without rebooting? I have made a workaround, but it still involves rebooting....
if anyone found a solution to switch between the two runtime please post how you did it. Or any suggestions..

I'd be interested in your work around. Please share details..

gatorlounge said:
I'd be interested in your work around. Please share details..
Click to expand...
Click to collapse
+1 for the workaround.

Why even mention a workaround and not even post how to do it??

mentalityx said:
Why even mention a workaround and not even post how to do it??
Click to expand...
Click to collapse
Because I think he's checking whether there is a non-reboot workaround, before incorporating his reboot-workaround in his next build?

Because if you're having to reboot, you could just go into windows first and copy the rootfs from PPP to rmnet, whichever one you wanted?

BobaFeTT_NL said:
Because I think he's checking whether there is a non-reboot workaround, before incorporating his reboot-workaround in his next build?
Click to expand...
Click to collapse
Well then let's hear it all.
Sent from my HTC HD2 using XDA App

I don't think that it would be possible, would it? Because you would at least need to disable all kind of connection activities that are going on, and that would probably bring some problems to this.
Sent from my HTC HD2 using XDA App

My workaround is to have a switch in my startup.txt (similar to how I modified it for the dpi resolution). but it will require a reboot to apply since it has to be read at bootup time. I was wondering if the data connection can be flushed and reloaded (something like remounting a partition can be done from terminal).

Not sure if this will work for you, but if you want to bring interfaces up and down, use ifconfig:
ifconfig rmnet0 down
ifconfig ppp0 up
If the IP changes, you may need to update the gateway with something like this:
route add default gw 123.123.123.123 ppp0

bangsters said:
My workaround is to have a switch in my startup.txt (similar to how I modified it for the dpi resolution). but it will require a reboot to apply since it has to be read at bootup time. I was wondering if the data connection can be flushed and reloaded (something like remounting a partition can be done from terminal).
Click to expand...
Click to collapse
Its a solid start bangsters. A step in the right direction. One restart is better than multiples.
Sent from my HTC HD2 using XDA App

leonowski said:
Not sure if this will work for you, but if you want to bring interfaces up and down, use ifconfig:
ifconfig rmnet0 down
ifconfig ppp0 up
If the IP changes, you may need to update the gateway with something like this:
route add default gw 123.123.123.123 ppp0
Click to expand...
Click to collapse
thanks. it looks like it needs to load driver files before it can bring the ports up tho... is it possible to load both rmnet and ppp drivers, then just activate one?

bangsters said:
thanks. it looks like it needs to load driver files before it can bring the ports up tho... is it possible to load both rmnet and ppp drivers, then just activate one?
Click to expand...
Click to collapse
I have done this before in linux with a problematic ethernet driver for a realtek card. I surely can be loaded after linux is running, don't know about android thoug.
Santroph
Sent from my HTC HD2 using XDA App

bangsters said:
Hey. Since PPP is faster than the two, it is the ideal connection. But it's not as reliable as RMNET. Well not for now at least. And it does not support wifi tethering (the only reason I am sticking to RMNET)...
So, has anyone been able to allow the phone to switch between RMNET and PPP without rebooting? I have made a workaround, but it still involves rebooting....
if anyone found a solution to switch between the two runtime please post how you did it. Or any suggestions..
Click to expand...
Click to collapse
This could help:
While enabling PPP in HyperDroid I realized that actually only one file needs to be replaced: init.rc.
Of course there are also other files needed for PPP, but Pongster already included them all, so I don't know of them, but you probably do .
But by having the one or the other init.rc in place one can switch between RMNET and PPP.
In these two versions of init.rc there is only one line of difference:
The RMNET version includes the line "service ril-daemon /system/bin/rild".
The PPP version includes the line "service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0".
The init.rc is part of the init process and contains services to be set up at boot.
I don't know if it's possible to control services at runtime.

bangsters said:
Hey. Since PPP is faster than the two, it is the ideal connection. But it's not as reliable as RMNET. Well not for now at least. And it does not support wifi tethering (the only reason I am sticking to RMNET)...
Click to expand...
Click to collapse
PPP DOES support wifi tethering. I have been using ppp wifi tethering for ages now.
You just need to use command ipconfig /renew just once after windows pc is connected and complains about no internet connection (traffic) It works everytime with every ppp build that does not give error while enabling hotspot.
Mdeejay's newest builds (such as desire based 2.4.2 and desire hd based 3.4) have ppp almost as stable as rmnet. There is also the newest ril wrapper file which makes ppp better.
There is too much speed difference between RMNET and PPP and with the newer evo based kernels not supporting rmnet anymore, I think PPP is stable enough to forget about rmnet altogether. I get 1.5mbps/0.1mbps D/U with RMNET, and 4mbps/1.5mbps D/U with PPP. Huge difference.
Since RMNET-PPP switch is not something you would frequently do, I believe it is not very important to be able to switch without rebooting. (If PPP is not stable for you, than you make a rmnet switch one time with a reboot and thats all) Your previous startup.txt switch function was very practical.
EDIT: I just saw the date stamp of the post/thread. It was old and was bumped after a month. Well, at least I wrote about PPP/wifi tethering's current situation.

memin1857 said:
There is too much speed difference between RMNET and PPP and with the newer evo based kernels not supporting rmnet anymore, I think PPP is stable enough to forget about rmnet altogether.
Click to expand...
Click to collapse
This is so not true!
Current kernels are faulty regarding PPP and need to be fixed. Just look here.

In terms of stability :
Actually I am sitting in train that
Means many changes between GPRS EDGE and 3G. And almost every time it goes to GPRS the connection is lost and I need to switch on/off airplane mode. That's no fun. Better slow but reliable!
Sent from my HTC HD2 using XDA App

pathologo said:
This is so not true!
Current kernels are faulty regarding PPP and need to be fixed. Just look here.
Click to expand...
Click to collapse
Try newer builds such as mdeejay desire based 2.4 or mdeejay desire hd based 3.4
ppp reliability has improved a lot lately.
I looked at your link. Those hard freezes are fixed already. Your link is a month old!
You are reading a one month old post, while I am using myself and this my own experience. ppp used to be very bad in the past, now it is much much better.
Actually you don't have a choice with the newest evo kernels.

memin1857 said:
I looked at your link. Those hard freezes are fixed already. Your link is a month old!
You are reading a one month old post, while I am using myself and this my own experience.
Click to expand...
Click to collapse
You are wrong! Just go through this thread and you will actually see that is it NOT fixed!

I read through everyone's replies. I found a gscript that can change PPP and RMNET. I'll attach it and let me know if it works for you all.
EDIT: Sorry. It does require reboot.

Related

share 3G via WiFi?

I thought I saw a .cab file here somewhere that would allow you to bridge the 3G/EDGE connection to the WiFi connection so I can share my 3G over WiFi to laptop or whatever.
Anyone seen this? I cant remember the name, thought it was something like WMBridge or something.
Thanks
G
GuardianZX9 said:
I thought I saw a .cab file here somewhere that would allow you to bridge the 3G/EDGE connection to the WiFi connection so I can share my 3G over WiFi to laptop or whatever.
Anyone seen this? I cant remember the name, thought it was something like WMBridge or something.
Thanks
G
Click to expand...
Click to collapse
internet connection sharing will allow you to share your 3G over bluetooth or USB to your laptop !!
and now that I think about it you can almost certainly go through the arduous and difficult task of getting activesync to connect over an adhoc wifi connection, once that is done you will be able to use the phone as a 3G modem for your laptop.
ice_coffee said:
and now that I think about it you can almost certainly go through the arduous and difficult task of getting activesync to connect over an adhoc wifi connection, once that is done you will be able to use the phone as a 3G modem for your laptop.
Click to expand...
Click to collapse
u can do it tht way but its hard, and requires a registry hack, which to be fair doesnt work all that well, disconns after a couple of mins at best, bluetooth is the way to go if u want wireless connecton, although i use the lead for security, u can use the 3g conn as a modem, but then if u like us use tmob wb and walk then u cnt use ur data package.
hope this helps
Peter
The app is called wmWifiRouter. Looks like they just came out with a new version the 10th. Forget bluetooth, its not secured at all, and only lets you share with one device. With wmwifirouter you can share with many. See the link below.
http://forum.xda-developers.com/showthread.php?t=341398
excellent that is exactly what I was looking for, I will play with it today and see if I can get it to work.
Thanks
G
Should be a simple matter of copying the exe to your device and running it. It takes care of all the registry settings, starting up Internet Sharing, keeping the connection alive, and with the latest version you can even put the unit to sleep and your connection will stay alive. About the only thing it doesn't do is set up a peer-to-peer profile with a fixed IP address, but the thread above walks you through that. Make sure you set the profile to use WPA encryption (NOT WEP or 'open') and set a password.
techntrek said:
The app is called wmWifiRouter. Looks like they just came out with a new version the 10th. Forget bluetooth, its not secured at all, and only lets you share with one device. With wmwifirouter you can share with many. See the link below.
http://forum.xda-developers.com/showthread.php?t=341398
Click to expand...
Click to collapse
I finally got around to trying this and have had no luck. I followed the directions as best as I could tell. Anyone verify if this works on the Athena? I used to have the method set up manually but hadn't set it up again since updating to AP3.0. This would be much handier... if works!
wgary said:
I finally got around to trying this and have had no luck. I followed the directions as best as I could tell. Anyone verify if this works on the Athena? I used to have the method set up manually but hadn't set it up again since updating to AP3.0. This would be much handier... if works!
Click to expand...
Click to collapse
Powell,
Why not build this into AP 4.0 ROM?
eaglesteve said:
Powell,
Why not build this into AP 4.0 ROM?
Click to expand...
Click to collapse
i was trying for 3.0 actually but couldnt get it to work at time bc of confusing instructions. i will though in 4.0 100%
I verify that it works with the Athena and it works great. Let me know if your having trouble. I've been using it everyday now with no problems.
Pawel062 said:
i was trying for 3.0 actually but couldnt get it to work at time bc of confusing instructions. i will though in 4.0 100%
Click to expand...
Click to collapse
The directions are confusing because the newer method was grafted onto the same thread as the older method. So it's hard to tell what's what. I put about an hour into this but made no progress. The exe file doesn't appear to do anything on the Athena...
MWillis561 said:
I verify that it works with the Athena and it works great. Let me know if your having trouble. I've been using it everyday now with no problems.
Click to expand...
Click to collapse
Sorry, just saw your response as I wrote mine. Here is what I did:
1. set up an ad hoc network on my Athena. IP address 192.168.0.1 (another place saide 192.168.0.7--tried both)
2. Set up on my client (MacBook Pro). A connection was established.
3. Ran the exe file -- nothing happened. One comment said to deactivate the network before running. I did this in various degrees with no success.
4. Also opened up the Internet Sharing applet and tried to connect manually -- "USB cable is not connected."
Clearly I'm missing something here. It would be very handy to have this capability. Can you clarify??
Not sure why you are having a problem - I unzipped the zip, transfered the exe to the athena and it ran on the first try after first setting up the ad-hoc wifi connection (settings, connections, wi-fi, network adapters tab, IEEE..., use specific IP address in the 192.168.x.x range; then go to the other tab and set up an ad-hoc connection).
I had an even worse experience. Everytime I ran the exe, my Athena locked up, needing a complete reset each time.
I gave up in the end .
I have got other methods to work using Mortscipts, but it does seem like something that would be well worth someones time sorting out for the good of us all.
Have you tried the latest version of wmWifiRouter? The developer released a new version of it earlier this month. Its on version 0.8 now.

[DEV] Wireless Monitor Mode

BCM4329 driver source code suggests that monitor mode is possible (for kismet_drone, WIDSs, etc).
http://forum.aircrack-ng.org/index.php?topic=6735.msg34733#msg34733
The idea is to modify wl_iw_set_mode(), and allow IW_MODE_MONITOR by setting these flags:
WLC_SET_MONITOR and maybe WLC_SET_PROMISC too.
Then test with tcpdump if anything changed.
Have you come across anything regarding injection with this driver/chip? Monitoring mode would be nice, but add packet injection to the mix and the Nexus one becomes a lean mean WEP cracking machine.
airo*-ng with gpsd sounds fun.
overridex said:
Have you come across anything regarding injection with this driver/chip? Monitoring mode would be nice, but add packet injection to the mix and the Nexus one becomes a lean mean WEP cracking machine.
Click to expand...
Click to collapse
Confirmed. Damn would that be a seriously good feature for a phone. Wouldn't have to use the laptop then
mer6 said:
Confirmed. Damn would that be a seriously good feature for a phone. Wouldn't have to use the laptop then
Click to expand...
Click to collapse
I would LOVE this. Hate having to drag the laptop around....
I had a go at putting it into monitor mode within a debian Chroot but wasnt having any of it. No idea if its debian/driver/hardware thats stopping it.
Code:
[email protected]:~$ sudo iwconfig eth0
eth0 IEEE 802.11-DS ESSID:"" Nickname:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:72 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Managementmode:All packets received
Link Quality=5/5 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[email protected]:~$ sudo iwconfig eth0 mode Monitor
Error for wireless request "Set Mode" (8B06) :
SET failed on device eth0 ; Invalid argument.
It wont give error when trying to swap into Ad-Hoc but then doesnt swap.
It is about driver, you need to modify it.
If anyone is able to compile & run a compiled wifi driver I can try write a patch for enabling monitor mode.
bump
bump... just wondering
any word on aircrack suite working?
usually broadcom chips don't support it.
fleebailey33 said:
usually broadcom chips don't support it.
Click to expand...
Click to collapse
Can't agree with that assert.
http://aircrack-ng.org/doku.php?id=compatibility_drivers
I'm waiting N1 to be released in my country so I can get one and start investigating.
Any news on this? Would truly be great.
deprecated
fleebailey33 said:
usually broadcom chips don't support it.
Click to expand...
Click to collapse
That's not true, look at the b43 module .. it proves that the broadcom chips are capable of being set into monitor mode, the only thing you'll need is a firmware that is able to supports the monitor mode
sorry for the noob question but what does this accomplish..i see ppl posting not having to carry the laptop and got interested
bonkasnucca said:
sorry for the noob question but what does this accomplish..i see ppl posting not having to carry the laptop and got interested
Click to expand...
Click to collapse
It would basically make our Nexus capable of injecting packets which would allow us to crack a WEP encryption on a secured network to obtain the key and then connect to that network and use the internet
gravufo said:
It would basically make our Nexus capable of injecting packets which would allow us to crack a WEP encryption on a secured network to obtain the key and then connect to that network and use the internet
Click to expand...
Click to collapse
So any work on this been made since OP or is this still being thought about even? Status update would be great.
hi guys,
bcm4329 is also in Desire Z, and Galaxy S I9000.
I posted here in galaxy dev thread,
but there is no further interest..
br
condi
deprecated
gravufo said:
It would basically make our Nexus capable of injecting packets which would allow us to crack a WEP encryption on a secured network to obtain the key and then connect to that network and use the internet
Click to expand...
Click to collapse
There is an app for that try looking for "penetrate" apps on market.
BTW someone need to compil new kernel and drivers files with this flags to test it

[Q]Wifi problem with MiniCM7 Pro V6

Hi this a excelent ROM!! i love it! but the Wifi disconnects every 5 minutes or less...and reconnect, How i can fix this?
same here,
using slade's new ROM, "GinTonic.SE | v1.3" ....
any ideas ?
I don't know why, but using ondemand or performance profile I don't have that issue. Test it and tell me
kem06 said:
I don't know why, but using ondemand or performance profile I don't have that issue. Test it and tell me
Click to expand...
Click to collapse
Thanks for your reply,
Just tried changing the profile ,,, rebooted ,,, but still the same problem ,,,
it seems that i'm missing something !!!
aymanxp said:
Thanks for your reply,
Just tried changing the profile ,,, rebooted ,,, but still the same problem ,,,
it seems that i'm missing something !!!
Click to expand...
Click to collapse
Mmm.. Do you have bluetooth or EDGE/3G activated ? It might make some problems.
Another thing, which policy suspension do you have for WiFi ?
after trying everything, i used a static IP to connect and finally it seems to work.
thanks for your interest.
i haven't bluetooth or EDGE/3G active, the policy suspension of is never! i format sd card and reinstall rom but the problem continues....
aymanxp said:
same here,
using slade's new ROM, "GinTonic.SE | v1.3" ....
any ideas ?
Click to expand...
Click to collapse
Same for me
The same problem in almost all these ROMs.
I'm using the MiniCMPro V7 and I'm trying to debug it by reading the logcat and editing some config files, will post/edit any advance later.
It worked by using aymanxp's method as a workaround.
By reading the logcat I found that something is forcing the dhcp server on the phone to lease a new IP after some time [receives a SIGTERM] although it obtained an infinite lease.
In other topic, why android does not have a separated config (Static/dynamic, IP, DNS, etc...) for each wireless connection?
B.R.
Update:
Well, my actual conclusion is that the WifiStateTracker Daemon is forcing DHCP to request ip renewal every 5 minutes or so, and if there are a valid or infinite lease in place, dhcp returns an error after waiting, so WifiStateTracker gets the wifi down and restarts DHCP, so lame.
Tried to find any config file but found none, only dhcpcd and wpa_supplicant, but nothing about the daemon.
So to have the wifi working properly, from now, the right way is to don't use dhcp?
Try to change wifi sleep policy to "Never" instead of "when screen turns off"
XxLordxX said:
Try to change wifi sleep policy to "Never" instead of "when screen turns off"
Click to expand...
Click to collapse
Nope, won't work either.
@Pierrot12:
As a temporal workaround, yes
We can use static IP, but that would work just if using only one Wi-Fi network (as in the house OR the work), but for people like me, using more than one network, it's very annoying to edit the parameters every time the AP changes.
I'm tempted to write an app to replace the android's very simple AP managing system
I flash to Sonybread 7 SP3 and the problem continues...
I'm using v6 and I have not had any problems with WiFi. In fact, I think it's the most stable ROM. I have downloaded files flawlessly, which means that WiFi is not disconnecting right? Anyway, I'll put it to test..
RozenTensai said:
I'm tempted to write an app to replace the android's very simple AP managing system
Click to expand...
Click to collapse
Great! good luck
Actually found the problem, but don't know if it would work for anyone.
After some research and hits and misses, found that the problem with the DHCP client running in the MiniCM7-based ROMs does have a incompatibility with "Reserved IP" or "Infinite IP Lease" for a certain MAC, in other words you should use:
A) IP Assigned by the router (not reserved), or
B) Static IP configured on the device.
If that's not your case, then just wait for a fix from the devs or my app (still brainstorming ) or any workaround posted in this thread
@Pierrot12: Thank You!
@eysonfm Yeah, I was on that ROM and it's really stable. But I want MiniCM7 Pro
I have also problems wifi DHCP issues with MiniCM7 Pro V7+
I don't understand, because I got it from one moment to the other
Only
B) Static IP configured on the device.
is working for me
in terminal with netcfg I could see that I got an ip adress over dhcp. In Wifi manager stands getting IP address
I won't do an factory reset, maybe I can help somebody to find the bug by testing somethings
i'm having these issues with minicm7 pro v19 as well...
RozenTensai said:
Actually found the problem, but don't know if it would work for anyone.
After some research and hits and misses, found that the problem with the DHCP client running in the MiniCM7-based ROMs does have a incompatibility with "Reserved IP" or "Infinite IP Lease" for a certain MAC, in other words you should use:
A) IP Assigned by the router (not reserved), or
B) Static IP configured on the device.
If that's not your case, then just wait for a fix from the devs or my app (still brainstorming ) or any workaround posted in this thread
@Pierrot12: Thank You!
@eysonfm Yeah, I was on that ROM and it's really stable. But I want MiniCM7 Pro
Click to expand...
Click to collapse
Also, i discovered that i had the "backup" and "restore..." options enabled under Settings -> privacy enabled. They were causing my phone to receive bad configurations saved in my google account in googles's servers...
so i disabled these otions, re-flashed minicm7pro, set up my router to "not reserve" the address for the minipro's MAC address and everything is working as it should since then!

[Q] Wifi connect issues on CL3ANTH3ORY 1.2

Ever since I flashed CL3ANTH3ORY 1.1 (now on 1.2) I have not been able to connect to wifi at home. I was running AO5PTH3ORY before and it connected fine. Before that I was running BAMF Remix 2.1 and it connected fine.
It scans, it finds, it connects, it tries to obtain an IP Address, then it disconnects, scans, finds, connects, tries to obtain an IP Address, then disconnects, repeat, repeat, repeat, etc.
Any help would be greatly appreciated... Thanks in advance!
Its a known issue that is being worked on. Look for a fix soon.
sent from my thunderbolt running CL3ANTH3ROY, using the XDA premium app
Good lookin out... that means I May need to go back to a different ROM for now so that I can use some of the apps I have that communicate to my laptop via WiFi.
I appreciate the info!
Sent from my Thunderbolt using XDA App using CL3ANTH3ORY 1.2x.
The fix is in the candystor3 in the app drawer
sent from my thunderbolt running CL3ANTH3ROY, using the XDA premium app
+1 For the candystore fix.. worked for me
I'm not able to find anything in there to address wifi connection... I would imagine it'd be under system fixes/tweaks, but all I see is Solid BG Notification, Remove location and add alarm, and Tether Fix. Under Mods I do not see anything in regards to fixing wifi.
I apologize if I'm missing something easy... I appreciate the advice and time helping me address this problem.
djsnake210 said:
I'm not able to find anything in there to address wifi connection... I would imagine it'd be under system fixes/tweaks, but all I see is Solid BG Notification, Remove location and add alarm, and Tether Fix. Under Mods I do not see anything in regards to fixing wifi.
I apologize if I'm missing something easy... I appreciate the advice and time helping me address this problem.
Click to expand...
Click to collapse
Ahh sorry, I piggy backed off of the previous commenter with the wifi tether track
Wifi is working for me.. In fact, I have better range than I did stock (might be me imagining it though). Is it open or encrypted? I'd try deleting the profile and re-adding it if you haven't already
Yeah I tried that... I was hoping moving from 1.1 to 1.2 would do the trick, but it didn't help.
I have it protected with WPS. I tried using all 3 methods to connect (forgetting the network between each test)... the password, the button, and the pin. What's strange is even when it says "connected obtaining ip address" it doesn't show as an attached device on my router. Maybe that's just because it hasn't been assigned an ip address yet.
Question... Is this something that is usually controlled by the ROM or the kernel?
I'm sorry... It's WPA protection... but tried connecting through WPS as well as manually.
It's Kernal based...
And the fix in the candy store worked perfectly.
I was cruising along on his AOSP build before this morning, now that tethering is working again...back to things making "sense"...
I think you may have misread my issue... It's not an issue with WiFi tethering... It's an issue with the phone connecting to my home WiFi network.
I hope this helps. Thanks!
Sent from my Thunderbolt running CL3ANTH3ORY v1.2 using xda app.
djsnake210 said:
I think you may have misread my issue... It's not an issue with WiFi tethering... It's an issue with the phone connecting to my home WiFi network.
I hope this helps. Thanks!
Sent from my Thunderbolt running CL3ANTH3ORY v1.2 using xda app.
Click to expand...
Click to collapse
No reports of a WiFi issue at all... Have you flashed a different kernel? I would wipe Cache/Dalvik and Format /system then reflash.
Sent from my SHIFTAO5P using XDA App
DroidTh3ory said:
No reports of a WiFi issue at all... Have you flashed a different kernel? I would wipe Cache/Dalvik and Format /system then reflash.
Sent from my SHIFTAO5P using XDA App
Click to expand...
Click to collapse
I did flash dream kernel 2.3.6. I just read in the main thread for this ROM that someone else had the same issue (post #591). I guess I should have given the HTC Kernel a chance, ay?
Do you have just the kernel available for downloading and flashing? I checked the official list and it isn't posted there. If not I'll just wipe and flash... I know this should fix my other issue as well with the advanced power menu (thanks again for the input), but since I have a workaround for that now (Quick Boot app) I was hoping to alleviate another wipe/flash until 1.3 of clean was available.
Thanks again for your help!
Another workaround I would suggest trying is manually setting your connection instead or relying on dhcp. You probably have a network id of 192.168.1.1, broadcast id of 255.255.255.0 and can attempt to try an ip in the rage of 192.168.1.1 to 192.168.1.149
For more detailed stats, run ipconfig /a for windows or ifconfig -a if you are on linux/unix/osx
yareally said:
Another workaround I would suggest trying is manually setting your connection instead or relying on dhcp. You probably have a network id of 192.168.1.1, broadcast id of 255.255.255.0 and can attempt to try an ip in the rage of 192.168.1.1 to 192.168.1.149
For more detailed stats, run ipconfig /a for windows or ifconfig -a if you are on linux/unix/osx
Click to expand...
Click to collapse
Good lookin out! As soon as I set it to a Static IP I connected right up!
I would still be interested in reflashing the HTC kernel mod, but at least this is working.
Thank you sir!
djsnake210 said:
Good lookin out! As soon as I set it to a Static IP I connected right up!
I would still be interested in reflashing the HTC kernel mod, but at least this is working.
Thank you sir!
Click to expand...
Click to collapse
no problem
glad it worked out.
it sounds like the kernel has an issue with dhcp.

Running 3G and WiFi connections simultaneously

Hello to all.
I was trying to start this thread in Android Software and Hacking General, but got a warning about not having enough posts to submit a thread there, so I'm going to try here.
I have a Samsung Galaxy S II phone with the newest Android version. My goal is to modify the system so that 3G and WiFi are able to run together, side-by-side, simultaneously without 3G being turned off. Now, every time I connect to a WLAN, 3G cuts.
[OK, the spam police won't let me post outside links; Google Mobisocial 3G Wifi Stanford to find the article I'm talking about.]
MobiSocial News wrote about a hack that modifies ConnectivityService.java in a rather crude way, but according to the author of that article, it works on a 2.x Android system. There's not much info about the hack, but it's at least something and sounds plausible.
I tried to follow the instructions; I downloaded newest Android source codes, modified ConnectivityService.java and built the kernel by following these instructions: [a link to source.android.com "Building the System"]. But unfortunately, make didn't produce a services.jar mentioned in the article.
---
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Every piece of information is valuable, so don't be afraid to post. Thanks!
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
I want to do the same with you
Cherilee said:
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
Click to expand...
Click to collapse
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Moonguy75 said:
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Click to expand...
Click to collapse
And why they say that it works?
Cherilee said:
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Click to expand...
Click to collapse
It's possible with a rooted phone.
cboursinos said:
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
Click to expand...
Click to collapse
Read here:
http://forum.xda-developers.com/showthread.php?t=2197776
Moonguy75 said:
No it is not possible.
Click to expand...
Click to collapse
Actually it is, I found this thread that describes how to do it on an optimus G phone, and based on that I was able to do in on vanilla android 4.3 as well (my rooted nexus 4).
You need to put a couple of scripts together, since you need a series of shell commands for turning this on and off, I recommend the wonderful SH Script Runner for this.
Here is what I did on my Nexus 4. It works perfectly but note that you don't actually see the wifi icon turning on, but if you run "netcfg | grep UP" you will see that the wlan0 interface is up and running (as well as the rmnet_usb0 mobile data interface, both of them will be up and will have the expected IP addresses) and you can access your local LAN while your mobile data 3g/4g whatever provides your default route to the outside world.
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Sent from my MI 2 using Tapatalk
wlh03212 said:
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Click to expand...
Click to collapse
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
sordna said:
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
Click to expand...
Click to collapse
Hi I'm running on Miui v5 4.1.1
I did try the above commands. But I'm not sure about the ip route you mentioned in the coding x. X. X. X via y. Y. Y. Y.
The response of the script was permission denied. I am definitely rooted and I gave permission to SH script runner.
Sent from my MI 2 using Tapatalk
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
sordna said:
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
Click to expand...
Click to collapse
Thanks you for your reply. First of all my understanding of networking isn't anywhere basic . What i did with the xxx was replacing it with the internal ip assigned to me, aka 192.x.x.x
For the yyy, I replaced it with the ip of 3g connection. Not sure what I am doing here. Please guide me here (I know the su part which I an required to do in terminal)
And finally my goal. I have Seagate wireless plus and itself is a portable wifi hotspot to its own content. I am able to stream pictures music and video from the battery operated hardisk. I can bridge the connection of the portable hotspot to my home wifi gaining xs to the Internet.
However while I am connected to the Seagate wireless plus, I cannot connect to my 3g. That meaning I can't have Internet on the go which is a very big limitation.
Sent from my MI 2 using Tapatalk
Sent from my MI 2 using Tapatalk
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
sordna said:
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
Click to expand...
Click to collapse
# enable dual-networking:
............
............
.............
..........
...........
..............
..........
ip route add x.x.x.x via x.x.x.y # add any desired local route -------->( do i remove this row of code entirely? What do i do with this row of coding? Provide my default gateway? I'm not sure what's my default gateway or how i do find out my default gateway or how should i edit this coding to my default gateway.)
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well (In short if the i execute the above commands correctly with the correct default gateway of my 3G, the netcfg command should show my default gateway correctly? is my understanding correct?)
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
sordna said:
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
Click to expand...
Click to collapse
Thanks you much! Going to try out when I get home.
Sent from my MI 2 using Tapatalk
OK. Please hit the thanks buttons
sordna said:
OK. Please hit the thanks buttons
Click to expand...
Click to collapse
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
wlh03212 said:
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
Click to expand...
Click to collapse
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
sordna said:
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
Click to expand...
Click to collapse
Yes. I notice that the wifi switched off and then turns on again. Alright I do some research on my own! Thanks again.
Hope that I will get some breakthrough soon
Sent from my MI 2 using Tapatalk
Hi
I finally got it working. When I am connected to seagate wireless, I have to fiddle with the connection settings inside wifi settings. I assigned a static ip and assigned the gateway to 0.0.0.0
As for the ip, I set a different internal ip with the last digit increased by one. Example 172.25.0.2
Now I am connected to both 3G and LAN.
Sent from my iPhone using Tapatalk

Categories

Resources