How to Websocket sub address?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
Frida
Posts: 45
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

How to Websocket sub address?

Post by Frida » Thu Oct 29, 2020 1:39 pm

How do I create a websocket at such an address: 192.168.5.49:80/Chat
The only thing that succeeds for me is: 192.168.5:80
I can do it in c, and javascript.
Yes Frida is my watchdog!

User avatar
jimmo
Posts: 2236
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: How to Websocket sub address?

Post by jimmo » Thu Oct 29, 2020 10:44 pm

Frida wrote:
Thu Oct 29, 2020 1:39 pm
How do I create a websocket at such an address: 192.168.5.49:80/Chat
The only thing that succeeds for me is: 192.168.5:80
I'm not quite sure what you're asking... "192.168.5:80" is not a valid ip addr & port.

What have you tried so far?

Are you trying to use a static IP address? Or is the issue that you want to use a specific port? Or more a general question on how to run a websocket server?

User avatar
Frida
Posts: 45
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: How to Websocket sub address?

Post by Frida » Tue Nov 03, 2020 12:49 pm

I wrote: The only thing that succeeds for me is: 192.168.5:80
It should have been '192.168.5.49:80'

I have set up a web socket server at a local address '192.168.5.49', which is accessed via port '80', and the path '/ Chat'.


It all works fine with javascript, but after I changed the router, it takes 20 minutes to get my clients to connect to the router.

If I load micropython on the same device, I get hooked up right away.
The same is true of a c program.

It would be easier to do in micropython than in c if I can access my path.

In c I have a hole through to my path, but there is a lot of programming left for the last part to run.

If there is no option in micropython, I have to fix it in c.
Attachments
pic1.png
pic1.png (309.26 KiB) Viewed 362 times
pic2.png
pic2.png (191.13 KiB) Viewed 362 times
pic3.png
pic3.png (179.21 KiB) Viewed 362 times
Yes Frida is my watchdog!

Post Reply