0

$USD

$USD
TUTORIALS OBLOQIoT

UART OBLOQ IoT Module Tutorial 4: Connecting to WiFi

DFRobot Oct 18 2018 2298

In this article we will check how to connect the UART OBLOQ device to a WiFi network. To do it, we will need to send the corresponding command via serial, as we will see below.

We will be using a Serial to USB converter so we can send the command from a computer without the need to develop software. For a diagram on how to connect the UART OBLOQ to a serial to USB converter, please check here.

For this test, we will be using the Arduino IDE serial monitor as a tool to establish a serial connection to the UART OBLOQ. Nonetheless, you can test it with other tool.

 

The command

In order for the device to establish a connection to a WiFi network, we need to send to it the corresponding command, which includes the network credentials, more precisely the network name and the network password.

The format of the command is shown below. Note that the credentials are separated by a comma but are kept inside the same pair of “|” characters.

|2|1|yourNetworkName,yourNetworkPassword|

You can check below at figure 1 the Arduino IDE serial monitor configuration before sending the command. Please note that in the first dropdown at the bottom we should choose “Carriage return“, and we should set the baud rate to 9600.

UART OBLOQ IoT Send Command Connect WiFi

Figure 1 – Sending the command to connect the OBLOQ to a WiFi network.

Once you send the command, the device should start to try connecting to the WiFi network. It will first print |2|1| to indicate the reception of the command and then, as shown in figure 2, it will start periodically printing |2|2|, so we know that it is still in the process of connecting. Once the procedure finishes and if the connection is successful, then it will print the IP address assigned to the device on the network.

Note that during the connection procedure the OBLOQ LED will turn blue, and it will become green when the connection is done.

UART OBLOQ Connection to WiFi success.png

Figure 2 – Successful connection of the UART OBLOQ to a WiFi network.

UART OBLOQ module Tutorials: