OpenViBE Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000069openvibefeature requestpublic2011-02-24 19:302013-11-08 16:43
Reporterna_paul 
Assigned Tolbonnet 
PriorityhighSeverityminorReproducibilityhave not tried
StatusresolvedResolutionsuspended 
Platformx86OSWindowsOS VersionXP
Summary0000069: OpenVibe driver requested for Contec KT88 24-channel
DescriptionFor a cheap system this is surprisingly effective and I have been using clinically and for research for ~6 months now. Also having good results analysing the saved edf file in sLoreta.
BUT! Would be fantastic to be able to link to OpenVibe. There is now a Yahoo Conteckt88 user group, and there would be a lot of interest in using OpenVibe. I know someone has produced a driver for the Contec 16 channel model but I don't know how effective it is. It also doesn't work with the 24 channel system. The 24 channel system samples at 200Hz whereas the 16 channel system samples at only 100Hz.
I would be happy to contribute some costs if someone could produce a driver. I could supply a data sample from a COM port sniffer if that would help.
na_paul
TagsNo tags attached.
Attached Filesgz file icon openvibe3009M_conteckt88-201107031751.patch.gz [^] (8,661 bytes) 2011-07-04 14:36

- Relationships

-  Notes
(0000918)
yrenard (administrator)
2011-02-25 17:07

Dear na_paul,

thank you for this feature request. Actually, I am member of this yahoo group myself and I already discussed w/ Alexandra on her blog about this alpha driver she published. She did not yet explicitly gave us the "go" for integration in OpenViBE. Actually, she must accept to put this code in L-GPL v2+ so we can put it in OpenViBE and she did not specify a license yet. Maybe you will have more influence than I do to convince her to turn her code L-GPL v2+.

Best regards,
Yann
(0000927)
na_paul (reporter)
2011-03-15 13:02

Dear Yann,
 
Thanks for replying to me re my request for a driver for the Contec 24 channel system.
I uploaded some files to the Yahoo group - you may have seen them - including a data sample from a com port monitor.
There are actually 26 2-byte channels, the extra 2 being P1 and P2 reference signals.
I am not sure how to upload files to the request area on the OpenVibe forum. If you think the files will be useful to post there please do so.
I hope that if anyone is trying to write a driver they can make it for the 24 channel system, which is a bit different to the Contec 16 channel system that some people are using. The 24- channel system has more potential as thesampling rate is 200/sec and has several extra ecg, eog etc channels.
I have emailed Contec to request the order of the data in the data stream.
 
Regards
 
Paul Dennison
(0000929)
kawk (reporter)
2011-07-03 18:00

Hi,

I've just uploaded a slightly updated version of the driver to the group's files section:

    ixokawk/openvibe3009M_conteckt88-201107031751.patch.gz

It contains basically the old code from Emerson, plus menu selection of COM port, some code re-styling, and I've tested it under Linux. I hope it isn't far from being good enough to be included as unstable in OpenViBE trunc.

Also, one can select 24 or 32 channels in the configuration and it would try to read so many values from one sample. It should be able to resync on the next sample on a 2400 even if the driver was configured to read less channels. I wonder if that's all to do to support the 2400 and 3200 models. It maybe already can cope with the 200 Hz sample rate as well. At least the logs uploaded by Paul let me hope so.

The loop needs some restructuring, e.g. call read() less often. But I'd like to get some reports about the current version first; whether it's working somehow with 24 channels right now..

Kolja
(0000930)
kawk (reporter)
2011-07-03 18:04

A note regarding the licenses. As code was uploaded by both Alexandra and Emerson (and now me) especially crafted for OpenViBE, I believe we can assume it is the intention of all contributors to have it integrated here, and if that means it gets LGPL that is quite certainly okay for all.
(0000931)
yrenard (administrator)
2011-07-03 20:24

Dear Kawk,

thank you for this very good work. I haven't looked at the code yet but based on the description you gave, I guess this would be included by Laurent in the next release (he'll judge). The only thing that must be checked is if Alexandra and Emerson actually agree to put the code LGPL v2+. I do believe we can assume their intention as well, but when it comes to licenses, believing and assuming is not enough. They have to _explicitly_ agree.

