@PJ_Glasso I have a RAK 3172 (STM32WL uP) successfully operating the WE2 via commands via I2C communications, running a model and returning results. The WE2 contains SSCMA-Micro. I’ve referred to SSCMA-Micro GitHub at_protocol, but have yet to be able to cause an image to be stored to the SD CARD. Note, I am not using the Arduino based SSCMA library (as it does not currently support the SMT32 family). I have tried various iterations of AT+SAMPLE and AT+TRIGGER and AT+INVOKE (which can send images files via a serial link).
Do you have any guidance on command(s) needed to have the SSCMA-MICRO firmware store an image file to the on-board SD Card?
Thanks in advance!
Hi there,
So I have NOT tried this Myself but AFAIK it works,
SSCMA-Micro does support saving JPEGs to the module’s SD card, but it’s not done with AT+SAMPLE / AT+TRIGGER / AT+INVOKE by themselves.
On Grove Vision AI V2 (WE2 + SSCMA-Micro), SD saving is driven by an “action trigger”:
The command you want
AT+ACTION="save_jpeg()"\r
Set the action once:
Seeed’s docs explicitly say that calling save_jpeg() sends AT+ACTION="save_jpeg()", and it “should only be called once.”
Then: every INVOKE will save a JPEG
After the action is set, each time you invoke (i.e., run the pipeline), the module will save a JPEG to the SD card. The Seeed example literally does: AI.save_jpeg(); once in setup, then AI.invoke(...) repeatedly, and “each invoke saves JPEG.”
So from your STM32WL/RAK3172 side, the flow is:
- Once at startup:
AT+ACTION="save_jpeg()"\r
- hen repeatedly (whatever your normal run command is):
AT+INVOKE...(or the equivalent you’re already using successfully)
To stop saving (important)
You must clear the action set (even after reboot, per the docs)![]()
AT+ACTION=""\r
Seeed notes this is equivalent to clean_actions() and must be done if you no longer want JPEGs stored.
SD card “gotchas” that matter
If they still don’t see files:
- SD must be FAT32 (with 8192 cluster size) or exFAT (Seeed recommendation).
- Firmware needs to be new enough (Seeed calls out later than 2024-04-18).
- Files go under a default export folder; the system creates session subfolders and tracks the latest folder in a hidden
.sscmafile (don’t edit it).
Those are about capturing/streaming/returning images (e.g., base64 over UART) — they don’t automatically configure the “save-to-SD” action. The SD write is specifically tied to the ACTION trigger mechanism.
HTH
GL
PJ ![]()
Time permitting I’ll check it out, as I do have a use case for it. ![]()
@PJ_Glasso I will test with the guidance you have provided.
Please share the link to the Seeed’s doc you mention and the Seeed example that uses the AI.save_jpeg();. I went through the Wiki again and the GitHUb of SSCMA-Micro but did not come across it?
Additional comments. I was able to implement the AT+ACTION both to start saving to the SD CARD and to stop it, as you suggest, hooray!
However, the images are low resolution (~3KB). Is there a way to save the full resolution image sense by the OV5647 camera?
Thanks!
Jim M
Hi there,
So, this would be that ![]()
Example 3.
I would think you can set the default to be Higher maybe.
HTH
GL
PJ ![]()
The command you need is AT+ACTION="save_jpeg()", followed by your standard AT+INVOKE command. This is not done with AT+SAMPLE or AT+TRIGGER alone .
The key is that the SSCMA-Micro firmware on your WE2 uses an “action trigger” system for SD card saving. You set the action once, and then every subsequent inference will save an image.