Main Site Documentation

IoT Labs WiFi module now supports Websockets!


#1

Just got this working, so I thought I would share! New SDK to be release soon.


using GTM = Gadgeteer.Modules;
using IotLabs.Gadgeteer;
using IotLabs.Net;
namespace WebSocketTest
{
	public partial class Program
	{
		private WebSocketServer _wss;
		void ProgramStarted()
		{
			_wifi.Connected += OnConnected;
			_wss = new WebSocketServer("IoTLabs");
			_wss.ClientConnected += OnClientConnected;
			_wss.ClientDisconnected += OnClientDisconnected;
			_wss.TextMessageReceived += OnTextMessageReceived;

			_wifi.Connect("SSID", "PASSWORD");
		}
		private void OnClientConnected(object sender, byte endpoint, string uri)
		{
			Debug.Print("Client (" + endpoint.ToString() + ") Connected at URI '" + uri + "'.");
		}
		private void OnTextMessageReceived(object sender, byte endpoint, string message)
		{
			Debug.Print(message);
			_wss.Broadcast("Echo - " + message);
		}
		private void OnClientDisconnected(object sender, byte endpoint)
		{
			Debug.Print("Client (" + endpoint.ToString() + ") Disconnected.");
		}
		void OnConnected(object sender, EventArgs e)
		{
			_wss.Start(_wifi);
		}
	}
}


#2

Sweet! Good job!

Is the code open somewhere?


#3

@ Architect - It will be available in a soon to be released update to the SDK.


#4

Nice job. Is this module for sale somewhere yet?


#5

@ ianlee74 - I build the modules on demand and will be announcing another batch at the end of December (does this count as an annoucement?).


#6

any news on the SDK front yet ?

Highlights ?

SSL, UDP Sockets ?


#7

@ PiWi - No SSL yet, Bluegiga has still not released their updated firmware. Web sockets is the current big news. There are also improvements to the web server to support compressed html/css/js files. The web server now also supports files served from a SD card.


#8

@ munderhill - Thanks for the update 8)


#9

@ munderhill - on the bluegiga site they are annoucing wifi sdk 1.3 but I’ve found no dox for it yet, any links you might have ?


#10

@ PiWi - No links or other information except their product announcement.


#11

What’s the cost and can I sign up for one for testing?


#12

[quote=“munderhill”]I build the modules on demand and will be announcing another batch at the end of December.
[/quote]
I’d be interested in one too please. Any idea when you think they’ll be ready to ship and what it might cost to get the to the UK?


#13

I’d be interested in one too please. Any idea when you think they’ll be ready to ship and what it might cost to get the to the UK?
[/quote]

@ jason - I will be opening up the batch soon and will ship by the end of January. Cost of shipping to the UK and Europe is $25.00 US.


#14

@ munderhill - I’ll keep my eyes and ears open. Thanks.