Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:51 29 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 : PicoMiteWeb alphas a14+, now with added Telnet

     Page 2 of 5    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 10:56pm 14 Feb 2023
Copy link to clipboard 
Print this post

  bigfix said  About every device I ever configured had the option for fixed Network setup


That is probably true, but the PMW might simply have to be the exception to that.
For NOW anyway.

Remember - Peter is only playing about in alpha at the moment, trying to get core stuff working.  He said on his other thread not to ask about this and that extra network feature, cos while in alpha, he's just trying to establish if he can make it work AT ALL reliably enough to come out of alpha, before getting carried away with special network features.

Give it a little time.

If Peter decides that this is working well enough to come out of alpha, static IP etc MIGHT be something he would be willing to do in the later firmware revisions.
Smoke makes things work. When the smoke gets out, it stops!
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 11:01pm 14 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  TERATERM.zip

Thanks Peter,
with your INI file it works. Now I just have to find the crucial place with the settings. Then I can change that in my setup.
What kind of eagle eyes do you have? The font in TeraTerm is much too small! Man oh man.
Matthias
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 11:13pm 14 Feb 2023
Copy link to clipboard 
Print this post

Click SETUP/FONT/FONT and choose a font and size that suits you.

I tend to use Terminal/Regular/14pt, but you can use any font and size you like by just repeating the above step.

To make sure TT remembers what you have set for your font, click SETUP/Save Setup...
Smoke makes things work. When the smoke gets out, it stops!
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 11:27pm 14 Feb 2023
Copy link to clipboard 
Print this post


thx Grogster, but I have a more recent version with even more settings, my settings and font and language german.


THE DIFFERENCE IS:

EnableLineMode=on --> off



@Peter: the a15 is faulty. If I have OPTION TELNET CONSOLE ON and no connection via Tera Term, then the Pico always resets with Tera Term via USB after the EDIT in the middle of the screen!
Running both at the same time, no problem.
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 145
Posted: 01:42am 15 Feb 2023
Copy link to clipboard 
Print this post

Problem solved. After looking at Maker Pi Pico's schematic it appears that I used the wrong option list.
I have several RP2040 modules and also many different ones, each with its own option list, which means that a mistake is easily made. But everything is still intact and so far no software problems.

> option list
PicoMite MMBasic Version 5.07.07a15
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP4,GP5
OPTION COLOURCODE ON
OPTION DISPLAY 40, 90
OPTION SDCARD GP15
OPTION RTC AUTO ENABLE

> option list
PicoMite MMBasic Version 5.07.07b18
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP4,GP5
OPTION COLOURCODE ON
OPTION DISPLAY 40, 90
OPTION SDCARD GP15
OPTION RTC AUTO ENABLE

Jan
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 04:06am 15 Feb 2023
Copy link to clipboard 
Print this post

@Michal

  Michal said  It also works with PuTTy.

Michal


