So I have assembled the entire OpenFlexure high-res microscope and included the SD card with the custom OS image in the raspberry pi 5 4GB. Unfortunately, there does not seem support for the Raspberry Pi 5.
I was wondering whether anyone encountered a similar problem and overcame it or has ideas to solve this. Is there software support for raspberry pi 5 planned and any way I could contribute to the software development?
Unfortunately the Pi5 introduced some changes that are not compatable with the OpenFlexure OS. The installation notes specify Pi3 or 4. Pi2 are still compatable with the software I think but are significantly more sluggish. We only have electronics drawers to fit Pi3 and Pi4.
Similarly the Pi camera 2 is the only camera that is compatable with the software.
One of the key things in the robotic microscope is integration of the camera feed, including the flat field and lens shading. This allows the fast autofocus to work, and gives flat colour images that tile well. We were using picamerax, but the underlying Pi has moved to picamera2. Porting autofocus and lens shading to the new Pi software stack is in progress with the server version 3. There are some notes on that on another thread: Developing v3 of the OpenFlexure software .
As @WilliamW has said, the “current” (horribly out of date) image is based on Buster, which won’t work. I have a build based on Bookworm (i.e. the current one) and v3 of the server software - this is not yet an alpha, but I hope to be able to share something soon. In fact, I spent this morning sorting out some build server stuff that’s required to do that.
v3 of the software is based on picamera2 and the libcamera software stack, so it should in principle be compatible with Pi 5. However the Pi 5 has a different camera stack (it’s still using libcamera but I think a chunk of the code in the Broadcom blob - i.e. the stuff that’s not open source - is different. That results in different handling of black level and camera modes.
The conclusion is that, even on the new image, I don’t expect Pi 5 will work out of the box. However, once that new image is out, in principle it should be possible to fix it, and the changes ought to be contained to labthings-picamera2. If you’re keen to pitch in and help there, hopefully that’s feasible once I’ve got a build of the new image in a shareable state. If you want to short-circuit my build server, you can build a Bookworm-based image using the OS Customiser. I believe this works, but it’s not been tested much yet - I’m not trying to be secretive, but this image definitely isn’t ready to be unleashed on the wider community yet!
Thank you so much for your fast & detailed reply, @WilliamW and @r.w.bowman! I highly appreciate such active community.
My quick fix was ordering a Raspberry Pi 4B and it works beautifully
My first priority to gain further understanding, fix core issues (Sangaboard v5 connected but motor/light not working), reprint some parts that encountered damages during my assembly.
Then, I am very happy to contribute. I suggest by starting with testing the v3 server version initially with the raspberry pi 4 and then pi 5. From there, it will be clearer what issues are and what’s required for development / writing automated tests.
My very first action step will be reading the current source code and "short-circuit your build server via the [OS Customiser] building next week (I’m travelling this week)
Pi5 will probably be some time. The big worry is that in a few weeks Richard will be on paternity leave for a few months. I still don’t really have much time to look into OpenFlexure software right now and am also probably not the best person to be hacking into the nuts and bolts of the software.
Our current phase of work is to try to make sure that more of us understand the software and the roadmap, as we move towards v3 which should support the Pi5.
We now have little diagram which helps me understand how the repos fit together:
Also, it is worth noting that it turns out that the v3 OS that was compiled doesn’t use the v3 branch. It instead uses a branch called blood_stack, which is most of the v3 changes plus a lot of new features taking high quality scans of blood smears which would be needed for malaria diagnosis.