Comments (3)
Thanks for using the library.
Can you provide more information so that the issue you're experiencing can be duplicated, identified and debugged, if exists.
As you know, the process, even though seems simple, requires the perfect cooperation of every underlying layers, such as
- Nano-33-IoT core and hardware
- WiFiNINA_Generic/WiFiNINA library
- This WebSockets2 library
- Your home network: routers, settings, etc.
- The WebSockets Server you're connecting to
- many more
It's advisable that you isolate the issue to be related to 1., 2. and/or 3.by using another board, such as ESP8266/ESP32. If the problem persists, then you'll know it's possible 3-6. If this is the case, it's better that you post on the issue on ArduinoWebsockets Issue as it's ESP32/ESP8266 related.
You can also use this independent SimpleWebSocket example of WiFiWebServer Library to verify if the issue is related to this WebSockets2 library.
You have to post the whole sketch, so that other people can duplicate the issue. Otherwise, nobody can have psychic power to guess what's wrong or waste time to recreate, and the issue will be closed.
from websockets2_generic.
Hello, I'm using the example sketch but I've modified it to send a string message every 16ms.
I've tried using it on my ESP32 and it does not have the same problem. The ESP32 works perfectly fine and the data comes in smoothly and quickly. So this leads me to believe it's:
a) not my server
b) not my internet connection
c) possibly not the library? Maybe there's a problem all Arduino Nano 33 IOT's have that causes this?
I've tried using the WifiWebServer library example you suggested on the Nano 33 iot but it still has the same problem.
Here's some of the code I used from that example. I modified it to send data every 16ms.
void setup()
{
Serial.begin(115200);
while (!Serial);
Serial.print("\nStarting SimpleWebSocket on " + String(BOARD_NAME));
Serial.println(" with " + String(SHIELD_TYPE));
// check for the presence of the shield
#if USE_WIFI_NINA
if (WiFi.status() == WL_NO_MODULE)
#else
if (WiFi.status() == WL_NO_SHIELD)
#endif
{
Serial.println(F("WiFi shield not present"));
// don't continue
while (true);
}
#if USE_WIFI_NINA
String fv = WiFi.firmwareVersion();
if (fv < WIFI_FIRMWARE_LATEST_VERSION)
{
Serial.println(F("Please upgrade the firmware"));
}
#endif
// attempt to connect to WiFi network
while ( status != WL_CONNECTED)
{
Serial.print(F("Connecting to SSID: "));
Serial.println(ssid);
// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);
}
// you're connected now, so print out the data
printWifiStatus();
wsClient.begin("/capstone/ws?clientId=1");
}
void loop()
{
while (wsClient.connected())
{
// send a hello #
wsClient.beginMessage(TYPE_TEXT);
wsClient.print("1,234,562,456,777");
wsClient.endMessage();
delay(16);
}
Serial.println("disconnected");
}
from websockets2_generic.
As I suspect, I now think this is the issue is deeper inside the WiFiNINA library and/or Nano-33-IoT.
Can you make a simple sketch using WiFiNINA to demonstrate the issue, then post on WiFiNINA Issue.
Also search there to see if there is similar issues/fixes.
Hope you find out a solution. Please update then.
I'm closing the issue now because it's not something related to this library.
from websockets2_generic.
Related Issues (20)
- Compile error with Arduino Nano RP2040 HOT 2
- VSCode + PIO for Teensy4.1 compilation error. Complaining stm32_eth.h missing! HOT 1
- WebSockets2_generic library and MKR1000 + Ethernet Shield HOT 1
- CA Certificate not getting verified ? HOT 3
- QNEthernet higher latency HOT 10
- QNEthernet and NativeEthernet staticIP not working with WS Server HOT 19
- what is websocketclient if no incoming request? HOT 2
- ESP32-Server Not Working Properly HOT 2
- [Questions] How to receive binary data? HOT 1
- Connect() is blocking? HOT 1
- Error Compiling for board MKR WiFi 1010 HOT 1
- Error 1006 HOT 1
- WebSockets2_Generic example problem HOT 1
- Uploading and running example of ESP "Minimal-Esp32-Client" error [ 4159][E][WiFiClient.cpp:313] setSocketOption(): fail on -1, errno: 9, "Bad file number" HOT 3
- RP2040W-Server example does not compile without errors HOT 1
- Serious problem with timeout when sending packages HOT 1
- Portenta WiFi Websockets tested lately? HOT 5
- Examples Generic WiFiNINA RP2040 ServerAllFunctionsDemo does not work HOT 4
- RP2040 WebSocket immediate disconnection HOT 2
- Multiple Clients Teensy41 server example QNEthernet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websockets2_generic.