Skip to content

Add optional ANT Neuro EDX support#799

Open
caleycaleycaley wants to merge 1 commit intobrainflow-dev:masterfrom
caleycaleycaley:add-ant-edx-pr
Open

Add optional ANT Neuro EDX support#799
caleycaleycaley wants to merge 1 commit intobrainflow-dev:masterfrom
caleycaleycaley:add-ant-edx-pr

Conversation

@caleycaleycaley
Copy link

Summary
This PR adds optional ANT Neuro EDX support to BrainFlow behind a dedicated build flag.
It introduces EDX board IDs for supported ANT amplifiers, adds the native EDX board controller implementation, wires the new IDs across bindings, and documents both build and runtime usage.

What’s included
add optional BUILD_ANT_EDX CMake flag
add ANT Neuro EDX native implementation and protobuf/gRPC wiring
add explicit EDX board IDs for supported ANT amplifiers
add EDX protocol support and board descriptors
update Python, Java, C#, Node, Julia, MATLAB, and Rust bindings with the new board IDs
document CMake build requirements for EDX
document runtime usage for direct EDX board connections
add Python example tests for direct EDX lifecycle, impedance, and mode transitions
Design notes
EDX support is opt-in and does not affect default builds unless BUILD_ANT_EDX=ON
explicit EDX board IDs are used.
Validation
Built successfully:
Live device validation against a real EE511 on EDX (localhost:3390) passed:
python_package/examples/tests/edx_full_lifecycle.py
python_package/examples/tests/edx_impedance.py
python_package/examples/tests/edx_mode_transitions.py

@caleycaleycaley caleycaleycaley marked this pull request as draft March 20, 2026 06:12
@caleycaleycaley caleycaleycaley marked this pull request as ready for review March 20, 2026 06:12
UDP = 1,
TCP = 2
TCP = 2,
EDX = 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should not be here, its a public enum to specify which protocol to use if device supports multiple. This one supports just one

}
string descr_str = System.Text.Encoding.UTF8.GetString (str, 0, len[0]);
var ms = new MemoryStream (Encoding.UTF8.GetBytes (descr_str));
var serializer = new DataContractJsonSerializer (typeof (T));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it complains due to removed using above, why is it removed?

cd build-edx
cmake -G "Visual Studio 17 2022" -A x64 -DBUILD_ANT_EDX=ON -DMSVC_RUNTIME=dynamic -DCMAKE_INSTALL_PREFIX=../installed-edx ..
cmake --build . --target install --config Release -j 2 --parallel 2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it here? just add a cmake option and build.py option and set a default for this option properly, I dont think it requires mentioning it here


.. compound::

EDX profile on Linux example: ::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

board.config_board("reference_range:0.15")?;
board.config_board("bipolar_range:2.5")?;
board.start_stream(45000, "")?;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its too much, just one example is enough

case BoardIds::ANT_NEURO_EE_511_EDX_BOARD:
board = std::shared_ptr<Board> (new AntNeuroEdxBoard (board_id, params));
break;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as is if ant edx board is selected but dyn lib is built wo flag it will just return unsupported board error, instead it would be good to print in logs how binary should be compiled to use these boards

{"eeg_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}},
{"emg_channels", {25, 26, 27, 28}},
{"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30}},
{"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can put resistance channels to its own preset

{"emg_channels", {25, 26, 27, 28}},
{"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30}},
{"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}},
{"ref_resistance_channels", {29}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw there is no public method exposing these 2, the only way to access them will be get_board_descr, although I think its fine

if (NOT Protobuf_FOUND)
find_package (Protobuf REQUIRED)
endif ()
find_package (gRPC CONFIG REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont just use find try to install it from cmake instead

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or package to third_patry folder

UDP = 1,
TCP = 2
TCP = 2,
EDX = 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants