Bug 1865

Summary: HMO 3054:Failed to open device generic/unspecified error
Product: PulseView Reporter: Fred <Fred.Jupiter.BHA>
Component: Device handlingAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: dan
Priority: Normal    
Version: 0.5.0   
Target Milestone: ---   
Hardware: x86   
OS: Windows   

Description Fred 2023-07-06 09:50:12 CEST
I don't have any experience with Pulsview yet.
I try to connect a device.
Unfortunately, an error message comes up.
Perhabs somebody could help me.

HMO3054 
Win10 1809
PulseView 0.5.0-git-7e5c839 
same result with PulseView 0.4.2


Log:
sr: asix-omega-rtm-cli: Cannot execute RTM CLI process: Failed to execute helper program (Invalid argument)
sr: log: libsigrok loglevel set to 4.
srd: libsigrokdecode loglevel set to 4.
sr: log: libsigrok loglevel set to 5.
srd: libsigrokdecode loglevel set to 5.
sr: hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0000000000000000 cg NULL -> [uint32 20000, 20001]
sr: serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: scpi_tcp: Successfully sent SCPI command: '*IDN? '.
sr: scpi: Got response: 'HAMEG,HMO3054,019258351,06.005', length 30.
sr: hwdriver: Scan found 1 devices (hameg-hmo).
sr: device: hameg-hmo: Opening device instance.
sr: scpi_tcp: Failed to connect to 10.226.50.108:5025: Bad file descriptor
Notifying user of session error: "generic/unspecified error"


>If I try a secound time:


sr: hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0000000000000000 cg NULL -> [uint32 20000, 20001]
sr: serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: scpi_tcp: Failed to connect to 10.226.50.108:5025: Bad file descriptor
sr: scpi: Couldn't open SCPI device.
sr: hwdriver: Scan found 0 devices (hameg-hmo).

>It seams after I start pulsview I could only send one SCPI command.
>Perhabs there CR/LF is not OK.
Comment 1 Dan Horák 2023-07-06 12:37:35 CEST
Have you tried connecting the scope via USB? Does it work with sigrok-cli?
Comment 2 Fred 2023-07-06 14:19:28 CEST
>Thank you for yout answer.


>With USB the Device don't found:
>I changed with Zadig: Hameg HO730 driver to WinUSB (v6.1.7600.16385)
sr: serial: No serial device specified.
sr: hwdriver: Scan found 0 devices (hameg-hmo).

>I changed with Zadig: Hameg HO730 driver to USB> Serial (CDC)
>Search as USB:
sr: scpi: Opening serial device COM10.
sr: serial: Opening serial port 'COM10' (flags 1).
sr: serial-libsp: Error opening port (31): Ein an das System angeschlossenes Gerõt funktioniert nicht..
sr: scpi: Couldn't open SCPI device.
sr: hwdriver: Scan found 0 devices (hameg-hmo).
>Search as serial port:
sr: serial: Parsed serial options: 115200/8n1.
sr: serial: Parsed serial device: COM10.
sr: scpi: Opening serial device COM10.
sr: serial: Opening serial port 'COM10' (flags 1).
sr: serial-libsp: Error opening port (31): Ein an das System angeschlossenes Gerõt funktioniert nicht..
sr: scpi: Couldn't open SCPI device.
sr: hwdriver: Scan found 0 devices (hameg-hmo).

>I changed with Zadig: Hameg HO730 driver to libusb-win32 (v1.2.6.0)
sr: serial: No serial device specified.
sr: hwdriver: Scan found 0 devices (hameg-hmo).

>I changed with Zadig: Hameg HO730 driver to libusbk (v3.0.7.0)
sr: serial: No serial device specified.
sr: hwdriver: Scan found 0 devices (hameg-hmo).

>If I connnect my Saleae Logic 8 to USB and start the Pulsview it is found.
If start the Pulsview and I connnect later my Saleae Logic 8 to USB and it is not found.


>Test with sigrok-cli.exe:
sigrok-cli --driver=hameg-hmo:conn=tcp-raw/10.226.50.108/5025 -O analog --frames 1
sr: scpi_tcp: Failed to connect to 10.226.50.108:5025: Bad file descriptor
Failed to open device.

>I tried also with Win10 22H2 and Pulseview, but same result.
sr: serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: scpi_tcp: Successfully sent SCPI command: '*IDN?'.
sr: scpi: Got response: 'HAMEG,HMO3054,019258351,06.005', length 30.
sr: hwdriver: Scan found 1 devices (hameg-hmo).
sr: device: hameg-hmo: Opening device instance.
sr: scpi_tcp: Failed to connect to 10.226.50.108:5025: Bad file descriptor
Notifying user of session error: "generic/unspecified error"
Comment 3 Fred 2023-07-07 08:06:00 CEST
>1. Search for Device=OK
sr: [03:16.090000] serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: [03:16.090000] scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: [03:16.090000] scpi_tcp: Successfully sent SCPI command: '*IDN?'.
sr: [03:16.106000] scpi: Got response: 'HAMEG,HMO3054,019258351,06.005', length 30.
sr: [03:16.106000] hwdriver: Scan found 1 devices (hameg-hmo).
>2. Search for Device=NOK
sr: [03:38.573000] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0000000000000000 cg NULL -> [uint32 20000, 20001]
sr: [03:38.582000] serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: [03:38.582000] scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: [03:39.597000] scpi_tcp: Failed to connect to 10.226.50.108:5025: Bad file descriptor
sr: [03:39.597000] scpi: Couldn't open SCPI device.
sr: [03:39.597000] hwdriver: Scan found 0 devices (hameg-hmo).
>PowerOff PowerON Device (HMO3054)
>Search for Device=OK
sr: [06:08.539000] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0000000000000000 cg NULL -> [uint32 20000, 20001]
sr: [06:08.546000] serial: Parsed serial device: tcp-raw/10.226.50.108/5025.
sr: [06:08.546000] scpi: Opening RAW TCP device tcp-raw/10.226.50.108/5025.
sr: [06:08.550000] scpi_tcp: Successfully sent SCPI command: '*IDN?'.
sr: [06:08.564000] scpi: Got response: 'HAMEG,HMO3054,019258351,06.005', length 30.
sr: [06:08.564000] hwdriver: Scan found 1 devices (hameg-hmo).
>To me it looks like the driver opens the TCP/IP connection when searching, 
>sends the command "*IDN?" and does not close the connection.
>If searched a second time no new connection can be opened because of the opened connection.