Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : MMBasic V6.03.00 release candidates

   Page 8 of 27    
Posted: 02:10pm
16 May 2026
Copy link to clipboard
matherp
Guru

V6.03.00RC8
PicoMiteRP2040V6.03.00RC8.zip
PicoMiteRP2350V6.03.00RC8.zip

All versions
Relaxes the restriction whereby labels had to be the first thing on the line. They can now have white space before them.
Changes to PIO RUN to ensure an existing PIO program is shutdown properly

WebMite both
MM.INFO(WIFI STATUS) is improved so that it doesn't return 1 during retries

WebMite RP2350
Full implementation of HTTPS/TLS

  Quote  WEB OPEN TLS CLIENT domain$, port [,timeout]
Open an encrypted TLS connection to a remote server.  Available on the
WEBRP2350 firmware only.
'domain$' is either a hostname (eg, "api.example.com") or a dotted-quad
IP address.  'port' is the TLS port — typically 443 for HTTPS.
'timeout' is the optional time out in milliseconds and defaults to 5000.
This covers both the DNS lookup and the full TLS handshake.
Once the connection is open the WEB TCP CLIENT REQUEST and WEB CLOSE TCP
CLIENT commands used for plain TCP apply unchanged — the encryption is
transparent to the application.  If a CA bundle has been loaded with
WEB TLS CA the server's certificate is verified against it and the
connection is aborted if verification fails; otherwise the TLS handshake
is encrypted but the server identity is not authenticated.  See the
chapter "Secure (TLS) Connections" for details.

WEB OPEN TLS STREAM domain$, port [,timeout]
Open an encrypted TLS connection in streaming mode.  Available on the
WEBRP2350 firmware only.
Identical to WEB OPEN TLS CLIENT except that subsequent data flows use
the WEB TCP CLIENT STREAM command (with a circular buffer and read/write
pointers) rather than the request/response WEB TCP CLIENT REQUEST.  Use
this form to receive a continuous TLS-protected stream — for example, to
fetch an HTTPS audio stream and feed it to PLAY STREAM.
See WEB OPEN TLS CLIENT for parameter details and the chapter "Secure
(TLS) Connections" for the overall TLS workflow.

WEB TLS CA filename$
Load a PEM-encoded CA certificate bundle from the filesystem and enable
peer-certificate verification for subsequent TLS connections.  Available
on the WEBRP2350 firmware only.
'filename$' is the name of a file in the default directory containing
one or more concatenated "-----BEGIN CERTIFICATE-----" blocks.  Each
block is the public certificate of a trusted Certificate Authority.
After this command runs successfully every TLS connection (WEB OPEN TLS
CLIENT, WEB OPEN TLS STREAM, and WEB MQTT CONNECT on port 8883) will
only succeed if the server presents a certificate signed by one of the
CAs in the loaded bundle.  Verification stays in effect until WEB TLS
NOVERIFY is run or the WebMite is restarted.
The system clock must be set (via WEB NTP) before this command will
produce useful results — certificates carry validity dates which can
only be checked against real time.  Without a real clock all
certificates appear expired and verification will always fail.
If the file cannot be parsed as PEM or contains no valid certificates
an error will occur and verification remains in its previous state.

WEB TLS NOVERIFY
Drop any loaded CA bundle and revert to the default behaviour for
subsequent TLS connections — encrypted but not authenticated.  Available
on the WEBRP2350 firmware only.
After this command any WEB OPEN TLS CLIENT, WEB OPEN TLS STREAM, and
WEB MQTT CONNECT on port 8883 will accept any server certificate
(including self-signed) without checking who issued it.  Useful for
testing or for connections on trusted local networks where the cost of
maintaining a CA bundle is not justified.  See the chapter "Secure
(TLS) Connections" for guidance on when this is appropriate.
A note on MQTT, though it didn't get a new sub-command name: WEB MQTT CONNECT on port 8883 now automatically uses TLS on the WEBRP2350 build, sharing the same CA-or-no-verify state controlled by the two commands above. If you've already got an MQTTS blurb in the MQTT section of the manual that mentions this, you're covered; otherwise it's worth a one-line note in the existing WEB MQTT CONNECT entry.



Program to create PEM encoded certificate bundles and sample certificates and instructions for use.
fetch_ca.zip

