Hi there,
So I’m feeling like there is something else at play Can post the compiler output first 3 lines and the last 20 line b4 the upload.? Can you post the exact code you are using? Even the code snips don’t compile with no includes?
You have a lot of variables in this particular setup. PLIO and Arduino are not the same so also pick one and get it working ,Then change or try the other environment. IMO your making it harder on yourself.
Are you on the windows or Linux and which IDE are you using, Normally if you run into an issue , I don’t see switching to a different IDE is going to help, as You can see it just complicates your scenario
and increases the frustration level.
Do you have more than one Xiao?
Have you visually inspected the build quality? Look around the antenna connection, (may need a magnifier) everything looks ok?
Are you using WPS2 security on the WiFi? (I use my phone as an access point to test occasionally and it works very well.) even Camera webserver example works with it. (sammy GS9+)
HTH
GL PJ
Look at this demo see if it opens some ideas.