Author: linga51

GPIO library - WiringPi

[Copy link]

2

threads

19

posts

110

credits

Registered member

Rank: 2

credits
110
Published in 2016-2-22 18:14:22 from mobile | Show all floors
when i compile RFSniffer with pin 16 (physical pin 40) then it falls back to gpio in sysfs mode. what pin did you use to test it?

2

threads

19

posts

110

credits

Registered member

Rank: 2

credits
110
Published in 2016-2-23 16:44:56 from mobile | Show all floors
Edited by apocalyps at 2016-2-25 03:47

Did some testing but on some pins it falls back to sysfs.

Edit:
@Werecatf
Tried your code but also got the following message

  1. gpio: Unable to open GPIO export interface: No such file or directory
  2. wiringPiISR: unable to open /sys/class/gpio/gpio199/value: No such file or directory
Copy code

EDIT:

Ok i had some things not correctly in my kernel.

1

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
Published in 2016-2-26 17:47:04 | Show all floors
@apocalyps

What was the problem with the kernel?
I have the same problem

2

threads

144

posts

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-2-26 17:50:14 | Show all floors
His kernel was not built with the GPIO sysfs-interface enabled, he had to enable the setting and re-build the kernel.

0

threads

6

posts

114

credits

Registered member

Rank: 2

credits
114
Published in 2016-2-26 18:44:57 from mobile | Show all floors
WereCatf, please can you give us some info on how rebuilt the kernel with sysfs interface enabled?

2

threads

144

posts

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-2-26 19:46:10 | Show all floors
domcat replied at 2016-2-26 18:44
WereCatf, please can you give us some info on how rebuilt the kernel with sysfs interface enabled?

When doing menuconfig the appropriate setting can be found under Device Drivers -> GPIO Support -> sysfs interface, or use CONFIG_GPIO_SYSFS=y if manually editing .config.

If you meant you don't even know how to build a kernel in general: no, that's not something a beginner should be doing in the first place and I don't want to write such a long guide -- way too much work. Use an image where it's already enabled by default instead, like e.g. Armbian.

1

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
Published in 2016-2-26 20:02:04 | Show all floors
@WereCatf
Thanks for the explanation!

You can tell which ports function works wiringPiISR.
I have seen the information that it only works on ports PA7, PA8, PA9, PPA10, PG6, PG8
example here https://github.com/ua3nbw/gpiokey/blob/master/wpi.c

2

threads

144

posts

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-2-26 20:07:56 | Show all floors
All PA- and PG-pins should be able to work with interrupts, at least according to the H3 - specsheet.

1

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
Published in 2016-2-26 21:05:58 | Show all floors
@WereCatf
Thanks you!

0

threads

6

posts

114

credits

Registered member

Rank: 2

credits
114
Published in 2016-2-26 22:00:32 from mobile | Show all floors
Ok thanks.
Reply

Use magic report

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list