Test program for TLS functionality
https_test.zip
 
Posted: 05:21pm
16 May 2026
Copy link to clipboard
ville56
Guru

  Quote  MM.INFO(WIFI STATUS) is improved so that it doesn't return 1 during retries


thanks Peter, works great. Now trapping every non-connection situation so far.
 
Posted: 07:37pm
16 May 2026
Copy link to clipboard
Volhout
Guru

@Peter,

1/ The mm.info(path) has changed since 6.02.01. Tested on 2040MIN version.

Program
print cwd$
print mm.info(path)


Store this program, called "cwd.bas" in A:/ and B:/

option list
PicoMite MMBasic RP2040 V6.02.01  <----------- Last official release on Geoff's site.
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION SDCARD GP17
OPTION F5 flash run 2
> a:
> run "b:/cwd
A:/
B:/ <---------------path is B:/


option list
PicoMiteMin MMBasic RP2040 V6.03.00RC8 <------------- last version
OPTION SYSTEM SPI GP6,GP3,GP4
OPTION AUTORUN  1,NORESET
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 252000
OPTION DISPLAY 40, 80
OPTION LCDPANEL ILI9341, RLANDSCAPE,GP2,GP1,GP0
OPTION TOUCH GP5,GP7
GUI CALIBRATE 0, 407, 267, 897, 677
OPTION SDCARD GP22
OPTION AUDIO GP20,GP21', ON PWM CHANNEL 2
OPTION MODBUFF ENABLE  192
OPTION F5 flash run 2
OPTION PLATFORM Game*Mite
> a:
> run "b:/cwd
A:/
NONE <---------------path = NONE
>


Filemanagers use this, and some games.

Please repair this..


2/ The fix you did to PIO is not working, in fact it makes things worse. Reading of FIFO always shows the same value, even if PIO is changing it (unless PIO is not running at all because of the change).

The programs that run PIO DMA FIFO work. But the ones that read individual FIFO do not. But they work in V6.02.01. The only simple examples I have are the Quadrature decoder, and the NES decoder. But these require external hardware you may not have.
Please indicate what I could do to help analyze.

Regards,


Volhout
Edited 2026-05-17 06:19 by Volhout
 
Posted: 08:22pm
16 May 2026
Copy link to clipboard
matherp
Guru

Need a test program that shows the PIO problem - la_24_2 works fine
The cwd bug is trivial
Edited 2026-05-17 06:47 by matherp
 
Posted: 09:09pm
16 May 2026
Copy link to clipboard
Volhout
Guru

@Peter,

Leave the PIO issue for now. Tried to create a good demo, but in trying to do so, all started working again. Strange.

Volhout
 
Posted: 09:14pm
16 May 2026
Copy link to clipboard
matherp
Guru

  Quote  Leave the PIO issue for now.

The change was trivial - just ensuring the old PIO was stopped before setting up the new one. Basically, the same as your workaround.
 
Posted: 11:18am
17 May 2026
Copy link to clipboard
phil99
Guru


There is a possible bug in the I2C SLAVE WRITE command.
If the number of bytes requested by the Master doesn't exactly match the number sent by the Slave the slave I2C freezes.
The freeze occurs after all the data has been sent and received by the master.

Examples and a workaround are in the Stepper project thread.
Also here.
Edited 2026-05-17 21:20 by phil99
 
Posted: 01:28pm
17 May 2026
Copy link to clipboard
matherp
Guru

V6.03.00RC9
PicoMiteRP2040V6.03.00RC9.zip
PicoMiteRP2350V6.03.00RC9.zip

Fixes bug introduced in MM.INFO(PATH)
Fixes various bugs in I2C slave operation and use of string for single byte transfers (master and slave).
The master/slave example in the manual should now work as-is (change nect to next) and LIST SYSTEM I2C will correctly identify a running I2C slave without it hanging.
Edited 2026-05-17 23:43 by matherp
 
Posted: 01:57pm
17 May 2026
Copy link to clipboard
twofingers
Guru


Hi Peter,
can you confirm that the DIR() function is not yet working correctly? In version 6.03.00RC8, the contents of drive "A:" are displayed to me even though I have selected drive "C:". I suspect similar issues may exist for other file functions/commands as well.
Additionally, I receive an error message for the following:

