Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an agilent 82357b clone. The linux-gpib software from sourceforge comes with hotplug stuff. I found a site that has an example udev for an NI device, but this one is a bit different. You have to load the firmware twice, and both times it changes the usb address/id (whatever it's called).
For example: Say that the device is this:
Code:
Bus 002 Device 031: ID 0957:0718 Agilent Technologies, Inc.
When you run install the firmware with fxload it becomes
Code:
Bus 002 Device 032: ID 0957:0718 Agilent Technologies, Inc.
But you need to run fxload a second time and it becomes
Code:
Bus 002 Device 033: ID 0957:0718 Agilent Technologies, Inc.
How can I change "99-linux_82357a.rules" so that it runs "/lib/firmware/agilent_82357a" a second time with the updated DEVNAME? (Assuming that's the file I need to change.)
NOTE: The origin of /lib/firmware file assumes that the device first appears with idProduct=="0715", but I'm not seeing that with mine.
#!/bin/sh
GPIB_CONFIG_OPTIONS="--minor 0"
DATADIR=/lib/firmware
FXLOAD=/sbin/fxload
GPIB_CONFIG=/usr/local/sbin/gpib_config
FXLOAD_OPTIONS=
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
FIRMWARE=
SS_LOADER=
# pre-renumeration device IDs
case $PRODUCT in
# 82357a with firmware already loaded
957/107/*)
$GPIB_CONFIG $GPIB_CONFIG_OPTIONS
;;
# 82357a without firmware
957/7/*)
FIRMWARE=$DATADIR/agilent_82357a/82357a_fw.hex
SS_LOADER=$DATADIR/agilent_82357a/82357a_fw.hex
;;
# 82357b with firmware already loaded
957/518/*)
$GPIB_CONFIG $GPIB_CONFIG_OPTIONS
;;
# 82357b without firmware
957/718/*)
FIRMWARE=$DATADIR/measat_releaseX1.8.hex
SS_LOADER=$DATADIR/measat_releaseX1.8.hex
FXLOAD_OPTIONS="-t fx2"
;;
esac
# quit unless we were called to download some firmware
if [ "$FIRMWARE" = "" ]; then
# OR: restructure to do other things for
# specific post-renumeration devices
exit 0
fi
# missing firmware?
if [ ! -r $FIRMWARE ]; then
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??"
fi
exit 1
fi
# missing second stage loader?
if [ ! -r $SS_LOADER ]; then
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "missing $SS_LOADER for $PRODUCT ??"
fi
exit 1
fi
# missing fxload?
if ! which $FXLOAD; then
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "missing $FXLOAD ??"
fi
exit 1
fi
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE"
fi
$FXLOAD -v $FSLOAD_OPTIONS -D ${DEVNAME} -I $FIRMWARE -s $SS_LOADER
Last edited by Quakeboy02; 08-23-2013 at 10:29 PM.
Reason: vsload s/b fxload
I've got a couple of counters, an SA, and a voltmeter that I'd like to hookup. I'm not sure what direction I'm going to have to take, as linux-gpib just doesn't like my adapter on Debian. I tried setting up Scientific Linux in a virtual box and installing both linux-gpib and NI-VISA, but I clearly haven't cast the appropriate spells, because that's not working either. This will take a back seat for awhile, as I have other projects, but eventually I'm going to have to find a way to make it work. I'll checkout that link to the fork of linux-gpib and see if it has anything to offer.
Try over at the "hp_agilent_equipment" group on Yahoo. Someone there might know how to get it working. With all of this test equipment floating around, you would think that one of us would have hooked up and figured it out by now. LOL
I've been in the hp_agilent_equipment group for awhile, and no-one seems interested in helping setup this device on linux. The linux_gpib group asked me a couple of questions, but didn't respond with any help after I posted a long reply. I think it's effectively a moribund group.
I've setup a Scientific Linux virtualbox and tried to load ni-visa on it with mixed results. The software can detect the controller, but can't see the counter I have it plugged into. SL doesn't look like a bad distro, and I'd even consider jumping ship from Debian if I could just get this working. =) Loading the software is always the easiest part. It's the configuration bits and bobs that always kill you.
So, what I have is the sourcecode for linux-gpib and a seemingly very steep learning curve for ScientificLinux plus NI-VISA. I'm going to play with SL for awhile, but if I can't figure out how to see an instrument soon, I'm just going to go play with the sourcecode for linux-gpib. It's been a very long time since I played with linux device drivers, but that might be the most productive route.
As to my original question. I had figured out a way to do it in a manually run script before I posted this question. I'll probably just meld that script with the udev script and call it good, if I can get somewhere with the linux-gpib. My manual script works so it's very low on my priority list.
Added:
Oh, and the Prologix stuff looks good. There's no complicated interface: just send the commands and it works. I took a chance on something less than half that price and I'm paying for it with my time.
Last edited by Quakeboy02; 08-26-2013 at 10:27 PM.
I've been in the hp_agilent_equipment group for awhile, and no-one seems interested in helping setup this device on linux. The linux_gpib group asked me a couple of questions, but didn't respond with any help after I posted a long reply. I think it's effectively a moribund group.
The problem with the group (as I see it) is that it is too generalized. It really should be broken up into sub-groups where things are a bit more focused. Waaay too much traffic...
Quote:
Originally Posted by Quakeboy02
I've setup a Scientific Linux virtualbox and tried to load ni-visa on it with mixed results. The software can detect the controller, but can't see the counter I have it plugged into. SL doesn't look like a bad distro, and I'd even consider jumping ship from Debian if I could just get this working. =) Loading the software is always the easiest part. It's the configuration bits and bobs that always kill you.
That's why I have partition after partition after partiton available on this box. It isn't a big deal to set up a distro for testing. I am distro agnostic, so I will try anything once.
Quote:
Originally Posted by Quakeboy02
So, what I have is the sourcecode for linux-gpib and a seemingly very steep learning curve for ScientificLinux plus NI-VISA. I'm going to play with SL for awhile, but if I can't figure out how to see an instrument soon, I'm just going to go play with the sourcecode for linux-gpib. It's been a very long time since I played with linux device drivers, but that might be the most productive route.
You are a better man than I, Gunga Din.
I am a Controls Engineer, aka, a PLC jockey. I couldn't spell "C" if you told me it was settled in between the "B" and the "D" in the alphabet...
Quote:
Originally Posted by Quakeboy02
As to my original question. I had figured out a way to do it in a manually run script before I posted this question. I'll probably just meld that script with the udev script and call it good, if I can get somewhere with the linux-gpib. My manual script works so it's very low on my priority list.
Yeah, if it works, don't fight it.
Quote:
Originally Posted by Quakeboy02
Added:
Oh, and the Prologix stuff looks good. There's no complicated interface: just send the commands and it works. I took a chance on something less than half that price and I'm paying for it with my time.
Something that I learned *not* to do a long time ago. I work a 50 - 60 hour week normally, and I find myself with more disposable income than time (maybe not a *huge* amount of disposable income, but still more than I have of time). So any device that doesn't perform either gets donated, or parted out. I really enjoy firing up my xytronic solder/desolder station and taking out my frustrations on a miscreant board.
As for your SA, I'm envious. We got a Rigol SA here at work (which I suppose I could take home and play with if I like), and while it is nice, it ain't a HP/Agilent...
And my SA is coming in from Israel, it's a, umm, Afedri SDR (if you squint real hard it kinda-sorta looks like a SA )
"Something that I learned *not* to do a long time ago. I work a 50 - 60 hour week normally, and I find myself with more disposable income than time"
I've been disabled for quite some time, so I have to manage things in the other direction. =)
And don't be too jealous of my old gear, especially my SA, which is an 8558B. I've got a 5334B, a 5335A, an 853A with the 8558B plugin, an 8640B, an 8444A, and a nice 3456A DMM. The SA's not much, but it satisfies what few needs I have for it. About half of this was received not working, so I traded my time for the cost difference. But, it's a good, enjoyable hobby, and keeps me occupied, rather than watching soap operas. LOL Why couldn't I have had some of this stuff back in the day, instead of all the Heathkit stuff I've owned? =)
Since you are into antiques, can I interest you in a Nicolet npc-764 logic analyzer? As far as I know, it even works (it was tossed in as part of a deal for a Tek quad trace scope. I've never turned it on). PM me with an address of where you want it sent and it's yours.
Quote:
Originally Posted by Quakeboy02
I've got a 5334B, a 5335A, an 853A with the 8558B plugin, an 8640B, an 8444A, and a nice 3456A DMM. The SA's not much, but it satisfies what few needs I have for it. About half of this was received not working, so I traded my time for the cost difference. But, it's a good, enjoyable hobby, and keeps me occupied, rather than watching soap operas. LOL Why couldn't I have had some of this stuff back in the day, instead of all the Heathkit stuff I've owned? =)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.