Micropython thread

Thread about micropython answers and discoveries

Here is what I discovered today, the timelapse and RC modules are electrically the same but have a different set of files flashed on them. The timelapse module just contains boot.py, while the RC module has many files and a different boot.py. You could easily convert a RC module into a timelapse, but going the other way would involve uploading a lot of files.

TIL: Looking around the timelapse user filesystem I can see marked deleted blocks containing RC module bits. So either the master image started with a filesystem containing RC files, they deleted them, then added the timelapse file (unlikely), or these modules have been re-used and updated (maybe they only manufactured RC modules, then updated those to timelapse as necessary).

Here’s the flash layout (at least what is visible to me)

LABEL      TYPE SUB    OFFSET        SIZE  ENCRYPTED?
------------------------------------------------------
otadata    DATA 0x00  0x0000A000      8k   yes
phy_init   DATA 0x01  0x0000C000      4k   yes
nvs_key    DATA 0x04  0x0000D000      4k   yes
bbl_keys   DATA 0x02  0x0000E000     24k   
nvs        DATA 0x02  0x00014000     24k   
nvs_user   DATA 0x02  0x0001A000     24k   
app        APP  0x10  0x00020000   1796k   yes
vfs        DATA 0x81  0x001E1000    956k   
loader     APP  0x11  0x002D0000    644k   yes
storage    DATA 0x82  0x00371000    556k   
fenc       DATA 0x06  0x003FC000     16k   yes

If you buy this combo before they release the flash utility you will be unhappy as you currently can’t move a CPU from a RC to a Timelapse.

So you’re saying its best to wait till they get around to flashing some Core boards for time lapse and put them in the store…

Or wait till they release the flashing tool.

2 Likes

This was mentioned somewhere… (one way flash, until flasher software made available) … but for the life of me I can’t find it again… any ideas?

Maybe I wasn’t clear enough… it was mentioned somewhere else (I thought it was officially so, also) that you could use the Core board (included with the timelapse kit) for either timelapse or in another project, but not the other way around until flasher was available. I just can’t find that again, which is why I asked if had any idea (where it was mentioned before).

Wow… really? Without flashing the correct firmware it doesn’t work… who would have thunk it! :rofl: :man_facepalming:

Now that I think of it, I think it might have been a note in the box (which was binned last week) for the timelapse kit that said not to flash the Core that came with the timelapse kit until the flasher was available. Anyway, it is just a matter of time … else this will no longer be true :open_mouth:

The Multi-Function Core Board is designed for various CyberBrick projects, featuring built-in Bluetooth and WiFi connectivity. It can be quickly connected and disconnected via dual-pin headers, allowing easy switching between different expansion boards. The Core works with the Receiver Shield and the Transmitter Shield to create a basic remote control system, and it can also pair with the Time-lapse Trigger Shield to capture customized time-lapse videos.

Or wait till they release the flashing tool.

This was mentioned somewhere… (one way flash, until flasher software made available) … but for the life of me I can’t find it again… any ideas?

The (future) official recovery tool is mentioned in the pink header, e.g. at:
https://makerworld.com/en/cyberbrick/api-doc/

By comparing the apps at CyberBrick_Controller_Core/src at master · CyberBrick-Official/CyberBrick_Controller_Core · GitHub I assume one can convert in both ways, as long as the frozen Python modules needed and integrated into the firmware binary are included. To check this, @mugglesmuggle can you hook up your TimeLapse core via USB to REPL (e.g. Arduino MicroPython IDE) and see which modules are installed (I did get myself only the “normal” kits, not the timelapse kit, thus cannot check myself):

help(“modules”)

Do you see bbl_product and rc_module in addition to TimeLapse ble_module and shutter_module ? If so, try creating app, bbl and log folders as in Where is documentation on building applications for Cyberbrick? - #17 by xrk and fill them with files from CyberBrick_Controller_Core/src/app_rc at master · CyberBrick-Official/CyberBrick_Controller_Core · GitHub and replace the boot.py also from the GitHub.

If you now issue:

import machine
machine.soft_reboot()

what do you see as last debug messages in the console (which you can leave back to REPL console with Ctrl+C also)?

2 Likes

Yes! That was it… thanks! :slight_smile:

1 Like

I already tested that, they are running the same firmware build and the only difference between them is the filesystem contents. It was possible the RC build contained a sense mechanism in one of the bytecode files to determine that it was installed on a timelapse module and switch to timelapse mode, but testing it excluded that possibility. Copying the boot.py from a timelapse build to a RC module has the expected effect.

As mentioned here, the filesytem on the timelapse version still contains remnants of the RC build in deleted files, suggesting that everything starts as a RC module and the timelaps update just deletes the RC files and adds the timelapse file. Why they didn’t only replace boot.py I don’t know.