Ethernet adapter // NO DHCP - Android Q&A, Help & Troubleshooting

Greetings all.
Quick question. Is there any way to connect android device (using USB Ethernet adapter + OTG) via Ethernet cable to another device that does not provide IPs via DHCP (static IP)?
To elaborate, I'll soon be in the situation where I'll have no access to the internet and the only thing I'll have is my android device (Pixel C) and my HTPC (running OpenELEC). I would like to connect them via ethernet cable and browse SMB share from my tablet (as well as move things around). I know that the best way would be connecting directly to HTPC via USB and use file manager in Kodi/OpenElec but I would like to be able to move files around without interrupting HTPCs usage. Also, I know that I could possibly buy cheap network router with 2 ports and get IP assigned via DHCP from it but if that's possible I would like to connect those two directly.
*** UPDATE ****
I was able to manually set IP on HTPC as well as on Android device using ifconfig eth0 [IP] netmask [NETMASK]. I'm able to ping and ssh into the HTPC machine, however, it's only doable with superuser permissions. Is there any way to set static IP for eth0 by default (eg /etc/network/interfaces in linux/unix) on android or at least make ifconfig change available for regular user?
V/R
Marc

Pixel C Ethernet Adapter - No DHCP
Hello,
I'm also experiencing issues with DHCP not being available.
What I would like to do is establish point-to-point communication between two(2) devices - a tablet
and an embedded device. The tablet is a Pixel C running Marshmallow 6.0.1. I have the devices
physically connected by USB and they will use this USB connection to communicate using
standard web services.
In the configuration, the embedded device is acting as the "server" but unfortunately does not
support DHCP. I need to create a static IP address and disable DHCP on the tablet side.
I was able to establish an ethernet connection with LAN(DHCP). However, unlike previous versions
of Android, the Pixel C does not provide the capability to disable DHCP and modify ethernet
settings.
My question is, is there a procedure to create a static IP address and also disable DHCP on
the Pixel C(Marshmallow 6.0.1)? If not, can we restore the settings that were available on
previous versions of Android?
csd_

Related

[Q] Wake on LAN wireless PC through internet by Android device

Hello,
I am searching for apps who can wake on LAN my wireless PC by using my HTC Legend device (through internet connection). Is this possible? What apps are currently the best in the market? Thanks a lot for your advise.
Rgds, Marvon
I'm normally using this one:
https://market.android.com/details?id=net.mafro.android.wakeonlan
and sometimes this one:
https://market.android.com/details?id=com.benfinnigan.wol
But you have to check, that you can open UDP Port 9 on your Router on the Broadcast IP (x.x.x.255) and add a DynDNS Domain if you dont have a static IP.
If you have a FritzBox you cannot open that port that easily but there is a nice App for that:
https://market.android.com/details?id=de.sifl.fritzdroid
Hi Fabi280,
thanks a lot for your reply. I am completely new to this. WOL is enabled in the bios but i cannot find the wol settings in my wireless WMP600N network card). Do you have a manual available how to set this up and let it work?
tchuss,
Marvon
The Solution is pretty simple.
There is no WOL with WLAN, actually there is but there aren't much devices that support that Technology. So lets say it just works with a LAN Cable plugged in.
A Device that has Wake On Lan enabled doesnt shut off the Network card, so its always connected, even if it is off (and its connected to power).
LAN doesnt consume that much power, as there is always power on the LAN Cable.
WLAN consumes much more power than LAN and is often used on Mobile Devices which are using Batteries
Hy, can anyone help me with this:
I have made my pc to wake and everything is working great, but after some time it stops working and I cannot wake my pc anymore... Anyone knows what is the problem? I tried to set up lease and everything and I do not know what is the problem...
In my android app I have:
ip address: 86.xx.xx.xx
mac addres: CB:xx:xx:xx:xx:xx (from my pc)
and port: 9
in router I have pre-assigned DHCP IP Address (192.xxx.x.xx) to MAC address.
If I turn off my pc, I can turn on my pc with the app, but after some time it stops working...
any help please...

Got Pandora and Market working with Dock *sorta

Just bought the Malata Dock for my Gtab. I'm currently running Zyhong's Gtab beta 3.2.
As stated by others, Pandora and Google Market fail to stream/download when using Ethernet only.
This is still early and hopefully a dev will point me in the right direction, but I am able to make the tablet use the ethernet connection for Pandora and Market.
Boot Gtab on dock with Ethernet connected. At this point most things work except Pandora/Market.
Using my Droid Inc, I turned on Wireless Tether in Infrastructure mode.
Configure wireless on the tab. Once it connects, go to Settings -> Wifi and modify the wireless connection. I configured the ip address, gateway and DNS 1&2 to work as if the wireless connection was the wired connection.
At this point Pandora and Market will begin to work using the Ethernet. I confirm this by downloading "Angry Birds" from the market. 18MB download in about 30 seconds. Checked phone during this time and it had no bars on 1X...no way it was using the cell connection.
My current theory is the previously stated "Connectivity Status = True" setting. I'm guessing this gets set once the Wifi connection is establish.
If I now drop the wifi connection, Pandora and Market breaks.
I'm curious if it is possible to write an app or script to rename wlan0 to eth1 and eth0 to wlan0. I'm assuming the test for connectivity status = true is set to check wlan0 ?
Any ideas?
Another theory is that there are no DNS servers configured for the wired connection.
I'll be trying that later.
I don't have enough posts yet to ask in the developer forums for help....so if you know one of the devs who are interested in the dock, please point them over here.
With that said, I tested if setting the DNS server manually would have any effect. It appears that DHCP is setting the DNS servers after all with a wired only connection.
So I'm back to the Connectivity Status = True issue.
I'll be looking at how that check is performed and what initiates it. If I can cause the check to be performed on eth0 instead of just wlan0 I think that will fix it.
konman2k4 said:
Another theory is that there are no DNS servers configured for the wired connection.
I'll be trying that later.
Click to expand...
Click to collapse
Got my dock today. With wireless turned off, I can boot on the dock & draw a dhcp ip.
Can't be a DNS issue or you wouldn't be able to surf the net.
Can surf net via browser, play videos/music/pics from my Windows Media Center, Netflix plays fine & can even receive email (as long as the app is the one that does the checking & not me telling it to).
Pandora, Crackle, Market, Amazon App tore, & SlideME not worky (some say no connection while others just hang).
Turning on wireless at the same time results in drawing different ip for wireless. Netcfg show eth0 up with an ip/mask, wlan0 up with an ip/mask. Ifconfig shows data transfer on both interfaces (and different mac addresses).
Must be something the the apps are looking for wifi. or could it be that this is a phone OS & phones don't have ethernet connections (and that ethernet is not listed in Settings, Wireless & Networks)?
At work we don't have wireless, so I used my phone with "wireless tether" to make a connection. Once the wireless network is seen and connected to, I modified the wireless network settings on the tablet so that the gateway, dns, subnet mask and IP are all valid on the wired connection. As for IP just make one up that is not already in use that is valid for the wired network subnet.
This basically tells the tablet that yes you are connected to a wireless network, but with a routing trick you are sending all your traffic out the wired connection.
Since the dock charges the tablet, I connect the phone to the tablet to keep it charged while the wireless tether app is running.
BTW...if you install opera and flash, you can change your agent string to "desktop" within opera and use the web version of pandora all without having to do the fake wireless trick.
I can confirm Pandora and the Market works just fine doing this....as for you other apps I haven't tried those.
konman2k4 said:
At work we don't have wireless, so I used my phone with "wireless tether" to make a connection. Once the wireless network is seen and connected to, I modified the wireless network settings on the tablet so that the gateway, dns, subnet mask and IP are all valid on the wired connection. As for IP just make one up that is not already in use that is valid for the wired network subnet.
This basically tells the tablet that yes you are connected to a wireless network, but with a routing trick you are sending all your traffic out the wired connection.
Since the dock charges the tablet, I connect the phone to the tablet to keep it charged while the wireless tether app is running.
BTW...if you install opera and flash, you can change your agent string to "desktop" within opera and use the web version of pandora all without having to do the fake wireless trick.
I can confirm Pandora and the Market works just fine doing this....as for you other apps I haven't tried those.
Click to expand...
Click to collapse
Read you origianl post. My point was that it is not a DNS issue since with wireless turned off & starting the tab on the dock, internet works. If DNS was the issue then the browsers/etc would not be able to resolve the urls.
But, I did verify your theroy while making sure that there was no possiblity the tab was communicating via your cell/wifi.
I connected mine to the dock with wireless & ethernet connected. Verified both interfaces were up via ifconfig. Wifi connected to wireless access point & ehternet connect directly to a switch. Disconnect access point from switch so no physical connection to lan/wan from the access point, that way wireless connection to tab stays up but it goes nowhere & the only physical connection to the lan/wan is via ethernet. Mail works, Market works, Amazon store works, Pandora works.
Has to be the Connection Status issue in Android that is casuing the problem. Current ROMs must not take ethernet into consideration when checking status. I saw sample code on the net for Connection Status that only looks for Wifi.
I believe we need a rom dev to pursue this for it to work correctly.
Haven't been back to this thread in a bit, but now that I have my 10 posts, i'll start asking around in the Dev community if somebody can point me in the right direction.
konman2k4 said:
Haven't been back to this thread in a bit, but now that I have my 10 posts, i'll start asking around in the Dev community if somebody can point me in the right direction.
Click to expand...
Click to collapse
I did a new post in the Q&A forum back on 5 Aug & pointed it back here. Here's the new post http://forum.xda-developers.com/showthread.php?t=1204015. So far 59 views and a big 0 responses.

[Q] Can't ping to my android JB device from PCs in the same network.

In my small home network, I have an annoying network issue with my JellyBean (4,1+) Android devices and I couldn't find find a real solution despite my tons of searches in web and forums.
I show you my structure and my current situation:
Netgear DG834GT Modem/Router Wireless
Router IP address: 192.168.0.1
It is configured Gateway, DNS, DHCP (DHCP IP leases over .50) and Upnp.
Wireless is WPA-TKIP secured and only Trusted MacAddress reserved. MacAddress's list is updated with all devices can connect to the router wirelessly.
All managed IPs (both Wired and Wireless) are listed in LAN IP Settings, so they are known by router.
Desktop PC - IP 192.168.0.20 (Static IP)
Laptop PC - IP 192.168.0.65 (Wired)
IP 192.168.0.66 (Wireless)
Laptop and Desktop PC are connected via a Netgear 10/100 4-ports hub, that is lastly connected to one of the 4 ports of the Modem Router.
Galaxy Nexus - IP 192.168.0.75 (Android 4.2.2)
Galaxy Note II - IP 192.168.0.76 (Android 4.1.2)
(Galaxy S II - IP 192.168.0.74 - I don't own it any more, right now)
When I enter in the range of my wireless network with one device, it connects correctly to my wifi and it is able to surf both the web and my local network services with no issues.
PROBLEM: If I enable a server service on one of my JB Android devices (like SSHDroid, FTPDroid, Airdroid, etc) and than I try to connect from my desktop PC (w/ IP 192.168.20) to my Android device, it fails.
If I try to ping android device from my desktop PC (eg. ping 192.168.0.76 to ping Galaxy Note 2), I get this output:
Code:
PING 192.168.0.76 (192.168.0.76) 56(84) bytes of data.
From 192.168.0.20 icmp_seq=7 Destination Host Unreachable
From 192.168.0.20 icmp_seq=8 Destination Host Unreachable
From 192.168.0.20 icmp_seq=9 Destination Host Unreachable
Here, I keep the ping command running from PC that reports the error continuosly.
In this while, if I use a terminal emulation app from phone to ping my desktop PC, ping from android device succeeds, and from this moment desktop PC suddenly starts to detect correctly my android device, and command output reports:
Code:
.......
64 bytes from galaxynote2 (192.168.0.76): icmp_req=4 ttl=64 time=1748 ms
64 bytes from galaxynote2 (192.168.0.76): icmp_req=5 ttl=64 time=740 ms
...
I ALSO WISH TO PREFACE THAT: until version Android ICS (4.0.4) until I owned Galaxy S2 (or I'm not so sure of that, but certainly until Gingerbread 2.3.6... ), I didn't have this problem. Furtherly, with wireless Router I have in office (Digital Michelangelo wave 54), I don't have this problem too.
Ideas, suggestions, tips?
Tnx in advance for any answers.
Gabo

[Q] Android unable to connect to my Wi-Fi network - Windows can

I am in university halls of residence. I have setup a Wi-Fi hotspot in my room using a generic router by connecting from the ethernet out port in the wall to a ethernet LAN port and disabling DHCP on the router.
This works perfectly for my Windows 7 laptop. It connects to the router and then to the uni internet without issues. However, although my Samsung Galaxy S3 (International i9300) can detect the network, if I just try to connect to the network as I would any other it gets stuck when obtaining an IP address. After messing around with it for a bit i found that I could get the phone to connect by going into the advanced settings and choosing "static" instead of "DCHP". I don't know what I was really meant to enter for IP Address, gateway, subnet, DNS 1 and DNS 2.
The router has the IP of 192.168.1.1 when i connect it directly to my laptop via ethernet so I tried that as the gateway, I set the IP address to something like 192.168.1.14 (So that it was similar but different), I set the subnet to 255.255.255.0 and the DNS servers I used google's (8.8.8.8 and 8.8.4.4). This got me connected to the router but there doesn't appear to be any internet connection.
I therefore thought that I had entered wrong information for the network (I was only guessing after all). Therefore I went into ipconfig in Windows and copied the default gateway and DNS servers and used a similar IP address (Last number different). I had the same issue.
Does anyone have any suggestions?
I only want Wi-Fi in my room for mobile.

Bluetooth PAN DNS Hostname to pull from DHCP rather than the android creating its own

Hey guys,
So I have a bluetooth pan on a raspberry pi which gives an ip and Internet connection to an android, in this case the S6 edge. I am given an ip address, however I can't communicate with other devices on the network. I do receive Internet though. It seems the android is assigning itself a dns hostname, which separates itself from the rest of the network. I could be wrong, but when laptops connect to the same pan network, they are given the dhcp information from the router and they can communicate over the network with the ip's being given to them from the bluetooth access point.
The laptops have a hostname of TP-link_D5DE and the android has android_9xxxxxx
Can the android adopt dhcp hostname info via Bluetooth pan? Can I change this name? Is it possible without root if so?
I understand there was somewhat of an issue with dhcp "hooks" back in the day where the bluetooth controller couldn't retrieve this information but I read that on a forum which was a few years old and also read it was fixed on newer versions of android.
I plan on have an app with a webview client call on this IP resource as you would in a web browser. Is it possible to have this app issue a dns name?
Thanks!

Categories

Resources