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 : Error : [CYW43] do_ioctl(2, 263, 16): timeout
Page 2 of 2 | |||||
Author | Message | ||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
Ahh, OK... thanks Gents. I presumed it was a timeout, but with no reference I didn't want to take it for granted. The manuals are top-notch anyway, SOMEthing, sometimes gets missed somewhere. I was just curious, thinking maybe I'd missed a vital clue John |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
I am aware that this lockup in the software is different to that being covered by this thread as it didn't show the error code. I am curious to see that the code recovered but the watchdog timer did not restart the program and the program dropped to a prompt after reconnecting. ntp address 67.219.111.127 got ntp response: 03/05/2024 17:00:00 [133] WEB TCP CLIENT REQUEST Query, buff%() Error : No connection Error: Invalid address - resetting PICOE66178758B3 connecting to WiFi... Connected 192.168.1.115 Would this be the effect of the ON ERROR SKIP? 0A47 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
Option Autorun ON ? VK7JH MMedit MMBasic Help |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
Thanks Jim, Autorun on is back now. 0A47 EDIT But!!!! > option autorun on > option list WebMite MMBasic Version 5.08.00 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP26,GP27 OPTION AUTORUN ON OPTION LCDPANEL ILI9488, RLANDSCAPE,GP15,GP14,GP13,GP17 OPTION WIFI ???????, ?????? , PICOE66178758B3 OPTION TOUCH GP12,GP11 OPTION SDCARD GP22 OPTION AUDIO GP2,GP3', ON PWM CHANNEL 1 > run [133] WEB TCP CLIENT REQUEST Query, buff%() Error : No connection > Still locks at prompt after run. Will see what happens. 0A47 Edited 2024-05-03 22:14 by OA47 |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
I may have this wrong but I believe certain errors cause OPTION AUTORUN to be removed to prevent an infinite loop of crash - reboot - run - crash. If you don't think that is going to be an issue apply OPTION AUTORUN OFF then add this to the top of the program:- Sub MM.Startup : Run : End Sub So far that has worked for me. Edit. As far as I know that has always been the case. Not connecting at start-up causes a crash, WiFi needs to be available before booting. Edited 2024-05-04 07:22 by phil99 |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
Thanks Phil, that explains why the Option AUTORUN disappears. 0A47 |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
I think this is related - from the manual... John |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
As far as I now, "Error : No connection" refers to the WEB OPEN connection, not WiFi. WEB OPEN TCP CLIENT "xxxx", 80 WEB TCP CLIENT REQUEST Query, buff%() WEB CLOSE TCP CLIENT He is getting past his NTP so the WiFi is running OK. "Error: Invalid address - resetting" indicates that you are heading to a cancelled autorun and a softreset The reason could be anyof these:. exception_set_exclusive_handler(HARDFAULT_EXCEPTION,sigbus); exception_set_exclusive_handler(SVCALL_EXCEPTION,sigbus); exception_set_exclusive_handler(PENDSV_EXCEPTION,sigbus); exception_set_exclusive_handler(NMI_EXCEPTION ,sigbus); exception_set_exclusive_handler(SYSTICK_EXCEPTION,sigbus); Jim VK7JH MMedit MMBasic Help |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
So, I've been running tests for a few days (VB to WM on TCP port 1111 and sending regular packets when a timer fires) MMbasic ver 5.09.00RC4 As yet, I haven't seen the error code in the subject line crop up... Thanks Peter, maybe it's the last we've seen of that one? Still having a lot of random freezes, so just trying to work through some ideas there. John |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
I have a test device running with no attempts to connect to it. It suffers from the random CYW43 failures. With the watchdog in service this resulted in reboots. I have disabled the watchdog and have noticed something interesting. When the device fails it stops for 4310 seconds and then carries on as if nothing had happened. It is always 4310 seconds +/- rounding errors. I don't know of any significance with 4310 seconds. ~72 minutes. Jim VK7JH MMedit MMBasic Help |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Just about possibly: 32-bit unsigned 4294967296 so maybe a counter 1000000 per second (i.e. in uS) Would be 4294 or 4295, though, which is 15 secs or so different. John |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
An interesting observation Jim. I don't think mine had ever done that, but maybe I never waited long enough to find out. I've had several CYW43 messages in a row as though it was in a loop, but I still had to do a hard reset to clear them. So far for the last week or so, I've had no CYW43 errors (Maybe Peter's fixed the issue, or it's just not 'the time' for it to happen), but I've had plenty of freeze ups (some fire the W/D, some don't). I haven't made any conclusions on the why's as yet. I even played with the idea of inserting 'wait-states', like in the old 232 comms to maybe slow things down, just in case the client wasn't as quick as the WebMite. It didn't work, but it was just an idea Still plodding on though [Edit] Not sure what the 4310 seconds could mean. Maybe JohnS above is correct? Edited 2024-05-10 15:27 by Malibu John |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
There's one thing I haven't been able to understand during my coding and testing... Consider the following code: First up, the VB code I'm running that simply 'talks' to the WebMite... (commented, but simple enough to follow) Option Explicit Private Declare Function GetTickCount Lib "kernel32" () As Long 'here is the high speed timer Private HitNum As Double 'count how many packets are sent variable Private StartTick As Long 'store the tick count value variable Private Sub Form_Load() HitNum = 0 'reset the count variable End Sub Private Sub Form_Unload(Cancel As Integer) Winsock1.Close 'close the winsock connection End Sub Private Sub Timer1_Timer() 'timer function Winsock1.Close 'close the winsock While Winsock1.State <> 0 'if we haven't closed, loop here until we have DoEvents Wend Winsock1.Connect "192.168.0.114", 1111 'connect to this IP address and port StartTick = GetTickCount 'get the start tick While Winsock1.State <> 7 'loop until we've actually connected Text1.Text = "Connecting..." 'show that it's trying to connect DoEvents Wend End Sub Private Sub Winsock1_Connect() 'connection is established HitNum = HitNum + 1 'add to the value Winsock1.SendData "VB Hit " & HitNum 'assemble the text and send it Text1.Text = "Waiting for reply No. " & HitNum 'show that we're waiting for a reply End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) 'Something has been received Dim RecStr As String Winsock1.GetData RecStr 'get what came in Text2.Text = "Reply Text - " & RecStr 'show the data received Text4.Text = GetTickCount - StartTick 'show the time taken between sending & receiving End Sub ...and then the WM code I'm running... Option EXPLICIT Option DEFAULT NONE Option autorun on WEB TCP INTERRUPT WebInterrupt do Watchdog 20000 loop sub WebInterrupt local Integer ConnNum local integer ConnData(512) for ConnNum = 1 to mm.info(Max Connections) longstring clear ConnData() web tcp read ConnNum, ConnData() if llen(ConnData()) > 0 then web tcp Send ConnNum, ConnData() end if web tcp close ConnNum next ConnNum end sub So, the VB code send a TCP request at 1 second intervals, the WM receives it and send out the data that came in then displayed in a text box in VB. Simple enough, and I would think that the 'round trip time' between send and receive would be pretty much the same (within reason...) But, the round trip time can vary a huge amount. I've seen as low as 12ms and as much as 500ms for the exact same code, running in the same session. Should the round trip be close to the same, or is there something else going on? John |
||||
led-bloon Senior Member Joined: 21/12/2014 Location: AustraliaPosts: 205 |
Try: Limit loop 'ConnNum' to one iteration only See if there is any changes. led Miss you George |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
Yep, I like the way you're thinking, led - been down that path a few times already. Naturally, thought I better do it ONE more time, just to be really, really, really sure! Single iteration results - FOR/TO loop results - Showing MAX, MIN & AVG ticks and which data packet did the deed. There's some differences in the two, but no real reason that could be nailed down. The WM code only responds if the packet has data in it and the VB code only counts the local trip time, so only really counts a single iteration in 'local time' anyway John |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
02:30:11 [CYW43] do_ioctl(2, 263, 16): timeout 1715485321 1715481011 4310 03:42:01 Did it again this morning. I was up for a toilet break and can confirm that the heartbeat stops during the 4310 seconds. VK7JH MMedit MMBasic Help |
||||
Malibu Senior Member Joined: 07/07/2018 Location: AustraliaPosts: 228 |
What version of MMB are you getting this error code in? I'm running the 5.09.00RC4 and haven't seen the error since then John |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
> option list WebMite MMBasic Version 5.09.00RC4 OPTION CPUSPEED 250000 'KHz OPTION WIFI xxxxx, ********, PICOE6614104035 OPTION TCP SERVER PORT 80, 1000 OPTION TELNET CONSOLE ON > Edited 2024-05-12 07:54 by TassyJim VK7JH MMedit MMBasic Help |
||||
Page 2 of 2 |
Print this page |