Sending remote data to Arduino - Suggestions needed!

Hi all,

I have what is a perplexing challenge for me and hopefully an easy answer for someone else!!!

I need to send a small amount of data to an arduino continuously which is then displayed on an lcd. I have done this a few times, but am now a bit stuck on on this particular project.

I need to send the data, which is the output of a few commands, from a Linux server that is quite stripped down, so a lot of luxury utilities simply aren’t there.

It doesn’t have usbserial available so I can’t use straight tty commands, I can probably use the actual serial port, but not very confident it will work either.

I’m currently working on the idea of using an Ethernet shield, then passing a curl request from the Linux box to the arduino, something like curl http://133.123.233.123/?data

Sampling every few seconds is fine. The arduino can be physically connected to the Linux server if needed.

Thoughts/similar projects/tutorials on how to approach that sort of thing? I’m sure there are better ideas that what I have had so far!

Cheers,
Pazu

Curl sounds plausible enough. Take a look at the ethernet client examples in the reference - set one up to echo data to the serial port and then figure out how to parse what you got. Strtok will likely come in handy in that regard.

pazu:
I need to send the data, which is the output of a few commands, from a Linux server that is quite stripped down, so a lot of luxury utilities simply aren't there.

It's hardly a big job to add them.

I reckon this would be easy to do with Python.

...R

Thanks Bill, playing with Curl now, will see what I can come up with, least I can validate that idea as a possible!!

Robin, I'll look into python, however a simple bash script would be my preference at this stage (I'm trying to keep the impact on the system to a minimum amount). I have no doubt it should be easy enough to add other apps on, however I have tried to do a few basic ones previous (like iftop and ifdata), and they simply don't work/I'm not skilled enough to trouble shoot. The linux server in question is a security appliance running as a router/firewall, so by design it is VERY locked down. The other side of it is if I modify anything on the base OS, I lose vendor support immediately, hence why I"d like to do it with basic tools that are already on the system (which is why USBSerial is out at the moment), Curl is on there, so I can use that with a basic script to get the data I need.

Open to any other ideas :slight_smile:

pazu:
however a simple bash script would be my preference at this stage

There have been a few Threads on the Forum about unsuccessful attempts to use bash scripts to communicate with an Arduino. I don't know enough about bash to offer any suggestions apart from using a script to run a Python program.

Look through the interfacing section of the Forum

...R

https://www.google.com/search?q=bash+site:forum.arduino.cc

Disable auto-reset. Redirect echo to /dev/ttyACM0.


Or, get out your compiler...