Arduinos on there own personal LAN. Possible?

Hello am not new to arduino but I am new to the magic of the Ethernet.

Is it possible to get two arduinos on Ethernet to chat to each other on there own LAN network.
I would Ideally like to send data to one through serial, which would then communicate via there own LAN to the other to perform operations.

Am actually an engineer and am trying to learn using Ethernet for future work so am looking to experiment with ethernet communication to get my head round it.

They must not communicate through the INTERNET.

Well - provided each had an ethernet shield connected (or equivalent), and they were all connected to a switch or hub - I don't think it would be an issue (assuming proper coding on each Arduino, of course). However, I don't have any experience with ethernet-enabled Arduinos; my assumptions are made from what little I have gleaned about the hardware and software involved on this forum and other places...

I didnt think about a switcher or hub and would rather avoid one if possible and go direct from one ethernet board to the other.
The coding looks the hard part to me

Networking is very much new to me

I hope to move to FPGA one day if I can get my head round it

Why do you want them connected? A simple serial comms link between them might be the way to go, if you want "simple".

madmanwithabox:
I didnt think about a switcher or hub and would rather avoid one if possible and go direct from one ethernet board to the other.

If you're only looking to connect two of them - then a crossover cable should work fine. If you need more than two, then you'll need to use a switch or hub (I don't know of any dual ethernet shields or such for the Arduino - you might be able to do something custom like that using a Mega; the issue is the number of pins needed, more than anything - although you might be able to pull something off with a regular Arduino, software serial ports, and a couple of those serial-to-ethernet adapters).

madmanwithabox:
The coding looks the hard part to me

Network-aware comms coding takes a bit to get your head around, but it isn't too bad (I once wrote a simple web server in a COBOL-ish language (DB/C) - plus I've played around with similar things in VB, Perl, Python, and PHP)...

madmanwithabox:
Networking is very much new to me

You should probably try to understand as much as possible at a PC level if you can - it might help...

madmanwithabox:
I hope to move to FPGA one day if I can get my head round it

FPGAs, from my understanding, are a whole 'nother beast compared to microcontrollers - with an FPGA, you are essentially writing code to control logic states/output based on logic states and/or other input - which is compiled such that the FPGA being "programmed" has those inputs/outputs/gates to work as your "code" is designed. There's also a fair bit of parallel processes that are allowed (must be allowed) to go on that you have to be able to wrap your head around. The simple examples and tutorials I have seen of the coding needed, and the explanations - have left me with my head spinning a bit. I've always figured that if I needed to learn how to use and program FPGAs, I'll worry about it when the time comes, and not a moment sooner, as it is a skill which I am pretty sure I could master, but it might be something that I'll never need. I'll likely know when I'll need it if the time comes. Currently, I just don't see a need for creating custom FPGAs and the code for them for anything I am working on currently; I think that microcontrollers or other existing solutions will fill my needs at the moment.

While I'm no expert either I have done similar with a router in between. The cheapest simplest router of flee bay or equivalent will make it a very simple job. Using a cross over cable works for most network devices and I use one to set up IP cameras before plugging in to a network but to do that I have to assign my laptop as the DNS and tell the camera to use it as an access point. Like I said this may be easy to do with the Arduino, I'm not sure but I do know with a router its plug it in and away you go.

Why do you want them connected? A simple serial comms link between them might be the way to go, if you want "simple".

Like I said am learning ethernet and arduino seems a simpler place to start, the industry am in (power supplys) doesnt usually have a LAN or ethernet connection needs but more and more customers are requesting them so am trying to give my self an advantage over other engineers.
Serial is easy I know

the cross over cable is something am defiantly going to need to get.

I dont like FPGA's either they are messy and dont have the time to learn them inside out, let alone how they work with ethernet.
What am really looking to establish is a ethernet system that can be transferred from one project to another so I don't need to mess about with it too much in every job.
The requests from the Ethernet that a unit like a power supply would be simple requests such as to shut down or start up a unit and maybe status requests.

For the simple things you describe, perhaps...

... will give you what you need.

madmanwithabox:
I dont like FPGA's either they are messy and dont have the time to learn them inside out, let alone how they work with ethernet.

Maybe you don't have time now, but maybe in the future you will?

Kinda OT...

Think of an FPGA as an IC that you can make into anything you want, via a collection of "unwired" logic gates and other on-board "components" (memory cells and the like), which (via a compiled language) can be "assembled" into an internal circuit (which can be nearly anything - even a CPU!). Its kinda like having a huge collection of 74xx logic, and a huge breadboard, and being able to build whatever you like, within the limits imposed by the onboard "components" of the FPGA, and the FPGA programming language.

Most electronics hobbyists, I would surmise, never have the need to deal with programming a custom FPGA. You should keep it in mind, though, as an option - just in case you run into a situation where you say to yourself "I wish I could buy this particular device" - and you look around, and you can't find it, and no one can tell you differently (or someone says "they don't make such a thing"); you would at least know then that "Ok - so I can't buy it? I'll build it!". If you manage to create a unique and useful enough device - you might even be able to get it manufactured (as in "real silicon").

FPGAs are how (from my understanding) modern IC designs are prototyped, one level down from real silicon. It used to be, in the "bad ole days", you had to commit your designs to actual masks, and build real silicon - which with a mistake was a real expensive proposition. IC's were also designed using breadboards or wire-wrapped boards, using other ICs as "functional blocks" (logic ICs, but also PAL and GAL chips) - then when it was ready, these blocks were reproduced via computer (or sometimes "paper" or transparencies) for the photo-litho process to make real silicon; once again, if something wasn't right, it got expensive quick.

Nowadays - with FPGAs and other GEDA tools available - you have the rise of "virtual fabs" - companies that create new ICs and other devices, but they don't have an actual fab behind them; they instead ship off the virtual designs to other companies who do have fabs to "print them a run of chips" (in fact, I think Atmel does this - if you have the device design files and a fair amount of money and a large order, they'll run them off for you).

So - if you ever think you have a need for a custom design IC; knowing that an FPGA is a possibility is at least something handy to have in your toolbox...

:slight_smile:

Just general thoughts, the arduino with the serial connection would run serial and client code, and the remote arduino would run server code. The client code would be envoked when something is received via the serial code on the client arduino.

I suspect you might be better off actually stating what you hope to achieve in the end with this?