Usb ethernet adaptor on rooted nexus 10. - Nexus 10 Q&A, Help & Troubleshooting

Hello,
When I plug-in the USB ethernet adaptor (ASIX based) to my rooted kitkat android nexus 10, the network lights are on - indicating that the device is recognized.
The Wifi is turned off.
When running in terminal:
netcfg
I can see that eth0 is on.
However all my efforts to configure eth0 with static or dynamic IP have failed.
In detail:
ifconfig eth0 192.168.0.105 netmask 255.255.255.0 broadcast 192.168.0.255
assigns a static address to eth0,
but pinging to the gateway or any other IP on the network fails.

Not sure what is happening but I'll guess the issue is related to your router. My own configuration dynamically issued an IP address for an adapter compatible with the stock Ethernet drivers. Here is a much more detailed thread on my Ethernet adapter experiences:
http://forum.xda-developers.com/showthread.php?t=2238840
Maybe there will be some relevant info in that thread. Good luck.
Sent from my Nexus 10 using XDA Premium HD app

Related

Can't use ServerSocket

I'm trying to listen on a port using ServerSocket on an Android device. I want to be able to connect to this port over WiFi using a computer on the same network.
I get no exception when binding it to a port, however when I check netstat it says:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 (null):4040 (null):* LISTEN
I've tried countless ways of binding it to localhost, 0.0.0.0, the WiFi LAN IP address of the device with SocketInetAddress and InetAddress.getByName. Nothing seems to work.
When I try to connect to the port from a computer in the same WiFi (I've tried both netcat and Java's Socket.connect()), all I can see in Wireshark is an ARP request:
Who has [phone's LAN address]? Tell [computer LAN address].
This request repeat itself until timed out.
I've tried the reverse way, by setting the ServerSocket on the computer and connecting to that port from the phone, that works very well.
My testing phone is an Samsung Spica i5700 with a custom ROM.
Any ideas?

Enabling Ethernet over USB OTG

I found a way to enable Ethernet over USB OTG on a Samsung S6 Edge (SM-G925I, International Edition). The phone needs to be rooted because the method requires enabling the interface and editing routing tables.
The method has a "high" level of difficult, because it requires to enter commands on the phone using a terminal. By sharing this method, I hope experts will be able to automate this process, e.g., via an app.
While the description is for the Samsung S6 Edge, I suspect that this method may also be used on other phones.
Pre-requisites:
Tested on Samsung S6 Edge, SM-G925I, with Android v5.0.2 (Build LRX22G.G925IDVU1AOE3).
Phone must be rooted. This is necessary because you will be editing IP routing information which is only available with superuser access. Instructions for rooting the phone may be found elsewhere in XDA.
Set phone to "Airplane Mode" with Wi-Fi disabled. This simplifies the setup, but it is possible to lift this restriction. Left as an exercise to the reader.
Connect the phone to a micro USB OTG adapter. Then, connect the USB OTG adapter to a USB to RJ45 Ethernet adapter. Then, connect the Ethernet adapter to a router. (I have had good luck with BobjGear connectors and adapters. Sold by major online merchants.)
Setup
Your setup should look like this:
Samsung S6 Edge <-> Micro USB OTG connector <-> USB to RJ45 Ethernet adapter <-> Router <-> Internet
Enabling USB OTG interface
Using an app such as "Terminal Emulator" (by Jack Pavlevich) enter the following commands:
Check whether phone can reach router (that is, the gateway). Note: use the IP address of your router. Output shows that phone does not have access to any network.
Code:
$ ping -c 3 192.168.1.1
connect: Network is unreachable
(Optional) Check existing routing setup, useful for comparing after setup is completed.
Code:
# ip route // Should not show anything
# ip rule // Shows default rules (in my case, there are eight)
Confirm that the interface is visible to the phone.
Code:
$ netcfg
eth0 DOWN 0.0.0.0/0
The "eth0" interface corresponds to Ethernet over USB OTG. "DOWN" means that "eth0" is not active, resulting in the "Network is unreachable" message when pinging the router.
Now, gain superuser access:
Code:
$ su
Enable "eth0" interface. Router must be setup for DHCP.
Code:
# netcfg eth0 dhcp
If above command times out, try again. Otherwise try:
Code:
# netcfg eth0 down
# netcfg eth0 dhcp
Confirm that the interface is up and it has been assigned an IP address by the router. (IP address assigned to "eth0" will vary depending on your router setup.)
Code:
# netcfg
eth0 UP 192.168.1.21/24
Now, ping the router. (Note: Use your router's IP address.)
Code:
# ping -c 3 192.168.1.1
Network is unreachable
While interface is active and it has an IP address, phone still does not have access to any network.
Let's examine existing IP routing settings:
Code:
# ip route
The above command does not show any output, indicating that no IP routing is set up. In devices that support Ethernet over USB OTG off-the-shelf (e.g., Nexus 5, Sony Xperia Z1 phone and Z2 tablet), IP routing is setup "automatically". But in devices such as Samsung S6 Edge, IP routing settings need to be enabled manually using the commands below. (My guess is that Google, OEMs or carriers do not want you to use Ethernet over USB OTG.)
Configure IP routings
Configure IP routing in the "eth0" interface. The settings are similar to the ones used by the phone when the Wi-Fi interface is enabled. If the settings below do not work for you, check the IP routing settings on your phone when Wi-Fi is enabled and "eth0" is disabled, and adjust accordingly.
Code:
# ip rule add from all fwmark 0x101f9/0x1ffff lookup 1024 pref 13000
# ip rule add from all oif eth0 lookup 1024 pref 14000
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
# ip rule add from all fwmark 0x0/0xffff lookup 1024 pref 22000
# ip route add table 1024 192.168.1.0/24 dev eth0
# ip route add table 1024 default via 192.168.1.1 dev eth0
Exit superuser mode and (optionally) confirm IP routing settings.
Code:
# exit
$ ip rule // Command should show new entries 13000, 14000, 19000 and 22000
(Optional) Examine new IP routing settings and and newly created routing table entry.
Code:
$ ip route show table 1024
$ ip route
Both commands should output something like this:
Code:
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto static scope link
Finally, confirm router is reachable from phone. (Note: use your router's IP address.)
Code:
$ ping -c 3 192.168.1.1
That's it! Your phone should now have Ethernet access over USB OTG. Enjoy!
Ps. Please hit 'Thanks' if this info was useful.
Would we have to perform this everytime we flash a new Rom?
Hello,
Could you give more details about which (BobjGear or others) USB to Ethernet adapters you tested with the S6 Edge?
I'd like to get one, but I'm confused about those which can work or not... The BobjGear page
http://www.bobjgear.com/which-tablets-support-ethernet.html
for their adapters states that they don't support Android phones, obviously if you managed to get it to work that is not entirely true
Thanks in advance for any detail you could provide, this is really a great achievement!
luckylui said:
Would we have to perform this everytime we flash a new Rom?
Click to expand...
Click to collapse
@luckylui Indeed, configuration done using these commands (via terminal or using a script) is not sticky, so you need to re-do it after reboot or after disconnecting/re-connecting the micro USB OTG adapter.
In other devices (such as Android tablets), configuration is done "automatically" (some "init.rc" takes care of this upon detecting than an Ethernet interface has been connect). However, for most Android phones this has to be done manually.
I hope that an XDA expert can help us create such a "init.rc" configuration script.
dew_veil said:
Hello,
Could you give more details about which (BobjGear or others) USB to Ethernet adapters you tested with the S6 Edge?
I'd like to get one, but I'm confused about those which can work or not... The BobjGear page
http://www.bobjgear.com/which-tablets-support-ethernet.html
for their adapters states that they don't support Android phones, obviously if you managed to get it to work that is not entirely true
Thanks in advance for any detail you could provide, this is really a great achievement!
Click to expand...
Click to collapse
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!
doedoejohn said:
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!
Click to expand...
Click to collapse
Do you think you could share that app for the note 5?
Do apps access ethernet?
Thank you for this useful op.
Following your concept (S6 edge device rooted and using Alex-V kernel) I have no trouble with pings via terminal however all apps still see internet as disconnected.
Do your apps connect to the internet on all the phones with which you used this method?
Does the kernel have to support USB-Ethernet or is this not kernel related?
doedoejohn said:
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!
Click to expand...
Click to collapse
Hello, this is fascinating. I want to set this up on my LG G2 D801, only I don't know what "ip rule" commands I should enter. How can I find out the rules the phone sets when "wlan0" is active?
This post needs more recognition and attention than it has. XDA Admins should frontpage it imho. I have a friend who has a Nexus 9 and Ethernet dongles work out of the box. Samsung devices though is an other story. Me and my boss are setting up networks for small businesses. It would have been amazing if we could enable on our Samsung phones (S5 him and S7 me) Ethernet support as it would save us from having to carry on not-easy-to-access places heavy equipment to set up the network or troubleshoot issues that WiFi is not an option. I wish there was an app or a script that would do the work for you. In any way, good job, actually, spectacular job!
Hello,
how can I use ethernet with my S6 with Android 6?
doedoejohn said:
I found a way to enable Ethernet over USB OTG on a Samsung S6 Edge (SM-G925I, International Edition). The phone needs to be rooted because the method requires enabling the interface and editing routing tables.
The method has a "high" level of difficult, because it requires to enter commands on the phone using a terminal. By sharing this method, I hope experts will be able to automate this process, e.g., via an app.
While the description is for the Samsung S6 Edge, I suspect that this method may also be used on other phones.
Pre-requisites:
Tested on Samsung S6 Edge, SM-G925I, with Android v5.0.2 (Build LRX22G.G925IDVU1AOE3).
Phone must be rooted. This is necessary because you will be editing IP routing information which is only available with superuser access. Instructions for rooting the phone may be found elsewhere in XDA.
Set phone to "Airplane Mode" with Wi-Fi disabled. This simplifies the setup, but it is possible to lift this restriction. Left as an exercise to the reader.
Connect the phone to a micro USB OTG adapter. Then, connect the USB OTG adapter to a USB to RJ45 Ethernet adapter. Then, connect the Ethernet adapter to a router. (I have had good luck with BobjGear connectors and adapters. Sold by major online merchants.)
Setup
Your setup should look like this:
Samsung S6 Edge <-> Micro USB OTG connector <-> USB to RJ45 Ethernet adapter <-> Router <-> Internet
Enabling USB OTG interface
Using an app such as "Terminal Emulator" (by Jack Pavlevich) enter the following commands:
Check whether phone can reach router (that is, the gateway). Note: use the IP address of your router. Output shows that phone does not have access to any network.
Code:
$ ping -c 3 192.168.1.1
connect: Network is unreachable
(Optional) Check existing routing setup, useful for comparing after setup is completed.
Code:
# ip route // Should not show anything
# ip rule // Shows default rules (in my case, there are eight)
Confirm that the interface is visible to the phone.
Code:
$ netcfg
eth0 DOWN 0.0.0.0/0
The "eth0" interface corresponds to Ethernet over USB OTG. "DOWN" means that "eth0" is not active, resulting in the "Network is unreachable" message when pinging the router.
Now, gain superuser access:
Code:
$ su
Enable "eth0" interface. Router must be setup for DHCP.
Code:
# netcfg eth0 dhcp
If above command times out, try again. Otherwise try:
Code:
# netcfg eth0 down
# netcfg eth0 dhcp
Confirm that the interface is up and it has been assigned an IP address by the router. (IP address assigned to "eth0" will vary depending on your router setup.)
Code:
# netcfg
eth0 UP 192.168.1.21/24
Now, ping the router. (Note: Use your router's IP address.)
Code:
# ping -c 3 192.168.1.1
Network is unreachable
While interface is active and it has an IP address, phone still does not have access to any network.
Let's examine existing IP routing settings:
Code:
# ip route
The above command does not show any output, indicating that no IP routing is set up. In devices that support Ethernet over USB OTG off-the-shelf (e.g., Nexus 5, Sony Xperia Z1 phone and Z2 tablet), IP routing is setup "automatically". But in devices such as Samsung S6 Edge, IP routing settings need to be enabled manually using the commands below. (My guess is that Google, OEMs or carriers do not want you to use Ethernet over USB OTG.)
Configure IP routings
Configure IP routing in the "eth0" interface. The settings are similar to the ones used by the phone when the Wi-Fi interface is enabled. If the settings below do not work for you, check the IP routing settings on your phone when Wi-Fi is enabled and "eth0" is disabled, and adjust accordingly.
Code:
# ip rule add from all fwmark 0x101f9/0x1ffff lookup 1024 pref 13000
# ip rule add from all oif eth0 lookup 1024 pref 14000
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
# ip rule add from all fwmark 0x0/0xffff lookup 1024 pref 22000
# ip route add table 1024 192.168.1.0/24 dev eth0
# ip route add table 1024 default via 192.168.1.1 dev eth0
Exit superuser mode and (optionally) confirm IP routing settings.
Code:
# exit
$ ip rule // Command should show new entries 13000, 14000, 19000 and 22000
(Optional) Examine new IP routing settings and and newly created routing table entry.
Code:
$ ip route show table 1024
$ ip route
Both commands should output something like this:
Code:
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto static scope link
Finally, confirm router is reachable from phone. (Note: use your router's IP address.)
Code:
$ ping -c 3 192.168.1.1
That's it! Your phone should now have Ethernet access over USB OTG. Enjoy!
Ps. Please hit 'Thanks' if this info was useful.
Click to expand...
Click to collapse
First of all, thank you for this great work. I need ethernet connection and my tablet (lenovo yoga tab 3) had no ethernet access.
Now, following your instuctions I have managed to ping the router from the terminal, but then I do not load any page the browser and I do not connect the apps. Do I need to do anything else? Or am I doing something wrong?
Could you help me please?
Thanks in advance!
doedoejohn said:
Code:
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
Click to expand...
Click to collapse
Hello, I am trying to do the same for my note 4.
I am currently able to ping google.com without having changed the ip rule tables.
But all my apps are still not able to recognize the ethernet connection.
So I am digging into those ip rule tables.
My question is, how did you find that value 0x1f9 ?
I have analyzed dozen of ip route policy databases and I have roughly understood how they are built.
But it seems this value differs from an interface to another (wlan0, eth0, rmnet, ...). Seems it's a kind of network ID ?
Also, would it be possible to have your ip route policy table with wlan0 and the final one for eth0 with your tweak ?
Thanks
hello
i would like to know if there is a script to enable ethernet...i've a lenovo tablet, the usb dongle is well recognize by android but no ethernet connection is made...
Thank you for sharing this, novebis!
Getting ethernet working on my used tablet was the reason for my purchasing it and the reason I joined the forums.
This worked on my ASUS Memopad 8 ME181C K011 (rooted with locked boot loader) with a "Pluggable USB 2.0 Ethernet Adapter 10/100 Mbps", Model USB2-E100, hanging off of a "Micro USB OTG Charge HUB For Smartphone and Tablet".
I've got the "Pluggable USB 2.0 OTG Ethernet Adapter 10/100 Mbps", model USB2-OTGE100, also which I suspect will work without any changes. I also have a USB 3 gigabit model from a different manufacturer with a similar but newer SoC which I'll try. A Chromecast powered version from UGREEN is also on the way for testing.
I'll be looking for an automated method for this and for a way to make Google Play use the connection.
Thanks so much. I'm stoked
On Note 5, I can ping google.com and Chrome is working via the cable. But all other apps don't, like Google Photos, Youtube, Facebook.
Any idea why?
The script in this thread didn't work correctly so I had to improvise my own as below:
ifconfig eth0 10.1.1.50 netmask 255.255.255.0 broadcast 10.1.1.255
ifconfig eth0 up
ndc network create 9792
ndc network interface add 9792 usb0
ndc network route add 9792 usb0 0.0.0.0/0 192.168.225.1
ndc resolver setnetdns 9792 8.8.8.8 8.8.4.4
ndc network default set 9792
Click to expand...
Click to collapse
dan.leahu said:
On Note 5, I can ping google.com and Chrome is working via the cable. But all other apps don't, like Google Photos, Youtube, Facebook.
Any idea why?
The script in this thread didn't work correctly so I had to improvise my own as below:
Click to expand...
Click to collapse
Although I have a different device, I've given up on this and switched, instead, to a virtual android device.
There are some apps relating to fake WiFi which are supposed to address this issue but I've had no luck in getting some apps (e.g. Google Play) to use ethernet. I've also had limited results using reverse USB tethering.
What you're trying to do is what many would want. However, it's simply too good of an idea for the producers of proprietary systems and operating systems to tolerate. Efforts to give the people what they want seem to fall into a black hole of silence.
"Dive Into Android Networking: Adding Ethernet Connectivity - ELCE 21"
https://www.youtube.com/watch?v=LwI2NBq7BWM
Slides
https://www.elinux.org/images/9/98/Dive_Into_Android_Networking-_Adding_Ethernet_Connectivity.pdf
HD version of the video here...
https://bootlin.com/pub/video/2012/elce/elce-2012-zores-android-networking-ethernet-support.webm
Products resulting from the above work:
Premium DeskPhones
https://www.al-enterprise.com/en/products/devices/premium-deskphones
AngrySockPuppet said:
Although I have a different device, I've given up on this and switched, instead, to a virtual android device.
There are some apps relating to fake WiFi which are supposed to address this issue but I've had no luck in getting some apps (e.g. Google Play) to use ethernet. I've also had limited results using reverse USB tethering.
What you're trying to do is what many would want. However, it's simply too good of an idea for the producers of proprietary systems and operating systems to tolerate. Efforts to give the people what they want seem to fall into a black hole of silence.
"Dive Into Android Networking: Adding Ethernet Connectivity - ELCE 21"
https://www.youtube.com/watch?v=LwI2NBq7BWM
Slides
https://www.elinux.org/images/9/98/Dive_Into_Android_Networking-_Adding_Ethernet_Connectivity.pdf
HD version of the video here...
https://bootlin.com/pub/video/2012/elce/elce-2012-zores-android-networking-ethernet-support.webm
Products resulting from the above work:
Premium DeskPhones
https://www.al-enterprise.com/en/products/devices/premium-deskphones
Click to expand...
Click to collapse
Thank you so much, never knew such research exists on this.
So does it mean there's no way to do it?
I thought I was close, as after the script above I've further did some changes and now Google Play works via Ethernet Cable. I can download apps, which wasn't working before.
Added command:
Code:
ip rule add from all lookup main pref 1
But still, WhatsApp and Google Photos still miss the connection. I really can't understand why?!
Oh now I see from the slides:
• Java framework services and apps rely on Connectivity Manager
and have no clue what Ethernet route/connection actually means.
- Except for some apps (e.g. Browser, which relies on native implementation).
Click to expand...
Click to collapse
Actually found this which does a reverse tethering via USB cable + Linux computer. Hope it'll work better than trying to get Ethernet connection work.
https://github.com/vvviperrr/SimpleRT
found at:
https://news.ycombinator.com/item?id=12198085
dan.leahu said:
Thank you so much, never knew such research exists on this.
So does it mean there's no way to do it?
I thought I was close, as after the script above I've further did some changes and now Google Play works via Ethernet Cable. I can download apps, which wasn't working before.
Added command:
Code:
ip rule add from all lookup main pref 1
But still, WhatsApp and Google Photos still miss the connection. I really can't understand why?!
Oh now I see from the slides:
Click to expand...
Click to collapse
Congratulations on getting Google Play to work. That's a big accomplishment.
You're way ahead of me though.
Perhaps you will have better luck with the fake WiFi apps as well.
My main interest in this is to use social media apps without wireless.

Problem with ethernet in Samsung Galaxy Tab 4 8' (SM-T330), android 5.1.1

Hi everybody,
I have a problem with the ethernet connection in the Samsung Galaxy Tab 4 8' WiFi (SM-T330).
I need to connect the tablet to a embedded system through ethernet with a static IP address, and in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
A key requirement I have is that the IP address must be static. This is important because making some research I've connected the tablet to a LAN and with ethernet configured as DHCP and I have internet connection, but when I change the configuration of the connection to a static IP I can't even make ping to the gateway. If I execute in a terminal emulator the command 'netcfg' I can see the interface eth0 up with the correct IP assigned (192.168.1.98). If I run the command 'ip route show' I can see the following in the output:
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.98
Which is apparently correct IMO, but the fact is that if I ping the 192.168.1.1 address I get "Network is unreachable" error.
Just to compare, the output of 'netcfg' and 'ip route show' in case of DHCP configuration is pretty much the same:
default via 192.168.1.1 dev eth0 metric 238
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.179 metric 238
But this time everything works fine.
I have no clue why it doesn't work with a static IP. Can anybody help me with this issue? I'm doing something wrong, or this is an android 5.1.1 bug?
Thanks in advance.
pazonks said:
Hi everybody,
I have a problem with the ethernet connection in the Samsung Galaxy Tab 4 8' WiFi (SM-T330).
I need to connect the tablet to a embedded system through ethernet with a static IP address, and in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
A key requirement I have is that the IP address must be static. This is important because making some research I've connected the tablet to a LAN and with ethernet configured as DHCP and I have internet connection, but when I change the configuration of the connection to a static IP I can't even make ping to the gateway. If I execute in a terminal emulator the command 'netcfg' I can see the interface eth0 up with the correct IP assigned (192.168.1.98). If I run the command 'ip route show' I can see the following in the output:
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.98
Which is apparently correct IMO, but the fact is that if I ping the 192.168.1.1 address I get "Network is unreachable" error.
Just to compare, the output of 'netcfg' and 'ip route show' in case of DHCP configuration is pretty much the same:
default via 192.168.1.1 dev eth0 metric 238
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.179 metric 238
But this time everything works fine.
I have no clue why it doesn't work with a static IP. Can anybody help me with this issue? I'm doing something wrong, or this is an android 5.1.1 bug?
Thanks in advance.
Click to expand...
Click to collapse
how to you connect tablet with LAN cable?
thelous said:
how to you connect tablet with LAN cable?
Click to expand...
Click to collapse
They said (and I quote):
in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
Click to expand...
Click to collapse
thisisapoorusernamechoice said:
They said (and I quote):
Click to expand...
Click to collapse
Ohh i thought he mean tab 4 8.0 had ethernet port LOL., but why use LAN cable whek you can get same speed with wifi? Atleast i am getting same speed on tablet as i have on desktop computer....
I believe I am having the same problem. Any word on what is going on?
I was able to get UDP messages out to work intermittently by finding a network that it would connect with and then connecting it back into the network I wanted it to work with. I could not get the initial connection consistently, though.
I was able to get everything working again by flashing 4.4.2 onto the tablet, factory resetting, not letting anything update, and setting up my Ethernet network.

Ethernet connection - problem with some devices

Hi,
I want to connect few phones to ethernet network via USB ASIX AX88772B adapter. Some devices can connect without any problems, some need to install xposed and Fake WiFi module. And some... can't! They all have OTG support and drivers for this network card. All phones get IP from DHCP, on all DNSs are set to 8.8.8.8 and 8.8.4.4, all have the same gateway. On all devices traceroute and nslookup works properly, but on some doesn't work ping and internet generally. It looks like Android can't see internet connection. Even with Fake WiFi. I also tried to set IP of rmnet0 to 0.0.0.0, but it didn't help. This is steps which I'm doing:
Install xposed, fake wifi and turn it on
Plug ethernet card
Dhcpcd eth0
setprop net.dns1 8.8.8.8 and for second dns 8.8.4.4
route add default gw xxx.xxx.xxx.xxx dev eth0
Testing with nslookup, traceroute, ping
Did you have the same problem? I noticed that all LG Phones have this problem, and HTC ONE Max (I didn't test on other HTCs). Could you help me?

Cannot Set Static IP Over USB-C Ethernet Adapter

When attempting to set up a static IP, via a cable connection, even after the fields are filled out, the option to save is greyed out. The fields are slightly different from the wifi static IP options. The connection is working with DHCP. The options are:
IP ADDRESS: 192.168.0.166
NETMASK: 24
DNS: 208.67.222.222
DEFAULT ROUTER: 192.168.0.1
So already you can see its odd compared to the more standard wifi options -only 1 nameserver can be used? These settings work no problems for wifi - but wifi settings also have the subnet mask and two nameservers.
Is it something I'm doing wrong? I've not used ethernet on a phone before. Otherwise, I'll report it to Samsung.

Categories

Resources