Skip to content

Set WSN Node parameters for Node Server connection using P2P Client

manaswis edited this page Mar 20, 2013 · 13 revisions

To set wireless, network and device parameters, follow the steps in a chronological manner

  1. Load the latest firmware meant for IIIT-D WSN node from SVN into the program memory using Openpicus IDE.
  2. After loading the firmware, connect to the serial port using any Terminal (i.e HyperTerminal, Tera Term) to emulate the behavior of node using serial response based on the current state of the node.

Note: If you have connected the Node just in time then the following sequence is shown on Terminal

configure-terminal

  1. The default configuration profile of WSN node is shown below. As the last event shown is a successful Wi-Fi connection which means our Flyport module is broadcasting SSID (Flyport Adhoc) to connect to any wireless network.

def-profile

  1. Connect to this unsecured Wi-Fi network from network connections window.
  2. Once you are connected, open the P2P client in a web browser having default IP: 192.168.1.115 with username: admin password: flyport.
  3. This shows the P2P client with real-time light, temperature and motion sensor data along with default set of parameters from the default profile in various text fields.

p2p-browser

  1. To set the access point details (for Flyport Wifi Project only) to which your node is going to connect in Infrastructure mode,

    1. Scroll down the page as shown below
      infra-network-param
    2. Select the infrastructure mode and enter the access point details. Following is a sample:
      SSID: AP1
      Type: WPA
      Key: ap1passkey
    3. Now press Save. "Saving profile……" will be shown on the Terminal.
  2. Select DHCP Enabled option in network parameters in P2P client and press Save.
    The node will work like a DHCP client to your access point and IP will be allocated from the access point (DHCP Server).

dhcp-enable

  1. Once again on the terminal, "Saving profile…" will be displayed which means you have created a new custom profile. You can now switch from Default profile to Custom profile by rebooting the node. To do that, go to top of the P2P page and click Reboot Device. This will call software reset.

After reboot, the following sequence on the Terminal Side is displayed:

terminal-seq

This means the WSN node is trying to connect using Custom profile which was recently configured. After 30 seconds, as pass-phrase calculation will be over, a new IP address will be allocated by the access point (e.g. 10.0.0.5). This will also be shown in the Terminal.

  1. You can now connect to the same Wi-Fi access point (SSID: AP1) to access the same P2P page with the new IP address (say 10.0.0.5).

  2. If you want to enable Upload Calls to the server, scroll to the top of the P2P client in the browser window. Locate the Device parameters section.

upload-param

Specify parameters like sampling period of sensors, publish period, API key (SensorAct Data Upload API key - see instructions below), Device name, Location, Server IP, Server Port, URL, Enable SNTP and Enable Upload. After specifying these parameters press Save button to save current configuration into the custom profile and Reboot Device from this P2P client.

The reboot sequence will be shown in the Terminal and after connecting with the access point, the node will try to make a TCP connection with the Server every 10 seconds to upload wave segment containing sensor readings using HTTP POST request.

To view the Data Upload key,

  • Login into SensorAct's Web Application
  • Click Manage VPDS tab. (If you don't see this tab, then go through the instructions here first)
  • Select the VPDS where the device is registered.
  • In the VPDS management home page, click on the View API Key link (next to logout).
  • From the dialog box, copy the Data Upload Key and paste this in the API key field on P2P page.