So I went around and around with this all day, looking at all the posts from @filip.ayazi et al, trying to figure out why this brand new board doesn’t seem to be recognized. It seems that the RPi is not opening a serial port (I enabled the serial port in rasp pi her instructions I found) but to no avail. Here is a snippet from my log file to see if this helps y’all diagnose the problem:
[2023-10-05 15:30:42,111] [MainThread] [INFO] Created Serial<id=0xb39a7fb0, open=True>(port=‘/dev/ttyAMA0’, baudrate=115200, bytesize=8, parity=‘N’, stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)
[2023-10-05 15:30:42,112] [MainThread] [INFO] Testing communication to SangaBoard
[2023-10-05 15:30:42,113] [MainThread] [INFO] Running firmware checks…
[2023-10-05 15:30:44,117] [MainThread] [WARNING] No firmware version string was returned.
I read this as saying the board may have no firmware. I’ve added the sangaboard extension to the Openflexure connect, so I tried to update the firmware there. Here is the log from that:
[2023-10-05 15:31:34,772] [Thread-55] [INFO] Downloading: https://gitlab.com/filipayazi/sangaboard-firmware/-/jobs/artifacts/release/raw/builds/firmware.elf?job=build to /tmp/firmware.elf
[2023-10-05 15:32:05,971] [Thread-55] [ERROR] Traceback (most recent call last):
File “/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py”, line 255, in wrapped
self._return_value = f(*args, **kwargs)
File “/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/flask/ctx.py”, line 158, in wrapper
return f(*args, **kwargs)
File “/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/webargs/core.py”, line 594, in wrapper
return func(*args, **kwargs)
File “/var/openflexure/extensions/microscope_extensions/sangaboard-extension/SangaboardExtension/init.py”, line 135, in post
raise RuntimeError(“Upload failed”)
RuntimeError: Upload failed
I don’t speak linux, I speak C++ because I am old and hate fun. Can someone help me fix this? I have no idea what to do next. Thanks!!
I’m sorry your Sangaboard doesn’t work, I normally flash firmware and run some basic tests on boards before they are shipped out, but it’s possible there was some mix-up.
Can you please tell me what the state of the 4 LEDs on top left of the Sangaboard is? There should be two blue LEDs on (Power) and then there are two red serial status LEDs.
If the Sangaboard with proper firmware is on a properly configured raspberry pi (listening for serial), the LEDs should be off (unless there is some active communication). If the raspberry pi isn’t listening for Serial but Sangaboard has working firmware, RX LED will be on (unless the pi is using that pin for something else) and TX will be off. If the the board doesn’t have firmware installed TX will be on (possibly faintly, you can confirm by powering the Sangaboard with a Pi connected).
I can’t tell what exactly is failing in the firmware upload, it could be either the firmware download (
urlretrieve doesn’t always raise an exception when it fails to download for some weird reason) or the actual upload process. I’ll push an update to the extension to get more info in the logs soon.
If the Sangaboard doesn’t have firmware, the other way to upload is using the USB-C connection and almost any computer. It is based on the raspberry pi pico chip (RP2040), so if it has no firmware it will behave as a USB flash drive to a computer. You can try plugging it in via the USB-C (try both orientations of the connector, it sometimes doesn’t work reversibly for signal routing reasons), if it doesn’t behave as a flash drive (which likely means there is at least some firmware uploaded), try holding the USB_BOOT button, pressing the RST button, and releasing the USB_BOOT. This will put the board into a firmware upload mode and it should appear as a USB flash drive (alternatively just hold USB_BOOT while plugging it in, it should appear as a USB drive when the button is released). Once it appears as a USB drive, you should be able to upload new firmware by simply drag-and-dropping a file onto it, the latest release firmware is Artifacts · build (#4035824242) · Jobs · Filip Ayazi / sangaboard-firmware · GitLab
If none of this works I’ll send you a replacement, it’s possible the board was damaged in transit.
No worries, @filip.ayazi! I am so grateful to NOT have solder a PCB for once in my scientific career. Paste solder can suck it. (c:
The blue power LEDs are both on and the TX is solid red; no light on RX except a brief momentary flicker at boot up…so no firmware. Honestly, this is a relief – I thought I messed up the entire install or broke the board or something.
I will try the combination of buttons to mount the device once I get back to the lab tomorrow, and also try it on a PC. It would not mount to my 2023 MBP when I held the button and plugged it in…though this is not uncommon with some of the fancier SAMD boards I use – so I bet the same is true with RP-based things. I’ll let you know if it works, and thanks for the fast reply!
Alright, @filip.ayazi – the plot thickens. Here are the lights that I see when I plug it in:
Pressing any of the aforementioned buttons has no effect on these lights whatsoever.
I can’t get it to mount onto a Mac, WIn10 PC, Win11 PC, or linux box using any cable I have or any combination of buttons/flipping connector (per your instructions). 'Just so happens I have an inspection scope, so below are 2 pics of what I see with the lights and when I inspect the RP chip:
It may not be totally clear, but the solder joint and trace on the pin indicated by the red arrow is really mangled. I’m thinking the chip is shot. Thoughts?
Thank you for trying all that. If the board cannot be reflashed via USB there is indeed something very wrong with it, please send me a message via https://taulab.eu/contact with your email (the one you used for the original order) and shipping address (if different) and I’ll send you a replacement.
Good catch on that messed-up solder joint. The spacing there was a bit small and these two pins got shorted during soldering so the manufacturer (JLCPCB) manually fixed this joint on most of the latest boards (the same design worked fine for previous batches, but this one wasn’t as lucky). It shouldn’t be the main cause of the issue as other boards like this work fine (and the solder jumper was between VCC and Vanalog which is just a filtered VCC), but it could be related.
Done! Emailed you through the link you sent.
@filip.ayazi Excuse me where is the firmware, the link you provided sends me to a page that cannot be found
@filip.ayazi new board works like a charm! Thank you so much!!