question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Revision b03115 of Raspberry Pi not identified correctly

See original GitHub issue

In priciple this is the same issue as in #1270 that was fixed with #1376 again. I have a new revision that is not correctly detected as Rasperry Pi 4 and hence the same problem again.

Hint: I’ve posted the information below already as a comment at #1376, but @pgrawehr asked me to open a new issue here.

Details: When looking at /proc/cpuinfo I get the following output (cut down to the relevant part, important parts highlighted as bold text):

Hardware : BCM2711 Revision : b03115 Serial : 10000000aeb9cbea Model : Raspberry Pi 4 Model B Rev 1.5

This matches with the data that calling the pinout tool retrieves (again cut down):

Revision : b03115 SoC : BCM2711 RAM : 2GB

The “funny” part here is, that even the offical documentation does not list this board revision (but it states, that “this list is not exhaustive”…)

A quick fix for this issue could be to extend RaspberryBoardInfo.cs, line 166 0x3111 or 0x3112 or 0x3114 or 0x3115 => Model.RaspberryPi4,

But I’d like to question, if the approach to hardcode those regularly updated/supplemented numbers really is a good way? Shouldn’t there better be an alternative (read: extensible) way, that let’s one influence the board detection mechanism? Maybe some kind of delegate or by providing a kind of option pattern?

As @pgrawehr mentioned, the current way is the only reliable way to detect the board type, I want to clarify the concern I’ve written above: I do not question the mechanism in general. I rather question the implementation. Resolving the board’s revision number into the correct board type is basically a dictionary lookup. Currently this is a hard coded switch expression and I doubt this is a good way ragrding the “moving target” of revisions that are beeing released from time to time. Maybe there is no better way to do it at the moment, then I’m fine with it - but I wanted to set you thinking about it… In my eyes there should at least be some kind of extensibility mechanism for that.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
pgrawehrcommented, Feb 21, 2022

@W1zzardTPU

Also the code could be restructured so that people can actually force a specific hardware driver without having to fork the whole repo to make code changes (which is beyond most people’s abilities anyway).

That is possible. Just use .. = new GpioController(PinNumberingScheme.Logical, new RaspberryPi3Driver()).

1reaction
Mr-Bart-Simpsoncommented, Feb 21, 2022

I can follow @joperezr’s point in general. Though, I had some trouble with injecting the driver by myself because it didn’t allow me to set some pins to INPUT_PULLUP - but maybe that was an issue on my side. I will probably re-check that…

On the actual topic, I have to admit, I didn’t have a detailed look into the documentation until now. But after doing so (especially at the structure of New-style Revision Codes), I agree with @W1zzardTPU’s proposal. When having a closer look at e.g. the revision number I get, it disassembles as follows:

0 0 0 000 0 0 1 011 0000 0011 00010001 0100

N O Q uuu W u F MMM CCCC PPPP TTTTTTTT RRRR

0 0 0   0 0 0 1   3    0    3     0x11    4
                            |        |    |
                            |        |    |-> Revision
                            |        |
                            |        |-> Type: 4B
                            |
                            |-> Processor: BCM2711

So maybe the current way to mask with & 0xFFFF is just not good here and the last four bits should be ignored, particularly because the information encoded there isn’t really used for retreiving the model . Hence masking with &0xFFF0 should do the job.

Edited for some clarification: “isn’t really used for retreiving the model” here of course is only related to new-style revision codes. It probably would be the best to distinguish between old- and new-style revision codes in the first place and doing the proposed masking only for the latter…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with Latest Hardware Revision 1.4 for 4B boards
My suggestion is load Raspberry Pi OS on another SD card and see if it experiences crashes in a similar way. If it...
Read more >
i2c not detecting on Raspberry Pi 4 Model B Rev 1.5
I've deduced that the rev code for my board, b03115 . Anyone know if this is the cause of the i2c devices not...
Read more >
I just received a "4B Rev 1.5", what is the Revision 1.5?
Hardware : BCM2711 Revision : b03115 Serial : 100000009da70523 Model : Raspberry Pi 4 Model B Rev 1.5. Searching it should be the...
Read more >
Wifi lost after dist-upgrade on rpi4B rev 1.5 · Issue #217
I just got this rpi4 2GB rev 1.5 and it works well, or did, until I did a dist-upgrade and it lost contact...
Read more >
Screenly OSE do not display after installation - Anthias
We installed Screenly OSE by entering comand "bash <(curl -sL https://www.screenly.io/install-ose.sh)" As requested, I rebooted the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found