Web Socket Server

filipESP
Posts: 71
Joined: Tue Nov 06, 2018 12:42 pm

Web Socket Server

Postby filipESP » Fri Dec 06, 2019 11:08 am

Hi,
I need to know if is possible to create a WebSocket Server on ESP WROOM. In IDF there is only WebSocketClient implementation.
I found some code in github for Arduino ESP32.
https://github.com/Links2004/arduinoWebSockets
Is any way to use it as IDF library?

User avatar
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: Web Socket Server

Postby Jakobsen » Fri Dec 06, 2019 7:21 pm

Hi PilipESP

I use this componet from Blake Felt - Code high quality and a nice and clean bare metal implementation

https://github.com/Molorius/esp32-websocket

/Jorgen
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

StefanRvO
Posts: 16
Joined: Sun Mar 06, 2016 9:25 pm

Re: Web Socket Server

Postby StefanRvO » Sun Dec 08, 2019 11:46 am

I am using mongoose(https://github.com/cesanta/mongoose) in my project (see here for how i use it: (https://gitlab.com/StefanRvO/light-equa ... r_module.c).

Libwebsockets (https://github.com/warmcat/libwebsockets) should also be working as far as i know, but i found it a bit more difficult to use than mongoose.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Web Socket Server

Postby Ritesh » Sun Dec 08, 2019 6:22 pm

StefanRvO wrote:
Sun Dec 08, 2019 11:46 am
I am using mongoose(https://github.com/cesanta/mongoose) in my project (see here for how i use it: (https://gitlab.com/StefanRvO/light-equa ... r_module.c).

Libwebsockets (https://github.com/warmcat/libwebsockets) should also be working as far as i know, but i found it a bit more difficult to use than mongoose.

Hello,

Did you try to port libwebsocket Library for ESP32? Because we have tried it earlier and faced some compilation issues with ESP32 IDF.

Let us know if anyone has tried and used it for ESP32 Target.
Regards,
Ritesh Prajapati

filipESP
Posts: 71
Joined: Tue Nov 06, 2018 12:42 pm

Re: Web Socket Server

Postby filipESP » Mon Dec 09, 2019 6:39 pm

Jakobsen wrote:
Fri Dec 06, 2019 7:21 pm
Hi PilipESP

I use this componet from Blake Felt - Code high quality and a nice and clean bare metal implementation

https://github.com/Molorius/esp32-websocket

/Jorgen
Could you tell me how to log into the server and is it possible to create something like dashboard?

filipESP
Posts: 71
Joined: Tue Nov 06, 2018 12:42 pm

Re: Web Socket Server

Postby filipESP » Tue Dec 10, 2019 12:15 pm

OK, i got it!
Thank U very much.

StefanRvO
Posts: 16
Joined: Sun Mar 06, 2016 9:25 pm

Re: Web Socket Server

Postby StefanRvO » Mon Dec 30, 2019 1:48 am

Ritesh wrote:
Sun Dec 08, 2019 6:22 pm


Hello,

Did you try to port libwebsocket Library for ESP32? Because we have tried it earlier and faced some compilation issues with ESP32 IDF.

Let us know if anyone has tried and used it for ESP32 Target.
I belive i got it working some time ago (~a year). I can't really remember what i did to make it work. I concluded that it would take to long to rewrite my webcode to use libwebsockets instead of mongoose, so i didn't use more than about a week on it, but i do think i got their demo running at the time (https://github.com/warmcat/lws-esp32-factory)

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Web Socket Server

Postby Ritesh » Mon Dec 30, 2019 8:30 am

StefanRvO wrote:
Mon Dec 30, 2019 1:48 am
Ritesh wrote:
Sun Dec 08, 2019 6:22 pm


Hello,

Did you try to port libwebsocket Library for ESP32? Because we have tried it earlier and faced some compilation issues with ESP32 IDF.

Let us know if anyone has tried and used it for ESP32 Target.
I belive i got it working some time ago (~a year). I can't really remember what i did to make it work. I concluded that it would take to long to rewrite my webcode to use libwebsockets instead of mongoose, so i didn't use more than about a week on it, but i do think i got their demo running at the time (https://github.com/warmcat/lws-esp32-factory)
Thanks.

We have refereed same at out end and moved further for same. So, We have taken reference of master branch in which libwebsocket example is ported with few fixes and same for transport related changes.
Regards,
Ritesh Prajapati

filipESP
Posts: 71
Joined: Tue Nov 06, 2018 12:42 pm

Re: Web Socket Server

Postby filipESP » Tue Mar 24, 2020 12:49 pm

Jakobsen wrote:
Fri Dec 06, 2019 7:21 pm
Hi PilipESP

I use this componet from Blake Felt - Code high quality and a nice and clean bare metal implementation

https://github.com/Molorius/esp32-websocket

/Jorgen
Hello again Jakobsen.
Did you tested your code in terms of serving any jpg, svg, png file?

User avatar
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: Web Socket Server

Postby Jakobsen » Tue Mar 24, 2020 9:22 pm

No - But
I use it for raw date - amplifier status, audio samples to be displayed on canvas etc. Do not see why it would not work for image data on a specific format as well.
/j
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

Who is online

Users browsing this forum: FrankJensen, Google [Bot], MikeMyhre and 117 guests