What's new

OTG (On The Go) protocol and static IP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

batman

New Around Here
I can hook up equipment to the network with a USB to RJ45 adapter with OTG (On The Go) to get wired access to the internet over the network. The adapter works very well to provide wired internet to tablets, smarthones and so on that do not have a RJ45 connector.
Now I run into problems with networks that do not work with a DHCP server but use static IP. I want to hook it up there too but the adapter cannot get an internet connection.

I can get a static IP adress everywhere but cannot get every network to install DHCP for me, because for diffeent reasons they DHCP is not available and not everyone will change policy just for me.
Is there a solution?
I am thinking of a adapter fitted between the network and the "USB to RJ45 OTG adapter" that has a static IP on one side and can provide DHCP to the "USB to RJ45 OTG adapter". Does such a thing exist?
Is there a micro USB to RJ45 OTG adapter that uses a programmable static IP address(es)?
Is there another solution?
 
Fit the adapter onto the device and plug it in. You will need the terminal emulator. run ifconfig and look for the wired interface. There are some commands you can enter in the terminal to set the ip in a static way.

The other way to set a static ip is to modify the network configuration files on the device. Since most of them are linux based they follow the same filing and methods linux use. you will still need to use ifconfig to identify the interface to figure out which one to set static.
 
@System Error Message, Thanks, maybe you can help me a little more because I tried for several hour but do not understand it all.

The adapter has a micro-USB and a normal-USB, I could not find a terminal adapter on the smartphone so I hooked it up to a PC.
Started CMD.EXE and entered ipconfig (I presume you meant that)
With ipconfig I can find the adapter but I cannot change anythingbecause I seem unable to address the adapter (I might be doing something wrong).
With network center -> status of the network adapter -> Poperties -> There I can change the IPv4 properties and there I set a free fixed IP address, subnet mask and standard gateway and DNS server (Like I do with network cads)
With cmd.exe + ipconfig the changes seem saved when I unplug and replug the OTG USB adapter.

But when connected to the smartphone I still get no OTG internet connection over RJ45.

Did I make a mistake somewhere?
 
Since you are running with a smartphone, I can't help much there. iOS and Windows at least you can go in and set a static IP address. I'd imagine Android you could do the same.

Different OS and hardware, but I can absolutely hook my USB3 GbE NIC up to my tablet through a USB OTG adapter and it works just dandy wiring in to my network. I let it pull an IP through the DHCP server, but I can also set a static IP easily in the network adapter properties.

I'd wager the issue you are having if you are setting a static IP for it is either you are setting it on the wrong network IP range, or else you are accidently setting it to the IP of another device.

You have to set the IP address ON THE PHONE. You can't do it on your computer and expect that to carry over with the adapter to the phone. IP addressing is done on the level of the operation system, not on the Network adapter hardware. Figure out how to set a static IP on your phone.
 
With android it doesnt show ethernet configurations in the configuration page so theres no GUI to set the static ip. you need an app called "Terminal Emulator" which can be found on google play store. Once you connect ethernet run the command ifconfig. You should see something like eth0 or something like that which would say that its link state is connected and that it has the mac address of your USB NIC.

Once you find your interface, navigate to the linux configuration files and add the static entry in. Seriously just google this as there are many tutorials out there that show you how to manually set a static IP in linux. Android is linux based and has a very similar file structure and settings.
 
Or frankly considering the effort you are going to here, I'd consider a basic pocket router that probably costs $20 and you can just plug it in. Easy to set the static IP on the router and then it can hand out a dynamic one to your phone. You can also then be wirelessly connected instead of trying to fiddle with a hardwired connection and network cable on a phone (talk about the worlds largest pain). If you need to, you can get a dual port pocket router so you can still wire in to it if you want.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top