Git Product home page Git Product logo

Comments (5)

gilmaimon avatar gilmaimon commented on May 24, 2024

Hi, let's try to determine the exact issue..

Can you please share the code you are using (or just the relevant parts).

Also, what version of the library are you using?

1002 means that there is a protocol error, I wonder if that error is thrown by the client or server...

I'm sure we'll sort it out.
Gil.

from arduinowebsockets.

logdog2709 avatar logdog2709 commented on May 24, 2024

Thanks for responding Gil.
I am using the same code from examples and library v0.4.11.

This is the server URL
wss://bd91q2tled.execute-api.ap-south-1.amazonaws.com/test
This just echos data field
{"action":"message","data":"Echo Data"}

    // run callback when messages are received
    client.onMessage(onMessageCallback);
    
    // run callback when events are occuring
    client.onEvent(onEventsCallback);

    // Before connecting, set the ssl fingerprint of the server
    client.setFingerprint(echo_org_ssl_fingerprint);

    // Connect to server
    client.connect(websockets_connection_string);

    // Send a message
    client.send("{\"action\":\"message\",\"data\": sensorData}");

    // Send a ping
    client.ping();

With this code I was able to connect to the server with client.setInsecure() but handshake was failing.
https://github.com/morrissinger/ESP8266-Websocket/blob/master/examples/WebSocketClient_Demo/WebSocketClient_Demo.ino

from arduinowebsockets.

gilmaimon avatar gilmaimon commented on May 24, 2024

Hi,

Thank you, I was able to re-produce and I believe I fixed the issue. Can you pull the changes from master and see if the issue persist?

Gil.

from arduinowebsockets.

logdog2709 avatar logdog2709 commented on May 24, 2024

Working like charm. Thanks a lot Gil.

from arduinowebsockets.

gilmaimon avatar gilmaimon commented on May 24, 2024

For sure :) Thank you for using the library!

from arduinowebsockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.