I’m using “ARDUINO mega-2650” with ETHERNET shield based on “WIZNET W5100” for connecting my ARDUINO to ETHERNET devices such as a switch, router, local pc, meters, etc.

In my application, I want to accept data from local devices connected in LAN and transfer that data to my SERVER application. basically, my ARDUINO will act as a transparent gateway.

Currently, I’m using TCP protocol to connect with my SERVER application and local devices present in LAN. hence my ARDUINO is working as a MASTER for local devices and CLIENT for my SERVER application. with TCP protocol my ARDUINO is working fine, but this method is limited with devices that support TCP application for communication only.

As of now, I want to connect my ARDUINO to an “ETHERNET METER MACHINE” which does not follow TCP protocol, hence I’m not able to process or accept any data from it. This “ETHERNET METER MACHINE” only sends data to the particular IP address in form of IP packets.

Can anyone suggest me a way to access all data coming at my IP address in ARDUINO without using any specific higher level protocol like TCP or UDP. For transferring or redirecting that data to the server application, TCP is fine. Is there any reference for pure “IP PACKET processing”, access HEADER of each data packet for fetching any information like “SOURCE IP ADDRESS”, “DATA LENGTH” etc. As I’m not very well aware of ARDUINO functions and libraries, can anyone guide me for above IP packets extraction part, any inputs will be highly appreciated.

Thanks and regards
Aatif Shaikh

You will use IPRAW mode of the W5100 socket for your device talking IP and not talking TCP or UDP.

I googled a lot but couldn’t find any specific link which state how to do that in arduino

Refer to the W5100 datasheet on the WIZnet website.