Set PTT with Terminal or Script

Ice/DBus, Web-Interfaces, Management tools

Re: Set PTT with Terminal or Script

Postby hamie » Sun Jan 24, 2016 7:05 pm

I would like to get a copy if possible for use on my local ham repeater. I've got a rpi2 laying around!
Last edited by hamie on Thu Apr 21, 2016 6:46 pm, edited 1 time in total.
hamie
 
Posts: 7
Joined: Sun Jan 24, 2016 5:12 pm

Re: Set PTT with Terminal or Script

Postby stephensworld » Mon Jan 25, 2016 2:07 am

@hamie: I send you an email
stephensworld
 
Posts: 8
Joined: Sun Oct 04, 2015 2:44 pm

Re: Set PTT with Terminal or Script

Postby Grandpa-G » Fri Feb 26, 2016 2:05 pm

Could I contact you for some private conversations about your work?

stephensworld wrote:I did the following steps

you need to install some development packages:
Code: Select all
apt-get install build-essential pkg-config qt4-dev-tools libqt4-dev libspeex1 \
                libspeex-dev libboost-dev libasound2-dev libssl-dev g++ \
                libspeechd-dev libzeroc-ice-dev ice-slice libpulse-dev slice2cpp \
                libcap-dev libspeexdsp-dev libprotobuf-dev protobuf-compiler \
                libogg-dev libavahi-compat-libdnssd-dev libsndfile1-dev \
                libg15daemon-client-dev libxi-dev

for more information please see http://wiki.mumble.info/wiki/BuildingLinux

Code: Select all
git clone https://github.com/mumble-voip/mumble.git


you have to edit the source files as shown above.

on the raspberry 2 I compiled with the following commands

Code: Select all
qmake -recursive main.pro CONFIG+="qt4-legacy-compat no-g15 no-server"
make


If you have any further questions don't hesitate to contact me.

The solution is great. We have many users on the repeater with mumble. Our next step is to connect two or more repeater.
Grandp-G
Here from the beginning.
Grandpa-G
 
Posts: 6
Joined: Fri Feb 26, 2016 1:31 pm

Re: Set PTT with Terminal or Script

Postby hamie » Mon Apr 18, 2016 7:44 pm

Anyone compile this on the RPI3 yet?
hamie
 
Posts: 7
Joined: Sun Jan 24, 2016 5:12 pm

Re: Set PTT with Terminal or Script

Postby hamie » Mon Mar 13, 2017 4:58 am

Can you past your MainWindow.cpp on pastebin?
I'm having trouble with where to put
Code: Select all
QTimer *gpioPollingTimer = new QTimer(this);
connect(gpioPollingTimer, SIGNAL(timeout()), this, SLOT(onGpioPoll()));
gpioPollingTimer->start(100); // 100ms polling Intervall

did you have to edit the UI and add a timer in?
hamie
 
Posts: 7
Joined: Sun Jan 24, 2016 5:12 pm

Re: Set PTT with Terminal or Script

Postby sm0ohc » Tue Mar 28, 2017 11:17 am

Is there a possibility to also have a copy of that image for a PI2 to our clubs repeater ?

73:s de K.
sm0ohc
 
Posts: 1
Joined: Tue Mar 28, 2017 11:03 am

Re: Set PTT with Terminal or Script

Postby Intrax » Sun May 28, 2017 12:35 am

Good day,

I found this topic while searching for information for my project.
'stephensworld' finished the issue where i was looking for.
I turned my Raspberry into an programming environment as described here.
I can't get the job done because i think I'm missing some information about editing the source files.
When i start compiling, there are errors.
Perhaps it has to to with versions because this topic is 1.5 years old, or I'm doing something wrong with the editing part of the source files. I'm not a programmer so i just follow the steps written by 'stephensworld'.
I did not succeed. Can someone rewrite the steps so it will match with the current software versions?
Otherwise is there an option to get a compiled version of Mumble client for Raspberry (with PTT signaling on GPIO interface).

Best regards,
Alex
Intrax
 
Posts: 5
Joined: Sun May 28, 2017 12:11 am

Re: Set PTT with Terminal or Script

Postby Intrax » Tue May 30, 2017 9:47 am

Hi,
Is it possible someone with knowledge rewrites this handout?
It is not clear where to made the changes exactly (right place in source). When i try to compile i get much errors.
I'm not a programmer so i can just follow the steps written by 'Stephensworld'.
This post is 1,5 years old so i think it is not usable for current versions of mumble. Is it?
I hope someone can help to make a Mumble PTT radio (GPIO port signal) for Rasbian (Pi2 and 3)
Perhaps there is a compiled version available somewhere. One i can install on Raspbery Pi2/3.

Best regards,
Alex
Intrax
 
Posts: 5
Joined: Sun May 28, 2017 12:11 am

Re: Set PTT with Terminal or Script

Postby hamie » Sun Jun 04, 2017 1:32 pm

Mine is a bit different on the the functions but here is some code blocks you can find to get it working
MainWindow.cpp
Code: Select all
void MainWindow::setupGui()  {
   updateWindowTitle();
   setCentralWidget(qtvUsers);
   setAcceptDrops(true);
QTimer *gpioPollingTimer = new QTimer(this);
connect(gpioPollingTimer, SIGNAL(timeout()), this, SLOT(onGpioPoll()));
gpioPollingTimer->start(100); // 100ms polling Intervall

Code: Select all
void MainWindow::destroyUserInformation() {
   UserInformation *ui = static_cast<UserInformation *>(sender());
   QMap<unsigned int, UserInformation *>::iterator i;
   for (i=qmUserInformations.begin(); i != qmUserInformations.end(); ++i) {
      if (i.value() == ui) {
         qmUserInformations.erase(i);
         return;
      }
   }
}
void MainWindow::onGpioPoll() {

 static bool pttGpioPrevState = false;
 static bool pttGpioState = false;

 QList<ClientUser *> talkingUsers = ClientUser::getTalking();
 // For someone else to be talking we have to be connected to the
 //server and there must be at least one person talking that isn't ourselves
 static bool pttPrev = false;
 const bool someoneElseTalking = g.sh && !(talkingUsers.empty() ||
 (talkingUsers.size() == 1 && g.uiSession ==
 talkingUsers.first()->uiSession));

 if (someoneElseTalking) {
        if(!pttPrev){
                system("echo 1 > /tty/pttctrl");
                pttPrev=true;
        }
 }

if(!someoneElseTalking){
        if (pttPrev){
                system("echo 0 > /tty/pttctrl");
                pttPrev=false;
         }
}

}
hamie
 
Posts: 7
Joined: Sun Jan 24, 2016 5:12 pm

Re: Set PTT with Terminal or Script

Postby Intrax » Sun Jun 04, 2017 10:16 pm

Thank you very much Hamie,

Can you tell me something about 'main.cpp'?
Where to place these parts exactly?

#include <wiringPi.h>
.....
wiringPiSetupSys();
pinMode(10,OUTPUT);
pinMode(25,INPUT);

In the source, #include statements are between " " instead of < >
Intrax
 
Posts: 5
Joined: Sun May 28, 2017 12:11 am

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests