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 : PicoMite MMBasic Version 5.07.07a29 with TFTP
Page 1 of 2 | |||||
Author | Message | ||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
PicoMite MMBasic Version 5.07.07a29 with TFTP (Trivial File Transfer Protocol) First of all @Peter many many thanks! This version looks very promising and could almost be the first beta. Long term stable, paramaters via POST work again. In between I was a bit sad because of the featuritis and the missing instability. But then came TFTP and that has surprised me then but very positive! Unfortunately tftp which is included in Windows (after enabling it in the features) can't do wildcards. Also not in the CMD. But in the Powershell I then searched the following command together (I'm a beginner in PS!): Get-ChildItem *.txt | ForEach-Object -Process {if (!$_.PSIsContainer) {tftp -i 192.168.1.119 put $_.Name;} Start-Sleep -seconds 1} The parameter -i is important (otherwise e.g. no images will work). With this command e.g. only .TXT or .HTML or also all (*.*) files from the current directory can be transferred to the PicoMite in one go! The pause is important so that the PicoMite can keep up with the requests. Also the deletion on the PicoMite works with wildcards (e.g. kill "*.txt"). @Peter: Is it possible to pass a -y or -all here? Otherwise you have to confirm each file individually. Since TFTP doesn't know DIR, you can't GET files with wildcards. Cool is also that TFTP works if a basic program (e.g. the simple web server) is executed on the PicoMite. So files can be exchanged or added during operation. But that brings me to the next question @Peter: Please create the possibility for security to enable/disable TFTP from the PicoMite side. Preferably not only as OPTION but also as basic command, then you can activate this in your program for e.g. updates. Thanks! Matthias |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
Already there KILL "*.txt",all will prompt once only I'll see what is possible - no promises Edited 2023-03-28 07:55 by matherp |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6102 |
Provided you don't open up the TFTP port (udp 69) in your router, it can only be used within your local network so is safe from the bad world, but not safe from your own mistakes. Jim VK7JH MMedit MMBasic Help |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
Hello Peter, good to know. I had a look in the manual beforehand. This should be added there. A task for @Geoff?! page 19: KILL fname$ Delete a file in the current directory on the current drive. and see picture: Nice that you check if TFTP can be enabled/disabled. How will the weather be the next days? ;-) By the way, are you planning a version of PicoMiteWeb with VGA? That would open up a lot of new possibilities! :-) Would this be possible at all? @Jim: You are right when you are alone in your own WLAN. But with three kids and friends the world looks different. And I think the PicoMiteWeb deserves to be used in cool projects. I'm thinking about sports club and community. And now, at the latest, it needs a certain level of protection. Matthias |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
Sounds like a good use for paired Picos (one W, one VGA). John |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
No - not enough memory to be worthwhile I will include OPTION TFTP ON/OFF in the next release. This will be a permanent option used at the command line only - default will be ON. It is not realistic to allow this in programs as it is not possible to be sure that all memory is released when you attempt to disable web functions |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6814 |
I just happen to know of a PCB for a Pear of PicoMites, John... ;) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
Hehe I thought so! John |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
PicoMiteWeb now in beta. https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Minor change WEB TLS CLINT REQUEST now takes an extra optional parameter WEB TLS REQUEST request$, array%() [,timeout] [,sendheader] sendheader can be 0 or 1 and defaults to 1 Setting sendheader to 0 blocks the construction of a standard HTML request to the end of your data (request$) |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3152 |
Not sure where to put this, but with PicoMite MMBasic Version 5.07.07b34, when I try "OPTON KEYBOARD US" I get "Error : Option System I2C not set". PicoMite MMBasic Version 5.07.07b34 Copyright 2011-2023 Geoff Graham Copyright 2016-2023 Peter Mather > option keyboard us Error : Option System I2C not set > option list PicoMite MMBasic Version 5.07.07b34 OPTION SYSTEM SPI GP2,GP3,GP4 OPTION LCDPANEL ILI9488, LANDSCAPE,GP20,GP19,GP18 OPTION TOUCH GP21,GP22 GUI CALIBRATE 0, 3950, 3882, -1244, -859 Is it supposed to be the case that System I2C must be set for OPTION KEYBOARD to be used? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
Will fix |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 128 |
As you solved all the really challenging issues... May I ask again for the boring feature of fixed IP Addresses ? Default at initial boot or casual use should stay at DHCP But it should be possible to override IP Address, Subnet, Gateway with an optional config option This would really help in many situations ! |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
No: sorry. Easy enough to set in your router so work for the sake of it and none-trivial in the firmware - there isn't any example code |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
What are these many situations? I'm puzzled! John |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
I only do this on my router... none of my devices have been hardcoded with Static IPs and my router knows all of their MAC addresses. Each gets assigned a known IP based on the known MAC. I currently have 35 active devices. Edited 2023-04-04 10:24 by pwillard |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 128 |
I fully respect Peters reasoning - and will not bother him any longer ! But as the question came up - here are my reasons for static IP I have quite a few IP devices - my Class C subnet is getting full... To keep things organized, I have a small DHCP pool and mostly fixed IPs Longerterm I will implement multiple VLANS/SSID and filtering between them Why do I use fixed IP Addresses ? I usually keep a preconfigured spare unit for each important device If something fails (usually at the worst moment...) it is just a quick swapout There is no easy way to have two MAC addresses pointing to the same IP address in the router If I would use a spare WebMite for multiple applications, it has the same MAC address, (independent from the application) When I flash some app, I would also need to modify the DHCP config accordingly I also keep a preconfigured spare router If I add a new DHCP device to the current router, I would need to update the spare If I change to another type of router, I would need to reenter all the DHCP entries into the new router I have multiple DSL lines - with manual config I can select the right router There is no easy way to do this with DHCP So far EVERY device I use has an option for fixed IP addresses Some are easy, some are rather challenging - but doable I would like to use WebMites, but DHCP only does not fit to my environment |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
Fascinating. I've never had any of the kinds of devices you mention fail (*) so I guess either I'm very lucky or you're rather unlucky... (*) oh, how to tempt fate! John |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9139 |
FYI, I've just posted a question about this on the Pico forum and static IP addresses are not supported at all by the current RP2040 sdk so even if I wanted to..... |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 128 |
Strange, at least CircuitPython seems to support it - different SDK ?? CircuitPython Example I have quite a few failures - but to be fair, most are in PSU sections If a light actor has a electrolytic capacitor for 240v in the size of a pea, you can bet that it fails after a few years... MLCC capacitors seem to develop shorts recently, i.e. in routers Current self healing X2 Capacitors loose their capacitance really quick Older types last since 30+ years i.e. in my ancient X-10 actors And soon thunderstorm season is coming - then anything can get barbecued... |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
I dunno. I find assigning static IP's to be a pain. |
||||
Page 1 of 2 |
Print this page |