Propeller and ethernet - please lessen the confusion
pacman
Posts: 327
I've searched (and searched) for my original thread on this, but I can't find them {I'm sure someone smarter than me will find it first go}
I need to generate a magic packet for a remote laptop (this idea was dead for a while, but now it's 'required' again).
Magic packets are 'carried' over UPD. Basically the prop would be powered up, wait 5? seconds, send the magic packet (perhaps three times to make sure the laptop wakes up) then goes to sleep until next power cycle. The prop and the laptop would be the only two items on this network.
What is the current state of play with Ethernet drivers (that will allow the noob {me} easily send a UDP packet)? I'm very lost....
I've had a quick look at Harrisons object (V5.0) but can not see a SendUDPMessage type of function. Am I missing it, is it not there, should I be doing it another way {and call you tell me what that is please}?
Should I be using a different object {which one?}
Additionally if you have designed/built/sell a board that has all the Ethernet/propeller/eprom stuff on it (and could survive in a 55 degree C environment for a long time) then please drop me a line.
Thanks in advance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
I need to generate a magic packet for a remote laptop (this idea was dead for a while, but now it's 'required' again).
Magic packets are 'carried' over UPD. Basically the prop would be powered up, wait 5? seconds, send the magic packet (perhaps three times to make sure the laptop wakes up) then goes to sleep until next power cycle. The prop and the laptop would be the only two items on this network.
What is the current state of play with Ethernet drivers (that will allow the noob {me} easily send a UDP packet)? I'm very lost....
I've had a quick look at Harrisons object (V5.0) but can not see a SendUDPMessage type of function. Am I missing it, is it not there, should I be doing it another way {and call you tell me what that is please}?
Should I be using a different object {which one?}
Additionally if you have designed/built/sell a board that has all the Ethernet/propeller/eprom stuff on it (and could survive in a 55 degree C environment for a long time) then please drop me a line.
Thanks in advance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
Comments
I'm trying to figure out what your application is. All I can think of is some kind of warning system to stop people dozing off while using their laptops in a sauna.
Am I close?
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Forums RSS Feed!
Gadget Gangster - Share your Electronic Projects
If I tell you, I'll have no chance of making my millions....
These laptops run some specialist data logging software - unfortunately they are in remote locations (mostly underground in flameproof enclosures). No PC (even the expensive industrial ones) has survived for more than a couple of weeks - heat/vibration. In the end the decision was made to just use cheap laptops and just replace them every couple of months.
Being underground the laptops can't use batteries.
Power frequently gets turned off.
But the laptops don't autmagically turn back on, hence the reason to wake then up.
A dedicated - easy to use magic packet generator could be used in many areas of my industry.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
At last a thread that I know something about, so that I can contribute to the forum!
It shouldn't be too hard to solve the problems here.
The temperature is not extreme; dissipating the heat in a confined space is a well-known art;
smart power monitoring/backup for controlled startup/shutdown is pretty standard for many applications, eg
transport or infrastructure.
(I scrape a living designing rugged computers/peripherals, mainly for things like CCTV on trains/trams; number-plate
recognition sytems over motorways etc. Others then multiply the prices by big numbers and drive fast cars.)
These kind of harsh environment problems are more mechanical than anything else and it's
straightforward to apply standard 'rugged' solutions. Design/small-batch manufacture of reliable PC's for things
like the military/offshore oil/mining etc is in itself relatively inexpensive.
Tell us more ...
Regards,
T o n y
Post Edited (TonyWaite) : 2/19/2010 10:38:48 AM GMT
The software used is _old_ it runs on XP (with much persuading). Vista = forget it.
In order to communicate with some of the other pieces of gear we use a dedicated (and expensive) PCMCIA card. Whilst I wish we could move to a newer platform the expense (last costed @ 46K AUD just for the software) kinda meant we have sought other methods.
Hence my idea.
One other 'reason' is that I can see a need for this with some home users - Imagine a {guess} $30 kit available from Sparkfun or Gadget Gangster. I personally think they would sell more than a few a year. Yes some of the newer hardware automatically re-powers, but there are quite a few older pieces of kit in the home /very small business that might find such a beasty useful. I have priced a commercial magic packet generator device and I just about fell off my chair when quoted over $3K (for something I reckon the Prop could do standing on it's ear).
I did have a working pro type working on a PIC 4520 on an Olimex board, but that was before I found the Prop.
One other (the biggest?) reason for doing it with a prop - I want to prove it can be done. And when I need to prove it can be done.....well 'logic' may not play a real big part..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
Also, Magic Packets do not require UDP. People tend to use UDP because it is much easier to gain access to UDP sockets than it is to get RAW sockets (RAW sockets generally require root or administrator access on platforms that support it). UDP is also required if you need your packets to be routed between different networks (such as the internet).
Post Edited (Harrison.) : 2/19/2010 4:16:10 PM GMT
www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026447
A little PIC and ENC28J60 might cost less, but will probably cost more by the time they are put on a PCB. Software development will be harder, as well.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Post Edited (Leon) : 2/19/2010 5:10:12 PM GMT
I may get thrown out of here for this, but, you might want to look at the Lantronix Xport Pro line of embedded ethernet devices. They cost a good bit but they have a linux os built into them and are about the size of your thumb. They also have two exposed serial pins that could be used to integrate with other sensors like a usb port or something. Couple that with a memory stick or card and you have a nice data capture device at the linux level.
2: Most bios do have the option to wake-up after power-failure, maybe less common in laptop bios.
3: How about ps2 port, and sending the key code for unsleep button?
You mostly seem to be missing one important line in my third? post.
I want to do it with a prop.
There may be other "better" methods using all sorts of off the shelf / custom developed solutions, but I don't want to use those.
if long term, I can get this working (most people I have spoken too seem to think the 'concept' is an excellent idea {without going into the implementation}) then someone else _might_ just decide they need one and actually want to make their own / copy the design / improve the design 110%.
If that then leads them to the Prop then I will actually feel like _I_ have helped the community grow in some small way. If they start with the concept and then move to AVR/PIC/whatever then at least I've contributed.
I'll definitely learn stuff on the way. Someone else might learn stuff along the way..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
Post Edited (pacman) : 2/22/2010 8:30:51 PM GMT
Thanks for that info - I did not know that UDP was optional. I'm not doing any routing so raw packet driver might work.
Which leads me onto another question - What object in the OBEX allow me raw packet generation? (I'm so not clever enough to do it myself). Is their a good example I can use as a staring point in some demo code somewhere?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
You might have a look at some of the example code using other uC's:
http://rototron.info/default.aspx?Page=WOL/WOL.aspx
At the bottom of that link is his source code. He pretty much opened up his design if you wanted to just get the device up and running (maybe for testing). I'm all for doing things with the propeller, since it leaves plenty of headroom for other features of a board...
I have a few questions, which are pretty much getting worn out here...
1) Why not place a propeller (or pic, picaxe, etc) in with the laptop to short the power button when the power comes back on? It could use the power LED as an input to know if the machine was off.
2) Have you checked the bios as mentioned by jeromelab? Most computers have a power setting to return to "OFF, ON, or LAST" after power is returned to the unit. The presence of that option would make the WOL system obsolete and obscure by any customer's standards.
3) Can you have the propeller replace the computer as a data logger? If you have a prop with web enabled access, why not make it a datalogger in itself and use a computer to parse out the data for display? Harrison's AJAX enabled web server shows random numbers, but can easily be modified to show variables that are read from real world sensors. It is fine in harsh conditions (more so than laptops), and can probably be leveraged to put out a pretty web page with graphs and whatnot using off-site hosted php graphing utils...
Anyway, good luck with your project. I respect that your journey is your destination... many of my projects are like that.
http://forums.parallax.com/showthread.php?p=744035
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.
I'll throw out a couple suggestions. One potential hardware solution, at least for making a proof of concept, is to get a Propeller Platform from Gadget Gangster and to get the PropNET module PCB from me (Gadget Gangster will be carrying the PCB soon as well as kits). The PropNET Module attaches to the Propeller Platform and hosts a WIZnet module for ethernet communication. There are options to add some other goodies to the PropNET module such as an SD card or 1-Wire temp sensor, etc. You could also use the PropNET module with a Prop Protoboard or development board, it just requires some wiring for the I/O. You can read more about PropNET here: http://forums.parallax.com/showthread.php?p=877210
Another potential hardware solution is to use the Hydra EtherX card and one of my Hydra Expansion Card breakout modules to attach the Hydra Card to non-Hydra hardware for prototyping purposes.
As for the driver - there is a solid TCP/UDP SPI based driver for the W5100 that was developed for the Hydra EtherX card. This driver, with modification for the pinout, can be used on the PropNET Module. There is a great chapter in the new Propeller Customizing/Programming book related to ethernet, W5100 and the Propeller. The chapter is a detailed review of the Hydra EtherX driver and includes samples for TCP and UDP. You might want to browse the chapter's code for free on-line.
Soon I hope to have a SPI and a parallel interface driver to release. Both drivers will hopefully implement all they can in ASM, which will make it faster than the current Hydra EtherX card. Of course I may run into some memory constraints, but I will have to figure that out if I get to that point.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
If all you need to do is restart/wakeup the laptop after a shutdown, why don't you use to the prop to watch the data flow and power LED on the laptop. If either of those goes OTL then hold the power button 'down' for the requisite restart period. You might have to make a special connector modification for the power button to the mother board but if you use an ACER 'cheap laptop' the power LED and button contact are on the same connector.
Too simple?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
Where I came unstuck was in interfacing the pins from the Propeller to the RJ45. If anyone solves that using RJ45 with magnetics built-in - or preferably an RJ45 without magnetics - I'd be very grateful as using a Prop alone to generate WOL is something I'd like to have working.
I have had good results when combining the prop with another controller....mostly I have
done it to get the benefit of the props video generators and precision timing.
Perhaps just use a propeller to sense when the laptop is powered down and power it back up.
That would be very easy and the prop can stand incredible temperatures...I saw that video
where they baked it in an oven and it kept on running Just bring the pwr switch leads of
the laptop out to the prop board so it can control it...a quick project.
You said the laptops had no batteries to use during pwr failure? Why not?
I'd use a low power mobo from a netbook and add extra heat sinking and fans where needed and
charge a battery to keep it on.
It would be a simple matter to keep the prop board on a LONG time using a tiny battery...just have
it sense when the ac dies and slow it down to a crawl while occasionally checking for the ac to
come back up...then have it reboot the pc.
I am wondering why the laptop is not remote from the hot underground site.... what sort of sites are these anyway????
I'm so curious.
Coal Mining. No batteries allowed (that are capable of generating enough energy to _create_ a spark) in any are that might be hazardous. Methane gas is flammable between 5% ->15%. Sparks in an explosive environment are _bad_.
In addition the ambient temperature increases by about 1 deg C for every 10m depth. Its not uncommon for the ambient temperature to be 30+, especially in dead headings (headings without ventilation).
The Laptops are in electrical panels that are frequently located in dead headings (so as they are out of the way). Theses panels often control {or have near them} BIG transformers (11KV down to 3K3V down to 1KV) or big pumps. suffice to say you only need to be in these areas VERY briefly to feel sweat on your brow.
The panels themselves are flame-proof (sealed so no air in/out) and thus must rely on convection cooling with the surrounding atmosphere. This means they _could_ have batteries in them, but if any of the panels were opened (a time consuming process) underground then they can't have batteries. Taking a 2+ Ton panel to the surface is a day long process.
As a test once we put a thermometer in one of the panels and it got to over 65degC.
Other panels ALSO get the advantage of being on moving equipment and they get the added _special_ of having the sh_t shaken (whats bigger than a shake?) out of them.
So it's a hot, no batteries, explosion possible, and vibration intense environment. Fun
We have found that our $600 laptop solution survive just as long (or longer) than many of the commercial solutions that cost 10x the price.
Hope that helps...
A $50 Magic packet generator would do nicely... and I _want_ to do with a prop...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================
http://forums.parallax.com/showthread.php?p=851153
you wouldn't happen to have electrical specifications for ethernet signals and the RJ45 magnetics? Best I could find was www.interfacebus.com/Design_Connector_Ethernet.html (near the bottom) Assuming the jack has a 1:1 transformer and ethernet is source impedance terminated, a resistor divider of 200ohm and 200ohm driving the TX+ pin (TX- pin grounded, divides 3.3v to 1.6v with a 100ohm impedance at the jack) should work. Assuming termination at the RX side, I'd switch the resistors to like 33 ohms. Or you could just go red-neck and hook the pin strait to TX+ and over drive the cable. May work out just fine. If the jack transformer is unhappy with 1.6vdc going through it, a large ceramic capacitor could be added between TX- and ground to block the DC component.
And Packman, good luck with the magic packet generator. I can see very good reasons to stick with the Propeller for this even though it's overkill.
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
I can see now how difficult a problem that project is.
I'm not an expert on ethernet protocols and signals but would it be possible to send the packet
you require from another pc and somehow monitor the ethernet signal lines and record the data.
Then play the data back using the prop... not a real ethernet capability...just a dumb recording
that it would play back several times. Maybe this would be enough??? This would be a kind of
cheat... but who would care as long as it worked.
Maybe you could encapsulate the prop circuit in plastic resin along with a battery.... to eliminate
the chance of a spark from the battery? or perhaps immerse it all in a non-conductive liquid like
mineral oil? ..in fact you could immerse the laptop mobo as well...it might help cool it down if the oil
was circulated to an external radiator of some sort.