Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Multiple Clients Teensy41 server example QNEthernet #65

Closed
videojedi opened this issue Jan 29, 2023 · 1 comment
Closed

Multiple Clients Teensy41 server example QNEthernet #65

videojedi opened this issue Jan 29, 2023 · 1 comment
Labels
Support Library support

Comments

@videojedi
Copy link

HI,
When trying to run the following example, my teensy seems to get stuck in a loop of accepting new websocket client connections. I don't quite understand what is happening. I'm using the latest build of QNEthernet. Doesn't seem to happen with Native Ethernet.
Possibly didn't happen on versions prior to latest release?

https://github.com/khoih-prog/WebSockets2_Generic/blob/master/examples/Generic/Teensy41_QNEthernet/MultipleClients_Teensy41_Server/MultipleClients_Teensy41_Server.ino

Terminal output is

Accepted new websockets client at index 0
Accepted new websockets client at index 0
Accepted new websockets client at index 0
Accepted new websockets client at index 0
Accepted new websockets client at index 0
Accepted new websockets client at index 0
...

Arduino IDE version: 1.8.19
Teensy4.1
QNEthernet 0.17.0
Windows 10

Many thanks
Richard.

@khoih-prog
Copy link
Owner

Hi @videojedi

Just comment out the unnecessary line

Serial.printf("Accepted new websockets client at index %d\n", freeIndex);

Be sure to have the client connect to the same IP:port

Tested OK for

QNEthernet v0.14.0

Starting MultiClients_Teensy41_Server on TEENSY 4.1 using QNEthernet
WebSockets2_Generic v1.13.2
=========== USE_QN_ETHERNET ===========
Initialize Ethernet using DHCP => IP Address = 192.168.2.119
Server available at ws://192.168.2.119:8080
Got Message: Hello to Server from ESP32
Connection closed
Got Message: Hello to Server from ESP32
Connection closed
Got Message: Hello to Server from ESP32
Connection closed
Got Message: Hello to Server from ESP32

QNEthernet v0.17.0

Starting MultiClients_Teensy41_Server on TEENSY 4.1 using QNEthernet
WebSockets2_Generic v1.13.2
=========== USE_QN_ETHERNET ===========
Initialize Ethernet using DHCP => IP Address = 192.168.2.119
Server available at ws://192.168.2.119:8080
Got Message: Hello to Server from ESP32
Connection closed
Got Message: Hello to Server from ESP32

@khoih-prog khoih-prog added the Support Library support label Jan 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Support Library support
Projects
None yet
Development

No branches or pull requests

2 participants