I took the microscope apart to clean the camera sensor.
when I reassembled it I could no longer connect remotely.
I connected monitor, mouse and keyboard.
The raspberry pi boots up but when I run OpenFlexure Connect and try to connect witn “connect locally” checked it switches to “connect remotely” and gives me a network error.
That sounds as though it might be a software glitch. The SD card in a Pi is a weak link, they can develop errors which just make some things stop working. Re-installing Raspbian Openflexure from scratch often clears these issues. It is also often worth changing the card.
Check that the SD card that you have got is rated at least A1. This is designed for ‘application’ use, reading and writing lots of small files that the Raspberry Pi needs. If you are doing a lot of images/scanning, then a card rated U3 or v30 will give noticeably better image read/write speed. The Pi interface will not be able to use the full speed of a really fast card. For me the lowest cost SD cards with these specifications are the branded Raspberry Pi ones, which I think is because they target A2 U3, but don’t have the very fast write speed (80, 150, 200MB/s) that a Pi cannot use.
The other usual suspect for unexpected problems like this is the camera cable and its connection. The wires in the cables can crack in ways that are hard to see, and that causes communication errors with the camera which sometimes seem to cause issues with other parts of the system.
I don’t think that it will make a difference, but have you tried a web browser, either on your Pi or on the other computer? Going to microscope.local:5000 should give the microscope interface. Sometimes the .local is stripped and if you are on the other computer it the would show as microscope:5000. Usually Connect is better at finding the microscope than that method. The most direct method is to find the IP address of your Pi, and then use a web browser to go to <ip_address>:5000.
I really suspect a damaged camera. I’m assuming a non functioning camera will prevent the server from starting. I have a replacement on order, along with an extra cable. They should arrive tomorrow (Sat.)
I don’t think it’s the SD card, but if the camera doesn’t work I’ll try that next.
Do you know what the process for the server is called? I was looking around on the Pi, but I couldn’t figure it out. Also, what and where would an error code for the server not starting be?
BTW I did try the remote computer using the connect program, and using the ip_address. Both failed which is why I connected a monitor and keyboard to try that.
I am assuming that you are running the released version of the software, v2.11.
The process on the Pi is the Openflexure server. There are associated processes for that. ofm stop stops the server, ofm start starts it again. There are other commands, and there are logs, I don’t remember where they are. The readme on the GitLab repository on this branch: Files · master · OpenFlexure / openflexure-microscope-server · GitLab has some details, and links to the correct docs for the server v2.
Camera problems don’t usually come as the network error, I think.
The reason I suspect the camera, or maybe the cable, is the microscope was working very well, except for some dirt probably on the camera sensor. I opened up the microscope and removed the camera module from the optics, cleaned it with dust removing air, and reassembled it. At that point I could no longer connect to the microscope from other computers, and I couldn’t use OpenFlexure Connect locally on the microscope. Near as I can tell nothing else changed.
Great! Version 2 of the software should still start up if the camera is missing, but it will have a placeholder image instead of the camera feed. However, I guess it’s possible that the camera was broken in such a way that it allowed the server to start, but then hung and didn’t capture any images. That would stop it showing up in OpenFlexure Connect, and possibly the web browser as well.
To add to @WilliamW 's post, ofm status and ofm log are probably the commands to use to check if it’s running.
The underlying service is called openflexure-microscope-server and so ofm stopofm start and ofm status are just calling sudo systemctl <verb> openflexure-microscope-server if I remember correctly.