Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:30 28 Nov 2024 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 : MMEdit V 5.1

     Page 1 of 8    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 09:39pm 26 Mar 2023
Copy link to clipboard 
Print this post

I have updated MMEdit to make use of the new features in the picoWEB.

These changes mainly affect the file manager.
You now have the option to use TFTP instead of XMODEM when connected to your picoWEB via Telnet.
If connected by USB, XMODEM is the only option.
TFTP uses UDP and doesn't pass through routers very well. It is usually confined to local networks.
When it can be used, it is faster than XMODEM and doesn't pad any extra characters to the end of files.
In MMCC, all file transfers are treated as binary. A bit slower but saves trying to determine each file type.

Adding TFTP to your PC
in Windows 11:
Settings
Apps
Optional features
More Windows features
TFTP client

In Linux:
Install TFTP HPA (you need the HPA version to use the MMCC file manager with TFTP)
Edit the MMCC.inf file
change
TFTP file receive command = mate-terminal -x tftp -m binary %IP% -c get %RemoteFile% %LocalFile%
You need to edit the terminal name to suit your Linux installation
Your may have to use "terminal" on it's own or "gnome-terminal" etc
Do the same for the following line with "put"

Make the changes with MMCC shutdown or they will be lost.

As a teaser, I copied 27 files totaling 160kB from the pico to my PC in ~20 seconds. It is slower going to the pico but still nice to watch.

No excuse for not having a backup.

  Quote  Changes:

24 Mar 2023
V5.1.0
Some colour added to messages in MMCC
Option to timestamp lines in MMCC
Option to use TFTP instead of XMODEM when connected by TCP to PicoWEB
Debug logging in MMCC
MMCC recognises some Telnet directives

Mar 2023
V5.0.5
Editor has column marker (adjustable) and comment wordwrap
^Q unwraps lines that were split during transfer from device.
MMCC now has auto-reconnect to serial ports.
MMCC now has wordwrap
When entering File Manager, the device time is set to computer time


Jim
VK7JH
MMedit   MMBasic Help
 
ville56
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 95
Posted: 01:04pm 28 Mar 2023
Copy link to clipboard 
Print this post

Many thanks for the enhancement, the speed improvement with TFTP is really welcome. The only problem i have with big filetransfers is, that i run into a timeout using filemanager. The same file can be sent with TFTP without any issue.

-----------------------------------
On the MMCC console it says
>
2 directories, 2 files
Blocks: 42384
XMODEM RECEIVE "GB.bmp"
Transfer failed!
Finished
Timeout 28

-----------------------------------
in the Telnet window connected to the pico i get the transfer blocks and then:

....Error : Remote did not respond
-----------------------------------
seems to me as if MMCC is timeing out. Is there a place where the timeout value can be adjusted.

Regards,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 08:39pm 28 Mar 2023
Copy link to clipboard 
Print this post

I haven't tried to transfer a 5MB file to the picoWEB. Mainly because I don't have a SDcard fitted yet.

Does the transfer make any progress at all or does it give up imediately.
I assume you are transferring with XMODEM over the USB

Seeing Timeout xx is not in itself a problem, it is just a debugging counter for me but anything above 4 or 5 is strange.


I will have to get a SDcard fitted...

Jim
VK7JH
MMedit   MMBasic Help
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 08:59pm 28 Mar 2023
Copy link to clipboard 
Print this post

  TassyJim said  
If connected by USB, XMODEM is the only option.


Hi Jim;

I curious, why is that?

TFTP is it's own protocol, not reliant on Telnet to work.

When I have PUTTY connected serially, via USB, I am still able to TFTP to my PICO W.

What am I missing or did I not understand the comment?

Hans ...

EDIT: I TFTP'd a 2.1 meg file to the SDcard and it did not time out.
     I wonder if my OPTION TCP SERVER PORT 80, 8000 effects that or not as it is on a
     different port?
Edited 2023-03-29 07:14 by Hans
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 09:20pm 28 Mar 2023
Copy link to clipboard 
Print this post

  Hans said  
  TassyJim said  
If connected by USB, XMODEM is the only option.


Hi Jim;

I curious, why is that?

TFTP is it's own protocol, not reliant on Telnet to work.

When I have PUTTY connected serially, via USB, I am still able to TFTP to my PICO W.

What am I missing or did I not understand the comment?

Hans ...


