MicrochipTech / AzureDemo_AVR-IoT_Wx

"IoT Made Easy!" - Connect the AVR-IoT WA/WG Development Board to Microsoft Azure
2 stars 1 forks source link

So far unsuccessful - probably a missing step #1

Closed SharxRobotics closed 1 year ago

SharxRobotics commented 1 year ago

First of all thanks for these instructions. We have a lot of these AVR-IoT WG which suddenly became useless after Google IoT was shut off and were delighted to see the detailed instructions to convert them to Azure.

Followed all instructions exactly, in fact several times, but it's not working. There's probably some step missing.

We started out with a fully functional Atmel Studio installation, last used just before the pandemic. Both the official example AVR IoT code version 1.11 and our code based on that worked well.

To prepare for this, we used the "check for updates" feature in Atmel Studio and it said an update was available, we downloaded and installed it and it renamed itself to Microchip Studio. Set up an Azure account exactly as shown. Ran the IoT provision code, it issued informational messages that WINC firmware was updated from 19.6.1 -> 19.7.6 and WINC driver is version 19.3

Updated cloud.h as indicated. Code compiles in Microchip studio with 0 errors but 26 warnings. 3 of the warnings are these: Warning #warning "F_CPU not defined for <util/delay.h>" [-Wcpp] avr.iot-azure-demo c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h 92 After programming and startup the AVR-IoT device shows just the blue LED and no message received at Azure. No response to holding SW0 button during powerup, and no messages out a serial console. Tried deliberately putting wrong Wifi password in cloud.h and that resulted in the red LED being solid on in addition to the blue LED. Changing back to the correct password turned off the red LED, with just the blue LED solid on.

Compiling the previous version 1.11 worked, as expected, with messages issued on the serial console, and the unit responsive to holding SW0 on startup, and blue and green LED on with flashes of the yellow LED. Of course there's no more Google IoT hub to see if the correct messages are being sent but at least it means that our hardware and our Microchip Studio installation are working.

Compiling/programming this AzureDemo code then goes back to the previous behavior. Wonder if the code is basically working but the lack of F_CPU definition is causing bad timing delays. Upgraded the device pack to install everything that could possibly be related to the Atmega4808, no difference.

SharxRobotics commented 1 year ago

OK working now after trying this several times. I don't know why it didn't work the first time except maybe the certificate isn't stored properly when iot-provision updates the WINC firmware, and maybe that explains why it works if you repeat everything with no WINC firmware update. Anyway we can close this issue, again thanks for providing this. Wish the nice graphical UI from the previous Google IoT implementation was available, it allowed for quick demos.

There is a warning that the root certificate needs to be migrated by Sept 15, I'll open a separate issue for that.