LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-31-2017, 05:16 PM   #1
k8zgw
LQ Newbie
 
Registered: Jan 2017
Posts: 5

Rep: Reputation: Disabled
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
 
Old 01-31-2017, 05:43 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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.

Last edited by suicidaleggroll; 01-31-2017 at 05:45 PM.
 
1 members found this post helpful.
Old 01-31-2017, 07:52 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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/
 
Old 02-01-2017, 11:32 AM   #4
k8zgw
LQ Newbie
 
Registered: Jan 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
NO !

This is a six meter 2 channel Master II

two relays,

#1 NO = channel 1
operated = channel 2

#2 operated = PTT
 
Old 02-01-2017, 05:36 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu MATE 16.04 LTS Officially Released for Raspberry Pi 3 and Raspberry Pi 2 LXer Syndicated Linux News 0 04-26-2016 03:20 AM
LXer: Raspberry Pi vs. Raspberry Pi 2 vs. CuBox: performance comparison LXer Syndicated Linux News 0 05-26-2015 09:33 AM
LXer: Raspberry Jams: why Raspberry Pi is going back to school LXer Syndicated Linux News 0 10-25-2013 12:20 PM
LXer: Raspberry Pi becomes Raspberry PC via Mini-ITX carrier LXer Syndicated Linux News 0 07-17-2013 01:20 PM
LXer: Enter the element14 Pi Day ??Raspberry RoadTest? Challenge for a chance to win a Raspberry Pi c LXer Syndicated Linux News 0 03-08-2012 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration