HP1660 Logic Analyser and communicating through X Windows setup. - Page 1
Forum section: electronics / testgear

author: Tom Swift
author_rank: Contributor
timestamp: April 29, 2019, 02:22:47 am
content: *** SEE MY POST BELOW ON HOW TO SETUP X-WINDOWS ON A WINDOWS PC TO CONNECT TO THE HP1660 ***Hi. Apologies if this had been discussed before. I could not find a thread on here to explain this.I've been playing with this machine and using it for testing signals which works perfect. The documentation is great for explaining how it works.I made the mistake of digging deeper into its functionality and seeing if I can hook this thing up to my PC through X Windows. Unfortunately, there is no documentation that I can find to explain this process, (and what's available in either the documentation or the machine itself is poor). The machine does have an Ethernet socket.Thanks,Tom

author: 0culus
author_rank: Super Contributor
timestamp: April 29, 2019, 02:26:24 am
content: https://literature.cdn.keysight.com/litweb/pdf/01660-97028.pdfPage 514Seems straightforward to me, as long as you have a UNIX or UNIX-like OS on your LAN running the X server.

author: Tom Swift
author_rank: Contributor
timestamp: April 29, 2019, 02:37:14 am
content: Ah... gotcha. Refer to page 494 of this document previous poster sent. Sorry about that. Guess I needed another pair of eyeballs. Thanks.

author: 0culus
author_rank: Super Contributor
timestamp: April 29, 2019, 05:40:06 am
content: No problem. Hope that gets you up and running.

author: LapTop006
author_rank: Unknown
timestamp: April 29, 2019, 01:56:08 pm
content: If you're not a long-time UNIX user you probably want to play with using a Linux VM (or two) to learn how X works across a network, and what you need to do to make it work these days (by default X normally doesn't listen on the network any more).Some rough notes:On the display machine, once you've enabled network listening (assume you're on a trusted network) you run "xhost +" to enable any network users to connect (due to the way X works this is a pretty big security hole, so only do it on a network you fully trust).On another VM, at a console or SSH you can do something like "DISPLAY=<IP of display>:0 xterm" to pop up an xterm (choose whatever X program you like) on display 0 of the target machine.Once you have that working, it should be more obvious how to make the analyzer work.There are (or at least were) X server implementations for Windows, but I've not used one in a very long time, MacOS X also used to have an easily installable optional X server, but I've also not used it in a long time.

author: gslick
author_rank: Frequent Contributor
timestamp: April 29, 2019, 03:11:57 pm
content: One of the slightly non-obvious things with setting up the HP logic analyzers for remote use on an X Window System server is getting the logic analyzer specific font files installed on the server.In the SYSTEM directory on the analyzer hard disk there should be two font files, LG165.BDF and SM165.BDF. Also there should be a README file which contains some hints on copying the font files to the server and using mkfontdir and xset +fp to point to server to the additional fonts.Without the logic analyzer specific font files on the server most things will still work, although some things won't be display correctly.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: April 29, 2019, 05:06:53 pm
content: It can be quite a pain, as the current windows X system is different to the old one HP used. I got my 1670 running on modern ubuntu, but the screen was same size as screen on display, its workable but not by much more.You will have issues with permissions and things on the linux side, from memory, fonts are an issue too. It uses an older X protocol that modern ubuntu distros didnt like much (and this was a few years ago!).

author: 0culus
author_rank: Super Contributor
timestamp: April 29, 2019, 06:00:24 pm
content: If the OP has an old PC laying around, he could probably install an older distro on it and have more success. Of course I would only recommend doing this if 1) this machine and the logic analyzer don't have routes to the internet and 2) he has a trustworthy LAN. The former is easy to accomplish with either a firewall appliance or a segregated LAN that doesn't have any connection to an internet facing gateway.

author: Tom Swift
author_rank: Contributor
timestamp: April 30, 2019, 09:44:27 am
content: Here's how I set up my HP1660 on a Windows XP machine:**** Connect to your HP1660 through X-Windows ****I purchased a Vonets VAP11G-300 (AC adapter sold separately). You must disconnect your wireless network card before plugging this into your network card RJ45 socket.Open up your browser and go to:http://vonets.cfgU:admin P:admin (you can change this), and connect to your network with it.Unplug it from your computer and connect the RJ45 Ethernet connector to the HP1660. You can turn your wifi back on.... or if you like running Ethernet cable through your house. Plug a network cable in to the analyser and the other end in to your router.Download MobaXterm here:https://mobaxterm.mobatek.net/download.htmlInstall and run.Hover over the X-Server button. If it hasn't started, click the button. It will display that the server is running using whatever IP Address.(Current DISPLAY=XXX.XXX.XXX.XXX:0.0)In the HP1660. Go to System / External I/O / LAN Settings:LAN Port: LAN TP (or LAN BNC if you plugged in one of those, I guess)Analyser IP Address: 192.168.0.100, (you can change this to whatever you wish)Gateway IP Address: 192.168.0.1, (this is the IP address of your router.)Timeout, etc... leave alone.Click Done.You can verify it's working by pinging to that IP address.In a command shell, (Hit Windows-R, type cmd and hit Enter), type ping 192.168.0.100 (or whatever you set your Analyser IP Address to)It should receive pings from the analyser without timing out.In the HP1660. Go to System / External I/O / X-Window Settings:Remote Display Internet (IP) Address: Enter the IP Address from hovered X-Server button (Current DISPLAY=XXX.XXX.XXX.XXX:0.0)Set the Display and Screen to 0. (or possibly to whatever that was shown in the hovered button. It will most likely be 0.0)Click Done.In the HP1660. Go to System / External I/O / X-Window:Click ConnectMobaXterm will notify you that the HP1660 wishes to connect to it.Click YesYou're in. Enjoy.You must click the Disconnect button on the analyser before shutting down app.**** FTP to the HP1660 ****Press Windows-R and type: cmd. Hit Enter.Type ftp. A FTP prompt will appear.Type open 192.168.0.100 (or whatever you set your Analyser IP Address to)It'll ask for a username. Type dataYou're in. Use ls, cd, get... etc.When your done. Type close then exit...or you can use Filezilla...Host: IP Address of analyserUsername: data (if you want to fetch data from analyser), control (if you want to upload programs to it).You're in.**** Add Fonts to MobaXTerm ****You will have to convert the .bdf fonts to .pcf. The best way is to do it through Linux since it has functionality just for doing that.Look up 'Add Linux subsystem to Windows 10'. This will NOT make your machine a duel boot system.In a Linux shell, run these two commands:bdftopcf lg165.bdf > lg165.pcfbdftopcf sm165.bdf > sm165.pcfCopy lg165.pcf & sm165.pcf to c:\<user>\My Documents\MobaXTerm\slash\usr\share\fonts\misc\Add these two lines to the fonts.dir file located at c:\<user>\My Documents\MobaXTerm\slash\usr\share\fonts\misc\:lg165.pcf -Misc-Fixed-Medium-R-Normal--15-150-75-75-M-100-ISO8859-1sm165.pcf -Misc-Fixed-Medium-R-Normal--14-120-75-75-M-80-ISO8859-1Add the number of entries on top of file list by 2Add these two lines to fonts.alias located at c:\<user>\My Documents\MobaXTerm\slash\usr\share\fonts\misc\:lg165.pcf -Misc-Fixed-Medium-R-Normal--15-150-75-75-M-100-ISO8859-1sm165.pcf -Misc-Fixed-Medium-R-Normal--14-120-75-75-M-80-ISO8859-1Restart MobaXTerm and connect the analyser. Should run fine without errors.

author: swingbyte1
author_rank: Contributor
timestamp: May 02, 2019, 01:29:05 pm
content: Hi - I'm going to hijack the thread a bitI have one of these without the LAN port and would like to know if anyone knows whats involved in adding the port in? Does anyone have even a picture of the board or how it connects to the main board? I'm just wondering if there is any chance it may be possible to add this capability.Cheers

author: fenugrec
author_rank: Frequent Contributor
timestamp: December 19, 2022, 04:19:11 am
content: Quote from: swingbyte1 on May 02, 2019, 01:29:05 pmI stumbled accross this thread looking for that very information, and found that this fellowhttps://www.jamiecraig.com/hp1661cs-ethernet-interface/already figured all that out ! Haven't tested yet, but seems like a fairly straightforward mod.

author: tverbeure
author_rank: Regular Contributor
timestamp: December 27, 2023, 07:03:42 pm
content: Adding to this thread because it always came up first during Google searches.I tried many variant to make it work on Linux the usual way: xhost +, xauth, messing around with /usr/bin/Xorg and /etc/gdm3/custom.conf on my Ubuntu 20.04 system, but nothing worked. Eventually I got remote X server control running with the socat utility. Detailed write-up is here:https://tomverbeure.github.io/2023/12/26/Controlling-an-HP-1670G-with-Your-Linux-PC-X-Server.html.

