On my computer, I connected with wifi to a Wireless VINT Hub (With the 192.168.100.1 ip address).
I created a simple HTML page with the following script :
Code: Select all
<html>
<body onload="load()">
<script src="phidget22.min.js"></script>
</body>
<script>
async function load() {
const conn = new phidget22.NetworkConnection(5661, '192.168.100.1');
await conn.connect();
}
</script>
</html>
WebSocket connection to 'ws://192.168.100.1:5661/phidgets' failed
But if I execute the following code in Node.JS :
Code: Select all
const phidget22 = require('phidget22');
async function runExample() {
const conn = new phidget22.NetworkConnection(5661, '192.168.100.1');
await conn.connect();
// ...
}
runExample();
So the problem does not come from the configuration of my VINT Hub but an issue using the Phidget library with JavaScript (in plain mode in a HTML page)...
Where the problem come from ?
Thanks in advance for your answers.