sccn / lsl_archived

Multi-modal time-synched data transmission over local network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libjnidispatch.so?

jeffmorr opened this issue · comments

Hello,

I am trying to get LSL to run on the Magic Leap but I am currently not even able to get the version number to show up, which I believe is because there are some incompatibilities between LSL and the Lumin OS. I have built LSL as a .so targeting Android Nougat API Level 24 (as required by Magic Leap) and noticed that a libjnidispatch was also created when creating the liblsl.so. I have not included that in my Unity application (that will be deployed onto the Magic Leap), so I have two questions:

  1. What is this file?
  2. Is this file needed to run LSL as a Unity native plugin?

I've never tested it, but here has a liblslAndroid.so ... so I guess it worked for somebody at some point. I'm pretty sure that .so has not been compiled in a while so it is almost definitely missing some of the newer inlet features related to inlet postprocessing.

Okay I'll look into it, thanks!

FWIW the liblsl.so contained in the APKs is exactly the same as the one you need, Java just needs the libjnidetach.so as interface to the native library.
The Android binaries only differ from the "regular" Linux / OS X binaries in the libc they're linked against, so you can use them with Java, Unity or anything else as long as your device is an Android device.

Quick update: you can unzip the AAR archive and extract the binaries for the most common CPU architectures.

commented

Any luck with this? I'm also trying to run LSL on my Magic Leap. I have been using https://github.com/xfleckx/LSL4Unity, which works if I'm running with MLRemote, but gives me errors when I actually build and run on the ML. So far, I have figured out that I'm missing the .so (and maybe .dll) files in the build.

  1. What are the appropriate .so/.dll files for the Magic Leap? (and where/how can I get them?) I have tried the 32 and 64 bit versions in the LSL4Unity and get "Plugins: Couldn't open /package/bin/../../documents/C2/liblsl64.so, error: dlopen failed: "/documents/C2/liblsl64.so" is 32-bit instead of 64-bit" (which is odd). I also tried another liblsl.so file from liblsl-1.12-java-release\jni\arm64-v8a and got:
    "Plugins: Couldn't open /package/bin/../../documents/C2/liblsl.so, error: dlopen failed: couldn't map "/documents/C2/liblsl.so" segment 0: Executable file rejected (binary signature verification failed)".

  2. Is there a way to get my build to include the appropriate files? Right now, it looks in /package/bin and in /system/lib64, but neither includes the files at all. The only way I have been able to make any progress is by manually pushing the .so/.dll files to the ML device and pointing to them by listing the name as "../../documents/C2/liblsl.so", which feels a bit sloppy.

commented

It's an mixed/augmented reality headset. The CPU has 2 Denver 2.0 64-bit cores + 4 ARM Cortex A57 64-bit cores.

If it's an Android device, take a look at the link I posted above.

commented

Thanks, it did work with one of the libs (I had the wrong one before). Thanks!

@smichalka I'm sorry I switched to making this work on Android first and I am now revisiting getting this to work on Magic Leap. Did the AAR above get LSL working on Magic Leap for you?