Thanks again for the good work,

Yann
(0000932)
kawk (reporter)
2011-07-04 07:59

Here are the answers from all three as given today, posting to the Yahoo group in reply to my inquiry:

http://tech.groups.yahoo.com/group/conteckt88/message/70 [^]

Alexandra: "OK!"
Emerson: "I'm ok with it!"
Graham: "I am pleased for it to be included in OpenVibe under the afformentioned license..."
(0000933)
yrenard (administrator)
2011-07-04 10:46

Dear Kawk,

congratulations, you've been really efficient on this one !

I'll point Laurent to this discussion !
Regards,
Yann
(0000935)
kawk (reporter)
2011-07-04 14:38

For convenienve I uploaded the same patch here as well. I should've noted that I didn't actually compile it in Windows environment, but I strongly believe that at worst there might be one or two typos to fix, because I didn't change much from the previous version that was for Windows only. Setting up a compilation environment in Windows for testing is still on my to-do list.
(0000936)
lbonnet (reporter)
2011-07-04 15:06

Hi Kolja !

Thanks for the contribution, it's much appreciated !
I was going into the process of joining your yahoo group in order to get the files, but the profile creation somehow failed... anyway it's easier for me here.

I put this patch into the pipe for the upcoming release (this summer)
I'll let you know if any question remains at that time.

I won't be able to test it past compilation as we don't have the device, but if you do have time to run some acquisition tests in windows it would be great !

Congratulation all for this work :)
BR,

Laurent
(0000937)
lbonnet (reporter)
2011-07-04 15:08

The patch will be included in the upcoming release process (-->0.11.0).
(0000938)
kawk (reporter)
2011-07-05 12:03

In case I create more updates before, shall I produce new patches against trunk or against trunk+older patch? Kolja
(0000939)
lbonnet (reporter)
2011-07-26 15:46

Hi Kolja,
I took some days off, and I'm back in business now. I registered to the Yahoo group and downloaded the files.
I will be starting the integration soon. If you have any more update (windows test ?) let me know.

BR
Laurent
(0000940)
lbonnet (reporter)
2011-08-01 15:00

Dear Kolja,
I am currently in the integration process of your contribution.

I had no problem on Linux, few more on Windows (see below).
I don't know if you had the opportunity to do some tests on windows, please let me know if I need an update about that.

I would like to send you precompiled acquisition server binaries (windows and Linux) in order for you to test what the release version of your driver would be. Please let me know if it's possible, and what operating system you may test (windows & Linux, 32 / 64b).

Best regards

Laurent

-----------------------------------------------------------------------
Integration log:
----------------
On Ubuntu 10.04 LTS x86_64 :
-No compilation problem.
-At runtime, the connection fails (tcgetattr() failed on the port name). I suppose it's expected.

On windows 7 64b:
- Compilation:
ovasCDriverContexKT88.cpp: line 434 '::SetCommState(*pFileDescriptor, &dcb);' ---> "dcb not found"
I replaced it with:
::SetCommState(*pFileDescriptor, &l_oDCB);//dcb
Which seemed the most reasonable choice in this context. But I am not very sure.

- Runtime:
Without any device plugged in, I manage to "connect" and "play".
I was expecting the server to stop the driver automatically after the 5sec timeout (no sample received), but the driver keeps working (however no data received on client side as expected).
I manually stop the acquisition, and I got a huge freeze. Then the server actually stops and prints me a message about timeout reached.
(0000941)
kawk (reporter)
2011-08-01 15:13

I'll have a look ASAP. Still had no chance to test it on Windows.
(0000942)
kawk (reporter)
2011-08-01 20:42

The tcgetattr failure is expected if the port can't be opened at all. The freeze if the port can be opened but there's no data is not. It happens because return values aren't checked properly. I actually planned to leave the current implementation "unpolished" as is, because the strategy of issuing system calls for every single byte has to be replaced by better code anyway some day.. My priority was to get out code for testing for the KT88-2400 users so they could validate my assumptions about decoding that data.

