clariusdev / cast

APIs for Researchers and Marketplace Apps
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
38 stars 17 forks source link

Unable to Run Example Applications in example/claster and example/python #173

Open jonortegav opened 1 month ago

jonortegav commented 1 month ago

I am experiencing difficulties running the example applications located in the example/claster and example/python directories. Despite following the provided instructions, I am unable to successfully execute the applications.

Details example/python Application:

File: pycaster.py Issue: When attempting to run the pycaster.py script, I encounter errors related to loading shared libraries. Specifically, the script fails to load libcast.so and pyclariuscast.so on a Windows platform. Error Messages: Error loading libcast.so: [WinError 193] %1 is not a valid Win32 application Error loading pyclariuscast.so: [WinError 193] %1 is not a valid Win32 application

Code Excerpt if sys.platform.startswith("win"): try: libcast_handle = ctypes.CDLL("C:\MyProjects\cratos\cast\examples\python\libcast.so", ctypes.RTLD_GLOBAL)._handle # load the libcast.so shared library print("libcast.so loaded successfully.") except OSError as e: print(f"Error loading libcast.so: {e}")

try:
    pyclariuscast = ctypes.cdll.LoadLibrary("C:\\MyProjects\\cratos\\cast\\examples\\python\\pyclariuscast.so")  # load the pyclariuscast.so shared library
    print("pyclariuscast.so loaded successfully.")
except OSError as e:
    print(f"Error loading pyclariuscast.so: {e}")

Details example/claster Application:

File: Makefile Issue: I am unsure how to modify the Makefile to successfully build and run the application. The current Makefile does not seem to be configured correctly for my environment, and I need guidance on the necessary changes. Request: Could you provide detailed instructions or an example Makefile configuration that works for this application?

Operating System: Windows 10 Python Version: 3.12.5 GCC Version: gcc (Rev6, Built by MSYS2 project) 13.2.0

Steps to Reproduce

julien-l commented 1 month ago

Hi, ensure you have downloaded the binaries for your platform at https://github.com/clariusdev/cast/releases and make sure the Makefile paths and python paths point to the correct location where you extracted the libraries.

jonortegav commented 1 month ago

Hi Julien, thanks for the fast response.

I think I manage to generate the .exe file thanks to what you have said but i am struggling to connect to Clarius C3 HD3 probe.

I establish the connection between probe and Clarius app through the actual probe network and then I connect my PC to the same network (as you mention on the README.md). The problem is that when I execute the code the next message appears:

image

Important to mention that, while the IP address of the probe appears in the actual Clarius app when the connection between probe and application is established, there is no information about the port. To solve this i have tried Nmap to try to see to which port the probe IP is broadcasting to.

image image

But still does not work...

I don't know if I have something left or if I have misunderstood something.

Than you for your attention

jonortegav commented 1 month ago

I have just obtain a different error when i tried to connect to port=5000

image

Maybe there is a relation

clariusk commented 1 month ago

yes. it's the casting port you need, is your probe licensed with the Research Package or Cast API, then the App will show the relevant information to connect.

jonortegav commented 1 month ago

I don't have the Research option in the Clarius App, so I assume that's the issue. Anyway, thank you for your attention!