author: fenugrec
author_rank: Frequent Contributor
timestamp: December 27, 2023, 07:24:09 pm
content: Nice writeup @tverbeure.I posted one for the hardware details of adding the LAN option for a more permanent solution than just flying wires (https://qcte.ca/testeq/hp1660/) , but I only tried FTP connections. It should provide a few NFS shares too, did you try those ?Using the remote X connection has security implications, I think you touch on that a bit... I guess restricting the port access to the specific IP of the LA should be reasonably safe ?

author: tverbeure
author_rank: Regular Contributor
timestamp: December 27, 2023, 07:58:12 pm
content: QuoteVery nice! I'm happy mine came with all ports ready to go.QuoteI tried, but so far I didn't have any luck getting it to work. I also have issues with FTP. It works on my Windows machine and my Ubuntu 18.04 machine (which is a different boot partition on the same Windows machine), but it doesn't work on my main Linux machine (Ubuntu 20.4) or on my Debian 12 virtual machine that runs on a Macbook. I can log in successfully, but as soon as I do any transaction (e.g. just doing 'dir'), FTP hangs forever. Weird...QuoteI'm not too worried about it. There's a firewall between the outside world and my machines. But I've updated the blog post to use a stricter filtering rule:sudo ufw allow from 192.168.1.200 proto tcp to any port 6111instead of:sudo ufw allow 6111I guess it will make an attacker's job a little bit harder, but if they manage to get on my network anyway, I assume they'll also know how to spoof their IP address.I also think that the socat command limits security issues, in the sense that I only run it when I need to use the logic analyzer. When not running, the standard xhost restrictions apply, and they're set to blocking everything, including not allowing TCP/IP connections.

author: colorado.rob
author_rank: Frequent Contributor
timestamp: December 27, 2023, 08:10:15 pm
content: QuoteThis is almost certainly a firewall issue on the client machine or on the router between the client machine and the instrument. FTP requires clients to allow access from the server unless explicitly using PASV (passive) mode. The hang you are seeing when the server needs to send data is a key hint that this is the problem. In your FTP application, send the "pasv" command before sending any other commands.

author: tverbeure
author_rank: Regular Contributor
timestamp: December 27, 2023, 08:54:37 pm
content: Quote from: colorado.rob on December 27, 2023, 08:10:15 pmThat what I thought as well. I've tried the following:Open up TCP ports 20 and 21.Use the PASV commandWhen I issue the PASV command, it get:ftp> quote pasv502 PASV command not implemented.Opening up port 20 and 21 didn't help either.

author: fenugrec
author_rank: Frequent Contributor
timestamp: December 27, 2023, 09:52:48 pm
content: I just checked my settings in Filezilla (I'm thanking myself for saving it as a preset...), I had to select "Active only" (as you found, PASV is not supported), and also limit the number of simultaneous connections to 1.

author: tverbeure
author_rank: Regular Contributor
timestamp: December 28, 2023, 05:52:19 am
content: UFW is definitely blocking FTP traffic:[120802.397548] [UFW BLOCK] IN=wlp5s0 OUT= MAC=78:2b:46:be:5d:f7:00:10:83:7b:93:95:08:00 SRC=192.168.1.200 DST=192.168.1.51 LEN=44 TOS=0x00 PREC=0x00 TTL=255 ID=1895 PROTO=TCP SPT=20 DPT=50021 WINDOW=0 RES=0x00 SYN URGP=0192.168.1.200 (source port 20) is the logic analyzer, 192.168.1.51 (dest port 50021) is the PC. The problem is that you can't filter on source ports with UFW (and I really don't want to use iptables...)I can make FTP work when I do:sudo ufw allow from 192.168.1.200Not ideal from a security point of view but better than nothing...

author: alm
author_rank: Super Contributor
timestamp: December 28, 2023, 07:19:02 pm
content: With active mode FTP, the server will make a second TCP connection to the client with source port 20 and a random port >1024 on the client. This is really annoying for the firewall. Back when FTP was common, firewalls firewall software had specific support for FTP where they inspected the traffic and detected when the server would open a connection, and temporarily allow that specific connection. Looks likethis solution/hackmight work with ufw. A workaround is allowing all incoming TCP connections to port > 1024 with source port 20, though that's not water tight.Passive mode moves the misery from the client to the server.

author: tverbeure
author_rank: Regular Contributor
timestamp: December 29, 2023, 03:34:48 pm
content: Somebody on hacker news mentioned nf_conntrack_ftp: it automatically opens up port 20 when it detects ftp transactions.Chances are that Ubuntu 18.04 has something like this enabled by default but 20.04 doesn’t. I’ll give that a try.

author: alm
author_rank: Super Contributor
timestamp: December 29, 2023, 03:57:44 pm
content: For more recent kernel versions you need toadd an iptables rule for nf_conntrack_ftp to work. The Raspberry Pi forum post I linked to earlier shows how to do this with ufw.

author: tverbeure
author_rank: Regular Contributor
timestamp: December 29, 2023, 06:58:47 pm
content: Quote from: alm on December 29, 2023, 03:57:44 pmThanks! I've updated the blog post mentioning these 2 possible solutions.