Hi,
das Problem ist bekannt.
Dafür ist eine kleine Modifikation nötig der WiringPi.c
Lad dir Wirinpi runter:
code:
- git clone https://github.com/tumugin/WiringOP.git -b h5
dann musst du in den Ordner "WiringPi", die Datei WiringPi.c editieren. (sudo nano /WiringOP/wiringPi/wiringPi.c)
Finde die Funktion
int isH5(void);
code:
- int isH5(void)
- {
- FILE *cpuFd ;
- char line [120] ;
- char *d;
- if ((cpuFd = fopen ("/proc/cpuinfo", "r")) == NULL)
- piBoardRevOops ("Unable to open /proc/cpuinfo") ;
- while (fgets (line, 120, cpuFd) != NULL)
- {
- if (strncmp (line, "Hardware", 8) == 0)
- break ;
- }
-
- fclose (cpuFd) ;
- if (strncmp (line, "Hardware", 8) != 0)
- piBoardRevOops ("No "Hardware" line") ;
-
- for (d = &line [strlen (line) - 1] ; (*d == '\n') || (*d == '\r') ; --d)
- *d = 0 ;
- if (wiringPiDebug)
- printf ("piboardRev: Hardware string: %s\n", line) ;
-
- if (strstr(line,"sun50i") != NULL) //guenter von sun7i auf sun8i
- {
- if (wiringPiDebug)
- printf ("Hardware:%s\n",line) ;
- return 1 ;
- }
- else
- {
- if (wiringPiDebug)
- printf ("Hardware:%s\n",line) ;
- return 0 ;
- }
Ersetzen durch:
code:
- int isH5(void)
- {
- return 1;
- }
und dann compilieren und installieren:
code:
- cd WiringOP
- chmod +x ./build
- sudo ./build
Das Problem ist es wird keine Hardwarezeile ausgegeben. Deshalb funktioniert WiringPi so nicht. Da wir aber wissen, dass es ein H5 Prozessor ist, können wir die abfrage direkt als "wahr" deklarieren.
Hab es unterwegs gemacht. Hoffe es klappt auch. ;)
LG