Introducing PiCockpit and PiDoctor – how to test your Raspberry Pi and get information about it
We strive to make the Raspberry Pi even easier to use for everyone.
To this end today we are introducing our new platform PiCockpit. PiCockpit will be extended over time with useful tools for Raspberry Pi users and administrators.
We start out with two tools to help the Raspberry Pi community:
- PiDoctor – an easy, comfortable and predictable way to test your Raspberry Pi
- DVB-T Tools – mostly of interest to German Pi users, create a definition file for TV Headend to access DVB-T2 (read more about it here, in German)
best of all: both of these tools are absolutely free to use!
What is PiDoctor, which problem does it solve?
As an approved Raspberry Pi reseller (buyzero.de is our online one-stop shop for all your Raspberry Pi needs ) we also have to serve customers with broken Raspberry Pi’s.
We wanted to be able to better diagnose whether it is a software problem or a hardware defect, and make life easier for our customers and, Raspberry Pi users in general.
The premise is that no command line skills should be needed for the user of PiDoctor. And the output should be useful to a person knowing their way around Linux.
Example: Pi Zero W without WiFi
For instance, there are reports of Pi Zero W’s not being able to use the built-in WiFi. Further investigation showed that in some (rare) cases this is due to the OTP field 30 not being set correctly.
OTP are one time programmable fields in the Raspberry Pi SoC, field 30 is set during manufacture and can’t be changed by end users. The OTP field 30 sets the Pi’s identity.
If the OTP field is 00000000 it has not been set, and the Pi reverts to being a “Raspberry Pi 1 B”
In this case the Raspberry Pi needs to be returned to the vendor for an exchange.
Unfortunately, this and other information is hard to access for someone who is not yet comfortable with the command line, and general concepts of Linux.
Instructions and how-to’s take time, and need a support staff which knows about these issues and is able to correctly diagnose them.
We’ve also seen many cases, where the users use the wrong power supplies, bad SD cards, or outdated operating system software.
It happens when new Raspberry Pi’s are introduced – users just assume that the same software will boot on the new Pi. It’s not that easy, unfortunately.
PiDoctor makes life easier
To be able to get a lot of diagnostic information, and make life really easy for the end user, we’ve come up with the idea of PiDoctor.
To use PiDoctor, you follow four simple steps.
Step 1: put PiDoctor on the SD card – no imaging tool needed!
In step one, you download the PiDoctor OS, and extract it to an SD card. No image writing application is needed – PiDoctor can be copied directly using the Windows Explorer.
Windows users will probably prefer the .zip download – whereas Linux users might prefer the .tar.gz package. MacOS users can choose either one (zip might be a bit more convenient).
You should use a fresh SD card, which is FAT32 formatted. We recommend SanDisk SD cards, ideally class 10.
In case you need to format your SD card, we recommend the tool SDFormatter. (Windows / Mac )
This image shows an empty SD card (in my case drive G, your drive letter will probably be different)
Copy the contents the PiDoctor .zip or tar.gz file onto the SD card:
Safely remove the SD card from your drive:
Step 2: Boot the Raspberry Pi with PiDoctor OS
To obtain additional information and test your network connection and HDMI output, I recommend to plug in a LAN cable (connected to your network), and an HDMI cable (connected to your monitor / TV).
Connecting the Pi to your network and/or monitor is optional. In any case you should always use caution when someone asks you to boot an unknown software in your network!
Boot up the Pi by powering it.
It will automatically start the PiDoctor tests.
While the system is booting and the tests are in progress, the ACT LED will blink rapidly and irregularly.
PiDoctor will write the test results to a file on the SD card.
Once the tests are done and it’s safe to unplug your Pi, the ACT LED will start to blink slowly and periodically ( 2 sec on, 2 sec off).
Also, once the tests are done you will hear a sound, if your monitor is capable of playing sounds.
Unplug your Pi, and remove the SD card from it.
Step 3: Upload the test results file
Note: if you just want to test the PiDoctor web interface without booting the PiDoctor OS, you can simply click on the image in the help bar to download a sample results file.
After re-inserting your SD card in your desktop computer a new file should be present:
look for a file which begins with test
The file is of the type “.txt”.
Hint: You can (and probably should!) have a look at it’s contents, to see if you mind uploading the information to PiCockpit.com. For instance, we scan the WLAN to see that the Pi can access WiFi properly.
Click on “Choose File” and upload the test-xxx-yyy.txt file from your SD card (xxx is the test sequence number – it will keep increasing with each test, and yyy is the serial number of the Pi which was tested).
Click on “Get test results (Step 4)”
Step 4: Look at the test results
The overview will show you some basic information about your Pi:
- Pi Model (as indicated by vcgencmd – in case of a mismatch your OTP #30 might be not programmed properly!)
- CPU (ARMv7 is indicated for anything starting from Pi 2), number of cores
- RAM – and split between ARM and GPU (this split is set in config.txt, at the moment we use the defaults for PiDoctor OS)
- Serial number of your Pi
- LAN MAC, state (up means that you are connected to a network)
- WLAN MAC, state should always be down here if WLAN is present on your device
- Temperature of the SoC (measured once during the test run, not continuously)
- The monitor – if any was attached
Using the buttons you can access additional information. There is a lot of information to explore here:
Finally, at the bottom the PiDoctor OS version is indicated. New PiDoctor OS versions will bring more tests with them, so not all test results might be available if you are using an older version.
Tipp: use the newest available version to test your system.
That’s basically it – you have tested your Pi using PiDoctor OS. Congratulations! Look through the additional information tabs to dig into the system configuration and output.
Here’s some more screenshots:
The EDID file is read by the Pi from your monitor. It contains specific information about your monitor intended to support the computer in driving it at the proper resolution, etc.
By clicking on the button “Download EDID” you will be able to download the EDID which was captured by PiDoctor. This works in the Chrome browser, with Internet Explorer, etc. your mileage might vary.
edid.tv offers you the capability to submit the EDID file and analyze it, to read more information about your monitor. For free, and without having to sign up.
Please note that you can submit each file only once – therefore you might want to create an account with them to access the information again before uploading.
Obviously no EDID can be read if no monitor had been attached.
Back to our example
Pi Zero W with hardware trouble (wrong OTP set)
In this case the Pi Zero W identified incorrectly as “Raspberry Pi Model B Rev 2”:
In the extended info about the System we can have a look at the OTP fields:
Click the “System” button
Click on the “vcgencmd” tab, and select “OTP entries (otp_dump)”
We can see here that the field 30 was not set properly – therefore the Pi reverts back to “being” a Pi 1B Rev 2.
This is also the reason that no WLAN is working / activated:
I hope you agree, that this is easier to diagnose using PiDoctor, than instructing less technical users to run vcgencmd otp_dump in the shell, and much much easier if you have to test an array of Pi’s!
More functionality is to come, and I hope that you can contribute your input / feedback about the tool. Any feedback – especially constructive criticism – is welcome.
Want some more info?
Open Sourcing PiDoctor OS / a little background information
We will open source PiDoctor OS in a little while – in fact you can already log into the image and have a look how it’s built. There’s a file called pidoctor.py in /opt/pidoctor/
Login using: root / pidoctor
PiDoctor is built using Alpine Linux, and Python, patched with the most recent Firmware by the Raspberry Pi Foundation. Alpine Linux is used in a read-only configuration, the SD card is briefly mounted read-write to write the test results file, after that it is remounted read-only again.
The information which is collected is controlled almost entirely by /opt/pidoctor/config.json, and is written to a JSON file as test-xxx-yyy.txt on the SD card (xxx being the test run, and yyy the serial of the Pi which was tested).
Testing several Pi’s in sequence
PiDoctor OS was built to be able to easily test several Raspberry Pi’s in sequence. Please note the sequence in which your Pi’s were tested. Then, using the filename of the test results file, you can reconstruct which test results file belongs to which Pi.
The image shows several test files – the same Pi was tested three times in sequence (as can be seen by the sequence numbers 001, 002, 003, and the same Raspberry Pi serial).
You can now upload each file to PiCockpit individually, to obtain the test results.
You can support us by giving feedback about PiCockpit and PiDoctor – which features would you like to see? What do you find cumbersome, hard or unfriendly to use?
We will try to offer as much as possible for free, for the Raspberry Pi Community. To support the continued development of this tool, please consider purchasing your next Pi from us: www.buyzero.de