> ? MM.INFO(VALID CPUSPEED 315000)
1
> option cpuspeed 315000
Error : Invalid Option


One more note:
A potential bug—which, unfortunately, I have not yet been able to reproduce - is that yesterday, within the FM screensaver routine, additional opening parentheses were inserted after `RND` (resulting in `RND(`). Following the correction, this appears to be resolved.

Good news: "Option KEYBOARD repeat" is working again. Thanks!

Regards
Michael
 
Posted: 02:25pm
17 May 2026
Copy link to clipboard
matherp
Guru

Will fix the dir function. The cpuspeed message is correct assuming you are using vga or hdmi in which case the cpu speed can only be changed with the option resolution command.
 
Posted: 02:42pm
17 May 2026
Copy link to clipboard
twofingers
Guru


  matherp said  ... The cpuspeed message is correct assuming you are using vga or hdmi in which case the cpu speed can only be changed with the option resolution command.
That is strange; something must have changed again. I never altered the resolution, yet on a different Pico2, I still ended up with 315000 as the CPU speed. Confusing - but your suggestion works! Thanks!
Regards
Michael
 
Posted: 04:27pm
17 May 2026
Copy link to clipboard
matherp
Guru

Bug fix for DIR() function used on the C: drive - no version change.

PicoMiteRP2350USBV6.03.00RC9.zip
 
Posted: 05:20pm
17 May 2026
Copy link to clipboard
twofingers
Guru


Hi Peter, I can confirm that DIR() is now working. Thank you very much!
Unfortunately, `mm.info("Free space")` reports the free space for drive "B:" instead of "C:".
Regards
Michael
 
Posted: 05:51pm
17 May 2026
Copy link to clipboard
matherp
Guru

I can also fix that but be warned, with a large USB flash drive the first time the command is run will be catastrophically slow because of the limitations on USB flash drive read/write speeds (2min28seconds for a 64Gb USB flash drive)
 
Posted: 06:00pm
17 May 2026
Copy link to clipboard
twofingers
Guru


With large SD cards, there are also significant delays. I avoid this by creating smaller partitions - e.g., 1 GB. Nevertheless, I appreciate the ability to use USB sticks.
Edited 2026-05-18 04:01 by twofingers
 
Posted: 06:06pm
17 May 2026
Copy link to clipboard
matherp
Guru

 
Posted: 06:38pm
17 May 2026
Copy link to clipboard
twofingers
Guru


Hi Peter, I can confirm that "Free Space" is now working as well.
The first time around, it takes about 40 seconds for a 2 GB stick. Subsequent updates appear to happen instantly. Thanks again!
 
Posted: 08:36pm
17 May 2026
Copy link to clipboard
terekgabor
Senior Member

  terekgabor said  Hello Peter!

I tested web error handle and it seems it became much better. Now I can handle errors, so I have no slowing down experienced.

Some idea for music playing (for example Flac or Mp3):
Can be good a LOOP option in the Play command. If I play a single file it can start from beginning when ended. If I play a directory start playing first file after the last ended.

And I don’t know if there is a possibility to make PLAY REWIND n /PLAY FORWARD n for example to go forward or backward n seconds in the actually playing file.

G@bor


Hello Peter!

One more idea/question here:
Can PLAY MODFILE command modify to work the same way as for example PLAY MP3?: if I put a folder name after it will play all files from folder. (Also LOOP option and fwd,bwd can be good here too as I mentioned above.)

G@bor
 
Posted: 08:43pm
17 May 2026
Copy link to clipboard
matherp
Guru

  Quote  Can PLAY MODFILE command modify to work the same way as for example PLAY MP3?

No: modfiles are designed to loop and never end. The codec doesn't know whwere it is in the file, it just keeps reading and playing.
 
Posted: 10:52pm
17 May 2026
Copy link to clipboard
phil99
Guru


  Quote  Fixes various bugs in I2C slave operation
Thank you, and a bonus is the fix for the master requesting the wrong number of bytes provides a means of error checking.

If the master requests more than the slave has ready to send the data stream loops back to the beginning. Requesting double the amount available allows the first half of the received string to be compared with the second half to check for errors.

Edit.
Setup a MM2 v5.05.05 with the slave program and its behavior is exactly the same as RC9 is now.
Edited 2026-05-18 15:53 by phil99
 
   Page 8 of 27    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026