-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVR-IoT WA is not connecting to AWS #5
Comments
The solid blue LED indicates that it's able to connect to the Wi-Fi, so that's good. Whenever it's connected to AWS, it should show a blinking yellow light, and if I understood you correctly this never happens. You might have a board with outdated firmware. Please try using IoT Provisioning Tool to install the newest firmware, and try connecting to the sandbox again. Try the following to update the firmware: Download the provisioning tool and extract it. Open a terminal and navigate to the folder you extracted. In my case it's Linux.
Please note that the board uses MQTT to communicate with AWS. If you're on a network that blocks port 1883 and 8883 (school, university & office networks often do this), that might also be causing the issue. If that didn't work, let me know. |
Thanks for the response. You are correct in understanding the problem; however, I should mention that occasionally the board will have the blinking yellow LED (I can't pinpoint a cause for success), and if I have the board provisioned to access my own AWS account, I can successfully test MQTT messages. If I power cycle the board, though, it very often goes back into the error state. I tried provisioning back to the sandbox, like you said - still the same problem. I have actually updated the firmware multiple times prior in several different ways (drag and drop .hex to curiosity drive, provisioned to my own AWS, build and program from MPLAB). I'm on a home network that doesn't block those ports. Actually, this problem has occurred on two different networks that I've tried. Is there a way (logs or something), to check what is causing the red LED to come on? Is it just a connection timeout, or could it indicate corrupted packets, or something else? |
The red LED usually indicates errors related to networking or MQTT. I would try downloading the MPLAB X firmware project and running it directly from MPLAB X. If you run the project in debug mode, you could set some breakpoints wherever the red LED is toggled to see if you can find the problem there. You can find out where the red LED is toggled by searching (Ctrl + Shift + F) for There are also some debug logging available if you connect to the board with a serial terminal (e.g. Tera term) through the COM port. You would also have to enable debug logging in |
Ok, I finally had a chance to work on this today. I first ran a debug session and set a breakpoint at "LED_control(&ledParameterRed)" application_manager.c, under "if(shared_networking_params.haveError)". The session halted there. So I set a breakpoint at all lines in the code where shared_networking_params.haveError = 1; The session halted in wifi_service.c, line 211 at "shared_networking_params.haveError = 1;". That was under "if(M2M_SUCCESS != wifiError)". I'm not sure if this is just catching the first try at wifi connection, which may sometimes fail (see debug logs below), or if it's an indication of some other machine to machine connection error. Looking at some other M2M errors, I eventually came to winc_drv_fail being returned on winc_drv_start. This causes M2M_ERROR_INIT to be returned on m2m_wifi_init_start(). Going backward, this led me to finding that false is returned in winc_chip_init(), at the very end of the block, presumably because of a timeout. I'm not sure if that chain of errors is related to the "if(M2M_SUCCESS != wifiError)" causing the red led to come on. That is as far as I got with debugging - didn't have time to do more. I also went to view debug logs through a serial terminal and the following was returned: CC5D42B19CF5FE DEBUG ERROR WIFI: wifi error = -1 second cycle: 0123CC5D42B19CF5FE INFO NORMAL Connecting to AP with the last used credentials Which I guess is just indicating a connection timeout. I'm probably going to call it on this one, since I don't think there is anything wrong with my network/ports/firewalls, etc.. I'll look one more time into the router settings, but I don't think I'll spend more time just trying to get the out-of-box functionality (even just connecting to the sandbox) going on this. |
I have tried connecting to the sandbox, and connecting to my own AWS account. In both scenarios, the blue LED goes solid blue and then the green LED blinks indefinitely. After a patter of around 20-30 blinks, the green LED stays lit momentarily, then the red error LED will come on for a few seconds and then go off. Then the green LED continues blinking. I also don't see the device connected on the AWS side.
The text was updated successfully, but these errors were encountered: