Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Good way to create a backup copy of a micromite program
Author | Message | ||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
Hello people, I have a question about the workflow with the Micromite and the Ascii VT-100 Terminal. I love the workflow without a computer. Only a keyboard, Monitor, ASCII Video Terminal an the Micromite. There is only one Problem: what would be a good way to create a backup copy of the Basic program on the micromite? Best Regards Vamp05 |
||||
mclout999 Guru Joined: 05/07/2020 Location: United StatesPosts: 430 |
Hi. I always have all my downloads for my CMM2 in a folder on my primary workstation that is synchronized to one of my NASs almost every minute like everything else. For new content I am making on the CMM2 I sync that too when I have the SD card in the workstation to copy new downloads to it. I have considered using MMEDIT but for now, that is sufficient and is automated when I plug in the SD card. If you don't ever want to link your PC to the CMM2 this kind of backup may be your best bet but it is not very safe. It would be best to look at some of the wireless or wired solutions that are discussed here. |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1983 |
I do all my editing on my PC (with Notepad++) so savingt he file provides the backup. Then, using ExtraPutty to talk to the console as a VT100 emulation, I load the software on the target machine either by copying the contents of the editor and pasting into the micromite in F10 - AUTOSAVE (Ctrl-z exits but I usually have it as the last character in the file), or in the case of the F4 & H7 (the USB behaves oddly on the Eval boards) I use F11 (XModem recieve) and then send the file from the ExtraPutty session. Gives quite a quick development turn-around, nice dev environment and saving is just like any other text file on mt laptop. |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
The CMM2 has a SD Card as the main storage. It is "easy" to backup. But the Micromite (28 pin pic MCU) has only its internal flash. Ok in both cases a computer is needed Is it possible to use the "LIST ALL" command and store the basic program to a sd card logger: for example https://nettigo.eu/products/openlog-simple-serial-microsd-data-logger sd card logger Edited 2021-04-03 07:09 by Vampire05 |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
you could simply connect the logger to the ascii terminal and activate it by pressing a button (connect to power supply), then enter "LIST ALL", release the button and you would still have created a backup file |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
Hi guys, I think I have a smart idea for backup from CMM2, Micromite and other MCUs. I am trying this out at the moment. My idea is to make a backup over the internet/network: First the CMM2 needs internet. This is very easy to solve for this case. With an ESP32 / ESP8266 I build a SERIAL TO HTTP adapter: The ESP listens on the UART and knows the following commands: - Connect_to_wifi(SSID, PW): -> IP Address // connect to your wifi - http_get(URL): -> HTTP Response // send a http get - http_post(URL, BASE64_DATA): -> HTTP Response // send a http post - b64_encode(data): -> B64 String // encode data to b64. easy on ESP - b64_decode(b64_string): -> data // decode b64 to data. easy on ESP With this you can already communicate to the internet. An universal HTTP Client for all UART Microcontrollers On the other hand a very simple Python server can receive the following things : POST: http://...server-url.../save -> {"filename": "test.bas", "filecontent": "...BASE64 DATA..."} //save file on server GET: http://...server-url.../list //list all my files GET: http://...server-url.../load?filename=test.bas // get the filecontent of test.bas Now you could create a script in mmbasic, which sends the appropriate UART commands to the ESP! |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
I have implemented a test server: SAVE FILE: # HTTP POST: http://wumpiwolf.de:8000/Backup/Rest/save HTTP BODY should be -> {"filename": "test.bas", "filecontent": "..b64content.."} LIST FILES: HTTP GET: http://wumpiwolf.de:8000/Backup/Rest/list GET FILECONTENT: HTTP GET: http://wumpiwolf.de:8000/Backup/Rest/load?filename=test.bas You are welcome to test it! Create an account beforehand: http://wumpiwolf.de:8000/Backup/default/user/register Then everyone sees only his own files. For the HTTP interfaces therefore an authentication is needed by BASIC AUTH. For this you have to specify the following in the HTTP header: Authorization: Basic BASE64(Email:Password) Edited 2021-04-04 00:11 by Vampire05 |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 532 |
On CMM2 with Napoleon Commander you can copy between local files on SD and remote files on server (Python). Server can run for example also on NAS... Edited 2021-04-04 02:49 by jirsoft Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
@jirsoft woow, super nice soulution Backup Problem solved for CMM2 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
It doesn't help with your micromite but for systems with SD cards such as the CMM2 there is always the option of running a FTP server. https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=13531#164902 Jim VK7JH MMedit MMBasic Help |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1722 |
For non SD Mites by far the simplest solution is the SD card logger mentioned earlier. For anyone wanting to roll their own, it uses the same chip as a Uno or Nano and an Arduino bootloader. So it should be possible to adapt the sketch to them. Many people would have a spare one in the junk box. An MM+ with SD could also easily copy characters from a serial port to a file. There is also an SD driver CFunction for the MM2 that can be used for logging. For the MM+ or F407 a test run at low speed. Connect MM+ Rx to MM2 Tx only. open "com2:9600" as #2 : open "serial.txt" for append as #1 do : line input #2, ser$ : ? ser$ : ? #1, ser$ : loop ctrl-c to stop, then close #1 : files "serial.txt" to check that the file has data. No problem catching MM2 output to ASCII Video terminal. No PC in the loop if you use the terminal to setup the mm+, but don't press enter yet. Plug the terminal into the MM2 then enter on the MM+ (it has it's own PS2 kb) then LIST on the MM2. Edited 2021-04-04 18:22 by phil99 |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
Why not make a logger from a '170 with an SD card? Micromites and Maximites! - Beginning Maximite |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
Ok, i have finished the UART to HTTP Adapter (communicates to my own Server). For the Micromite it can only Backup files to Server with "LIST ALL" Command. For the CMM2 it has an interface to LIST, SAVE and LOAD files from my own server. Now i need to implement a driver (.bas file) for CMM2 to interface it. When i am finished, i make a video Edited 2021-04-05 04:10 by Vampire05 |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9030 |
The 170 has no SD-card support. Unless you mean pairing up a 170 chip with the likes of an OpenLog module? Perhaps you do...... Smoke makes things work. When the smoke gets out, it stops! |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
'170 + SD card CSUB library. The teeny SD card implementation has the limitations of not being able to create a new file, but can log to (fill in or overwrite) an 'empty' file already on the SD card. https://circuitgizmos.com/Sensor-Engine-MICRO-p112715727 This could do all the logger work. Edited 2021-04-06 01:13 by CircuitGizmos Micromites and Maximites! - Beginning Maximite |
||||
Vampire05 Regular Member Joined: 06/12/2020 Location: GermanyPosts: 88 |
Here is a Video of my Micromite and CMM2 Backup Solution: Micromite Backup CMM2 Backup Edited 2021-04-15 02:13 by Vampire05 |
||||
Print this page |