Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,798 Members 48,524 Now Online
XDA Developers Android and Mobile Development Forum

[Q] USB Ethernet, strange behavior

Tip us?
 
BennyKay
Old
#1  
Junior Member - OP
Thanks Meter 1
Posts: 4
Join Date: Feb 2014
Default [Q] USB Ethernet, strange behavior

Hello everyone!

I successfully manged to get a USB-Ethernet Dongle working on my note 2.
However I am experiencing a strange issue:

When I had first set up the ethernet functionality, everything was working fine.
(Most apps could Not access the internet though, but some such as browser or vlc-player could).
Some days passed by during which I did not use the ethernet functionality but accessed several wifi networks

Now the issue:
if I want to use ethernet at my home network again everything seems fine first.
I can connect via ethernet, retrieve an ip adress using "dhcpcd eth0" and even issue commands like "traceroute www .google. de"
The output of "ip addr show" and "ip route show" also indicates that eth0 interface was assigned a ip-adress and also the correct default gateway has been defined
however if I want to use the browser to browse the web no connection can be established...
same with VLC-Player.
so network commands via terminal work but there's no internet connection within apps.
The strange thing is:
if I now access my home network via wifi first, turn wifi off and use ethernet again everything works as expected (especially the browser is working again..?!)

I'm wondering what I'm missing here:
Do I miss something during setting up the ethernet interface?
note that I also set the "net.dns1" and "net.dns2" property for primary and secondary DNS Server...
But why is ethernet only working if I firstly connect to the same network via wifi?
I assume that while connecting to the network via wifi some additional properties are set.

I'd very appreciate any explanation/suggestion on this matter.
thanks in advance!

Regards!
 
MinChains
Old
#2  
Member
Thanks Meter 3
Posts: 47
Join Date: Dec 2012
Quote:
Originally Posted by BennyKay View Post
Hello everyone!

I successfully manged to get a USB-Ethernet Dongle working on my note 2.
However I am experiencing a strange issue:

When I had first set up the ethernet functionality, everything was working fine.
(Most apps could Not access the internet though, but some such as browser or vlc-player could).
Some days passed by during which I did not use the ethernet functionality but accessed several wifi networks

Now the issue:
if I want to use ethernet at my home network again everything seems fine first.
I can connect via ethernet, retrieve an ip adress using "dhcpcd eth0" and even issue commands like "traceroute www .google. de"
The output of "ip addr show" and "ip route show" also indicates that eth0 interface was assigned a ip-adress and also the correct default gateway has been defined
however if I want to use the browser to browse the web no connection can be established...
same with VLC-Player.
so network commands via terminal work but there's no internet connection within apps.
The strange thing is:
if I now access my home network via wifi first, turn wifi off and use ethernet again everything works as expected (especially the browser is working again..?!)

I'm wondering what I'm missing here:
Do I miss something during setting up the ethernet interface?
note that I also set the "net.dns1" and "net.dns2" property for primary and secondary DNS Server...
But why is ethernet only working if I firstly connect to the same network via wifi?
I assume that while connecting to the network via wifi some additional properties are set.

I'd very appreciate any explanation/suggestion on this matter.
thanks in advance!

Regards!
There is something on these forums called "reverse tether" look it up, it has something that can fix this with IP tables and force the phone to think that it is connected to Wifi
 
BennyKay
Old
#3  
Junior Member - OP
Thanks Meter 1
Posts: 4
Join Date: Feb 2014
Great, thank you!
I did not know about this possibility!
Especially the xposed module looks promising.
It might help to get more apps to reconize the active internet connection.
I'll give it a try!

however I still have no clue why the ethernet interface only seems to work correctly if I first connect the phone via wifi to the network.
The browser will recognize the connection when I do the following:
1.1>turn wifi on and connect to my network
1.2>turn wifi off again
2.1>connect the ethernet USB Dongle
2.2>set up eth0 interface
3>web browser works
Note that I only turn wifi on for step 1.1 and 1.2. When using the ethernet connection wifi is already turned off and the browser still works.
I read that the browser uses some low-level functionality and bypasses the Android framework which is why it can use network connections even though android "thinks" no network is available.

But if I skip the first 2 steps even the web browser won't work.
I think it's quite strange behavior which I cannot explain. Maybe a configuration problem which is solved when setting up a wifi connection prior?
Maybe I'll have to dig a bit deeper into how networking in android works.
 
chandoliasnikos
Old
#4  
Senior Member
Thanks Meter 41
Posts: 286
Join Date: Dec 2010
Location: Katerini
Hi, can you share your settings and how did you managed to connect through ethernet? Which rom and kernel you used?

Sent from my GT-N7100 using Tapatalk
Samsung Galaxy Note II
MoKee 44.4
AGNI CM kernel
 
BennyKay
Old
#5  
Junior Member - OP
Thanks Meter 1
Posts: 4
Join Date: Feb 2014
Quote:
Originally Posted by chandoliasnikos View Post
Hi, can you share your settings and how did you managed to connect through ethernet? Which rom and kernel you used?

Sent from my GT-N7100 using Tapatalk
Hello!

I am using PhoeniX ROM v16.7 along with the AGNI PureStock Kernel v.3.9.3.
It is the kernel that enables the ethernet functionality.
However ethernet support depends on the chipset of the ethernet adapter you are going to use.
Mine has an ASIX AX88772 chipset. I am not sure what kind of chipsets are supported by this kernel.
If the kernel does not support your chipset you will have to compile the driver yourself and insert it as a kernel-module.
I cannot post any links (due to restrictions for new members) but you will find a lot about this topic if you search for: note 2 ethernet kernel module

I do not really understand what you mean by settings:
If you have ethernet up and running you can type in terminal:

Code:
Select Code
netcfg
You will then see a list of all network interfaces along with the eth0 interface.
To set up the eth0 interface using dhcp you can issue:

Code:
Select Code
dhcpcd eth0
For manual configuration you will need:

Code:
Select Code
ifconfig eth0 IP_ADDRESS_YOU_WANT_TO_ASSINGN netmask YOUR_SUBNETMASK
route add default gateway IP_ADDRESS_OF_YOUR_GW dev eth0
setprop net.dns1 IP_OF_YOUR_DNS_SERVER
I am not sure if I do something wrong during configuration, because eth0 interface will only work in apps like the browser if I connect to my network via wifi first (see the my first posts for detailed explanation).
I can turn my wifi off afterwards and use ethernet instead but for configuration I need to start wifi first.
I am not sure why - I still could not figure out the problem...
The Following User Says Thank You to BennyKay For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes