How to connect to the default MQTT network
The default network, which is automatically created with a Hub, is a MQTT network. The a default network, cannot be deleted.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
- You have created an IoT Hub
Add a Hub device if you haven’t already done so.
To keep this tutorial simple, choose to
Allow Insercureconnections. Insecure connections allow connections to the hub without encryption layer.
Configure the physical device (or client) to connect through the network, using the following parameters:
- Host: The network endpoint.
- Port: Use
1883for plaintext or
- MQTT Username: The device ID from the device you created earlier.
- If your client asks for a password, just pass in an empty string.
If you have configured your device to force mTLS (
Deny Insecureconnections), you will also need to provide the device certificate & private key, so that during the TLS handshake, the Hub will be able to verify the device identity.
Connect and exchange messages.
Some networks support topic prefixes, but the default networks do not. The whole “topic space” is available to MQTT clients.
Read our introduction blog post to understand more about MQTT topics.