Quick Start

Attention

If using any of the 1.x.x firmware versions, the user will not be able to OTA update to 2.x.x or above versions. Therefore, we strongly recommend to manually flash a 2.x.x image (e.g. Melody-Wifi-2.1.0) using the BC188 User Flasher v2.0.0 available in the BlueCreation website: http://bluecreation.com/firmwareupdates.php

Starting up with Melody Wi-Fi is really easy! You can either choose to do it using a PC and a serial terminal / console or directly connecting to the BlueCreation-XXYYZZ Access Point with your phone, tablet or PC and using our Web Application.

In any case, you will just need the Melody Wi-Fi Discovery Board, the attached USB cable and a functioning Wi-Fi network in your vicinity.

Using Web Application

Firstly, power up the board by connecting its micro-USB port to a power source (e.g. a PC or a portable battery). The Discovery board should light up and after a few moments, you should be able to scan for available networks with your favourite Wi-Fi enabled device (e.g. PC, mobile phone, tablet) and see the BlueCreation-XXYYZZ Access Point (where XXYYZZ would be the last 6 letters of the Wi-Fi module’s MAC address which can be find on its label). Connect to it using the password melody123 and when finished, open your preferred web browser to access the Web Application: http://192.168.10.1/.

In the Networks section, you will be able to see all the available Wi-Fi networks around you.

_images/scan.png

In order to connect, just find your network, click on it and input the password if required. After a few seconds, you will be connected.

_images/connect.png

In the Command Line section, you will have access to the Web Console where you will have complete control over the module as if you were connected via a Serial Port.

_images/console.png

For more information on our Web Application, please read the Web Application documentation.

Using Serial Port Console

Start by connecting the USB cable to the computer and the micro-USB port on the Wi-Fi board. The Discovery Board should light up and and two new serial ports should appear in your Windows Device Manager. Please remember the number for the second new COM port. Open your preferred terminal / console (we recommend Hercules) and connect to the mentioned port using the following settings:

  • baud: 9600 bps
  • data size: 8 bits
  • parity: none
  • flow control: none
  • local echo: on
  • transmit End-of-Line character: Carriage Return (CR, ‘\r’)

Operating with the Melody Console

In both consoles, once connected you can use the help command to get a list of all currently supported commands. The following example shows how to set up the board’s Internet connection and get the current time through a simple HTTP GET request.

  • Set up & connect to the network

    config_set wifi.sta.ssid <your_ssid_here>
    config_set wifi.sta.passkey <your_passkey_here>
    wifi_sta_connect
    
  • Read data from an HTTP server

    http_get http://www.timeapi.org/utc/now
    

You can also control the GPIO outputs of the module, as shown below:

gpio_set 40 0 -- switches on LD1 in the board
gpio_set 41 0 -- switches on LD2 in the board

For more examples, do have a look at the Common use cases section in the Melody document. For more advanced users, you can define your own functions, applications and interfaces using the Lua command interpreter and documented Lua API.