Open aalku opened 1 year ago
I added this so I think the board gets detected but there's a new error. I guess the module is not compatible with the kernel or something, right?
I get this:
Traceback (most recent call last):
File "/home/pi/auto-fan.py", line 2, in <module>
import RPi.GPIO as GPIO
File "/usr/local/lib/python3.10/dist-packages/RPi.GPIO-0.7.1-py3.10-linux-aarch64.egg/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
SystemError: initialization of _GPIO raised unreported exception
I'll try to find out where does that unreported error come from.
EDIT:
Ok... sometimes... it works!
It seems the error is thrown randomly like 9 of every 10 tries and the other time it works perfectly.
But if I add a fprint here it works always. 🤷🏻♂️
I don't undersand why.
Ok. I needed to initialize "revision" variable. It needs to have a length, a \0, I guess, It makes sense.
I don't know why prints here or there totally changed the probability of crash but once I fixed that variable then it works as expected.
So the pending thing is if we detect the board this way or how.
Here it is the code if you can make use of it: https://github.com/aalku/RPi.GPIO-Amlogic-BPiM5/commit/beff42442ffb9c4a6780b5bf0f8b4c1570716045
it's only for bananapi amlogic 4.9 kernel ubuntu/debian image, no support third part images like armbian.
Ok. Thanks. I'll leave my fork online then. It works for me and maybe it will help someone else.
https://github.com/aalku/RPi.GPIO-Amlogic-BPiM5
Thanks again. Great job.
Hi! It seems the detection of the board is not working in my board running Armbian 23 with kernel 6.1.30-meson64
I get this error:
Looking at the code I think the problem is that I get no "Hardware" section in /proc/cpuinfo:
I think we could use this, but I don't think if you know a better way:
I might code it myself but I wish to get at least your advice.