Arduino ethernet networking: feasibility / question

After a long time back to arduino for a new ethernet project more complex than what I had before.

Last project:
Standard hello world project with on/off state change of led over http and port forwarding router.
New project:
a tablet pc sits between arduino and router, no port forwarding.


  1. connection between arduino and tablet: only ethernet, nothing else
  2. dhcp between tablet and router over wifi: ip unknown when writing arduino sketch
  3. tablet has no free port so that I can add, say, another NIC to have 2 ip address pairs.
  4. java used to program the tablet

I assume that I have to implement this software setup if feasible (tell me please):

  1. standard request / response of http between tablet and server providing user web page to publish event
  2. socket connection between tablet and arduino

My little knowledge in networking says 1-network card / chip gives 1-ip address on tablet, so in my case, I can't have two pairs of ip, say, for arduino server sketch and for the socket calling from tablet (in java) and then and between the tablet and the router. On server sketch example of arduino it is also written that the ip is dependent on lan. I guess the solution is software and I just don't know it, may be forum has the solution too but I also don't know to search what keyword.

That's why I'm in trouble and turned to forums again :smiley:

Please suggest how in case of my constraints I can implement a solution..

Is the tablet using WiFi to connect to the router? If not, how do you connect both through the same Ethernet port on the tablet?

If you have Ethernet to the Arduino and WiFi to the Router:

Assign a fixed IP address, such as, to the Arduino sketch. Last octet must not be '1'.
Assign a fixed IP address, such as, to the Ethernet port. First three octets must match the Arduino address. Last octet must be 1.

From the tablet, try to browse to your Arduino:

This might be sufficient to get it working. Otherwise yoy may need to set the subnet mask to ""

Thank you for suggestion but I think I still can’t understand it fully,

The path is exactly this:

Arduino <—> Ethernet shield (enc28j60) <—> tablet ethernet port <—> wifi <—> router <—> internet provider <—> internet

I think I understand to what you are pointing here:

Assign a fixed IP address, such as, to the Arduino sketch.  Last octet must not be '1'.
Assign a fixed IP address, such as, to the Ethernet port. First three octets must match the Arduino address.

but then, pairs you provided there are: (,, but I think you meant like: (, right?

also, the suggestion assigns one ip to the Arduino sketch and the other to Ethernet port, of who? You meant for the tablet right?

If I got it corrct, i.e. the suggestion is to assign to the Arduino sketch and to the tablet, then dhcp of router will resist it, as for instance if I’m running the robot in a park having wifi and ip are assigned dhcp, may be someone else there already obtained this ip and I can’t reserve it the way I want right?

I think that on a tablet, even though there are both wifi and ethernet, there is no 2-chip allowing 2-ip addresses, while on a notebook you have this…

So here a different solution must be taken, to both stay with ethernet connection between Arduino and tablet, and let router to assign ip to tablet via wifi…

Also on tablet I have setting for PPPOE ADSL, could be any use of it here to get the solution from?

Any suggestion please?

What I normally recommend is using internet connection sharing on the laptop/tablet. With Windoze, the ethernet port is assigned by default. All computers/devices on the ethernet port must be in the 192.168.0.x range.

The laptop/tablet will perform a NAT on that localnet to the ip the wireless router assigned to your tablet.

The only challenge is if your WISP uses on the wireless network. Then you will have a routing challenge. Most WISPs do not use that subnet (or on the wireless localnet for that reason.

Google search "Windows internet connection sharing" for details/instructions.

Thank you,

The good news is that I was wrong and the tablet allows for separate ip for wifi and ethernet.

The problem is solved, thank you again!