Closed retiutut closed 5 years ago
Looks like the wifi shield failed to connect to your computers server. I would check you computers firewall permissions or the permissions on the nodejs file?
Here is the line of code that is producing that error
Cheers
I turned off Windows Firewall and set VSCode to "Run as Admin". Still getting same error.
Could you create a test application that streams data into the nodejs application to test the internal server? It sounds like we need to approach this problem from another angle.
Here is a successful log when using Mac. I notice that my host machine starts with 10.
just like the WiFi shield
TCP: on port: 60127
Attempting to connect to 10.0.1.12
-> POST: 10.0.1.12/tcp {"ip":"10.0.1.19","output":"raw","port":60127,"delimiter":false,"latency":16667}
server listening 10.0.1.19:61087
STATUS: 200
No more data in response.
BODY: {"connected":true,"delimiter":false,"ip":"10.0.1.19","output":"raw","port":60127,"latency":16667}
Connected to 10.0.1.12
The Windows machine IP address starts with 192.
i agree with your edit, what is your windows computer ip address?
The Windows machine is supposedly at 192.168.56.1
seems weird those ip addresses are so different right?
Woah now.... Windows 10 says my IP address should be 10.0.1.14! Bug found!
awesome, im in class, be back later, lmk if u find the solution 🚀
Looking into a fix using parameters for ip.address(), as seen in https://github.com/indutny/node-ip/issues/79
@andrewjaykeller Got it working using
this.wifiServerUDP.bind({
address: ip.address("Ethernet", "ipv4")
});
I think a more generalized fix would select Ethernet, or a WiFi network interface if Ethernet is not available. What are your thoughts?
This could be a huge fix for windows users who have had WiFi connection issues on windows!
Just tried the above code on a Mac, and the network interfaces follow a different standard (ex en0, en1). The fix for this issue should be contained to Windows OS case.
To fix this issue, the following now happens on WindowsOS only:
My Wifi shield has an address of 10.0.1.12 and is attached to a Ganglion board.
Able to connect and stream data using auto-detect and wifi direct on a Mac running OS X Mojave with OpenBCI_NodeJS_Wifi tests and in the Hub.
Using a Windows 10 machine, getStreamingWiFiDirect.js produces an error. This same error is happening in the current GUI when trying to connect, along with other errors stemming from a failure to connect.