long distance relay

Post details of your projects here.
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

long distance relay

Post by YahooArchive »

I came up with a solution that seems rather unique to me, just wondering if
anyone has seen or done the like...

I needed remote access to a few input pins, located about 1 km away, accessible
via long-range WiFi. The WiFi radio is an Ubiquity Bullet2. I could've used an
ARMWeb, but that would've also necessitated a switch, as there's another
connected host (an IP cam). Further, it's all solar powered, low-consumption
switches are expensive (on top of the cost of an ARMWeb) and lastly, I already
had an extra SuperPro on hand, so...

The Bullet2 has embedded Linux running on it, it has a serial port inside it's
case, and that port is a dedicated TTY. [Here's the seemingly unique part:] I
connected that port to UART1 on the SuperPro, and coded the SuperPro to login to
the 'nix shell, and execute shell commands to effect communication with network
hosts.

Specifically it executes trigger_url when the state of an input pin changes, to
transmit the event to my PC. The URL passed to trigger_url references an ASP
script on my PC, that script dumps a file in a specific directory to log each
request, and a .NET app using a file system watcher component delivers the
events to my desktop.

A 2-way connection is easily possible, by executing nc (short for netcat) one
option of which is to make it listen on a specified port, a connection to which
becomes a bi-directional stream between the TTY and the network-connected host.
The challenge with that angle involves recovering from connectivity drop-outs;
the code on the SuperPro is largely on it's own in that case. Since this would
make outputs on the SuperPro available as well as inputs, I considered
re-purposing the output on the cam to reset them all if the SuperPro quit
responding... but that's a less than elegant solution.

I was hoping to use nc's UDP option, rather than trigger_url, that would've made
the road back to my desktop somewhat less convoluted, but the version of nc was
pared-down for size, and that feature was eliminated. I could write a UDP
utility and add it to the Bullet2 firmware (which is open source.) I could also
write something like trigger_url that dumps the web response to stdout/tty,
which would give the SuperPro a way to query the PC for status or pending
command requests. But it suits my needs as is, for now anyway.

To be sure, the UDP functionality on the ARMWeb offers a cleaner way to transmit
outbound events and accept inbound commands, fron an SBC. Otoh, the hardware
cost of interfacing with network hosts via TTY is a tiny fraction of the
more-conventional alternatives. (SuperPro is overkill, a regular Pro would
easily suffice.) And add to that the high cost of a suitable network switch,
and extra capacity for solar-powered locations -- a 5 watt load translates to
about 30-50 watts of panel output capacity (depending on latitude.)

So again the question: unique and innovative, or been done a million times by
high school kids for the science fair? (I would create a poll, but it's so
demoralizing when zero people respond... which seems to happen almost every
time.)

In any case, if anyone is interested in this project I'll post the sources.


-MM



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: long distance relay

Post by YahooArchive »

In a word, No

It proves there's more than one way to skin a cat.

What are you using for antennas??

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: long distance relay

Post by YahooArchive »

Cheap 12 dBi panels, $20 + change from Streakwave. I have another pair of them
providing a point-to-point link across almost 5 km (using higher-gain antennas)
that sustains 11 mbits actual through-put (not merely link speed; it's 802.11g,
link speed fluctuates between 36 and 54.)

(Sorry for going OT, to everyone that's less than interested.)


-MM

Post Reply