Giter Club home page Giter Club logo

openbci_nodejs_wifi's People

Contributors

daniellasry avatar retiutut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openbci_nodejs_wifi's Issues

Bad stop byte

Hi,

I'm using this code as fundament in an electron app with the use of openbci-observables and eeg-pipes. I'm running on a MacBook Pro Late 2013. The sample rate is set to 200hz and latency to 10ms. When I run the electron application, it always stops after a couple seconds and returns "bad stop byte" and a different hexa-code every time. I've tried the application on a newer Macbook without problem. When I run the code only in terminal on my own Mac without electron, there's no problem. I really need some help regarding this.

Best,
Aksel

Connection problems: mismatch between local ip address and shield's ip address using WiFi direct

Hi!

I was investigating connection issues related to our WiFi shield as can be seen on my forum post and finally narrowed it down to a very similar issue as #26.

We operate in a corporate setting where every machine has multiple network interfaces, the main one being an Ethernet connection that is heavily secured and through which any OpenBCI data transmission is hopeless. We thus opted for WiFi direct through a usb wifi antenna. When connecting the shield's network through this interface, we can see its ip address as 192.168.4.1, and our computer's is 192.168.4.2. However, the current nodejs implementation assumes that the local ip address must be the one assigned through Ethernet, which in our case is a completely different address assigned starting with different numbers. As i long suspected, this is the source of our connection problems, as sockets between ip addresses of the shield's interface and our coporate addresses simply do not work.

Hardcoding 192.168.4.2 inside Wifi.prototype.getLocalIPAddress solved the connection problem and I was able to see data streaming in the GUI for the first time, confirming this mismatch was definitely the issue.

As I can see, the current solution, implemented when solving #26, was based on @retiutut having the reverse problem, and thus Wifi.prototype.getLocalIPAddress was hardcoded to use the address from the Ethernet interface. A more robust solution could either:

  • Let the user specify directly the local ip address to use (would require a GUI update, maybe a second text input underneath the STATIC IP choice for the shield)
  • change the implementation of Wifi.prototype.getLocalIPAddress to dynamically return an ip address that is "compatible" with the shield's address. This could be done by checking that both start with the same numbers in the first 2 "fields" of the ip, but there is probably a non-hacky way to do that with node APIs (I'm really not good at networking stuff)

I will try to submit a PR regarding this, I think it would help adoption of the shield in more complex networking environments.

Hub version: 2.1.0
GUI version: 4.1.6
Shield firmware: 2.0.5

Issues connecting Wifi on Windows

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.

PS C:\Users\Retiutut\Documents\GitHub\OpenBCI_NodeJS_Wifi\examples\getStreamingWiFiDirect> node getStreamingWifiDirect.js
TCP: on port:  51599
Attempting to connect to 10.0.1.12
-> POST: 10.0.1.12/tcp {"ip":"192.168.56.1","output":"raw","port":51599,"delimiter":false,"latency":16667}
server listening 192.168.56.1:62971
STATUS: 504
No more data in response.
BODY: {"connected":false,"delimiter":false,"ip":"192.168.56.1","output":"raw","port":51599,"latency":16667}
Error: ERROR: CODE: 504 MESSAGE: {"connected":false,"delimiter":false,"ip":"192.168.56.1","output":"raw","port":51599,"latency":16667}
    at IncomingMessage.res.once (C:\Users\Retiutut\Documents\GitHub\OpenBCI_NodeJS_Wifi\openBCIWifi.js:1120:16)
    at Object.onceWrapper (events.js:276:13)
    at IncomingMessage.emit (events.js:193:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)

signal stops when calling from javascript

Hello,

As soon as I call the javascript function to start streaming, the signals on GUI completely stops. I am new to javascript, so I don't know if this is my code issue or the wifi shield issue. Attached is my block of code to get the data from the board. I would appreciate any help!
I am using macOS Mojave 10.14.6, OpenBCI_GUI 4.1.5

Thank you.

Screen Shot 2020-01-09 at 2 11 48 PM

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.