Connectivity Ideas?

battletoad

Expert Member
Joined
Mar 10, 2009
Messages
1,461
Reaction score
52
A colleague and I are sending a box out to the bundus where it has to collect data and send back to the lab. The setup is:

1. An HMI system running probably some version of embedded linux (just think dumb pc). Has no network capability, but it dumps data to a usb drive whenever a schedule fires provided said usb drive is attached.
2. Raspberry Pi type A.

What I'd like is to somehow get the data onto the Pi and then send it to a web server.

Problem is, no network and only usb drives. A very ghetto solution which would probably work is to get a 4 port usb hub and connect the HMI, Pi and a flash drive. Procedure would then be:
1. unmount flash drive from Pi
2. Pray hard that HMI picks up flash drive and set it to dumping mode. After time delay/write complete, reset HMI (thereby making flash drive available to Pi)
3. mount flash on Pi, get data and send off.
4. rinse and repeat.

This has to be synchronised perfectly, but that's ok. This is the only solution I can think up apart from requiring additional items. Also, for the most part it is proof of concept.

How dependable is this solution since the flash drive will be arguably unmounted unsafely? Is it even possible?

I've had a look at USB gadget (make file/partition available as flash drive) but the end result is similar.
 
Don't think the USB thing will be easy to get working. The setup that you are proposing is like having 2 pc's connected to a USB hub which is not the way that USB is designed to work. I have seen articles proposing USB for networking 2 computers so it may be possible but will probably involve quite a bit of hacking.

Maybe you can use an arduino with some kind of storage shield to connect to the HMI via USB (or another interface if available on the HMI) and then interface the arduino to the PI or another device for networking. The Arduino hardware isn't a very large extra cost.
 
How big is the data?

Would a 3G/Edge connection work?

Yeah 3G, even edge would work. The box generates csv files and I'll set them to be probably about 100kb.

Don't think the USB thing will be easy to get working. The setup that you are proposing is like having 2 pc's connected to a USB hub which is not the way that USB is designed to work. I have seen articles proposing USB for networking 2 computers so it may be possible but will probably involve quite a bit of hacking.

Maybe you can use an arduino with some kind of storage shield to connect to the HMI via USB (or another interface if available on the HMI) and then interface the arduino to the PI or another device for networking. The Arduino hardware isn't a very large extra cost.

Would the Arduino then pick up as a flash drive on the HMI's side, then have some network capability toward the PI?
 
Why a Rasberry Pi type A? The cost to get a type B is slightly more, but ten you get more memory and a network port.

Then all you need to do is to make a cross over network cable, assign a suitable address to both interfaces and you have networked the 2 with minimal fuss, and save yourself a very complex and finiky setup via usb.
 
Yeah 3G, even edge would work. The box generates csv files and I'll set them to be probably about 100kb.



Would the Arduino then pick up as a flash drive on the HMI's side, then have some network capability toward the PI?

I was kinda sorta vaguely thinking that you could either use a network enabled arduino and do away with the PI or interface from the arduino to a network enabled PI via the GPIO that (I think) the PI has. I missed the bit about the USB gadget earlier but I think either way, all this interfacing is getting a bit messy.

I was also wondering about a couple of other options:

Does the HMI have a COM port? There is a device branded a Tibbo which acts as a network device server for a serial port plus interfacing to a COM port is always going to be easier than USB. If you had a 3G router that you could VPN into, you could then dial in and pull the data directly over the wire to your PC (you install a virtual COM port on the PC) and do away with the PI

Alternatively, is it feasible to do away with the HMI and connect your instrumentation directly to a network enabled PI, Arduino or another single board computer?
 
I found some info about USB host-to-host network cables and USB to Ethernet Adapters HERE.

maybe you can get one of these working with the HMI then ftp to your PI and/or webserver.
 
Last edited:
Why a Rasberry Pi type A? The cost to get a type B is slightly more, but ten you get more memory and a network port.

The HMI has no network interface.

I missed the bit about the USB gadget earlier but I think either way, all this interfacing is getting a bit messy.

Trust me I'm feeling it.

I was also wondering about a couple of other options:

Does the HMI have a COM port? There is a device branded a Tibbo which acts as a network device server for a serial port plus interfacing to a COM port is always going to be easier than USB. If you had a 3G router that you could VPN into, you could then dial in and pull the data directly over the wire to your PC (you install a virtual COM port on the PC) and do away with the PI

Alternatively, is it feasible to do away with the HMI and connect your instrumentation directly to a network enabled PI, Arduino or another single board computer?

I'll have a look at the Tibbo, sounds interesting. The PI has serial ports, but google results infer that functionality is lacking.
I'd like to chuck the HMI and do everything with the PI, but that requires me to first figure out all transmission signals over serial, which for now is not worth the time.

Thanks for all the assistance. I'll do the weird usb thing just to prove it can be done, but then put forward that networking should be top of the list if this solution is to have a later phase.
 
Why a Rasberry Pi type A? The cost to get a type B is slightly more, but ten you get more memory and a network port.

The HMI has no network interface.

I missed the bit about the USB gadget earlier but I think either way, all this interfacing is getting a bit messy.

Trust me I'm feeling it.

I was also wondering about a couple of other options:

Does the HMI have a COM port? There is a device branded a Tibbo which acts as a network device server for a serial port plus interfacing to a COM port is always going to be easier than USB. If you had a 3G router that you could VPN into, you could then dial in and pull the data directly over the wire to your PC (you install a virtual COM port on the PC) and do away with the PI

Alternatively, is it feasible to do away with the HMI and connect your instrumentation directly to a network enabled PI, Arduino or another single board computer?

I'll have a look at the Tibbo, sounds interesting. The PI has serial ports, but google results infer that functionality is lacking.
I'd like to chuck the HMI and do everything with the PI, but that requires me to first figure out all transmission signals over serial, which for now is not worth the time.

Thanks for all the assistance. I'll do the weird usb thing just to prove it can be done, but then put forward that networking should be top of the list if this solution is to have a later phase.
 
Good luck with your project. Be interested to hear how you get it working.
 
1. An HMI system running probably some version of embedded linux (just think dumb pc). Has no network capability, but it dumps data to a usb drive whenever a schedule fires provided said usb drive is attached.

Can you give us specs & links on this device please?
 
UPDATE: decided to ditch the whole USB swapping thing. It works, but I'd rather do something properly even if it is proof of concept. Got an RS485 to usb cable (FTDI type) and will be playing around.

Hyperterminal in XP gives me some hexadecimal type strings preceded by colons. Seems there are plenty of c source codes floating around that can make sense of the signals.

Can you give us specs & links on this device please?

This little guy.
 
That sounds like progress.

I saw an article about this project a few days ago. It is a school project that was entered into a 'How do you use your PI' competition but I thought you might draw some inspiration from it.
 
Top
Sign up to the MyBroadband newsletter
X