Thingspeak with MKR1000 example program from Arduino library 2.0.0 sends http error -301

조회 수: 4 (최근 30일)
I am using the standard program WriteSingleField from the Thingspeak library to send a number between 0 and 99 to one of he fields in my channel. Every 20 seconds the field is updated in the Arduino program. But after two updates I get an HTTP error -301 and the channel is stops updating...
I tried several things (changing my write api key, using a longer delay, ) but cannot find a suolution. My Arduino MKR1000 uses the WiFi101 library and this is also the latest version 0.16.1.
I have not changed anything in my WiFi router. Who knows a solution?
  댓글 수: 1
Christopher Stapels
Christopher Stapels 2021년 6월 3일
Which version of the ThingSpeak library do you have?
-301 is a connectivity error. Can you try moving the device?
If the two writes and then fail is really consistent, that would make the newtwork connectivity less likely.
My MKR 1000 does not show this issue though I'm not sure I've tested it with all the most recent updates.

댓글을 달려면 로그인하십시오.

채택된 답변

Alex Pikkert
Alex Pikkert 2021년 6월 7일
<SOLVED>
The problem was not caused by router settings or distance between the board and the router or a weak USB power plug or delay settings in the program...
It was a firmware issue !
I checked the firmware version of my MKR1000 board using the standard updater procedure in the IDE.
I found my firmware version was 19.4.4 and I could upgrade to 19.6.1. (Board version MR510PB).
Now the WriteSingleField program is working 100% OK !

추가 답변 (1개)

Vinod
Vinod 2021년 6월 4일
The fact that it is stable with PC USB and unstable when powered by standalone USB suggests that perhaps the standalone USB is not supplying the necessary amperage and your device is browning out when performing network communication.
Try changing to a USB power plug that provides at least 2A current @5V. And while you're at it, use the same USB cable as when you're connected to your PC.
  댓글 수: 3
Vinod
Vinod 2021년 6월 5일
If you've eliminated the brownouts of the device, I would reccomend trying to set up a WiFi hotspot using your phone and have the MKR1000 connect to that SSID and publish for a few minutes. If that works fine, then maybe the issue is with your WiFi router settings. See this thread, for example.
Alex Pikkert
Alex Pikkert 2021년 6월 7일
편집: Alex Pikkert 2021년 6월 7일
Hi Vinod,
I did set up a hotspot wifi on my phone and connected my MKR1000. Connection OK, still no connection to my channel, resulting in HTTP error -301......
Checking my network scanner app shows that my board gets an ip address and after a few minutes the address is lost. Both in my hotspot wifi (phone 4G) and my home router..
Faulty MKR1000 maybe?

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 WiFi에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by