I didn't realize that you do quite stringent quality assurance on svn trunk. If you prefer, I'll prioritize quality over quick prototyping and rework the code.

There are a few more issues with the current patch:

- The list of ports to select from is restricted to just a few "popular" ones. On Windows, e.g. COM20 can't be selected, and on Linux, ttyS20 is out of reach as well. I'm not sure how to handle this properly. Best would be to actually gather a list of available ports but that's quite a lot of work. The OpenEEG driver anyway does it the same way.

- Currently, the sampling frequency and the maximum number of channels don't actually depend on the actual device (KT88 may have 16 up to 32 channels). In fact, a two-step setup would be more appriopriate (port and/or device variant first, then parameters within variant-dependent limits) but I'm not sure how to implement that in this environment. Is it possible to dynamically change limits of options (sample rate, channels) dependent on one other selection (device variant)?

- When running, it shows acquisition jitter of more than 5ms. Do I have to bother yet or may this be something that can't be really improved?

Thanks for your efforts in checking my efforts 8) - Kolja
(0000945)
lbonnet (reporter)
2011-08-02 14:14

Hi Kolja !
And thanks again for the work.

We do have a strong contribution policy, and as openvibe is officially compatible with many operating system, the trunk must compile and execute no matter what :)

Quick prototyping is good, as long as we warn the users of the possible outcomes.
If you think the driver is stable enough for testing, but needs some more work it's fine. I can create a new dedicated branch in the svn, including a proper warnings and instructions file.
KT88 users could test your driver at will, without any risk for the trunk stability. You could continue the development, and provide me patches for the branch.
As the main developer of the branch, you would have to answer to the possible questions users may ask on the forum (bug reports, feature requests).

On the other hand, we can just wait and postpone the integration (following release scheduled around November). I don't want to rush you.

I let you decide :)
Anyway, thanks again for this contribution that will surely enlarge our community!

Laurent
(0001121)
jtlindgr (administrator)
2013-11-08 16:43

As there hasn't apparently been any progress in this for a few years, I mark this as suspended. If this is still relevant and you'd like to reopen the issue, we'd kindly request functional driver code that meets up the OpenViBE quality standards, has a compatible license, and builds with v0.16+. Also, as we do not have the device in question, we would not be able to support it by the OpenViBE core team.

- Issue History
Date Modified Username Field Change
2011-02-24 19:30 na_paul New Issue
2011-02-25 17:07 yrenard Note Added: 0000918
2011-02-25 17:07 yrenard Assigned To => lbonnet
2011-02-25 17:07 yrenard Status new => acknowledged
2011-03-15 13:02 na_paul Note Added: 0000927
2011-07-03 18:00 kawk Note Added: 0000929
2011-07-03 18:04 kawk Note Added: 0000930
2011-07-03 20:24 yrenard Note Added: 0000931
2011-07-04 07:59 kawk Note Added: 0000932
2011-07-04 10:46 yrenard Note Added: 0000933
2011-07-04 10:47 yrenard Assigned To lbonnet => yrenard
2011-07-04 10:47 yrenard Status acknowledged => assigned
2011-07-04 10:47 yrenard Assigned To yrenard => lbonnet
2011-07-04 14:36 kawk File Added: openvibe3009M_conteckt88-201107031751.patch.gz
2011-07-04 14:38 kawk Note Added: 0000935
2011-07-04 15:06 lbonnet Note Added: 0000936
2011-07-04 15:08 lbonnet Note Added: 0000937
2011-07-04 15:08 lbonnet Status assigned => acknowledged
2011-07-05 12:03 kawk Note Added: 0000938
2011-07-26 15:46 lbonnet Note Added: 0000939
2011-08-01 15:00 lbonnet Note Added: 0000940
2011-08-01 15:13 kawk Note Added: 0000941
2011-08-01 20:42 kawk Note Added: 0000942
2011-08-02 14:14 lbonnet Note Added: 0000945
2013-11-08 16:43 jtlindgr Note Added: 0001121
2013-11-08 16:43 jtlindgr Status acknowledged => resolved
2013-11-08 16:43 jtlindgr Resolution open => suspended


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker