Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:34 01 Aug 2025 Privacy Policy
Jump to

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 : CMM2: serial file transfer (to/from Raspberry Pi)

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 11:30am 26 Aug 2020
Copy link to clipboard 
Print this post

Hi folks,

Apologies if this has been covered elsewhere, if so I'd appreciate a pointer to the appropriate thread(s).

I'm getting heartily sick of popping the SD card in/out of the CMM2 to transfer files to my Pi, or upload them to GitHub, and minicom and XMODEM are not a convenient combination for multiple file transfers.

What I wantis an ftp-like client from the Pi to the CMM2 with commands for navigating the CMM2 filesystem and getting/putting multiple files (with XMODEM perhaps being the underlying protocol).

I'm guessing this is a job for serial comms using COM1 or COM2 as described in the CMM2 manual, probably with a Pi client hewn from Python. I'm thinking I would rather not work over the serial console so that I'm not having to deal with any standard output/diagnostics the BASIC server program is generating.

I don't really have a clue on the hardware side, though I'm guessing this USB-TTL doodad (ostensibly one of these https://www.ebay.co.uk/itm/262285972686) that I've picked up on my travels might be part of the solution - the IC is unmarked, so don't ask me what it says

Does anyone have any advice / suggestions ?

1. Ideally the solution already exists, I don't want to re-invent the wheel.
2. Don't tell me about MMEdit , I'm sure it is wonderful, but using Windows is not convenient and Wine is not an option since the Pi is not x86.

Best wishes,

Tom
Edited 2020-08-26 21:44 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 420
Posted: 12:04pm 26 Aug 2020
Copy link to clipboard 
Print this post

Have my eye on one of these for exactly your case - a WIFI enabled SD card.

Plug it into the CMM2 and access the storage via WiFi from another device...  

https://www.amazon.co.uk/GuDoQi-Wireless-Memory-Digital-Camera/dp/B07436HRSY/ref=asc_df_B07436HRSY/?tag=bingshoppinga-21&linkCode=df0&hvadid=&hvpos=&hvnetw=o&hvrand=&hvpone=&hvptwo=&hvqmt=e&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=&hvtargid=pla-4584207586542308&psc=1

Nim
Entropy is not what it used to be
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:08pm 26 Aug 2020
Copy link to clipboard 
Print this post

  Nimue said  Have my eye on one of these for exactly your case - a WIFI enabled SD card...


Hi "Nimue",

I seem to recall a relatively recent thread along the lines that these (especially the cheap-ish ones like this) have limited functionality and don't actually fulfill their promises.

Is anybody actually using one ?

Regards,

Tom
Edited 2020-08-26 22:08 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 420
Posted: 12:13pm 26 Aug 2020
Copy link to clipboard 
Print this post

Sorry - I joined after those posts.  

My bad.
N
Entropy is not what it used to be
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:26pm 26 Aug 2020
Copy link to clipboard 
Print this post

  Nimue said  Sorry - I joined after those posts.  

My bad.
N


It's only "your bad" if I turn out to be correct in my assertion

Tom
Edited 2020-08-26 22:32 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
datawiz

Newbie

Joined: 10/08/2020
Location: United States
Posts: 26
Posted: 01:31pm 26 Aug 2020
Copy link to clipboard 
Print this post

I recently posted about a wifi library I created using an inexpensive esp8266 based microchip.
All the details are in this thread: wifi on the cmm2 thread

I've included several example programs, including cmm2 basic programs and python scripts to run on the remote device (Mac/Windows/Linux). One set of programs allows you to initiate an upload from the remote side to the cmm2 (cmm2 is the server) and another set allows you to initiate a download to the cmm2 (remote host is the server).

The protocol is very simple (as you'll see), but I've tested 100+ megabyte files across it and compared it to the original without any errors. It's not very practical with larger files, because serial speed is still limited to 115k and the effective transfer rate is a little more than half that, but for smaller files its very convenient and I've integrated it into my development workflow.

All the basics should be in the library to create something like you described. If you need any help, feel free to reach out.

Rich/dw
Edited 2020-08-27 00:31 by datawiz
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 01:35pm 26 Aug 2020
Copy link to clipboard 
Print this post

Hi thwill,

Too bad you're on a Pi. If you where running W10, you could use MMEdit, and develop the code on the PC.

Maybe we should investigate a linux version of MMEdit compiled for the Pi. There is an X86 linux version of MMEdit.

http://www.users.on.net/~tassyjim/MMedit2.htm
Edited 2020-08-26 23:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:21pm 26 Aug 2020
Copy link to clipboard 
Print this post

  datawiz said  I recently posted about a wifi library ...


Thanks Rich, I did notice it and then promptly forgot. It does sounds ideal so I've ordered the necessary bits of hardware to try it for myself.

This doesn't mean I'm not also interested in a hardwired serial solution, if only for educational purposes.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:24pm 26 Aug 2020
Copy link to clipboard 
Print this post

  Volhout said  Hi thwill,

Too bad you're on a Pi. If you where running W10, you could use MMEdit, and develop the code on the PC.

Maybe we should investigate a linux version of MMEdit compiled for the Pi. There is an X86 linux version of MMEdit.

http://www.users.on.net/~tassyjim/MMedit2.htm


Didn't I explicitly say "Don't tell me about MMEdit" ... I swear you are all on Jim's payroll

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 06:48pm 26 Aug 2020
Copy link to clipboard 
Print this post

You got me. !!!

I have no solution, but I can imagine that you can create a geany profile to match MMBasic (keyword file). And a script to send your source via xmodem (minicom or similar) to the CMM is something that should also be possible.

If so you could use geany at the Pi.

I seem to remember from an earlier thread that someone created a geany profile. Not sure about the minicom script. Maybe I am mistaken...
I do not have a CMM2, but can try to work on something for the standard micromite (MX170).
Edited 2020-08-27 04:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:34pm 26 Aug 2020
Copy link to clipboard 
Print this post

Hi Volhout,

I think you are trying to solve a problem I don't have.

I'm not looking for file transfer integrated with an editor, most of the time I'm happy with using "edit" on the CMM2 (via the serial console). What I want is console driven file transfer between CMM2 and Pi which is a little bit "richer" than raw XMODEM.

Thanks for turning me onto Geany though, VSCode (my current go to editor) on my Pi 3B+ runs like a one legged dog, perhaps Geany will be better.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:46pm 26 Aug 2020
Copy link to clipboard 
Print this post

  Volhout said  
Maybe we should investigate a linux version of MMEdit compiled for the Pi. There is an X86 linux version of MMEdit.

http://www.users.on.net/~tassyjim/MMedit2.htm


That link is to a very old backup website that should not be used.
It is on an old ISP I no longer use and am unable to update or delete it.

Jim
VK7JH
MMedit
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 10:16pm 26 Aug 2020
Copy link to clipboard 
Print this post

I think it would be great to have a variation on MMuploder that would let you drag and drop files to copy things serially to the SD card of the CMM2. Any named files dropped are xmodemed to the SD card with the same file name. No specific program running on the CMM - it just has to be in immediate mode. (option to ctrl-c beforehand)

This is a doable concept, right?
Micromites and Maximites! - Beginning Maximite
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 10:35pm 26 Aug 2020
Copy link to clipboard 
Print this post

  CircuitGizmos said  I think it would be great to have a variation on MMuploder that would let you drag and drop files to copy things serially to the SD card of the CMM2. Any named files dropped are xmodemed to the SD card with the same file name. No specific program running on the CMM - it just has to be in immediate mode. (option to ctrl-c beforehand)

This is a doable concept, right?

doable but not for the RPI (by me).

It would still be a gazillion times faster to swap the SDcard.
Can't the RPi use USB card readers?
VK7JH
MMedit
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 10:49pm 26 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  
  CircuitGizmos said  I think it would be great to have a variation on MMuploder that would let you drag and drop files to copy things serially to the SD card of the CMM2. Any named files dropped are xmodemed to the SD card with the same file name. No specific program running on the CMM - it just has to be in immediate mode. (option to ctrl-c beforehand)

This is a doable concept, right?

doable but not for the RPI (by me).

It would still be a gazillion times faster to swap the SDcard.
Can't the RPi use USB card readers?


Sorry I hijacked the rPi discussion. I was thinking of this as a PC app. Just a way to drop .bas (and other light files) to the CMM2 over serial.
Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 06:31am 27 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  Can't the RPi use USB card readers?

That does not appear to match what Tom wants. (Right?)

John
Edited 2020-08-27 16:31 by JohnS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:43am 27 Aug 2020
Copy link to clipboard 
Print this post

  JohnS said  
  TassyJim said  Can't the RPi use USB card readers?

That does not appear to match what Tom wants. (Right?)

John


That's correct, my Pi already has a card reader hanging off it by an extension cable.

I'm railing against the nuisance of popping the SD card, plugging it into the reader, navigating to the folder/drive, doing "stuff", removing all connections to the folder/drive so it can be ejected safely, ejecting in the O/S, physically popping the SD card, plugging it into the CMM2.

That's fine once per session to upload progress to GitHub, but if I just want to move a couple of files back and forth from the Pi so I can use its richer toolset, or transfer something downloaded from the internet then it gets annoying.

"datawiz"s work sounds like a great starting point from which to start investigating something better.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Carnifex
Newbie

Joined: 02/07/2020
Location: United States
Posts: 13
Posted: 02:29am 28 Aug 2020
Copy link to clipboard 
Print this post

Linux has a couple of tools that might serve your purpose.

Minicom has its own built in xmodem protocol, which will let you navigate the local file system and choose what file you want to send to the CMM2, but it will not let you look at the the CMM2's file system. You can also use screen and sx, but that lacks the ability to look at either file system. I think Minicom is your best bet.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 08:58am 28 Aug 2020
Copy link to clipboard 
Print this post

Hi Carnifex,

From the first message in the thread:

  "thwill" said  ... and minicom and XMODEM are not a convenient combination for multiple file transfers.


Or to put it another way I find minicom to be a dreadful piece of software, but YMMV

I'm looking forward to building my own software on top of "datawiz's" work with the  esp8266.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025