no symbols exported in libsolum_android.so
Hello,
We are trying to build a Qt android app embeding libsolum_android.so, but the compiler does not find any symbol, like solumFwVersion or solumInit. Symbols does not seems to be exported.
Is there a way to use solum in a native c++ android app?
Thank you Virgile Dupuis Deski
I made the same experience when calling solumInit in the Ubuntu 22.04 compiled lib - compiler also doesn't find it.
Android has it's own API separate from the desktop, you should follow the example outlined here: https://github.com/clariusdev/solum/tree/master/examples/solum_android
We are using Qt to develop our android application with c++. What I understand, and correct me if I'm wrong, your android example use the libs include in solum-debug.aar. More precisely, the example uses the Solum.java class which itself dynamically loads the solum_android.so library. And Solum.java talks to solum_android.so via JNI code.
If I use solum-debug.aar as you do in the example I will have to write JNI code to talk to java code which itself will talk to c or c++ in JNI.
Is it possible to offer a libsolum.so version for arm64-v8a?
Thank you Virgile Dupuis Deski
Hi @virgileMaon you are correct, you would have do C++ (your app) -> Java (Solum.java) -> C++ (solum_android.so) -> Java (Solum.java) -> C++ (your app). I will look at providing the C++ lib directly for Android.
Hi @julien-l,
When do you think we could test a new package featuring C++ endpoints?
Thank you, David
I am thinking to provide libs this week. Which Android platform are you targeting in priority? aarch64/armv8, armv7-a, i686, x86_64?
Hi @julien-l
We are targeting arm64-v8a
Thank you. Virgile
Hello I published a pre-release https://github.com/clariusdev/solum/releases/tag/v11.4.0-dev with an attempt at libsolum.so for Android arm64-v8a. It was built against Qt 6.7.1.
I used this lib to build the provided solum_console example -> build ok.
It ran with the following shared libs:
- libQt6Core_arm64-v8a.so
- libQt6Gui_arm64-v8a.so
- libQt6OpenGL_arm64-v8a.so
- libQt6StateMachine_arm64-v8a.so
- libc++_shared.so
However it crashed soon after when instantiating QCoreApplication, not sure why, I have not been able to debug. If you create your own Qt application instance before calling solumInit(), then Solum will not attempt to instantiate QCoreApplication.
Please note, we will not be publishing any firmware for 11.4 currently, the software is currently unstable, even on the SDK side, we can not make guarantees on stability, please just use this as a way to test compilation
Hi,
I can make a solumInit in my QApplication, with no crash :). But the solumFwVersion (for V1, HD, HD3) returns me "unknown", while the java version returned right infos. Do you know why?
Thank you, I'll continue to test.
Hi,
I built the solum_qt example on android linked with the libsolum 11.4 you provided. From the gui on the tablet, I can connect the probe with wifi, and update certificate. However, once this is achieved the button "run" still disabled because I didn't pass in imagingState callback. In the callback setConnected the CusConnection is ProbeConnected and not SwUpdateRequired as I would have expected. I notice I pass in imagingState if I disconnect the probe from wifi. Forthemore, the firmware version at start still be "unknown"
Do you think you can provide firmware compatible with libsolum 11.4 so that we can continue our investigations? For the moment the results are encouraging and we would like to go as far as viewing the images from the probe.
thank you in advance
I cannot provide a FW 11.4 for now because it is not stable, it might brick the probe. I will try to provide arm64-v8a binaries for v11.3.0 that was released in pilot.
Thank you @julien-l
Here is another test build: https://github.com/clariusdev/solum/releases/tag/v11.3.0-dev
Notes:
- it is based on FW 11.3.0 so you should not need to update your probe
- it uses Qt 6.5.5
- with debug symbols
Let me know how it goes.
Hi @julien-l We managed to compile the qt_example with the 11.3.0 version you released. The connection seems to work, but I get an error when I try to start imaging: "Error: Failed to load workflow: Could not load scripts: Operation failed (Exception occurred: invalid message response for command set script (6467°) ...)". I suspect it's because the probe firmware is still version 11.2.0. But the required firmware version is still "unknown". How do I download the required firmware? Thanks
Yes the probe's FW version has to match that of Solum. You have 2 ways to update:
- update with the Clarius App itself (version 11.3.0 being a pilot-only release, you will need to enrol in the pilot program) or
- manually update with Solum, details in the README.
I wanted to manually update the probe with Solum, but I can't get the required firmware version as solumFwVersion returns "unknown". So I can't make the right call to download the probes firmware.
Is it normal that this function returns unknown?
The FW version is "11.3.0-573+670db68186", I will need to rebuild and re-upload the binaries with the correct FW info.
Thanks @julien-l I managed to download the right firmware! Will it work if you don't rebuild with the right FW informations?
You should be able to connect without the FW info, it will just prevent your FW download workflow. I just updated the binaries on GH release.
Thanks @julien-l for the new version! We've managed to use the Solum qt example on Android and get the ultrasound image displayed. We updated the probe using the Clarius Ultrasound app as we had a problem updating the firmware using Solum, we need to try again.
Good to hear, so you confirm the Solum C++ library for Android is usable? If so, I will commit the changes in our repo to deploy it with the next release.
Yes, everything seems to be working. The only issue I would add is about updating the software with Solum (Id had to perform a hard reset as the probe led was fixed orange), maybe I did something wrong. One last thing, the Solum library seems to be very large (about 800Mo), I don't think we will be able to embed it in an aab package. Is this size due to the debug symbols?
the Solum library seems to be very large (about 800Mo)
Due to debug symbols yes.
The next release will have the Solum C++ library for Android. I will close the ticket now.
@julien-l We are trying to automatically connect to the probe's Wi-Fi network. When we call the solumConnect method, the connection always fails with the following error message "Error connecting: failed to connect to the probe at 192.168.1.1:5000 (networkID 0)". In fact, our network ID isn't 0 because the Wi-Fi connection was made by the application. Is there a way to specify the network ID with the Solum C API (the Android Java API seems to have a way to pass the network ID to the connect function)? Or a way to bypass it?
Correct, you need to specify the network ID but the C++ lib does not allow it, I will update it. The workaround for now is to manually connect your phone/tablet to the probe's Wi-Fi.
I just added a new zip under https://github.com/clariusdev/solum/releases/tag/v11.3.0-dev with an updated connection function taking a struct of input parameters that includes the network ID:
int long long networkID = ...;
CusConnectionParams params { "192.168.1.1", 5000, networkID };
solumConnectWithParams(¶ms);
See solum.h for the new type and function. Let me know if it works for you, if yes I will include it in the next release.
thank you very much for your response
We've tested your new version and if we call solumConnectWithParams with the right network handle, the connection works!
Thanks for your quick response and version, it really helps us move forward!
Avec plaisir! I will include that change in the next release. Thanks for the feedback.