VK2BEA / HP8753-Companion

Facilitate and enhance the functionality of the HP8753 Vector Network Analyzer
Apache License 2.0
15 stars 4 forks source link

Cannot obtain HP8753 descriptor #10

Closed tomverbeure closed 7 months ago

tomverbeure commented 7 months ago

Hi Michael,

I'm able to compile the binary just fine, but when I start it, I get the following:

tom@zen:~$ hp8753 
libgpib: invalid descriptor
libgpib: invalid descriptor
libgpib: invalid descriptor
libgpib: invalid descriptor

The GUI also says "Cannot find HP8753".

When I use ibtest, things are working fine: I can open the device (address 16), I can write "IDN?" and read the HP8753C string:

om@zen:~$ ibtest
Do you wish to open a (d)evice or an interface (b)oard?
    (you probably want to open a device): d
enter primary gpib address for device you wish to open [0-30]: 16
trying to open pad = 16 on /dev/gpib0 ...
You can:
    w(a)it for an event
...
    send group e(x)ecute trigger (device only)
: w
enter a string to send to your device: IDN?
sending string: IDN?           <<<<<<<<<<<<<<<<<<<<<

gpib status is: 
ibsta = 0x2100  < END CMPL >
iberr= 0

ibcntl = 5
You can:
    w(a)it for an event
...
    send group e(x)ecute trigger (device only)
: r
enter maximum number of bytes to read [1024]: 
trying to read 1024 bytes from device...
received string: 'HEWLETT PACKARD,8753C,0,4.13  <<<<<<<<<<<<<<<<<<<<<
'
Number of bytes read: 29
gpib status is: 
ibsta = 0x2100  < END CMPL >
iberr= 0

ibcntl = 29
You can:
    w(a)it for an event
...
    send group e(x)ecute trigger (device only)
: 

I tried running with the -d 7 option, but that doesn't seem to be logging anything?

I'm attaching an strace file in case that helps.

Tom

trace.log

VK2BEA commented 7 months ago

Look at the journal to see the error and debug logging. Something like .. $ journalctl -t hp8753 --since '5 minutes ago' You should see (when successfully receiving a trace) a log like that below. What GPIB interface are you using?

Apr 07 19:16:41 maxwell hp8753[6649]: Starting
Apr 07 19:16:41 maxwell hp8753[6649]: Linux maxwell 6.8.4-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr  4 20:45:21 UTC 2024 x86_64
Apr 07 19:16:41 maxwell hp8753[6649]: HP8753 Companion version: 1.29-2
Apr 07 19:16:44 maxwell hp8753[6649]: 🖊 HP8753: IDN?;
Apr 07 19:16:44 maxwell hp8753[6649]: 🖊 HP8753: 5 / 5 bytes
Apr 07 19:16:44 maxwell hp8753[6649]: 👓 HP8753: 29 bytes (50 max)
Apr 07 19:16:44 maxwell hp8753[6649]: IDN returns "HEWLETT PACKARD,8753C,0,4.13
                                      "
Apr 07 19:16:44 maxwell hp8753[6649]: 🖊 HP8753: CLES;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 5 / 5 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: DUAC?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: DUAC?; off 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: SPLD?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: SPLD?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: COUC?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: COUC?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: MARKCOUP?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 10 / 10 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: MARKCOUP?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: OUTPLEAS;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 9 / 9 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 4 bytes (4 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2626 bytes (2626 max)
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString Active channel 0
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString Markers channel 1 are 0x0
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString Center/Span channel 1 yes
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString No. of segments channel 1 0
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString Markers channel 2 are 0x0
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString Center/Span channel 2 no
Apr 07 19:16:45 maxwell hp8753[6649]: process8753learnString No. of segments channel 2 0
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: HOLD?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: HOLD?; off 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: HOLD;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 5 / 5 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: LOGM?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: LOGM?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: SCAL?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: REFP?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: REFV?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: CENT?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: SPAN?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: LINFREQ?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 9 / 9 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: LINFREQ?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: IFBW?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 25 bytes (25 max)
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: AVERO?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 7 / 7 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: AVERO?; off 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: S11?;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 5 / 5 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:45 maxwell hp8753[6649]: Option setting: S11?; on 
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: FORM2;OUTPFORM;
Apr 07 19:16:45 maxwell hp8753[6649]: 🖊 HP8753: 15 / 15 bytes
Apr 07 19:16:45 maxwell hp8753[6649]: 👓 HP8753: 4 bytes (4 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 1608 bytes (1608 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: FULP?;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:46 maxwell hp8753[6649]: Option setting: FULP?; on 
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: LEFL?;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:46 maxwell hp8753[6649]: Option setting: LEFL?; off 
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: LEFU?;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:46 maxwell hp8753[6649]: Option setting: LEFU?; off 
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: RIGL?;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:46 maxwell hp8753[6649]: Option setting: RIGL?; off 
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: RIGU?;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 2 bytes (10 max)
Apr 07 19:16:46 maxwell hp8753[6649]: Option setting: RIGU?; off 
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: SCAPFULL;FULP;PTEXT ON;OUTPPLOT;
Apr 07 19:16:46 maxwell hp8753[6649]: 🖊 HP8753: 32 / 32 bytes
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 11 bytes (1000 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 21 bytes (1000 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 20 bytes (1000 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 4 bytes (1000 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 1000 bytes (1000 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 992 bytes (992 max)
Apr 07 19:16:46 maxwell hp8753[6649]: 👓 HP8753: 994 bytes (994 max)
Apr 07 19:16:47 maxwell hp8753[6649]: 👓 HP8753: 989 bytes (989 max)
Apr 07 19:16:47 maxwell hp8753[6649]: 👓 HP8753: 999 bytes (999 max)
Apr 07 19:16:47 maxwell hp8753[6649]: 👓 HP8753: 109 bytes (990 max)
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: KEY34;
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: 6 / 6 bytes
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: ESE1;SRE32;
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: 11 / 11 bytes
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: ENTO
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: 4 / 4 bytes
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: CONT;
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: 5 / 5 bytes
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: MENUOFF;EMIB;
Apr 07 19:16:47 maxwell hp8753[6649]: 🖊 HP8753: 13 / 13 bytes
Apr 07 19:16:49 maxwell hp8753[6649]: Ending
tomverbeure commented 7 months ago

Ok. Problem solved. This issue is that I didn't know of the existence of the GPIB menu.

It didn't occur to me that there'd be additional menu options left and right of the "Calibration Trace Data" options:

Screenshot from 2024-04-07 16-19-41

I'm not sure if the software is supposed to discover the GPIB device automatically or if one is always supposed to manual set the address?

Maybe the GPIB menu should be a bit easier to discover?

Tom

tomverbeure commented 7 months ago

BTW: the rendering of the imported data is beautiful! :-)

I think you can close this issue. A short term 'fix' might be to just mention in the README.md that you can manually set the GPIB parameters with the GPIB menu.

VK2BEA commented 7 months ago

yes .. interface design choices 8) Given your experience, I'll see if I can have that menu selected when the program first starts (i.e. when there is no database found). As far as the annoying splash screen goes, I'll disable that when the --debug switch is used.

VK2BEA commented 7 months ago

OK, I made those two changes ... if you start with --debug 2 (or greater), the splash screen won't show. On first run (when .local/share/hp8753c/hp8753c.db is not found), the GPIB tab is pre-selected.