jperkin / node-rpio

Raspberry Pi GPIO library for node.js
857 stars 123 forks source link

Plus board pinmap detection #131

Closed richardstefun closed 3 years ago

richardstefun commented 3 years ago

During testing on different boards I found out that my B+ board was not detected properly. This solves the 40 pin "Plus" board detection

jperkin commented 3 years ago

Ah interesting, thanks! Could you run the simple script at https://gist.github.com/jperkin/c37a574379ef71e339361954be96be12 so I can fill in the details for the B+?

richardstefun commented 3 years ago

No problem :)

This is the output of that script:

cpuinfo: 0010 dtmodel: socranges: 7e000000 20000000 02000000 os: 10

Also, this is the output of cat /proc/cpuinfo :

processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) BogoMIPS : 697.95 Features : half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7

Hardware : BCM2835 Revision : 0010 Serial : 00000000dc929511 Model : Raspberry Pi Model B Plus Rev 1.2

jperkin commented 3 years ago

Hm, is dtmodel really empty, or did that not paste correctly?

I'm assuming it's the same string as the "Model" line in cpuinfo...

richardstefun commented 3 years ago

Yes, I don't know why it happens. When I run cat /proc/device-tree/model it outputs the "Model" line