GoogleCloudPlatform / iot-device-sdk-embedded-c

Cloud IoT Device SDK for Connectivity to IoT Core.
Other
247 stars 83 forks source link

Integrated test wiki #107

Open FarRoss opened 4 years ago

FarRoss commented 4 years ago

After compiling using this command make TARGET=linux-static-debug CONFIG=posix_fs-posix_platform-mqtt_localhost, how can I run an example to connect to my Local MQTT broker?

Are there any wiki documents with a sample example?

atigyi commented 4 years ago

With this build the client will create an insecure TCP socket connecting to localhost:1883.

For port 1883, see this part of the config and this. And for localhost, the config is here.

This client supports solely the Google Cloud IoT MQTT Bridge authentication process (some client side hints). Thus the target (localhosted) MQTT Broker should accept this auth flow. First, it is best to be a "happy" broker, accepting every connection.

Basically, the posix example should work, just build and run it.