MWW1977
Posts: 56
Joined: Thu Feb 19, 2015 3:47 pm

Oops - unable to determine board type... model:14

Tue Jan 22, 2019 10:09 pm

Hi there,

I'm trying to get a module for the MagicMirror to run on my Pi 3A+. This involves 2 HR-SC04 sensors and to connect them to the correct pins I want to run

Code: Select all

gpio readall
. BUt on doin g that I get the notification: Oops - unable to determine board type... model:14

I already found similar items when I Googled for it but not with "model: 14" at the end.
Nonetheless I first updated the wiringPi version to 2.46.... with the same notification.
I installed a fresh wiringPi from the Home/Pi location and run "gpio readall" .... still the same result.

When I use: "gpio -v" I get:

Code: Select all

gpio version: 2.46
copyright.....
this is....
For details ....

Raspberry Pi Details:
Type: Unknown14, Revision: 00, Memory: 512MB, Maker: Sony
* Device tree is enabled.
* --> Raspberry Pi 3 Model A Plus Rev 1.0
* This Raspberry Pi supports user-level GPIO acces.
Does anybody knows what I must do?

drgeoff
Posts: 9071
Joined: Wed Jan 25, 2012 6:39 pm

Re: Oops - unable to determine board type... model:14

Tue Jan 22, 2019 10:19 pm

Possibly wiringpi has not yet been updated to recognise a 3A+.

MWW1977
Posts: 56
Joined: Thu Feb 19, 2015 3:47 pm

Re: Oops - unable to determine board type... model:14

Tue Jan 22, 2019 10:33 pm

drgeoff wrote:
Tue Jan 22, 2019 10:19 pm
Possibly wiringpi has not yet been updated to recognise a 3A+.
AAaaaaahhhhh crap! Just my luck! :shock: :shock: :shock:
Okay...then I will swap the sd card from my Pi 3A+ to my 3B+ tomorrow and check it again.
Hope that's the solution. Will report it tomorrow :D

User avatar
DougieLawson
Posts: 34767
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Oops - unable to determine board type... model:14

Tue Jan 22, 2019 11:52 pm

If you look at https://git.drogon.net/?p=wiringPi;a=co ... 57e9bd533a it's relatively easy to see what changes were made for "PI_MODEL_3P 13". It wouldn't take long to replicate those lines for a PI_MODEL_3AP. It amounts to about five lines of code (including making changes from V2.46 to V2.47).

If the code was on Github, I'd have forked it and done the update for you.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

User avatar
DougieLawson
Posts: 34767
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Oops - unable to determine board type... model:14

Wed Jan 23, 2019 7:57 pm

Here's a diff with the changes needed for WiringPi 2.46:

Code: Select all

--- gpio/readall.c      2019-01-23 19:41:28.656773000 +0000
+++ ../wiringPi/gpio/readall.c  2019-01-23 19:50:36.666773000 +0000
@@ -307,6 +307,8 @@
     printf (" +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+\n") ;
   else if (model == PI_MODEL_3P)
     printf (" +-----+-----+---------+------+---+---Pi 3+--+---+------+---------+-----+-----+\n") ;
+   else if (model == PI_MODEL_3AP)
+    printf (" +-----+-----+---------+------+---+--Pi 3A+ -+---+------+---------+-----+-----+\n") ;
   else
     printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
 }
@@ -353,6 +355,7 @@
   else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) ||
        (model == PI_MODEL_2) ||
        (model == PI_MODEL_3) || (model == PI_MODEL_3P) ||
+       (model == PI_MODEL_3AP) ||
        (model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W))
     piPlusReadall (model) ;
   else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3))
--- VERSION     2019-01-23 19:41:24.226773000 +0000
+++ ../wiringPi/VERSION 2019-01-23 19:45:33.966773000 +0000
@@ -1 +1 @@
-2.46
+2.47
--- version.h   2019-01-23 19:41:28.866773000 +0000
+++ ../wiringPi/version.h       2019-01-23 19:45:45.826773000 +0000
@@ -1,3 +1,3 @@
-#define VERSION "2.46"
+#define VERSION "2.47"
 #define VERSION_MAJOR 2
-#define VERSION_MINOR 46
+#define VERSION_MINOR 47
--- wiringPi/wiringPi.h 2019-01-23 19:41:31.046773000 +0000
+++ ../wiringPi/wiringPi/wiringPi.h     2019-01-23 19:44:56.286773000 +0000
@@ -100,6 +100,7 @@
 #define        PI_MODEL_CM3            10
 #define        PI_MODEL_ZERO_W         12
 #define        PI_MODEL_3P             13
+#define        PI_MODEL_3AP            14

 #define        PI_VERSION_1            0
 #define        PI_VERSION_1_1          1
Six lines of code that need to change.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

MWW1977
Posts: 56
Joined: Thu Feb 19, 2015 3:47 pm

Re: Oops - unable to determine board type... model:14

Wed Jan 23, 2019 8:39 pm

in what file should I change this?

User avatar
DougieLawson
Posts: 34767
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Oops - unable to determine board type... model:14

