-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
liblsl on ESP32-S3 #172
Comments
I'm fairly certain that you'll have to self-compile liblsl, whether you write your app in C or in Python, but I don't know if it's even possible on your platform. You'll need a C-compiler and at least unix-like networking libraries. I took a quick look at ESP-IDF (https://www.espressif.com/en/products/sdks/esp-idf) and it looks like it should have everything you need. The script at the root of the repo should give you a good starting point: https://github.com/sccn/liblsl/blob/master/standalone_compilation_linux.sh |
Hi, |
Originally I thought it'd be difficult, because the target platform needs a working environment for Asio, but apparently that's a thing nowadays. |
I don't get it, what'is the link beetween ASIO and liblsl ? |
ASIO is a liblsl dependency. You'll find it in the |
I'm working on the project mentioned by @ValentinPintat I was wondering if any other boost file will be required for creating a basic lsl outlet from lslboost |
Is there an easy way to make liblsl available on micropython ? |
"easy" is relative I guess.
Step 1 should be possible, but I wouldn't know and I have no way to test. |
Thank you very much for your replies ! Unfortuneltly we don't have those skills in our lab, we're more on the hardware side. From what I understand, on the discovery phase when the computer is running Labrecorder, an UDP stream is send from Labrecorder to all the network using the host gateway 239.255.172.215 and the port 16571. So if we re catching that UDP stream and we're sending back with our ESP32 the proper XML info we should see the stream appear on Labrecorder ? |
Hello ! We can see that Labrecorder is indicating us 2 ports 16572 and 16573. We know that we have to answer by an XML message but it's not clear for us on what port we have to send the answer ? Thank you very much |
I'm very confused. Are you trying to control LabRecorder? Or are you trying to read streams from other devices / applications? Or are you trying to stream data out in a way that LabRecorder will recognize it? |
Sorry about the confusion ! Unfortenely it's very difficult for me to put all the liblsl library on my ESP so instead I want to try to implement an outlet. So my question is what are the steps to create an outlet by using TCP, UDP, IGMP and XML. What are the exchange beetween Labrecorder and an outlet ? I want to use Lab recorder to see if my Outlet is visible on the Network, to connect to it and record my data in xdf format to see if it's well transmited. |
The part of the source you should be looking at is here: There's a UDP time server (necessary for clock sync), a UDP multicast responder (necessary to respond to queries to find streams), and finally the data tcp server. here's how to respond to a query. here's how to respond to a clock sync. This method shows you how to initiate the protocol handshake for the TCP server. IMO the path to getting liblsl compiled on the ESP32 might be shorter than the path to implementing an outlet from scratch, especially if you want it to buffer data, to be robust to network drops, to transmit to multiple inlets, etc. In any case, I think your development test bench should include:
Then, when you've characterized all the packets the simple outlet provides, you can swap it out for your custom implementation on ESP32 until you match the packets 1:1. |
I once wrote a wireshark dissector that splits some LSL packets.
I would use the liblsl-Python examples (HandleMetadata first, then ReceiveData and ReceiveAndPlot) for that. Anyways, the necessary steps for stream discovery are
|
Whaou ! Thank you very much for that !
We manged to try those three steps but we still have some questions.
|
The discovery ( |
Hi! I'm also working on a project to embed liblsl into an ESP32. `-- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Configuring incomplete, errors occurred! I'm using the Espressif IDF extension to VS Code. |
After a bit of investigation: |
Note that the FindThreads (a builtin cmake module) tries to find Threads from the system libraries. I guess that configuring the FindThreads through some cmake variables (CMAKE_THREAD_LIBS_INIT and CMAKE_USE_PTHREADS_INIT) could allow it to find the pthreads from the esp32's lib. Check this issue regarding Threads being not found on linux: alicevision/geogram#2 (comment) |
Hello, we managed to embed lsl on the ESP32-S3. |
@lucaskdc @ValentinPintat |
Hi,
We have a project where we want to implement LSL on an ESP32-S3 to create outlets for our sensors.
We first try to put micro python on the ESP but we cannot access liblsl with upip.
So we thought about putting the C librairies directly build inside our ESP.
Do you have any advice? What would be the closest example?
Thank you very much
Valentin
The text was updated successfully, but these errors were encountered: