harlequin-tech / WiFlyHQ

WiFly RN-XV Arduino Library
Other
110 stars 68 forks source link

WebSockets example might benefit from a corresponding server #14

Closed joshuajnoble closed 11 years ago

joshuajnoble commented 12 years ago

I bring this up only because I've tried a few different strategies for getting a server to talk to the WiFly without success. Everything else works, but the WebSockets is very tricky to get right with (afaik) the usual tools for making a quick server: Python, Node, Ruby. I think it would make the library much better documented. Thanks!

harlequin-tech commented 12 years ago

Hi Joshua,

did the WebSockets client example not work for you? It's using the standard demo websocket server (without keying).

Or are you asking for example non-arduino websocket server code?

joshuajnoble commented 12 years ago

Well, I was suggesting non Arduino code, because I've had some trouble and, if you have some, it'd be a nice reference. I can't get the current example to work for me on the server side so any pointers might be helpful to myself and others. Understandable if you find that out of scope though :)

andrewgleave commented 11 years ago

I'm having no luck connecting to a simple ws-based Node.js app either.

Running wscat --host 192.168.101.40 --listen 8080

I get a "error: continuation frame cannot follow current opcode 1002" which is here: https://github.com/einaros/ws/blob/master/lib/Receiver.js#L197

Any thoughts on why Telnet works and the WiFly doesn't?

Btw, I modified the wscat source so I could specify a host

joshuajnoble commented 11 years ago

I never had any luck with Node.js either, however, this: https://gist.github.com/3889156 does allow for communication between a browser and a WiFly shield. It could easily be changed to allow something other than a browser to communicate with a WiFly.

andrewgleave commented 11 years ago

Cool, thanks. I came across https://github.com/jonmarkgo/ArduinoPusherClient which implements a WebSocket client, integrates with the WiFlyHQ library and Pusher. Looks promising.