Simple no OS RAW web server and no framework websocket example?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple no OS RAW web server and no framework websocket example?

AfdhalAtiffTan
Hi all,

I am very new to the lwIP and web development, and I need some directions.

I've seen a lot of cool demo of websocket + webserver on ESP8266 platform on
youtube and I am wondering if lwIP can achieve the same. I am using SAM E70
Xplained Atmel development board.

I tried to learn http, css, and javascript, and, I am still struggling to
understand websocket. Most of the tutorial on youtube uses a framework
called socket.io.

My question is, is it possible for me to have a simple raw, no os, websocket
+ webserver example?
I wanted to display realtime ADC value without needed to refresh the webpage
manually.

I got the raw httpd example to work, but, I am still lost.
A hint on what I should learn would be helpful too.

Thank you.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Simple no OS RAW web server and no framework websocket example?

goldsimon@gmx.de
Am 02.12.2018 um 01:52 schrieb AfdhalAtiffTan:
> Hi all,
>
> I am very new to the lwIP and web development, and I need some directions.
>
> I've seen a lot of cool demo of websocket + webserver on ESP8266 platform on
> youtube and I am wondering if lwIP can achieve the same. I am using SAM E70
> Xplained Atmel development board.

There's no websocket support yet in lwIP. You'll have to rely on 3rd
party code for that.

Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Simple no OS RAW web server and no framework websocket example?

Mike Fleetwood
Hi,

I've got a fairly complete websocket implementation running on LwIP with
RTOS - I should think it would be pretty easy to re-jig it for raw LwIP,
using call-backs.  You would probably have to make some changes to your
http server code to allow it to keep websocket connections open.  I
could strip out the useful bits - if that's any use to you?  You would
need access to SHA1 encryption - although I think that's already
included in the LwIP distribution, but may need a little modification to
use it.

Regards,

Mike.

On 02/12/2018 15:03, [hidden email] wrote:

> Am 02.12.2018 um 01:52 schrieb AfdhalAtiffTan:
>> Hi all,
>>
>> I am very new to the lwIP and web development, and I need some
>> directions.
>>
>> I've seen a lot of cool demo of websocket + webserver on ESP8266
>> platform on
>> youtube and I am wondering if lwIP can achieve the same. I am using
>> SAM E70
>> Xplained Atmel development board.
>
> There's no websocket support yet in lwIP. You'll have to rely on 3rd
> party code for that.
>
> Simon
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users

--
FACE Systems Ltd
The Old Boat House
Cadgwith
Cornwall TR12 7JX
T:01326 291031
M:07831 401464


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Simple no OS RAW web server and no framework websocket example?

Andy Pont
In reply to this post by goldsimon@gmx.de
Back in December 2018 you wrote…

I am very new to the lwIP and web development, and I need some directions.
 
I've seen a lot of cool demo of websocket + webserver on ESP8266 platform on
youtube and I am wondering if lwIP can achieve the same. I am using SAM E70
Xplained Atmel development board.
 
There's no websocket support yet in lwIP. You'll have to rely on 3rd party code for that.
This may be a bit late if you have everything working but Real Time Logic[1] have just released their WebSocket server under a dual license (GPLv2 or commercial).  There are abstraction layers included for lwIP both for the Netccon and raw APIs.  Source is available at https://github.com/RealTimeLogic/MinnowServer

-Andy.




_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Simple no OS RAW web server and no framework websocket example?

stevestrong
In reply to this post by Mike Fleetwood
Mike Fleetwood wrote

> Hi,
>
> I've got a fairly complete websocket implementation running on LwIP with
> RTOS - I should think it would be pretty easy to re-jig it for raw LwIP,
> using call-backs.  You would probably have to make some changes to your
> http server code to allow it to keep websocket connections open.  I
> could strip out the useful bits - if that's any use to you?  You would
> need access to SHA1 encryption - although I think that's already
> included in the LwIP distribution, but may need a little modification to
> use it.
>
> Regards,
>
> Mike.

Mike, it would be helpful if you could share (at least the main parts of)
your implementation.
Thanks in advance.
Steve



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Simple no OS RAW web server and no framework websocket example?

Mike Fleetwood
Hi Steve,

I'll see what I can package up of the key elements.  May take a little
while, but I'll see what I can do in the next few days.

As I said, mine is built around RTOS - the http server bit juggles
several open connections, but if you're using "raw" lwip you can deal
with this using callbacks.  You will need to change the function calls
to lwip to the "raw" versions.

the main elements are dealing with the handshakes to open a collection
and the basic message sending/receiving.  My implementation deals with
an older protocol in addition to the current WebSocket standard, as I am
using an old version of Safari on Windows for some tests - you may not
need this compatibility, so I'll remove it unless you need it (keeps
things simpler!).

Regards,

Mike.

On 18/01/2019 09:51, stevestrong wrote:

> Mike Fleetwood wrote
>> Hi,
>>
>> I've got a fairly complete websocket implementation running on LwIP with
>> RTOS - I should think it would be pretty easy to re-jig it for raw LwIP,
>> using call-backs.  You would probably have to make some changes to your
>> http server code to allow it to keep websocket connections open.  I
>> could strip out the useful bits - if that's any use to you?  You would
>> need access to SHA1 encryption - although I think that's already
>> included in the LwIP distribution, but may need a little modification to
>> use it.
>>
>> Regards,
>>
>> Mike.
> Mike, it would be helpful if you could share (at least the main parts of)
> your implementation.
> Thanks in advance.
> Steve
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users

--
FACE Systems Ltd
The Old Boat House
Cadgwith
Cornwall TR12 7JX
T:01326 291031
M:07831 401464


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users