Page 1 of 1

New wiringPi released

Posted: Mon Dec 12, 2016 3:04 pm
This is version 2.36 (Yes, I know, a jump from the last one, 2.32, but there you go).

Get it via git & self-compile for now (apt-get purge wiringpi first if you have it installed via a package).

It fixes stuff that breaks in kernels 4.8 and onwards. Adds in more little bitty IO things - eg.. reading 1-wire temperature ds18b20 things and some temp/pressure sensors (think; weather station) fixes some potential security issues in the setuid root gpio program and makes user-level gpio access the default, but will fall-back to /dev/mem if that fails (then it will fail hard on you - use sudo)

And other stuff. Enjoy

-Gordon

Re: New wiringPi released

Posted: Sun Dec 18, 2016 9:16 pm
by steven1977
Thx gordon!

Re: New wiringPi released

Posted: Sun Dec 18, 2016 9:44 pm
by ElEscalador
Yes, much appreciated and much looking forward to when it is set up easy to get/install/upgrade for us simpleton that still need our hands held. Plans to include this version with a future Rasbian release?

Re: New wiringPi released

Posted: Sun Dec 18, 2016 10:09 pm
ElEscalador wrote:Yes, much appreciated and much looking forward to when it is set up easy to get/install/upgrade for us simpleton that still need our hands held. Plans to include this version with a future Rasbian release?
I think it already is easy to get/install/upgrade. Two commands to install or upgrade I think it's easy enough. It's all documented here: http://wiringpi.com/download-and-install/

I'll see if I can get it pushed into Raspbian, but I really have no control over that.

But worry not - if you want it simple, I'll be releasing a new version of my RTB BASIC early in the new year.

-Gordon

Re: New wiringPi released

Posted: Tue Dec 20, 2016 10:40 pm
by RaspISteve
Perhaps a question for Gordon,
Sir, started using your WiringPi a year or so back then got distracted. A question I did ask at the time was about what to do when I've done with my WiringPi related application.

My question at the time was about any issues on leaving WiringPi running, certainly with interrupts active seems unnatural to just 'walk away'. During development is there a safe way to detach ISRoutines then re-attached at then next program itteration without confusing the OS.

Similarly if its been running already any problems with a second initialisation.

Is there s simple way to close WiringPi or would a reboot be required.

Re: New wiringPi released

Posted: Tue Dec 20, 2016 10:48 pm
by DougieLawson
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Eh? WiringPi is a C/C++ library that gets linked into your program. There's no runtime component.

Re: New wiringPi released

Posted: Tue Dec 20, 2016 10:51 pm
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Everything is closed when your program exits. There is no need for a "close" operation.

-Gordon

Re: New wiringPi released

Posted: Wed Dec 21, 2016 11:27 pm
by RaspISteve
DougieLawson wrote:
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Eh? WiringPi is a C/C++ library that gets linked into your program. There's no runtime component.
[email protected] wrote:
RaspISteve wrote: Is there s simple way to close WiringPi or would a reboot be required.
Everything is closed when your program exits. There is no need for a "close" operation.

-Gordon
Guys, Thanx. Nearest I got to a proper OS was MSDos and TSRs then embedded where I owned everything but always felt the need to tidy up after.
Never like loose ends (they can bite back) hence the question.

Re: New wiringPi released

Posted: Thu Dec 29, 2016 3:55 pm
by dobova86
Hi Gordon,
I get this warnings during build:

Code: Select all

...
GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
gpio.c: In function ‘doI2Cdetect’:
gpio.c:360:30: warning: unused parameter ‘argc’ [-Wunused-parameter]
 static void doI2Cdetect (int argc, char *argv [])
                              ^
gpio.c: In function ‘doExports’:
gpio.c:391:28: warning: unused parameter ‘argc’ [-Wunused-parameter]
 static void doExports (int argc, char *argv [])
                            ^
gpio.c:391:40: warning: unused parameter ‘argv’ [-Wunused-parameter]
 static void doExports (int argc, char *argv [])
                                        ^
gpio.c: In function ‘doReset’:
gpio.c:717:28: warning: unused parameter ‘progName’ [-Wunused-parameter]
 static void doReset (char *progName)
                            ^

At the end I've no gpio utility done...
Probably I have some wrong flag for gcc ?
What's wrong?

EDIT: Sorry, I had some user problem in permission settings on /usr/local/bin dir...

Re: New wiringPi released

Posted: Fri Dec 30, 2016 4:56 am
dobova86 wrote:Hi Gordon,
I get this warnings during build:
Warnings are not errors.

-Gordon

Re: New wiringPi released

Posted: Fri Jan 13, 2017 2:48 pm
by stevieb9
Thanks Gordon!

On the website, you state: "Fixed the spurious first interrupt issue with the “ISR” code...". Can you expand on that?

I'm curious to know whether it fixes an issue I had while wrapping wiringPi for use with Perl. Here's the XS code with comments that describe the issue I was having, and the workaround:

Code: Select all

char *perl_callback; 
PerlInterpreter *mine;
int first_call = 1;

void interruptHandler(){
    PERL_SET_CONTEXT(mine);
 
    dSP;
    ENTER;
    SAVETMPS;
    PUSHMARK(SP);
    PUTBACK;
 
    // for some reason, the very first interrupt always calls the handler
    // twice. This code skips the very first erroneous call
 
    if (first_call == 0){
        call_pv(perl_callback, G_DISCARD|G_NOARGS);
    }
    else
        first_call = 0;
 
    FREETMPS;
    LEAVE;
}
Is this the issue you mentioned, or was there another one I may not have been aware of?

For completeness, the code referenced is from my [url https://metacpan.org/pod/release/STEVEB ... gPi/API.pm]WiringPi::API[/url] Perl distribution.

Keep up the great work!

Re: New wiringPi released

Posted: Fri Jan 13, 2017 7:37 pm
stevieb9 wrote:Thanks Gordon!

On the website, you state: "Fixed the spurious first interrupt issue with the “ISR” code...". Can you expand on that?
I fixed the spurious first interrupt issue with the “ISR” code.. not sure what more I can say, really. There was an issue whereby when you used the ISR code, you got a spurious interrupt - just once. I fixed it.
I'm curious to know whether it fixes an issue I had while wrapping wiringPi for use with Perl. Here's the XS code with comments that describe the issue I was having, and the workaround:
Why not test it and see... I don't do perl anymore.

-Gordon