pfroud / JVisa

Java library for VISA (Virtual Instrument Software Architecture) instruments
Apache License 2.0
38 stars 12 forks source link

JVisa for Android #15

Closed ccorrea97 closed 5 months ago

ccorrea97 commented 5 months ago

Hi, how are you?

I need to develop an Android app capable of communicate with an oscilloscope which support SCPI commands (I have it currently working in a Windows environment with Py VISA).

I see the supported OSs in the description, but I wonder if this library would work in an Android OS. In case it doesn't, or it is uncertain, would you help me giving me a hint of what kind of solution would be a better approach? If mixing Java with C (which I understand work well with VISA) or better go with C# (having .NET working with NI-VISA) and Xamarin (for Android, because C# is not officially supported by Android, when Java and/or Kotlin yes).

(If you need context and my question is not out of place in the first place, I'm aiming to develop an app for Android which retrieves data from an Owon VDS6102 oscilloscope and show it in charts and graphs.)

Thank you in advance.

pfroud commented 5 months ago

I don't think JVisa can work on Android. JVisa does not actually do VISA itself, it is only a wrapper around a VISA implementation.

I know of four VISA implementations. Some of them support Linux, but none say they support Android:

I see your oscilloscope has USB and Ethernet. USB is difficult to reverse-engineer but network might be easier. The oscilloscope hopefully uses LXI. You can try connecting the oscilloscope to your PC over the network, using the oscilloscope software to control it, and look at the network traffic using a packet sniffer / protocol analyzer software.

Wireshark is standard but it can't tell which Windows process sent network traffic. I also suggest trying Microsoft Network Monitor (archived, no longer under development, still works).

If you can find what network packets are used to discover and control the instrument, you can probably send the same packets from Android.