• AVR Freaks

AnsweredHot!Using PIC-IoT WG Development Board outside of Google cloud services

Author
jstanle1_home
Starting Member
  • Total Posts : 49
  • Reward points : 0
  • Joined: 2008/12/18 14:51:47
  • Location: 0
  • Status: offline
2019/04/07 11:59:52 (permalink)
0

Using PIC-IoT WG Development Board outside of Google cloud services

Does anyone know if it's possible to use the PIC-IoT WG Development Board to communicate (MQTT, web socket, HTTP, etc.) with something other than Google Cloud services?  I'd like to connect to some host or client running on my own PC, rather than on a Google server.
 
How would you set up the board for this?
 
Thanks for any word on this.
#1
katela
Super Member
  • Total Posts : 1279
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: offline
Re: Using PIC-IoT WG Development Board outside of Google cloud services 2019/04/07 13:24:44 (permalink) ☼ Best Answerby jstanle1_home 2019/04/07 21:59:21
4 (1)
I'm sure it can. It's not restricted to only Google Cloud.

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
#2
aschen0866
Super Member
  • Total Posts : 4459
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: Using PIC-IoT WG Development Board outside of Google cloud services 2019/04/07 20:02:07 (permalink) ☄ Helpfulby jstanle1_home 2019/04/07 21:59:13
4 (1)
I don't have a PIC-IoT WG board. From what I read, it seems to have an ECC608A on board. I am guessing the Google Cloud's certificates and private key are stored there. If you want to use the dev board for anything other than the Google Cloud, you'll have to get all the necessary certificate stuff of your own and disregard the ATECC608A altogether. You can do a lot with SAMD21 and WINC1500 without the ECC608A.
#3
AndyH
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2014/06/09 07:41:11
  • Location: 0
  • Status: offline
Re: Using PIC-IoT WG Development Board outside of Google cloud services 2019/06/19 06:45:45 (permalink)
0
You certainly can, I've modified my board to connect to an alternative cloud provider. 
 
Note for doing so:
- It's pretty easy to remove the code for the ATECC608A, just delete cryptauthlib from the project. There's only a few places that it's used. As my alternative cloud provider doesn't need certificate authentication, this wasn't needed. 
- The core of the code that needs altering is in cloud_service.c and the logic is a bit tortuous. Look out for the covering timer - this is set to 10s, but it needs to connect to wifi, get a time from NTP and connect to MQTT in that time - I was timing out. 
- Turn debug on. 
- The values in the header file IoT_Sensor_Node_config.h for the MQTT host and port are also hardcoded in the code elsewhere - search for 443 and google to find where. 
- I found it easiest to modify connectMQTTSocket() to not use TLS (change the line *context->tcpClientSocket = BSD_socket(PF_INET, BSD_SOCK_STREAM, 1); to take a 0 as the last parameter) to get it up and running, that way I could connect to mosquitto on a PC, and view the raw packets being transferred. 
 
#4
Jump to:
© 2019 APG vNext Commercial Version 4.5