User avatar
artiny
Posts: 46
Joined: Fri Feb 12, 2016 10:38 pm
Location: slovakia

RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 10:56 am

Hello

I want to test GPIO pins is still working or burned out ... is existing function for the test in bash, or how can I determinate is working...

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 11:25 am

wiringPi has the pintest utility.

My pigpio has the gpiotest utility.

Both check the basic GPIO functionality. It's best if nothing is connected to the expansion header during the tests.

User avatar
artiny
Posts: 46
Joined: Fri Feb 12, 2016 10:38 pm
Location: slovakia

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 1:28 pm

The wiringpi test is not only for old RPI 1 ?
I tried and this was output (nothing connected only HDMI, and 1 usb for keyboard)

https://www.dropbox.com/s/oglsy6d298457 ... 3.jpg?dl=0


The second, gpiotest - I first installed the library, and I started with sudo pigpiod , after I launched the gpiotest script, but in console is writed

Testing ....

and after second is closed the terminal windows, ....so I cant see the result beacuse is automatically close after 1 second,when start the Testing

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 2:30 pm

You are the second person to mention my gpiotest fails on a Pi3.

Unfortunately it works okay for me.

Code: Select all

$ sudo pigpiod
$ ls
gpiotest
$ ls -l
total 4
-rwxr-xr-x 1 joan joan 2420 Apr 13 15:19 gpiotest
$ ./gpiotest  
This program checks the Pi's (user) gpios.

The program reads and writes all the gpios.  Make sure NOTHING
is connected to the gpios during this test.

The program uses the pigpio daemon which must be running.

To start the daemon use the command sudo pigpiod.

Press the ENTER key to continue or ctrl-C to abort...

Testing...
Write 0 to gpio 14 failed.
Pull down on gpio 14 failed.
Skipped non-user gpios: 0 1 28 29 30 31 
Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
Failed user gpios: 14 
You can see from the above I have managed to kill GPIO 14.

See if this works. It is a more destructive test and you will need to reboot afterwards.

Cut & paste the following command (assumes you have already done sudo pigpiod).

for ((i=0;i<32;i++)); do echo "testing GPIO $i";pigs w $i 0 r $i w $i 1 r $i m $i r pud $i u r $i pud $i d r $i; done

Mine creates the following output on a Pi3.

You should get the same apart from GPIO14 which should look like GPIO15.

Code: Select all

testing GPIO 0
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
testing GPIO 1
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
testing GPIO 2
0
1
1
1
testing GPIO 3
0
1
1
1
testing GPIO 4
0
1
1
0
testing GPIO 5
0
1
1
0
testing GPIO 6
0
1
1
0
testing GPIO 7
0
1
1
0
testing GPIO 8
0
1
1
0
testing GPIO 9
0
1
1
0
testing GPIO 10
0
1
1
0
testing GPIO 11
0
1
1
0
testing GPIO 12
0
1
1
0
testing GPIO 13
0
1
1
0
testing GPIO 14
1
1
1
1
testing GPIO 15
0
1
1
0
testing GPIO 16
0
1
1
0
testing GPIO 17
0
1
1
0
testing GPIO 18
0
1
1
0
testing GPIO 19
0
1
1
0
testing GPIO 20
0
1
1
0
testing GPIO 21
0
1
1
0
testing GPIO 22
0
1
1
0
testing GPIO 23
0
1
1
0
testing GPIO 24
0
1
1
0
testing GPIO 25
0
1
1
0
testing GPIO 26
0
1
1
0
testing GPIO 27
0
1
1
0
testing GPIO 28
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
testing GPIO 29
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
1
-41
ERROR: no permission to update GPIO
1
testing GPIO 30
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
testing GPIO 31
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
-41
ERROR: no permission to update GPIO
0
-41
ERROR: no permission to update GPIO
0
$ 

calleblyh
Posts: 54
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 6:58 pm

[quote="joan"]You are the second person to mention my gpiotest fails on a Pi3.

Unfortunately it works okay for me.

Code: Select all


Okay, I am the third one.
I am running my RPi3 on latest Jessie 4-10. terminal command gpiotest tells me no such command. sudo pigiod nothing. Take it slowly, How do I install the library ? Then step by step instruction, please. How do I proceed ?

Appreciate your understanding...

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 7:13 pm

calleblyh wrote:
joan wrote:You are the second person to mention my gpiotest fails on a Pi3.

Unfortunately it works okay for me.

Code: Select all


Okay, I am the third one.
I am running my RPi3 on latest Jessie 4-10. terminal command gpiotest tells me no such command. sudo pigiod nothing. Take it slowly, How do I install the library ? Then step by step instruction, please. How do I proceed ?

Appreciate your understanding...[/quote][/quote]

sudo pigpiod not pigiod.  It launches the daemon silently.

If [b]pigpiod -v[/b] says command not found then on Raspbian do

[b]sudo apt-get install pigpio[/b]

If [b]pigpiod -v[/b] returns a number it is installed.

You can test by running the command [b]pigs hwver[/b] which should return 10494082 on a Pi3.

User avatar
rpdom
Posts: 12948
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: RPI3 how can I test the GPIO pins is working or dead?

Thu Apr 13, 2017 7:20 pm

calleblyh wrote:I am running my RPi3 on latest Jessie 4-10. terminal command gpiotest tells me no such command. sudo pigiod nothing. Take it slowly, How do I install the library ? Then step by step instruction, please.
To install pigpio, if it isn't already install in Raspbian, do:

Code: Select all

sudo apt-get update
sudo apt-get install pigpio

calleblyh
Posts: 54
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

Re: RPI3 how can I test the GPIO pins is working or dead?

Fri Apr 14, 2017 7:15 am

I have done all according to above ...

Here a screengrab:

[email protected]_SD21:~ $ uname -a
Linux CB_SD21 4.9.21-v7+ #986 SMP Tue Apr 11 17:06:55 BST 2017 armv7l GNU/Linux
[email protected]_SD21:~ $ gpio -v
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi 3 Model B Rev 1.2
* This Raspberry Pi supports user-level GPIO access.
[email protected]_SD21:~ $ sudo pigpiod
[email protected]_SD21:~ $ pigpiod -v
60
[email protected]_SD21:~ $ pigs hwver
10494082
[email protected]_SD21:~ $
[email protected]_SD21:~ $
[email protected]_SD21:~ $ gpiotest
bash: gpiotest: command not found
[email protected]_SD21:~ $
"
So, everything seems to be in order, except gpiotest NOT running. I am outof juice, what's next ? I need your advice.

Thanks

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPI3 how can I test the GPIO pins is working or dead?

Fri Apr 14, 2017 7:24 am

You need to download the test script and unzip it in your directory.

http://abyz.co.uk/rpi/pigpio/code/gpiotest.zip

From the Pi you could enter the following download and unzip commands

wget abyz.co.uk/rpi/pigpio/code/gpiotest.zip
unzip gpiotest.zip

calleblyh
Posts: 54
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

Re: RPI3 how can I test the GPIO pins is working or dead?

Fri Apr 14, 2017 11:33 am

Ok, done all that.

I can see there is the gpiotest file. Looking into the file and howto proceed looks ok. So I do sudo pigpiod.. then running from terminal doesnt work. Next trying to run from GUI lxterminal it looks better like the test is started but I never get any response. I think I'm doing something stupid/wrong, please advice how I should run the gpiotest ?
Thanks again
Calleblyh

User avatar
joan
Posts: 13617
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RPI3 how can I test the GPIO pins is working or dead?

Fri Apr 14, 2017 12:00 pm

calleblyh wrote: Ok, done all that.

I can see there is the gpiotest file. Looking into the file and howto proceed looks ok. So I do sudo pigpiod.. then running from terminal doesnt work. Next trying to run from GUI lxterminal it looks better like the test is started but I never get any response. I think I'm doing something stupid/wrong, please advice how I should run the gpiotest ?
Thanks again
Calleblyh
I just run it from a command terminal.
gpiotest.jpg
gpiotest.jpg (60.69 KiB) Viewed 9194 times

Return to “Troubleshooting”