Android IOS CobraII and IotLabs implementation

This is a link to a video showing how the CobraII card is used in an application with the IotLabs wifi module. The actual application is used for testing the speed of a cross-country skier passing two infrared gates. Users connect to the equipment by connecting to a wifi network exposed by the IoTLabs. Once connected users surf to a given address and get a jquery-mobile page to configure and monitor the measurements. New measurements that are registered gets sent to all connected client’s. It’s working well with Android as well as with IOS.

The setup is really simple but flexible. Here’s just an example of the init and beginning of processing requests:

 private void InitAP()
	  {
      // Create the Access Point

	    var ssid = StaticConfigState.Instance.SSID;

	    if (ssid == null || ssid == "")
	      ssid = "glidespeed";

      _ap = new AccessPoint(_wifi, new IpAddress(new byte[] { 192, 168, 1, 1 }), ssid);

      _ap.Started += new EventHandler(OnApStarted);
      _ap.ClientConnected += OnApClientConnected;
      _ap.ClientDisconnected += OnApClientDisconnected;
	  }
    
    string _ws_ActionRequested(object sender, string context, Hashtable parameters)
    {
      var response = string.Empty;

      switch (context)
      {
        case "login":
          Debug.Print("Handle Login and return response body");
          response = HandleLogin(parameters);
          break;

The webpage can be compiled into an app using phonegap. Or the entire page can be loaded from the card. This takes about 30seconds for this application. But once all the css files are transmitted, the application is fast. The IoTLabs SDK is very elegant and simple to use. The support for the SDK has been excellent.

Just wanted to drop this note, if anyone else is working on similar projects using tablet/phone clients.

5 Likes