I was using WiringPi for my various C scripts on my Raspberry Pi CM3 before the library was deprecated. I’ve now switched to a Raspberry CM4S (running Debian GNU/Linux 12) and installed version 3.10 of WiringPi (from GitHub: https://github.com/WiringPi/WiringPi), but I’m facing several issues.
First, when I try to use the "gpio" tool to check the status of my pins, I get the following message: "Oops - unable to determine board type... model: 21".
Then, when I try to use the wiringPi.h library in one of my C scripts, I encounter the following two errors before the program stops:
"wiringPi: ERROR: ioctl get line event of -1 (both) returned error 'Invalid argument' (-1)
wiringPi: ERROR: ioctl get line event of -1 (both) returned error 'Invalid argument' (-1)
Segmentation fault"
The segmentation fault is probably due to a case that I haven’t handled properly, but I’d like to understand what these WiringPi errors mean. My script is too long to share, but I am simply using "pinMode", "digitalWrite", and "wiringPiISR" functions to manage my GPIO pins.
After some research on "ioctl", I found some forums mentioning the I2C bus. I am indeed using the I2C bus on other GPIO pins of my Raspberry Pi, but they are completely separate from the ones used in my script.
Could the I2C bus actually have anything to do with my WiringPi error? Or could it be caused by an installation error, which might also explain the issue with the "gpio" tool?
Thank you in advance for your help.
First, when I try to use the "gpio" tool to check the status of my pins, I get the following message: "Oops - unable to determine board type... model: 21".
Then, when I try to use the wiringPi.h library in one of my C scripts, I encounter the following two errors before the program stops:
"wiringPi: ERROR: ioctl get line event of -1 (both) returned error 'Invalid argument' (-1)
wiringPi: ERROR: ioctl get line event of -1 (both) returned error 'Invalid argument' (-1)
Segmentation fault"
The segmentation fault is probably due to a case that I haven’t handled properly, but I’d like to understand what these WiringPi errors mean. My script is too long to share, but I am simply using "pinMode", "digitalWrite", and "wiringPiISR" functions to manage my GPIO pins.
After some research on "ioctl", I found some forums mentioning the I2C bus. I am indeed using the I2C bus on other GPIO pins of my Raspberry Pi, but they are completely separate from the ones used in my script.
Could the I2C bus actually have anything to do with my WiringPi error? Or could it be caused by an installation error, which might also explain the issue with the "gpio" tool?
Thank you in advance for your help.
Statistics: Posted by Lucas_Isaac — Fri Nov 08, 2024 9:43 am — Replies 1 — Views 23