pluxbiosignals / unity-sample

Unity Sample APP intended to show a practical integration of PLUX devices with the Unity environment, encompassing functionalities such as: the search of compatible Bluetooth devices and also the start/stop of a real-time acquisition.
15 stars 3 forks source link

Connectivity issue with FNIRS EXPLORER #10

Closed gkatsara closed 2 years ago

gkatsara commented 3 years ago

I use the 2018.3.7f1 Unity Version and I am trying to connect an FNIRS EXPLORER device to the Sample APP. After the app finds my device , I click "connect" , I see " Connection with device BTH88:6B:0F:93:24:D9 established with success! UnityEngine.Debug:Log(Object) " and after that the following error appears. There seems to be a problem with my device name but I do not understand why. The name of my device when I find it on my laptop's bluetooth is "biosignalsplux" which is one of the acceptable values.

Error while processing task: System.NotSupportedException: Specified method is not supported. at Assets.Scripts.PluxUnityInterface.ConnectionDone () [0x00330] in C:\Users\georg\Documents\My Unity Projects\unity-sample-master\Assets\Scripts\PluxUnityInterface.cs:721 at PluxDeviceManager.b40_0 () [0x00000] in C:\Users\georg\Documents\My Unity Projects\unity-sample-master\Assets\Scripts\PluxDeviceManager\PluxDeviceManager.cs:134 at UnityThreading.Task`1+<>c__DisplayClass5_0[T].<.ctor>b0 (UnityThreading.Task t) [0x00001] in C:\Users\georg\Documents\My Unity Projects\unity-sample-master\Assets\Scripts\PluxDeviceManager\utils\Task.cs:414 at (wrapper delegate-invoke) System.Func2[UnityThreading.Task,UnityThreading.Task+Unit].invoke_TResult_T(UnityThreading.Task) at UnityThreading.Task1[T].Do () [0x00001] in C:\Users\georg\Documents\My Unity Projects\unity-sample-master\Assets\Scripts\PluxDeviceManager\utils\Task.cs:442 at UnityThreading.Task.DoInternal () [0x0001d] in C:\Users\georg\Documents\My Unity Projects\unity-sample-master\Assets\Scripts\PluxDeviceManager\utils\Task.cs:255 UnityEngine.Debug:LogError(Object) UnityThreading.Task:DoInternal() (at Assets/Scripts/PluxDeviceManager/utils/Task.cs:269) UnityThreading.Dispatcher:RunTask(Task) (at Assets/Scripts/PluxDeviceManager/utils/Dispatcher.cs:495) UnityThreading.Dispatcher:ProcessSingleTask(Task) (at Assets/Scripts/PluxDeviceManager/utils/Dispatcher.cs:484) UnityThreading.Dispatcher:ProcessTasksInternal() (at Assets/Scripts/PluxDeviceManager/utils/Dispatcher.cs:475) UnityThreading.Dispatcher:ProcessTasks() (at Assets/Scripts/PluxDeviceManager/utils/Dispatcher.cs:392) UnityThreadHelper:Update() (at Assets/Scripts/PluxDeviceManager/utils/UnityThreadHelper.cs:243)

GRamosPlux commented 3 years ago

Dear @gkatsara,

Thank you very much for opening this new discussion!

Your perception is totally correct, the fNIRS Explorer is a device that belongs to the biosignalsplux family. Unfortunately, the current implementation of the Unity API still does not fully support fNIRS systems.

I need to apologize for the lack of information in the README.md file (we will update its content immediately). Despite not being able to provide an immediate solution, in the beginning of the year our team is planning to expand the compatibility to fNIRS Explorer devices.

Hoping that you consider appropriate, we will keep this issue open and, as soon as a new version will be released, I will notify you immediately.

My best and sincere regards, @GRamosPlux

gkatsara commented 3 years ago

Dear @GRamosPlux ,

Thank you very much for your quick reply and I look forward to your notification as soon as the new version becomes available. Until then, could you let me know if there is an API that supports the fNIRS Explorer device ?

Thank you in advance for your help, @gkatsara

diogotecelao commented 3 years ago

@gkatsara the standard APIs (e.g., C, Python) do work with the fNIRS Explorer

GRamosPlux commented 3 years ago

Dear @gkatsara,

Our team truly wishes you a happy new year!

In the past days we conducted some exploratory actions while trying to extend the support of Unity API to fNIRS Explorer devices.

The changes contained in the previous four commits were intended to fulfil this important goal, raised by your valuable experience.

A new method, entitled StartAcquisitionBySourcesUnity(...) was created in the PluxDeviceManager class (README.md | Link).

As described in the README.md file, this way the developer has full control on the channel configuration, being able to add the digital ports used in fNIRS Explorer.

In the Sample APP, after connecting the device the user only needs to click in the new button Start by Sources to start a real-time acquisition from fNIRS Explorer.

Our team truly hopes that this new update can meet your needs, however, if you find any issue or further questions arise, please, do not hesitate to alert us.

My best and sincere regards, @GRamosPlux