What terminal id is selected as I am getting ^[OS with F4 on the telnet option.

I selected VT100 as in Peter's Terminal.ini but I am seeing control characters with ESC and F Keys.

Thanks,
Hans ...
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 04:15am 15 Feb 2023
Copy link to clipboard 
Print this post

  TassyJim said  MMEdit terminal seems to talk to it OK but there is a problem with the file manager.
XMODEM works but does not conclude reliably. The file list is OK provided there are not too many files to list.
Both problems look like a timing issue that I will track down in time.

The usual "load and run" program transfer seems to be reliable.
They take 10 times longer than USB but will be much quicker than removing a device from service (up a gum tree) to update software!

Jim


Yes same here, it will list a full page worth of files and crashes with "ERROR: Invalid address - resetting" on the key press to continue listing files on the SDcard.





Hans ...
Edited 2023-02-15 14:26 by Hans
 
Michal
Senior Member

Joined: 02/02/2022
Location: Poland
Posts: 123
Posted: 06:59am 15 Feb 2023
Copy link to clipboard 
Print this post

  Hans said  @Michal

  Michal said  It also works with PuTTy.

Michal


What terminal id is selected as I am getting ^[OS with F4 on the telnet option.

I selected VT100 as in Peter's Terminal.ini but I am seeing control characters with ESC and F Keys.

Thanks,
Hans ...

Actually.
The Demo client I posted a few posts earlier (Delphi11-WIN32, ICS library) in VT100 mode seems to behave correctly.

Michał
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 08:33am 15 Feb 2023
Copy link to clipboard 
Print this post

V5.07.07a16


PicoMiteWebV5.07.07a16.zip



This fixes XMODEM. Apparently if you want to send 255 over telnet you have to send it twice. So my driver now sends it twice and when it receives it twice strips one. XMODEM is pretty slow over telnet but I just transferred 69KB successfully

Also fixes crashing if you have OPTION TELNET ON set but don't have a telnet connection - forgot to block the telnet transmit in this case - trivial one line change
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 09:15am 15 Feb 2023
Copy link to clipboard 
Print this post

  Quote  for the avoidance of doubt, The PicoMiteWeb will always be in station mode


Any reason for only supporting station mode?

On Raspberry Pi Documentation site it states that W supports soft AP mode with up to 4 clients.

  Quote  Soft access point supporting up to four clients
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 09:22am 15 Feb 2023
Copy link to clipboard 
Print this post

  Quote  Any reason for only supporting station mode?


yes because there are only so many hours in a day and the command complexity of supporting both with interlocks between the modes etc. would make it a mess.

Likewise for things like fixed IP addresses. There are only so many variants that are realistic to support.

This isn't an Arduino where you build a specific application for a particular task. It is a general purpose device. My intention is to provide a good spread of usable functionality. Anything else anybody wants then they have the C source and it is up to them.

UPDATE there is still a crash where you LIST ALL a long file (and possibly other commands that produce a long stream of fast output)
Edited 2023-02-15 19:23 by matherp
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 09:27am 15 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Any reason for only supporting station mode?


yes because there are only so many hours in a day and the command complexity of supporting both with interlocks between the modes etc. would make it a mess.

Likewise for things like fixed IP addresses. There are only so many variants that are realistic to support.

This isn't an Arduino where you build a specific application for a particular task. It is a general purpose device. My intention is to provide a good spread of usable functionality. Anything else anybody wants then they have the C source and it is up to them.

UPDATE there is still a crash where you LIST ALL a long file (and possibly other commands that produce a long stream of fast output)


Fair Enough, thanks for clarifying.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 09:35am 15 Feb 2023
Copy link to clipboard 
Print this post

Fixed the crash with LIST ALL


PicoMiteWebV5.07.07a16.zip
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 05:47pm 15 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  Fixed the crash with LIST ALL
PicoMiteWebV5.07.07a16.zip



... now I need a double ESC to exit the EDITor ?!?

... and this message when I exit Telnet / TeraTerm and then reconnect:

Telnet disconnected -14
>


... and the LED is no longer flashing ?! ... after a long time the led started to blink again!


Edited 2023-02-16 05:24 by homa
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 08:08pm 15 Feb 2023
Copy link to clipboard 
Print this post


@peter, hint for a  glitch:
to protect the Telenet console I tried to set OPTION PIN 1234.

The incorrect input via USB leads to a reboot! (1)

But when reconnecting via Telnet no access with correct PIN works! Also restart! (2)

Only with access via USB and correct PIN I get back into the Picomite. (3)





 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 10:43pm 15 Feb 2023
Copy link to clipboard 
Print this post

It would be better to keep things simple to start with and not use things like OPTION   PIN. Bugs like that are for a MUCH later day
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 07:05am 16 Feb 2023
Copy link to clipboard 
Print this post

ok, no problem. does not need to be solved now, is an alpha. But you should know and collect all known errors. Maybe other users will stumble over it too.
Thanks for your feedback.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 08:05am 16 Feb 2023
Copy link to clipboard 
Print this post

STATUS UPDATE AND REQUEST

I'm not unduly worried about the odd crash. Most of those are things like a missing interlock - i.e. a request is made for a service that isn't available or started

My big concern is the reliability of the Basic TCP server response.

If I run Jim's very simple test program below, then it will run for maybe 4 hours perfectly happily and then the PicoMite will lock up and stop responding. It is very difficult to debug something that behaves like this.
What I urgently need is a test example that fails reliably AND more quickly.
I suggest forgetting Telnet for the moment and concentrating just on this as, from my perspective, we can't make much more progress until this is fixed.

Now it is not impossible that the problem is buried deep within the cyw43 module or the Raspberry Pi SDK but hopefully it is just something I'm missing.

Anyway - help would be appreciated


Dim buff%(512)
Dim mystring$="PicoMite Web Test"
Dim FLOAT mytemp, myhumid, oldtemp, oldhumid
Dim mytime$
Dim k
Timer = 3000
Date$ = "01-04-2000"
On ERROR SKIP
WEB ntp 11
If Date$ = "01-04-2000" Then Print "OOPS!"
Print Date$
WEB tcp INTERRUPT poll
Do
  If Timer > 3000 Then doread
Loop
'
Sub poll
Local p%, t%
For a%=1 To MM.Info(MAX connections)-1
  WEB tcp READ a%,buff%()
  p%=LInStr(buff%(),"GET")
  t%=LInStr(buff%(),"HTTP")
  If LLen(buff%()) Then Print "_data_"
  s$=""
  If (p%<>0) And  (t%<>0) And (t%>p%) Then
  If k = 0 Then LongString PRINT buff%() : k = 1
    s$=LGetStr$(buff%(),p%,t%-p%+4)
    Print "String is ",s$
  EndIf
  If Instr(s$,"small") Then
    Print "sending picture"
    WEB Transmit FILE a%,"small.jpg","image/jpeg"
  ElseIf Instr(s$,"favicon") Then
    Print "sending icon"
    WEB Transmit FILE a%,"favicon.ico","image/vnd.microsoft.icon"
  ElseIf Instr(s$,"HTTP") Then
    Print "sending page"
    WEB transmit PAGE a%,"st_test.html"
    Memory
    Print "page sent"
  EndIf
Next a%
End Sub

Sub doread
Bitbang HUMID GP1, mytemp, myhumid,1
If mytemp > 999 Then
  mytemp = oldtemp
  myhumid = oldhumid
  Print "!";
  badrdg = badrdg + 1
Else
  oldtemp = mytemp
  oldhumid = myhumid
  Print "*";
EndIf
allrdg = allrdg + 1
mytime$ = Time$+"  "+Date$+"   "+Str$(badrdg)+"/"+Str$(allrdg)
Timer = 0
End Sub


<html>
<head>
<title>Stowport Test</title>
<meta http-equiv="Refresh" content="15">
</head>
<body>
<h1 align="center">{mystring$}</h1>
<p align="center">Temperature is {mytemp}</p>
<p align="center">Humidity is {myhumid}</p>
<p align="center">Reading taken at {mytime$}</p>
</body>
</html>
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 359
Posted: 08:37am 16 Feb 2023
Copy link to clipboard 
Print this post

Pico W crash

Can the odd crashes be caused by Wi-Fi Reliability?
  Quote  One reason why programs fail over a long period of time involves Wi-Fi reliability. If your Wi-Fi becomes unreliable, the Pico W's first instinct is to crash.


  Quote  


/Pluto
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 09:13am 16 Feb 2023
Copy link to clipboard 
Print this post

Peter,
I am seeing two problems.
The response time of the pico makes it unusable over anything other than local networks.
The variable substitution is fast and I don't think it is an issue.

The time to give the first reply packet is 260-330mS
This compares to a server I have running on a RPi. It's first packet arrives in 70mS.

The main problem is as you describe. The occasional dummy spit for no apparent reason. Mine happen when I am reasonably certain that no-one is trying to connect.

I will keep trying but haven't found a way to cause it to happen when I want it to.

To quote an Australian politician from a few years ago.
"Life wasn't meant to be easy"

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 2 of 5    
Print this page
© JAQ Software 2024