Using Agilent/Keysight E5810A with python


We have used linux-gpib with both NI GPIB-USB-HS and Agilent 82357B for few years already, using Raspberry Pi 1, 2B and 3B hosts, as well as Terasic DE1-SoC hosts. Instruments were controlled by python applications to collect samples and data for live view and analysis.

However USB interface can be tricky to operate flawlessly for long periods of time, and sometimes we had random hangs or time-outs with various Raspberry Pi configurations. Dedicated LAN-GPIB gateway would hopefully fix these issues completely, and also make it independend from host kernel driver/library support, as all GPIB control code now would run on gateway instead. So when opportunity presented itself to grab one of Agilent E5810A’s for <100$ USD, it took no thinking to make a deal.


Redistribution and use of this article, any parts of it or any images or files referenced in it, in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of article must retain the above copyright notice, this list of conditions, link to this page ( and the following disclaimer.
  • Redistributions of files in binary form must reproduce the above copyright notice, this list of conditions, link to this page (, and the following disclaimer in the documentation and/or other materials provided with the distribution, for example Readme file.

All information posted here is hosted just for education purposes and provided AS IS. In no event shall the author, site, or any other 3rd party, including Agilent or Keysight be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortuous action, arising out of or in connection with the use or performance of information published here.

If you willing to contribute or add your experience regarding instrument repairs or provide extra information, you can do so following these simple instructions

Manuals and service information

Agilent E5810 design and teardown

Image 1-2: Agilent E5810A Gateway, front and rear sides

Unit is thin, have half of 19” width. Due to light weight, it is easy to install it on rack mount.

Image 3-4: Vent holes on sides and bottom label

Cooling air enters unit from rear and side vents.

Image 5-6: Inner construction, top metal cover removed

Image 7-8: Main IBM Processor, SDRAM and interface chips

Image 9: Mezzanine board to board connectors

Image 10-11: Front interface board and status LEDs

Image 12: Switching power supply module

Image 13: PSU model and rating

Firmware upgrade

Unit arrived with very old firmware, rev.1.02.

After following manual for upgrade, and pointing it to our repository with latest rev.1.10 firmware. unit was updated sucessfully.

All firmware files we have are available for download. Keep in mind, these are for E5810A model, not the newer E5810B!.

Firmware version Fixed items
E5810A Rev. A.01.10, 10/10/2011 Fixed password special character recognition, viewable password on ‘view source’ page, session URL from by-pass password page.
E5810A Rev. A.01.09 Fixed LED Sequence
E5810A Rev. A.01.08 Fixed instruments to stay REMOTE connection whenever a data transaction times out
E5810A Rev. A.01.07 Fixed ftp ( firmware update issue, Firmware A.01.06 or below only able to update firmware through local ftp server.
E5810A Rev. A.01.06 Phy chip change (P1001 board)
E5810A Rev. A.01.05, 11/29/2007 Fixed P1001 Board Lan check issue
E5810A Rev. A.01.04, 10/26/2007 Fixed Guide Tech EOI issue
E5810A Rev. A.01.03, 6/14/2006 Fix the hang issue when the DHCP option 150 is turned on
E5810A Rev. A.01.02, 9/22/2003 Turn off IP forwarding to prevent forwarding of malformed IP packets

E5810 boots quickly, under 15 seconds, including DHCP discovery on LAN.

LXI/VXI support with python in linux

It is possible to use the E5810A LAN/GPIB gateway with any VISA implementation that supports TCPIP (LAN) resources and the industry standard VXI-11.2 TCP/IP Instrument Protocol.

To use this gateway in linux environment with python, very simple guideline as below is followed. Create folder (for example /home/vxi).

mkdir /home/vxi
cd /home/vxi

Enter directory and get SVN repository for python-vxi

svn checkout
cd python-vxi11/trunk

Enter /home/vxi/python-vxi11/trunk directory

python install

Now python-vxi should be installed on your linux platform

Here’s example python app to talk with VXI instrument:

import vxi11
instr =  vxi11.Instrument("", "gpib0,3")
instr.timeout = 30

Make sure to type “gpib0,3” in lowercase, and don’t put any spaces between the comma and the instrument address.. Number *3 here is GPIB instrument address.

Timeout setting to 30 change the GPIB I/O timeout delay, it is important for long operations when instrument might not reply in default timeout time. This is important for example for resistance measurements with NPLC100, OCOMP and DELAY 3 with HP 3458A instruments.

In case of correct installation and connection reply can be as below:

Keithley Instruments Inc., Model 2636B, 1234567, 3.2.1

Below are actual photos of E5810A controlling test DMM:

%(imgref)Image 14-16: E5810A booting process and first test results with Keithley 2002 DMM

Reading remote instrument status

Often it is important to read GPIB instrument status register, for example to check if device is busy or require attention to handle error/exceptions. One of such practical examples when this is essential – calibration procedures of Keithley DMMs, as internal calibration process may take multiple minutes. During this time it is expected that GPIB master (E5810A in this case) poll status register over GPIB bus to determine when instrument is ready to proceed next calibration step.

Code snipped below allow to read status register:

import vxi11

def read_status(self):
    inst = vxi11.Instrument("", "gpib0,3")
    reg = self.inst.read_stb()
    return reg

More information is available on github for python-vxi11 on Alex Forencich’s site
He also had created python-usbtmc for Python USB commnication with instruments, so check it out.

Discussion about this article and related stuff is welcome in comment section or at our own IRC chat server: (standard port 6667, channel: Web-interface for access mirrored on this page.

Author: Ilya Tsemenko
Created: July 18, 2018, 4:32 a.m.
Modified: Jan. 18, 2020, 9:50 p.m.