Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:30 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : DHCP Ethernet device

     Page 1 of 2    
Author Message
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 05:55pm 13 Apr 2017
Copy link to clipboard 
Print this post

Hi all,

I am needing to build a `pinger' or other `responder' for testing ethernet connectivity (could be 2km from host over a combination of copper and fibre)

I am thinking that the WIZNET (I think mine is a 5100) module but I am asking for advice on other possible modules (cheap is preferred but not a killer if a more pricey module is a better fit).

What I need is the ability to ask for and accept a DHCP IP address. (an know what this address is to display on a TFT/LCD screen)
And a method of either doing a ping to a known IP Address or accepting a ping (the latter requiring some one else to initiate this ping) but I am thinking a bit of fun as well like the remote (laptop/PC) asking for a web page that shows an image of BIGMIK with a Thumbs up to show the connection is capable of sending data etc..

Anyway open to suggestions for those that have `gone before'...

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 08:20pm 13 Apr 2017
Copy link to clipboard 
Print this post

I suppose any cheap Linux-capable device - RPi (Zero / Zero W) springs to mind.

Or an esp8266.

John
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 10:32pm 13 Apr 2017
Copy link to clipboard 
Print this post

Hi BigMik

is/will the pinger on wifi (i.e. locally after your ethernet wire/fibre spur)?

if so, the ESP8266 is a good option as it will handle the DHCP config to your router and it has a built in PING command.

I use exactly this option (as part of functionality on my LAN to SMS gateway) on my network here to ping one of my ISPs DNS boxes to confirm I have internet connectivity to them. The box monitors connectivity every minute and sends a SMS (M590E but a SIM800 will do just as well) after 3 consecutive time-outs. It then continues to text every 10 minutes while the condition continues and then sends a text when the network comes back up. I have the mains power for the router going through a realy controlled by the uM and I can send a text to the box to bounce the power to the router... as that has been the source of my worries. Did this from Madeira while on holiday last year, but just having the ability to bounce remotely is a real boon. This is all run by a 28pin MX with MMBasic 5.3

One slight problem is that it is fooled by wifi outage/congestion as well but I can live with that.

The ping to the pinger is easy from a server on the main network - my ESP8266 is set to static IP address so it is always a known quantity.

it runs in a "lights out" environment so doesn't have a display (although one was always planned) but it produces rich logs to the console while running but it is completely stand-alone. Months go by with out me connecting to it... oh, and it sends me a heartbeat text every day.

with this option you can be up and running in an hour and around $10 + $8 a month for the SIM.

published everything here http://www.fruitoftheshed.com/MMBasic.Micromite-SMS-Text-Gateway.ashx

hth

h

Edited by CaptainBoing 2017-04-15
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 01:12am 14 Apr 2017
Copy link to clipboard 
Print this post

Hi Captn,

Unfortunately it has to be wired,

The purpose of this is in our business has, in our busy period, remote terminals (betting terminals at race tracks). Often these are setup in areas that run on generators, which often are not set up until the day before a race meeting which gives us no time to debug any issues. Currently our system is run on an RS485 network and I use a micro mite to emulate a terminals protocol (software written by Peter Carnegie) this runs from a Xioami battery pack and works well, enabling us to test our network when there is no power infrastructure available.. we are over the next 12 months changing entirely to an Ethernet based system.. an expansion of our other existing network..

I want to have a similar hand held, battery powered, tool to do the same on an Ethernet WIRED network..

I will have a read of your article, I might get some ideas.

Thank you,

Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 01:35am 14 Apr 2017
Copy link to clipboard 
Print this post

How about an Orange Pi?
here

They do a Zero that's about $10

JohnEdited by JohnS 2017-04-15
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 02:49am 14 Apr 2017
Copy link to clipboard 
Print this post

  bigmik said  
Unfortunately it has to be wired,



another way then might be to use a bog standard PIC/Arduino with Great Cow Basic - they support the ENC28J60 on anything with 1K of ram...

https://sourceforge.net/p/gcbasic/discussion/579125/thread/d99324de/


might give you some ideas.

Using this device with a uM is on my long term radar but I haven't got round to doing it yet (or until probably July)

all the bestEdited by CaptainBoing 2017-04-15
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 05:26am 14 Apr 2017
Copy link to clipboard 
Print this post

I would think that the lowest effort (and cost) would be made using a Raspberry Pi.

Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 05:33am 14 Apr 2017
Copy link to clipboard 
Print this post

That was what I thought till it turned out it has to be wired.

Could be a Pi + external LAN board (ENC28J60 etc) but it's about the price of the board I posted and messier.

John
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 05:47am 14 Apr 2017
Copy link to clipboard 
Print this post

  JohnS said   That was what I thought till it turned out it has to be wired.

Could be a Pi + external LAN board (ENC28J60 etc) but it's about the price of the board I posted and messier.

John


I must be confused. A Pi has a wired Ethernet port. Hardware could be Pi, LCD, button(s), battery.

Software possibly Python.



Edited by CircuitGizmos 2017-04-15
Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 06:02am 14 Apr 2017
Copy link to clipboard 
Print this post

Only some have a wired port. They cost more than what I posted don't they?

John
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 06:35am 14 Apr 2017
Copy link to clipboard 
Print this post

I was thinking the cost of the total solution. I didn't realize that the Orange had the same pinout as the Pi and could take the same LCD/button boards.

Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 06:51am 14 Apr 2017
Copy link to clipboard 
Print this post

There again, the Great Cow Basic w/ a clone Arduino may be cheaper still. Have to add the ENC but no need for SD/uSD card.

And (a lot) lower power.

I'm amazed a TCP/IP stack (apparently) fits on an Arduino!

John
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:55am 14 Apr 2017
Copy link to clipboard 
Print this post

Or this Arduino Lan tester

That will be cheap to put together

Jman
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 12:08pm 14 Apr 2017
Copy link to clipboard 
Print this post

I reckon that is the one! - good catch
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 12:31pm 14 Apr 2017
Copy link to clipboard 
Print this post

Though it seems to need a mega 2560 (plus the LAN board) and they're not that cheap.

Can be done with a STM32F103C8T6 (+ LAN board) very cheaply, as another idea.

John
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 01:41pm 14 Apr 2017
Copy link to clipboard 
Print this post

Cheap as chips $8.60 shipped

Mega2560

Jman
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 07:07pm 14 Apr 2017
Copy link to clipboard 
Print this post

Hi All,

  jman said   Or this Arduino Lan tester



Thank you all for your great ideas.. I have been considering buying a Pi and have seen the OrangePi before as well.. I might get one of the OPi's as they seem pretty cheap (not for this project but to play with and learn /.... errr Stuff ..)

@ JMan...

PERFECT That device seems to be more or less all I need and more.. I will look into it as my first option.. I didnt see any link (using iPad isnt easy) to the HEX files and code etc.. but I will spend more time searching when I am on my PC later today.

Kind Regards,

MickEdited by bigmik 2017-04-16
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 07:42pm 14 Apr 2017
Copy link to clipboard 
Print this post

@JMan,

It appears that to get the information you have to pay a monthly subscription to Instructables.. @$36US per year.. Is that the case or is the information, re code etc available somewhere with the free acct?

I may join up anyway as it looks good but I am wondering if by paying their subscription you do get all of the code and schematics etc to actually build the project(s), I dont wish to join if all the required information isnt there.

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 09:05pm 14 Apr 2017
Copy link to clipboard 
Print this post

I think you'll have some work to do on that instructables project - yes it will do what you want out of the box but looking through all the vids, it lacks "polish" - the netmask section in particular evidently accepts settings that won't work and you could end up in an unfathomable mess - it would have been really easy to sanity check it... personally I wouldn't do it with an arbitrary string of octets, but hey, he has a working device and I don't

I have just done a very quick comparison of the ENC28J60 and the Wiznet W5100 (which seems to be a better option for TCP over the W5500). I am very keen to get this sort of thing working with my own code - I don't like to rely on libraries too much.

I think with the W5100 you could be up and running in a very short time - more of the work on the stack is done by the hardware which offloads all/most of the work if you can't be bothered with building mid-level protocols on top of PHY (and it is a LOT of work). The trade off is "only" four open sockets at a time. With the ENC you have no choice, you get MAC and flow control and you have to do everything above that yourself.

The W5100 can be set to handle all the tedious mucking about with the low level stuff and provide sockets out of the box and has "high-level" protocols built in (ICMP,IP,TCP,UDP etc.) so sockets should be a breeze.

I was thinking about making an "adaptor" out of a PIC + GCB to provide an interface module (similar in concept to a USB to Serial mod but with ethernet) but if the wiznet beast is as straightforward as it looks I would really like a pure MMBasic solution. I have one coming for the princely sum of <£4. I will have a concerted push to get something working and publish what I get.Edited by CaptainBoing 2017-04-16
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:49pm 14 Apr 2017
Copy link to clipboard 
Print this post

@Mick

Code attached but untested

2017-04-
15_074857_Arduino-Network-tester-master.zip


Regards
Jman
 
     Page 1 of 2    
Print this page
© JAQ Software 2024