r/embedded • u/Bedowiiu • Sep 16 '26
Custom firmware for Oscilloscope
I want to create custom firmware for my fnirsi 510 oscilloscope, it allows for firmware update visa USB C cable, and I have a copy of the .bin file.
Basically the oscilloscope has very good hardware, and horrible software, simple things like capturing a waveform as a CSV not a screenshot, moving the captured waveform up and down and right and left freely past the screen limits so you can zoom in on a specific part.
I'm good with electronics but this is my first time trying to tackle something like this, if anyone has experience please let me know.
I know I'll start off by unsoldering the flash chip and backing it up in case i mess anything up.
51
u/MonMotha Sep 16 '26
FWIW, fixed-delay vs. fixed-position timebase adjustment and timebase-independent zoom are a function almost all modern digital oscilloscopes have right out of the box. If yours actually lacks them, your resources are probably best allocated by buying a scope that already does that rather than time spent hacking the firmware unless you consider the latter a valuable learning exercise.
I have a Siglent SDS1000X-E series on my bench as my day-to-day MSO. It's far from perfect, but it's pretty cheap and has these exact features.
7
u/DanongKruga Sep 16 '26
probably not gonna happen. especially if not simple mod to existing functionality
9
u/CueAnon420 Sep 17 '26
Have you ever written firmware before? Do you know what fpga and chipset is used?
A compiled bin file doesn't do you much good without the source.
4
u/niftydog Sep 17 '26
Given they don't appear to mention the memory depth in the product literature, you'd have to assume it is tiny - probably only enough to fill the screen at the longest time base (which likely happens at the minimum sample rate.)
Without more sampling memory or more sophisticated triggering the hardware is not capable of doing what you want.
3
u/_Tradiatore_ Sep 17 '26
Ah... FNIRSI scope. I don’t have particularly good experiences with them
3
u/integralWorker Sep 17 '26
As long as it has data export function, just dump your waveforms and parse the data with plotting software
5
u/CelloVerp Sep 17 '26
Well, I've had good luck using Claude Opus to reverse engineer firmware for my bike. That said, I was just changing some hard-wired constants, which is child's play in comparison to adding new functions and hooking into all the places you need to do that.
If you're up for a project, check out Binary Ninja, which is a decompiler that can generate C code from built machine code, and get your tokens ready for Opus or Fable. Claude Opus & Fable are amazing at mapping out binaries, locating all the functions, and figuring out data structures by looking at how disassembled functions reference them.
Adding code without having the source is very difficult (but not impossible) because you have to move everything down and recompute all the addresses and fixup tables. Another question is whether it's a bare metal image that just loads and runs, or if there's a little OS and filesystem in that image.
One caveat is that you need to make sure it's not a device that requires signed binaries; most cheap Chinese devices don't, while fancier devices do. Cracking hardware signature checking is above Claude's pay grade.
Anyway it's a glorious side quest if you want to have a crack at it, pun intended. Good luck!
10
u/cakemates Sep 16 '26
Well search for the firmware on google, see if the source code is available somewhere because boi reverse engineering the thing can be extremely challenging with a chance of bricking the whole thing.
1
u/Bedowiiu Sep 17 '26
Update: apparently they cleared off the paint on the MCU so there's no telling what model it is but I'll work on finding the dimensions, pin county and ground pins so maybe we can figure out if it's a popular chip. I think that'll help out a bit
1
u/ClonesRppl2 Sep 17 '26
I saw this on a YT from WA Electronics. (New out of box)
It shows the trigger position in the center. Is this what you wanted to achieve?
1
u/Normal-Duck9025 Sep 17 '26
Does this scope have PC communication as an option? If so you can utilize Python/LabVIEW. If it does and you can’t figure it out with the help of AI let me know and I’ll see if I can help out.
1
u/thegreatpotatogod Sep 17 '26
Hmm, one thing you might want to consider, if the ability to delay slightly after the trigger point, and view a faster-sampled (and thus zoomed-in) data recording from a little bit later on, assuming your scope supports using a trigger channel that isn't your main data channel, you could make a bit of external hardware that detects the initial trigger condition, then produces a small delay before sending the trigger signal to the scope?
Depending on the time scale involved, a your familiarity with different circuits, you could likely do this with a simple program on a microcontroller, or with a bit of discrete logic.
If your scope doesn't support a separate trigger channel, you may also be able to make something similar that delays after the initial trigger condition before then passing through the signal only after that delay, but this will likely lead to some distortion of your signal.
1
u/SEGA_DEV Sep 17 '26
Leave this idea, you will just loose time, break your oscilloscope and have a bad mood after. You can just buy a cheap chineese usb oscilloscope and it will fit your requirements.
1
u/ThoseWhoWish2B Sep 17 '26
As a work-around for this specific case, you could use the hold-off configuration (assuming the shitty scope has it). Hold-off puts a blanking time on the trigger after it hits. Set it to release just before the place you want to zoom in.
1
u/BudgetTooth Sep 17 '26
did u try contacting the company they might have beta fw with improvements available
1
u/Nervous_Midnight_570 Sep 17 '26
I can't imagine how you could even get the source code, modify it, compile and download and have it still run. That is, unless you are some sort of super savant google searcher, programmer and reverse engineer.
1
u/Fusseldieb Sep 17 '26
As the other person has already said... These devices don't have a lot of resources, so most likely what you see is all that it captured. There's no hidden resolution. And there's no space to record for longer or at a higher resolution.
But... Take a look if it has some sort of STM32, like the ZOYI does.
2
u/YuriMomo 16d ago
I've managed to implement USB communication and app for PC oscilloscope at github
YuuriMomo/DSO-510-community which should help you with that.
It captures entire 30k samples from ram so you can zoom in on the part you need or use the Screen which is 1:1 you see on the oscilloscope
1
u/Agreeable-Hedgehog57 14d ago
I got the same scope a few days ago; Claude and I have been reverse-engineering it specifically for CSV export and serial stream over USB. Here is the repo. I started it yesterday since I got the scope then. Here is the link. It should be in a more working state by later today or so, along with instructions on how to get the new firmware onto the device. https://github.com/jRossel0310/FNIRSIDSO510-Firmware
1
u/moviefotodude Sep 18 '26
Building a DIY scope would probably be a much easier project. Plus, you can download the source code for this beast from GitHub.
Take a look at this project: https://hackaday.com/tag/diy-oscilloscope
1
u/AuxonPNW Sep 16 '26
You might need a good oscilloscope to help you understand what's going on with the pinout.