Sample Rates with Wifi Direct

tristanlbaileytristanlbailey Australia
edited October 2017 in Wifi Shield
I'm thinking that high sample rates are achieved through using multiple channels simultaneously with a wireless switch. Correct?

If so, what kinds of sample rates are possible with Wifi Direct? I'm going to guess much less.

Just wondering if I need to purchase a wireless switch, as well as the Wifi Shield. I will buy a switch if needed to achieve fairly high rates, but not sure if this is necessary.

Thanks.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Tristan, hi.

    This document,


    Says that Cyton defaults to 1000 hz sample rate and Ganglion to 1600 hz. Higher rates are possible, depending on your configuration.

    No, only a wifi router is needed, not a 'switch'. Multiple TCP streams are not used to achieve the throughput. Mentioning AJ @pushtheworld.

    Are you sure of your terminology? There does exist equipment called an Ethernet Switch or Hub,


    But "wireless switch", I have not seen that phrase used before.

    Regards,

    William

  • tristanlbaileytristanlbailey Australia
    edited October 2017
    OK, so by "switch" I guess I mean "access point" or "hotspot" (I'm not used to wireless networking).

    Although it may be cool to be able to connect an Ultracortex headset to the Internet, it does seem a bit silly that you need to connect your Ultracortex headset with a Wifi Shield chip, create a wireless router to the Internet, and then get your laptop / PC / tablet / whatever device to connect to it over the Internet...

    Is there not a more direct route (i.e. local network connection), or does it actually require an Internet connection to stream the data with?

    Also, let's say I did want the highest sample rate:

    "Higher rates are possible, depending on your configuration."

    So, what would the "configuration(s)" be? And...

    "Cyton defaults to 1000 hz sample rate and Ganglion to 1600 hz"

    What would a "default" setup be classified as?
  • wjcroftwjcroft Mount Shasta, CA
    Both Cyton and Ganglion have built in default "Bluetooth" radios, so the Wifi Shield is only an option if you want higher sample rates or easier internet access. A Bluetooth 'dongle' is used at the laptop to communicate with the OpenBCI board.

    For Ganglion in the case of macOS or mobile devices, the built in Bluetooth capability can be used; Windows and Linux hardware have so much variability, that a specific (CSR) dongle is recommended to have a known hardware platform. For Cyton, the Cyton dongle must be used for all laptops.

    Default sample rates are 250 hz for Cyton and 200 hz for Ganglion. These rates are adequate for most EEG work.

  • tristanlbaileytristanlbailey Australia
    edited October 2017
    Thanks for your reply William, but I think you misunderstood me.

    I know about the Bluetooth connectivity, as I have used the Mark IV Ultracortex a few times now. So, I was asking if there was a more direct way to connect when using the Wifi Shield. I presume that the so-called "Wifi Direct" setup would have something to do with this.

  • wjcroftwjcroft Mount Shasta, CA
    edited October 2017
    Tristan, hi.

    OK, sorry, I was not even aware of the Wifi-Direct set of protocols, until just doing some reading now. My impression is that these are currently being used only in a few special case devices such as between a Roku remote control and the Roku main console. It is not widely implemented on devices supporting wifi, and adds another whole level of complexity, protocols and coordination required.

    [see the examples]

    Almost all wifi devices (with the exception of those specifically designed to pair with Wifi-Direct) assume the existence of a local wifi router (or access point.)

    It seems that it may be far off that the Wifi Shield would support Wifi-Direct. And even if it did, the sample rates achieved would most likely not be any greater than connections via a router. For a Wifi-Direct scenario to work, it also has to be implemented compatibly on the corresponding other half of the connection, such as on Windows or macOS. That is likely to be an even bigger hurdle.

    William

  • "It seems that it is unlikely that the Wifi Shield would ever support Wifi-Direct."

    Hmm...


    "
    • The WiFi Shield currently only supports WPA level security. WiFi direct will arrive by 2018 via software update and Enterprise (WPA2 PEAP) support in 2018. You may use a hotspot or a router to create your own personal WiFi network in place of these restrictions.  "
    Some more reading to do, maybe? :P
  • wjcroftwjcroft Mount Shasta, CA
    edited October 2017
    Wifi routers are in every home and office here. I'm not sure of the scene there in Australia. It's not likely to get you any speed advantage. Almost all neurofeedback is done at sample rates in the 250, 256 hz range. Only very rare applications need sample rates above 500.

  • wjcroftwjcroft Mount Shasta, CA
    edited October 2017
    Also see the info about the Nyquist limit as relates to EEG,


    Since the highest typically used EEG frequencies are around 40 hz, Nyquist would say you need at bare minimum an 80 hz sample rate. But that would still expose you to substantial aliasing. (Only two samples per 40 hz waveform.) 200 hz sample rate would give you 5 samples per waveform. So you can see that by around 500 hz, you have about 12 samples per 40 hz waveform. Any more than this for EEG has only rare application.

    Higher rates are helpful for EMG, and I think some forms of cEEG, direct implant cortical EEG where you pickup higher frequencies. The skull tends to block much above 40 to 50 hz.

    The primary advantage of the Wifi Shield is for those cases needing the high sample rates, or for those users that want to use existing http / TCP libraries to interface with the OpenBCI data. And since all computers / mobile devices have built in wifi these days, it has even wider compatibility and transmission speed than the Bluetooth levels 2, 3, and 4 (BLE).

    Regards,

    William

  • Hi William, thanks again for your reply.

    I do believe that my project requires high sample rates, and as such I am concerned about the ability of the device (and by extent, its connection) to provide high-quality, error-free sample rates. Thus, my request for more detailed information about the Wifi Shield is warranted.

    The Nyquist stuff is interesting. I suspect that I will need sample rates in the thousands, possibly ten of thousands, but don't know for sure yet. My line of thinking is that it is better to be safe (with higher rates), than sorry (spending countless hours without clear results).

    I wasn't actually sure if my 2012 Acer laptop had "wifi" in it or not (it simply states "802.11/a/g/n + BT4.0"). So, I've been using the Bluetooth functionality, but not sure if it could use the Wifi Shield directly through Wifi Direct...
  • wjcroftwjcroft Mount Shasta, CA
    Curious what is your application that requires the high sample rates?

    802.11 is the IEEE Wifi standard, with the suffix letters specifying each successive subversion. Bluetooth 4 includes the Bluetooth Low Energy as well as the earlier BT 3 functionality.


  • tristanlbaileytristanlbailey Australia
    edited October 2017
    It's a secret...

    I'll wait for AJ's input on the potential configurations of the Wifi Shield and their associated sample rates.
  • edited October 2017
    tristanlbailey 
    I do believe that my project requires high sample rates, and as such I am concerned about the ability of the device (and by extent, its connection) to provide high-quality, error-free sample rates. Thus, my request for more detailed information about the Wifi Shield is warranted.

    I'm trying really hard to get this code dropped-packet free. Right now, we can pretty much get 1000Hz with Cyton and 1000Hz with Daisy is tougher. I'm reworking the firmware to allow for more redundancy and error correction. We are using TCP, but are limited by the RAM on the WiFi Shield. 

    Wifi direct is on the back burner as we work to stabilize the firmware for sending data, however, there is work planned to make WiFi direct happen and we are still tracking for a 2018 launch. 

    Your computer for sure has Wifi and can use the wifi shield today! The wifi shield uses "n" technology. 

    @wjcroft "It seems that it may be far off that the Wifi Shield would support Wifi-Direct. And even if it did, the sample rates achieved would most likely not be any greater than connections via a router." nope, not too far off. In fact the wifi shield boots up in wifi-direct mode, it's a hot spot that macOS, windows, or even phones can connect to. You are right though, I don't expect data rates to soar with the Wifi shield in direct mode.

    @wjcroft we got 250Hz all day with the wifi shield! 
  • wjcroftwjcroft Mount Shasta, CA
    AJ, thanks for that clarification. 

    But it seems to me there are THREE potential ways the shield can operate:

    (1) as currently through a dedicated hardware router
    (2) as on initial bootup, with the wifi chip on the shield acting as it's own hotspot / access point, but for data streaming
    (3) in true Wifi-Direct mode as described on the Wikipedia page,


    I sense what you are saying is that in the future the shield will operate as a hotspot? Or are you saying that true mode #3 is planned?

    William

  • William, no problem

    Only (1) is working, although your use of the term "dedicated" is misleading and I would avoid it.

    (2) as on initial bootup, with the wifi chip on the shield acting as it's own hotspot / access point "soft" access point but for NOT for data streaming, only for getting the wifi shield on your local network. checkout these docs http://docs.openbci.com/Tutorials/03-Wifi_Getting_Started_Guide#wifi-getting-started-guide-get-the-wifi-shield-on-your-wireless-network
    (3) The shield boots up in true WiFi-direct, waiting to leave this mode and join your local network. In WiFi-direct mode, the shield will remain a Soft access point and your computer will treat it like a normal router, however you will not be able to use the internet on your computer unless you are hardwired in (or have two wireless cards?)
Sign In or Register to comment.