Single file transfer

Support forum for MegunoLink
Post Reply
adbgw
Posts: 19
Joined: Mon Apr 05, 2021 7:33 am

Sun Sep 11, 2022 1:02 pm

Is there a way to upload and download single files via MeguLink?
I'd like to be able to upload and download configuration settings from/to the micro, and also download a new program image for reprogramming via a bootloader.
Device File Transfer isn't appropriate as the micro has no file system.
Program Device isn't appropriate as the micro isn't an Arduino (it's a PIC18F).
Seems configuration settings can be taken care of via a Property Table, but that's not super ideal (user doesn't need to see the config details).
For downloading to the micro it'd be ideal to have an Interface Panel 'File picker' control to select a file (with extension filter so hopefully selected file is valid for the purpose) which is then sent to the micro.
Ideally for uploading from the micro, some serial header/footer pre-/post-amble which MegunoLink recognizes as 'containing' a file, which when received on the PC side asks for a save file name/location, and saves the received data.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Tue Sep 13, 2022 9:07 am

Sorry I don't think there is any method to make this work. Will add to the request list.
adbgw
Posts: 19
Joined: Mon Apr 05, 2021 7:33 am

Wed Sep 14, 2022 11:45 am

Hope it's added sooner rather than later :) as it's just become more important as I've just discovered that "Load values from file" does not send Change messages when it changes a control's value. I've filed a bug report in Bugs section of forum as an own response to "'Changed' messages sent when updated from micro" (different but related).

In a previous version of my project there were no Communication messages set on the controls, and the micro used to request the values - ie it polled all the controls in the turn. That ended up very slow as the number of controls approached 200 (!).

So in my new version all controls send messages when the value is changed, and the micro no longer requests any control values.

But the client uses "Save values to file" and "Load values to file" for duplicating configurations between different units. When the micro requested the values that worked fine.

Expected it to still work, as I expected MegunoLink to send 'changed' messages if control values were changed as a result of a load - but it doesn't. (Perversely though it does send changed messages when a control value is changed by a message sent from the micro - telling the micro the 'new' value the micro just sent! My original bug reported under "'Changed' messages sent when updated from micro" mentioned above.)

So right at the moment my only option appears to be to use a Property Table.

(On a somewhat related note: Would be nice if MegunoLink had an 'end of line' delay setting, so comms to the micro could be paced a little. This delay could also be used for <quote> 'small delay' <end quote> added between each line of multi-line 'Changed value' messages - nowhere is it stated what that 'small delay' is, and it was far too long for my application.)
Post Reply