GoogleCloudPlatform / iot-device-sdk-embedded-c

Cloud IoT Device SDK for Connectivity to IoT Core.
Other
245 stars 80 forks source link

How to port Device SDK to Ameba-z SDK using IAR #71

Open TongBro opened 5 years ago

TongBro commented 5 years ago

I want to port the Device SDK to Realtek Ameba-z SDK to connect with Google Cloud IoT Core, but the user guide or porting guide is too complex for me, is any simpler guide?

I'm using IAR to build my Ameba-z SDK in Windows so the build tool 'make' mentioned in porting guide is not suitable for me, another reason, I'm not familiar with Linux system.

The Ameba-z has the MQTT APIs to use, including connect, publish, subscribe, disconnect.

The Device SDK has many source and head file, I cloud not distinguish which should add to my Ameba-z SDK.

https://www.amebaiot.com/google-cloud-iot/

Above URL has the simpler guide and I'm porting successfully, but it is for Ameba-1 SDK not for Ameba-z SDK, I want to implement the feature of connecting with Google Cloud IoT Core with my device RTL8710, I hope this Device SDK can help me.

Thanks.

atigyi commented 4 years ago

If there is already an MQTT client on Ameba-z, then the only thing which has to be solved is the authentication. MQTT CONNECT's deviceid and password fields have to be filled correctly according to this doc. If the Ameba-1 connects to Google Cloud IoT Core, then it generates the JWT "somehow". Try to locate and move this JWT generator code to the Ameba-z project. This JWT generator will require the private key.