LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Raspberry Pi ?? (https://www.linuxquestions.org/questions/linux-newbie-8/raspberry-pi-4175598666/)

k8zgw 01-31-2017 05:16 PM

Raspberry Pi ??
 
Not sure if this is the 'RIGHT PLACE" to ask this question, but
What is a Raspberry Pi but a Linux computer??

My project involves two R-Pi's connected back to back via the internet.

R-Pi 1 will have a usb sound "card" and two switches connected to the GPIO.

R-Pi 2 will also have a usb sound "card" and two relays connected to the GPIO.

I need to pass audio both ways between the Pi's as well as control the relays on Pi 2 from Pi 1.

This seems like a simple project, yet I can't seem to get any info from various Raspberry Pi forums.

BTW, the reason for this is to remote an amateur radio station at my friends house, about 39 miles away.

I don't want to "re-invent the wheel", just looking for ideas.

Thanks

Don Ritchie, K8ZGW

suicidaleggroll 01-31-2017 05:43 PM

How much software and/or networking knowledge do you have?

If it were me, I would make RPi 2 the "server" and RPi 1 the "client" (since RPi 2 is remote). I'd write a little C program to open up a TCP/IP port on RPi 2, listen for commands, and take the appropriate actions with the relays. I'd write another little C program to connect to said port from RPi 1 and issue commands based on the switches. They would be able to freely communicate with each other using whatever handshaking or command structure you want over the TCP/IP socket.

Since RPi 2 will be remote, you can use one of the RPis to autonomously open an SSH tunnel to the other one to allow the TCP/IP connection through an encrypted and protected SSH tunnel. Unless you can give a static public IP to one of the RPis, you'll likely still need to set up port forwarding in the router on one of the ends, and possibly set up a Dyn DNS domain so you don't have to worry about DHCP updates from the ISP.

As for the audio, I don't know the details of these sound cards, but I'm sure there'd be a way to get them to pass data to each other through either the same or a separate TCP/IP socket or SSH tunnel as above.

michaelk 01-31-2017 07:52 PM

There is lots of software and ways to do it. About the only thing specific I have seen for the pi is echolink but it should be possible. Is this for hf or vhf/uhf? Does the radio have a remote control port?

http://www.dxzone.com/how-to-remote-your-radio/

k8zgw 02-01-2017 11:32 AM

NO !

This is a six meter 2 channel Master II

two relays,

#1 NO = channel 1
operated = channel 2

#2 operated = PTT

jefro 02-01-2017 05:36 PM

Maybe ssh or other remote into the one that has ptt and run program to activate relay to kick in switch.


All times are GMT -5. The time now is 02:51 PM.