Network Configuration Guide

Last revision 2026/01/22

This guide details the configuration of WiFiBee-MT7681 in STA and AP modes, offering step-by-step instructions on using SmartLink with Android, Arduino UNO/Mega2560 setups, and AT command configurations to ensure seamless network connectivity.

WiFiBee-MT7681 supports STA and AP mode. In the first, we'll demonstrate 3 kinds of connection methods under STA Mode:

  1. SmartLink (Android APP)
  2. Configure the wireless network parameters via Arduino UNO/Mega2560
  3. Configure the wireless network parameters via AT command
LED Status Mode
0.5/s Boot Mode
1/s Operational mode, not connect
2/s Operational mode, connected

SmartLink Configuration

Software Preparation

Operating Steps

  1. Connect to the WiFi network

    1. Connect your phone to the target network, this is ouki

    2. Open DFRobot IoT Manager, Select SSID ouki, Enter WiFi Password

    3. Click Start Connection

  2. Wait for some seconds, when the LED flashes slowly (2/s), it means it has been connected to the WiFi. You can see the device IP address in the APP.

AT Command Network Configuration

WiFi Bee also supports AT Command configuration, you can use the Xbee USB Adapter to connect WiFi Bee. If you have a DFRobot Leonardo with Xbee socket, you can achieve the same purpose with following debugging code. (Note: Since Uno has only one serial port, it doesn't support the same method, but you can check the next chapter.)

Code


void setup() {  // put your setup code here, to run once:\n    Serial.begin(115200);\n    Serial1.begin(115200);\n    while(!Serial);\n }\nvoid loop() {   // put your main code here, to run repeatedly:\n    while(Serial.available())\n        Serial1.write(Serial.read());\n    while(Serial1.available())\n        Serial.write(Serial1.read());\n }\n```

### Operating Steps

1. Plug WiFi Bee on the Adapter, open Arduino IDE serial monitor (Serial assistant), input “**+++**” to enter AT mode

2. Select **no line ending**, baudrate **115200bps, 8/n/1**, input “**+++**” to enter AT mode.Return **OK**

3. Select **Both NL & CR**, input **AT+SSID=Your WiFi SSID** (WiFi Name) .Return **OK**

4. Input **AT+PASSWORD=Your WiFI Password** (WiFi Password) .Return **OK**

5. Input **AT+CONNECT**.Return **OK**

6. Reboot WiFI Bee (Press WiFi Reset), when the led flashes slowly (2/s), it means it has setup the WiFi connection. The IP address is **192.168.1.3**

## Arduino UNO/Mega2560 Network Configuration

### Hardware Preparation
- [DFR0216 DFRduino UNO](https://www.dfrobot.com/product-838.html) (or Mega2560) x 1
- [DFR0265 Gravity: IO Expansion Shield for Arduino V7.1](https://www.dfrobot.com/product-1009.html)
- [TEL0107 WiFI Bee - MT7681](https://www.dfrobot.com/product-1571.html)

### Software Preparation

- Download Arduino IDE: [Click to Download Arduino IDE](https://www.arduino.cc/en/software)

### Operating Steps

1. Plug WiFi Bee in the shield xbee socket
2. Turn the shield switch to `PROG`
3. Upload the following sketch
4. Turn the shield switch to `RUN`

### Sample Code

```arduino
void setup() {
  // put your setup code here, to run once:

}

const char ssid[]={
  "AT+SSID=ouki"};   // WiFi SSID
const char passwd[]={
  "AT+PASSWORD=88888888"}; // WiFi  password

void setup()
{
  Serial.begin(115200);

  delay(100);
  while(!Serial);
  Serial.print("+++");
  delay(1000);
  Serial.println(ssid);
  delay(100);
  Serial.println(passwd);
  delay(100);
  Serial.println("AT+REBOOT");
  delay(100);
}

void loop()
{
  while(Serial.available())
  {
    Serial.write(Serial.read());
  }
}

RUN/PROG is the serial switch, when you upload the sketch via USB, you have to turn the switch to PROG side. Once you want to use Xbee module, you need to turn it back to the RUNside. (Wireless Programming)

Result

WiFi Bee IP Address

AT Command Configuration

AT Command is generally applied to the terminal equipment and PC communication, In this section, we use AT command to configure network parameters.

How to Use AT Command

AT Command Description
+++ Enter AT Mode
AT+SSID AT+SSID=? Request WiFi SSID AT+SSID=SSIDName Set SSID Name
AT+PASSWORD AT+PASSWORD=? Request WiFi Password AT+PASSWORD=PASSWORD Set WiFi Password
AT+CONNECT Connect WiFi
AT+DISCONNECT Disconnect WiFi

Except "+++", other commands need to add carriage returns and linefeed symbols, so in the previous section, you need to switch to "no line ending" when entering "+++", switch to "both CR & LF" when entering other commands.
More the AT command, please refer to the WiFiBee AT Command List V1.1

Was this article helpful?

TOP