I understood that TFTP uses udp port 69.
I didn't realise that Peter has found a way to run it over serial.

There is a lot I don't understand...

MMEdit's file manager assumes that TFTP is usable when connected via TCPIP but not available when connected by USB.

MMEdit uses the IP of the telnet connection to know where to send the TFTP packets.
If you are connected by USB serial, MMEdit has no idea what the IP is or if there is any IP associated with the device it's talking to.

MMBasic serial connections use raw data rather that Telnet protocol.

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 09:42pm 28 Mar 2023
Copy link to clipboard 
Print this post

  Quote  I didn't realise that Peter has found a way to run it over serial.


I haven't. TFTP uses UDP on port 69. It does not rely on a there being a Telnet session or even Telnet being enabled. However, as you say, unless you know the IP address you can't use it as the PC is always the client. If MMEDIT allowed the user to specify a IP address for TFTP, or if it used MM.INFO(IP ADDRESS) to find it then you could TFTP while having the console connection over USB
Edited 2023-03-29 07:43 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 09:59pm 28 Mar 2023
Copy link to clipboard 
Print this post

If I hadn't tied TFTP to the current Telnet session, I can just see a user connecting the file manager to one pico and transferring files to/from an entirely different pico. That would cause confusion.

I think my terminology used in the explanation could be better.

Re the file transfers using XMODEM, I just completed a 5k transfer to my 'standard' pico without any issues.
Transfer rate was about 640k/minute.

Processing file: C:\Users\Jim\Documents\myapps\maximite\picomite\rp2040-datasheet.pdf

>
6 directories, 46 files
Blocks: 40011
XMODEM RECEIVE "rp2040-datasheet.pdf"
Transfer completed OK!
Finished
6 directories, 46 files

>


I will wait for further information.

Jim
VK7JH
MMedit   MMBasic Help
 
ville56
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 95
Posted: 10:23pm 28 Mar 2023
Copy link to clipboard 
Print this post

reformatting the SD card did the cure. Having had an "undeletable" file gave me some clue to the filesystem on the card. Also had some strange hangs with no response on the console for some seconds, which are gone now. Either the SD card is slowly dying or i have some electrical probs with the adapter/cabling.

Regards,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 11:08pm 28 Mar 2023
Copy link to clipboard 
Print this post

Good to know that the problem has been sorted out.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 07:32am 06 Apr 2023
Copy link to clipboard 
Print this post

MMEdit 5.1.1

New feature – support for picomite Library command in the file manager.
You can copy files to the library, adding to the existing library or initialise a new library. You can also copy the library to your PC and delete the library.

MMC scripting files are handled differently. Now each line of a mmc file is displayed with the option to process it, skip that line or cancel the remainder of the file. This is easier to control that the previous method of pausing and reconnecting. (MMCC automatically reconnects anyway now)

There was a bug when MMEdit is shut down with one of its windows minimised. Bug now squashed.

There is also a syntax file for WEBmite (previously picomiteWEB). You will have to delete the picomiteWEB.tkn file yourself if desired.

I will wait for the new manuals before I update the contents of the syntax files.

Jim
VK7JH
MMedit   MMBasic Help
 
ville56
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 95
Posted: 05:33pm 06 Apr 2023
Copy link to clipboard 
Print this post

just installed V5.1.1, MMedit seems to work normal but with MMCC in filemanager mode i just see the PC files, not the files on the pico. File transfers from PC >>> pico work though.

This is how the filemanager windows looks like



Is there something i've done wrong?

Regards,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 08:45pm 06 Apr 2023
Copy link to clipboard 
Print this post

Your slider has moved to the right. Move it back to the centre and the picomite files will be visible.



If it happens again, send me a copy of your mmcc.inf file before adjusting it so I can try and find out why it happened.

Jim
VK7JH
MMedit   MMBasic Help
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 04:53am 07 Apr 2023
Copy link to clipboard 
Print this post

Hi Jim,
Thanks for your latest MMEdit...running well on my new Linux machine...back in the MM world after a hiatus of few years but still regularly reading forum.
(I had an issue on my Ubuntu 20.04 system caused by failed attempts at qt5 install which caused conflict - I removed them from 'Ubuntu Software' screen and all perfect..your instructions all good).

Just one problem with File Commander, looks like it's sending the first field (Time) instead of the file name.
> XMODEM SEND "07:54"
Error : The logical drive number is invalid
>

Maximum Errors. Transfer Aborted.
File transfer failed
Finished

>



Thanks,
Phil
MMCC.zip
Edited 2023-04-07 15:00 by flip
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 05:03am 07 Apr 2023
Copy link to clipboard 
Print this post

Phil,
What device are you connected to. You have it set to "maximite"
You must set the correct device before opening the file manager.

Jim
VK7JH
MMedit   MMBasic Help
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 05:10am 07 Apr 2023
Copy link to clipboard 
Print this post

Thanks Jim,
I can see the problem (I think)
that maximite seems to come back whenever I exit and re-run MMCC
I can't make the picoVGA 'stick'



Phil
Edit...I guess 'Save settings' doesn't over-write  the .inf? ...I can easily edit...learning as I go.

...

OK Saved the change in the MMCC.inf file.
It now shows up as 'picoVGA' fine

But no difference to the problem...still trying to XMODEM SEND the time as a file
Phil
Edited 2023-04-07 15:28 by flip
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 05:35am 07 Apr 2023
Copy link to clipboard 
Print this post

My Linux setup doesn't have that problem.
I will have to have a hting about it.
For now, change the mmcc.inf file so that picomiteVGA is type0 and maximite type6


[Device types]
; FamilyList\ Fname|autostart|autoend|autoName|drives|xmName|filesCMD|filesAll|flash|fnstart
Type6 = maximite|auto|\003|0|2|2|files|0|0|0|0
Type1 = micromite|autosave|\026|0|0|1||0|1|0|0
Type2 = micromite+|autosave|\026|0|1|3|files|0|1|0|0
Type3 = pi-cromite|autosave|\003|0|1|1|files|0|1|0|0
Type4 = cmm2|autosave|\027[12~|1|1|3|ls|0|1|0|30
Type5 = picomite|autosave|\026|0|2|1|files|0|1|1|30
Type0 = picoVGA|autosave|\026|0|2|1|files|0|1|1|30
Type7 = WEBmite|autosave|\026|0|2|1|files|0|1|1|30
Type8 = command|||0|1|0|files|0|1|0|0

That should get things working while I think...

Jim
VK7JH
MMedit   MMBasic Help
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 05:55am 07 Apr 2023
Copy link to clipboard 
Print this post

Thanks Jim.

That worked. I do things haphazardly a lot so very likely I may have missed a step.

Here is my 'problem' version
Device types]
; FamilyList\ Fname|autostart|autoend|autoName|drives|xmName|filesCMD|filesAll|flash|fnstart
Type0 = picoVGA|auto|\003|0|2|2|files|0|0|0|0
Type1 = micromite|autosave|\026|0|0|1||0|1|0|0
Type2 = micromite+|autosave|\026|0|1|3|files|0|1|0|0
Type3 = pi-cromite|autosave|\003|0|1|1|files|0|1|0|0
Type4 = cmm2|autosave|\027[12~|1|1|3|ls|0|1|0|30
Type5 = picomite|autosave|\026|0|2|1|files|0|1|1|30
Type6 = picoVGA|autosave|\026|0|2|1|files|0|1|1|30
Type7 = WEBmite|autosave|\026|0|2|1|files|0|1|1|30
Type8 = command|||0|1|0|files|0|1|0|0


It is very useful software thank you for your help.
Phil
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 06:38am 07 Apr 2023
Copy link to clipboard 
Print this post

The last entry on each line is the file name start (fnstart).
The maximite starts at character 0 and the later devices swapped the order and start the name at chr 30 in the output of FILES.
Thinking its a maximite has other similar differences that will bite you.
VK7JH
MMedit   MMBasic Help
 
ville56
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 95
Posted: 11:13am 07 Apr 2023
Copy link to clipboard 
Print this post

Hi Jim,

thanks, moving the slider did it ... so easy. And it survived the last reboot, so seems to be just my fault. I apologize, but I just didn't see the slider on the far right.

Regards,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 11:59am 07 Apr 2023
Copy link to clipboard 
Print this post

  ville56 said  Hi Jim,

thanks, moving the slider did it ... so easy. And it survived the last reboot, so seems to be just my fault. I apologize, but I just didn't see the slider on the far right.

Regards,
Gerald

One thing I have learnt is that Windows (and Linux) can do strange unexpected things.

I have changed it so you can't slide it all the way over. That way users can see what to do.

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 1 of 8    
Print this page
© JAQ Software 2024