Wed Jan 23, 2019 8:43 pm

MWW1977 wrote:
Wed Jan 23, 2019 8:39 pm
in what file should I change this?
The diff for each file that changes starts with +++ followed by the file name.
You can feed that into the patch command. It was created with diff -u.

Go and read the fine man pages.
https://linuxacademy.com/blog/linux/int ... and-patch/
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

CPJ
Posts: 1
Joined: Thu Feb 07, 2019 5:14 am

Re: Oops - unable to determine board type... model:14

Thu Feb 07, 2019 6:28 am

Raspberry Pi 3B+ and 3A+ both use BCM2837B0, essentially the same devices, the 3B+ has 1GB RAM, Ethernet and wireless. Both have 17× GPIO, and HAT ID bus

So only small modification is needed to wiringPi, you can do it by hand if you don't want to patch.
  • git clone git://git.drogon.net/wiringPi
  • cd wiringPi
For future reference just search for all: PI_MODEL_3P using grep, and add matching entry for PI_MODEL_3AP

grep -rni "PI_MODEL_3P" *

gpio/readall.c:308: else if (model == PI_MODEL_3P)
gpio/readall.c:357: (model == PI_MODEL_3) || (model == PI_MODEL_3P) ||
wiringPi/wiringPi.h:102: #define PI_MODEL_3P 13[/color]

Then:


update : wiringPi/wiringPi.h:

Code: Select all

  
  #define PI_MODEL_3AP           14
update : wiringPi/wiringPi.c

Code: Select all

const char *piModelNames [16] =
     // replace -  "Unknown14"  with   "Pi 3A+"
run
./build

Your done.

Diff patch

Code: Select all

index 9396c6d..10b5a82 100644
--- a/gpio/readall.c
+++ b/gpio/readall.c
@@ -307,6 +307,8 @@ static void plus2header (int model)
     printf (" +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+\n") ;
   else if (model == PI_MODEL_3P)
     printf (" +-----+-----+---------+------+---+---Pi 3+--+---+------+---------+-----+-----+\n") ;
+  else if (model == PI_MODEL_3AP)
+    printf (" +-----+-----+---------+------+---+---Pi 3A+--+---+------+---------+-----+-----+\n") ;
   else
     printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
 }
@@ -353,6 +355,7 @@ void doReadall (void)
   else if ((model == PI_MODEL_BP) || (model == PI_MODEL_AP) ||
        (model == PI_MODEL_2) ||
        (model == PI_MODEL_3) || (model == PI_MODEL_3P) ||
+        (model == PI_MODEL_3AP) ||
        (model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W))
     piPlusReadall (model) ;
   else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3))
diff --git a/version.h b/version.h
index 242c62b..683e200 100644
--- a/version.h
+++ b/version.h
@@ -1,3 +1,3 @@
-#define VERSION "2.46"
+#define VERSION "2.47"
 #define VERSION_MAJOR 2
-#define VERSION_MINOR 46
+#define VERSION_MINOR 47
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
index 586b148..c7617b7 100644
--- a/wiringPi/wiringPi.c
+++ b/wiringPi/wiringPi.c
@@ -234,7 +234,7 @@ const char *piModelNames [16] =
   "Unknown11", // 11
   "Pi Zero-W", // 12
   "Pi 3+",     // 13
-  "Unknown14", // 14
+  "Pi 3A+",    // 14
   "Unknown15", // 15
 } ;

diff --git a/wiringPi/wiringPi.h b/wiringPi/wiringPi.h
index ae5d647..d4ca6d0 100644
--- a/wiringPi/wiringPi.h
+++ b/wiringPi/wiringPi.h
@@ -100,6 +100,7 @@
 #define        PI_MODEL_CM3            10
 #define        PI_MODEL_ZERO_W         12
 #define        PI_MODEL_3P             13
+#define PI_MODEL_3AP            14

 #define        PI_VERSION_1            0
 #define        PI_VERSION_1_1          1

User avatar
DougieLawson
Posts: 34767
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Oops - unable to determine board type... model:14

Thu Feb 07, 2019 1:38 pm

You shouldn't need to do that stuff. Gordon Henderson has updated the "official" version to V2.48 for RPi3A+.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

Gui Joris
Posts: 4
Joined: Sun Dec 02, 2018 8:59 am

Re: Oops - unable to determine board type... model:14

Mon Feb 11, 2019 12:21 pm

Thank you, Dougie.

I made the changes as suggested, and all is well.

I could, however, not yet find the 'official' 2.48 version Gordon has updated.
Where is this hidden ???

Have a nice day.

Guibert

User avatar
RaTTuS
Posts: 10183
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Oops - unable to determine board type... model:14

Wed Feb 13, 2019 9:46 am

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Gui Joris
Posts: 4
Joined: Sun Dec 02, 2018 8:59 am

Re: Oops - unable to determine board type... model:14

Wed Feb 13, 2019 11:15 am

Thanks.

Found, tried and succeeded.


Have a nice day.

Return to “Troubleshooting”