blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.81k stars 1.38k forks source link

MKR1000 - Edgent example not working #570

Closed kritch83 closed 10 months ago

kritch83 commented 1 year ago

Blynk library version: 1.1.0 IDE: Arduino IDE version: Tried 1.8.20 & 1.8.19 - same result Board type: Arduino MKR1000 rev.r3 Additional modules: no additonal libraries or hardware except the example sketch

Scenario, steps to reproduce

Load Edgent MKR1000 example provided with library. No mods, just example with Template ID and Device Name entered from console. If you try to add a auth token compiling errors out.

Expected Result

Connect to blynk.cloud and go online.

Actual Result

Setup on board loads and allows me to connect to AP to enter wifi credentials. Get to the wifi reconnecting step (which it does) after connecting to wifi, board never comes back online & eventually times out with error: 702 - Cant connect to cloud. Am I missing something obvious?

Terminal output:

2689] Using default config.
[2689] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.1.0 on MKR1000

 #StandWithUkraine    https://bit.ly/swua

[2689] --------------------------
[2690] Product:  AC Current
[2690] Firmware: 0.1.1 (build Aug 20 2022 12:37:37)
[2690] Device:   MKR1000
[2690] WiFi FW:  19.6.1
[2690] --------------------------

>[2691] INIT => WAIT_CONFIG
[2692] Scanning networks...
[3540] Found networks: 5
[4629] AP SSID: Blynk AC Current-0A844
[4630] AP IP:   192.168.4.1
[4630] AP URL:  blynk.setup.local
Device connected to AP
[30722] WAIT_CONFIG => CONFIGURING
[30723] Sending board info...
[30841] Sending networks...
[39774] Applying configuration...
[39776] WiFi SSID: Winona Router Pass: open4meplease
[39776] Blynk cloud: AUTHIDXXXXXXXXXXXXXXXXXXXXXXX @ blynk.cloud:443
[39777] CONFIGURING => SWITCH_TO_STA
[39782] Switching to STA...
[40782] SWITCH_TO_STA => CONNECTING_NET
[40783] Connecting to WiFi: Winona Router
[41665] Using Dynamic IP: 10.32.2.46
[41665] CONNECTING_NET => CONNECTING_CLOUD
[41675] Connecting to blynk.cloud:443
[46682] Connecting to blynk.cloud:443
[51685] Connecting to blynk.cloud:443
[56691] Connecting to blynk.cloud:443
[61693] Connecting to blynk.cloud:443
[66695] Connecting to blynk.cloud:443
[71698] Connecting to blynk.cloud:443
[76702] Connecting to blynk.cloud:443
[81706] Connecting to blynk.cloud:443
[86706] Connecting to blynk.cloud:443
[91666] Timeout
[91666] Last error code: 702
[91668] Configuration stored to flash
[91669] CONNECTING_CLOUD => ERROR
[101676] Restarting after error.
vshymanskyy commented 10 months ago

Edgent is no longer supported on MKR family devices. Blynk.NCP should be used on these boards, which is a better solution that delivers Edgent functionality (and more): https://community.blynk.cc/t/blynk-ncp-connect-any-hardware-with-network-co-processor/67065