Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:12 25 Apr 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 : Router issue - Pico  W

Author Message
Neskire

Newbie

Joined: 17/04/2022
Location: Denmark
Posts: 9
Posted: 07:21pm 21 Mar 2023
Copy link to clipboard 
Print this post

I have been testing 5 PicoW's running 5.07.07a19 and 5.07.07a21 connected to a TP-Link TL-MR3020 router (stand alone, no internet),
all working  great, no issues. They have been running for dayes now.
I am using Tera Term and Wireshark to monitor.

Then I switch PicoW1 and PicoW3 to a Huawei Soyealink B535-333 router (with internet) and some issues showed up.



"Unable to connect to this website 192.168.8.112 took too long to respond.
ERR_CONNECTION_TIMED_OUT"

It takes from minutes to hours before it stops responding to a page refresh. Same experience with PicoW1.
The only  way to get it working again is a Power reset. The MMBasic seems to be working ok.

Anyone have an idea what's going on? My knowledge of tcp/ip communication is limited.

Sorry for my english I'm from Denmark

PicoW3_Huawei_timeout.zip

PicoW1_Huawei_timeout.zip
Issues in start and end of record


Wireshark "PicoW3_Huawei"
Power reset at frame 289
Power reset at frame 420
Power reset at frame 655

Tera Term from frame 655
Connecting to WiFi...
Connected 192.168.8.112
Starting server at 192.168.8.112 on port 80
ok
1
_____________________________
String is       GET / HTTP
sending page
2
_____________________________
String is       GET /small.jpg HTTP
sending picture
3
_____________________________
String is       GET / HTTP
sending page
4
_____________________________
String is       GET /small.jpg HTTP
sending picture
5
_____________________________
String is       GET / HTTP
sending page
6
_____________________________
String is       GET /small.jpg HTTP
sending picture
7
_____________________________
String is       GET / HTTP
sending page
8
_____________________________
String is       GET /small.jpg HTTP
sending picture
9
_____________________________
String is       GET / HTTP
sending page
10
_____________________________
String is       GET /small.jpg HTTP
sending picture

stopped at frame 1088 with Ctrl "C"

> option list
PicoMite MMBasic Version 5.07.07a21
OPTION AUTORUN ON
OPTION WIFI Oister, **************************
OPTION TCP SERVER PORT 80, 6000
>



OPTION AUTORUN ON
Dim buff%(512)
Dim counter%=0  'counter for WEP TCP interrupt
Dim mystring$="3 The PicoMite Web is GO!!!"
dim a%=0

WEB tcp interrupt tcpintr
print "ok"

Do
Loop

Sub tcpintr
inc counter%
print counter%
Local p%, t%, s$ 'a%
For a%=1 To mm.info(max connections)
LongString clear buff%()
WEB tcp read a%,buff%()
p%=LInStr(buff%(),"GET")
t%=LInStr(buff%(),"HTTP")
If LLen(buff%()) Then Print "_____________________________"
s$=""
If (p%<>0) And  (t%<>0) And (t%>p%) Then
  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%,"t5m.html"
EndIf

Next a%
End Sub


<html>
<head>
<meta http-equiv="refresh" content="300">
<title>PicoMiteWeb Test</title>
<link rel="icon" type="image/x-icon" sizes="16x16" href="data:image/png;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAA
AAEAAAAAAAAAAAAAAAAP//ADMA/wD/AAQAFf8AAAIACABZAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAFAAUAVQBVAAUABQUABQBQBVAFBQAFAFAFBQAAVQBVAAUFBQAAAAAABVAAAAAAAAAAAAAAAA
AAACREMzERAAAAJkRDMxEQAAAmZEQzMREAAAZmREMzERAAAGZkRDMxEQAABmZEQzMREAAAZmREMzE
RAAAGZkRDMxH//wAAuzMAALrtAACa7QAArzMAAKv/AACf/wAA//8AAAA/AAAAHwAAAA8AAIAHAADAAwAA4AEAAPAAAAD4AAAA" />
</head>
<body>
<h1>{mystring$}</h1>
<p>This is a paragraph.</p>
<img src="small.jpg" alt="Small Picture">
<p>Test tcpintr: counter is {counter%}</p>
<br>
</body>
</html>

Erik
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5898
Posted: 09:35pm 21 Mar 2023
Copy link to clipboard 
Print this post

Start by updating your picoWs to the latest firmware.
a28 has a lot of improvements which might solve your problem.

You can use the version in the first post on this page
https://www.thebackshed.com/forum/uploads/matherp/2023-03-21_181400_PicoMiteWeb%20(4).zip
or the a28 from earlier in the same thread.
https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15696&LastEntry=Y#200555#200536

Jim
VK7JH
MMedit   MMBasic Help
 
Neskire

Newbie

Joined: 17/04/2022
Location: Denmark
Posts: 9
Posted: 01:01am 22 Mar 2023
Copy link to clipboard 
Print this post

Thank you Jim.
All 5 PicoW's are now reflashed and running a27 as firmvare.
2 are connected to TP-Link TL-MR3020 router (7 years old).
3 are connected to Huawei Soyealink B535-333 router (6 month old).
I will now let them running and see what happens.
My goal is to use one to monitor my caravan situated 50 miles away, therefor reliability is important, too long to drive in order reset the PicoW.



Greetings
Erik
Erik
 
Neskire

Newbie

Joined: 17/04/2022
Location: Denmark
Posts: 9
Posted: 05:37pm 25 Mar 2023
Copy link to clipboard 
Print this post

The 3 PicoW's connected to the Huawei Soyealink B535-333 router all failed.
Then I switched PicoW1, PicoW3 and PicoW4 to a Huawei B525s 23a router.
After a short time PicoW4 stopped with an error.



Picow4_Huawei_error.zip


OPTION AUTORUN ON
Dim buff%(512)
Dim counter%=0
Dim mystring$="4 The PicoMite Web is GO!!!"

WEB tcp interrupt tcpintr
? "OK"

Do
Loop

Sub tcpintr
inc counter%
print counter%
Local p%, t%, a%, s$
For a%=1 To mm.info(max connections)
  LongString clear buff%()
  WEB tcp read a%,buff%()
  p%=LInStr(buff%(),"GET")
  t%=LInStr(buff%(),"HTTP")
  If LLen(buff%()) Then Print "_____________________________"
  s$=""
  If (p%<>0) And  (t%<>0) And (t%>p%) Then
     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%,"t5m.html"
  EndIf
Next a%
End Sub


How is this possible ??

Restarted PicoW4 and all have now been runnig for 40+ hours, great.

My conclusion: the Huawei Soyealink B535-333 router has an issue with the PicoW as an IOT.
I will now ask my ISP why (both Huawei router has been supplyed by them).
Now I am able to continue with some more exiting programing.

Thanks to Peter's and Geoff's great work, which gives the Rpi Pico a very big advantage, built-in "OS" with a very advanced Basic programming language.
Many thanks Peter and Geoff

Greetings
Erik
Erik
 
TassyJim

Guru

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

Try extending the timeout
OPTION TCP SERVER PORT 80, 10000


Jim
VK7JH
MMedit   MMBasic Help
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024