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.
Linux Voltnut fits me pretty good
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.
Hmm ...
Did you notice that we hit a "hard bump" in December
We had to get the linux-gpib maintainer involved, in order to get the Agilent GPIB adapter working ?
The image is still WIP , and
plesa is 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 LabView
Or 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
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.
@Steve
Plesa 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
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.
Plesa hinted that the next one will be a collection of install scripts
How 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.
Plesa hinted that the next one will be a collection of install scripts
How 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.
Unless you're connected to the live internet you don't really need to update it - if it works, just keep using it.
How 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.
Look 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
.
This time i don't think it's a full image, but a set of install scripts.
@Plesa
If you need help with testing or writing parts of the script, let me know.
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 the
https://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 terminal
curl https://raw.githubusercontent.com/PlesaEEVBlog/RPi_LogNut/master/Install_GPIB_Support.sh | sudo bash
this 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
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 found
failed to bring board online
failed to configure board
main: No such device
I 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?
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 found
failed to bring board online
failed to configure board
main: No such device
I 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?
The 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.
@Plesa et all
Seems like Dave discovered that the NI-USB have started to "behave" as the Agilent.
Quoted text
[ 99.621040] Linux-GPIB 4.0.3 Driver [ 99.624382] ni_usb_gpib driver
loading [ 99.624443] ni_usb_gpib: probe succeeded for path:
usb-0000:00:1d.0-1.2 [ 99.624479] usbcore: registered new interface
driver ni_usb_gpib [ 99.624481] gpib: registered ni_usb_b interface [
132.187333] ni_usb_gpib: attach [ 132.187339] attached to bus interface
0, address 0xffff9baeb751a000 [ 132.196677] product id=0x709b [
132.196683] ------------[ cut here ]------------
[ 132.196712] WARNING: CPU: 1 PID: 1448 at drivers/usb/core/hcd.c:1584
usb_hcd_map_urb_for_dma+0x42a/0x550 [usbcore]
[ 132.196713] transfer buffer not dma capable
Dave writes on the gpib-mailinglist
OK we have seen this problem with the agilent driver also.
The kernel has become stricter with dma mappable buffers.
Will post a patch to SVN.
Thanks,
-Dave
I'll try to get some more info from Dave
/Bingo
Ps: I'll try out the image asap
Dave might have fixed the NI-USB problem
SVN commit [r1656] should fix the problem. Please report here if the fix
is successful as I do not have an NI USB adapter to test with.
For convenience I have uploaded a release candidate distribution tarball
linux-gpib-4.0.4rc1.tar.gz
<https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/4.0.4/>
cheers,
-dave
Could someone verify ??
I don't have a NI adapter
/Bingo
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 called
ssh on the /boot partition.
This will enable SSH on bootup.
I just found out the hard way
/Bingo
Dave might have fixed the NI-USB problem
SVN commit [r1656] should fix the problem. Please report here if the fix
is successful as I do not have an NI USB adapter to test with.
For convenience I have uploaded a release candidate distribution tarball
linux-gpib-4.0.4rc1.tar.gz
<https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/4.0.4/>
cheers,
-dave
Could someone verify ??
I don't have a NI adapter
/Bingo
I just tried with kernel 4.9.11 with similar results.
ibtest
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 ARM
Message 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 801e2fb4
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800669] fd80: b5193ab4 00000006 b8f7b000 b5193a80 a9fa5700 00000014 b2fbfdbc b2fbfda8
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800685] fda0: 80714e4c 80714c94 a9fa5710 7f3bee80 b2fbfdfc b2fbfdc0 7f3c9694 80714df8
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800701] fdc0: 7ede51f0 7f3bee80 00000000 00000000 80185ea4 7f3bee80 00000006 b8f7b000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800717] fde0: 00000001 7f3bee88 7ede51f0 7f3bee80 b2fbfe24 b2fbfe00 7f3bd2f4 7f3c9570
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800732] fe00: b2fbfe60 b8f7b000 00000006 b2fbfe68 00000006 00000000 b2fbfefc b2fbfe28
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800748] fe20: 7f3bae30 7f3bd298 b2fbfe60 00000000 a9fa5440 b2fbfe40 807179c4 00000001
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800764] fe40: b8f7b000 b2fbe000 a9fa5dc0 7f3bee80 7ede52a0 00000000 00000004 00000000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800779] fe60: 00000000 a9d83600 7ede52a0 00000000 00000006 00000000 00000001 00000001
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800795] fe80: 0000ffff 00000000 804c51ac 804c779c b2fbfedc b2fbfea0 804bccc4 804c5198
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800811] fea0: a9e71300 804c12e4 b6325c00 b2f0b000 b2fbff80 b6325c00 b2fbff80 76fa4000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800827] fec0: b2fbff80 00000001 b2fbe000 00000000 b2fbff4c 7ede51f0 b2e561c8 a9da4240
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800843] fee0: c018a065 00000003 b2fbe000 00000000 b2fbff7c b2fbff00 802830e8 7f3b948c
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800858] ff00: 8028fd44 00000001 b6325c08 b2928000 aac46e10 b2928000 00000000 00000000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800874] ff20: 00000020 00000001 b6325c00 00000000 aac46e10 00000002 b6325c08 00000000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800890] ff40: b2fbff7c b2fbff50 802701f0 802b6950 00000000 a9da4240 7ede51f0 a9da4240
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800906] ff60: c018a065 00000003 b2fbe000 00000000 b2fbffa4 b2fbff80 802838a0 80283048
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800921] ff80: 00000001 00000000 01484220 00000006 00000036 80108244 00000000 b2fbffa8
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800937] ffa0: 801080c0 80283868 00000000 01484220 00000003 c018a065 7ede51f0 00000001
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800952] ffc0: 00000000 01484220 00000006 00000036 7ede52a0 76f493c0 76faa000 00000000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.800968] ffe0: 76f45294 7ede51ec 76f3a630 76e95f2c 00000010 00000003 00000000 00000000
Message from syslogd@RPi3_2 at Feb 22 18:22:36 ...
kernel:[ 764.801292] Code: e50b9030 e3e05000 e50b302c e3a08002 (e5832000)
dmesg
[ 747.328240] /opt/linux-gpib/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=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] [00000000] *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: a0000013
sp : 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 [ni_usb_gpib])
[ 764.801115] [<7f3c9694>] (ni_usb_write [ni_usb_gpib]) from [<7f3bd2f4>] (ibwrt+0x68/0xb4 [gpib_common])
[ 764.801181] [<7f3bd2f4>] (ibwrt [gpib_common]) from [<7f3bae30>] (ibioctl+0x19b0/0x24ac [gpib_common])
[ 764.801226] [<7f3bae30>] (ibioctl [gpib_common]) 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 performance
sudo bash -c 'printf "dtoverlay=sdhost,overclock_50=100\n" >> /boot/config.txt'
I just tried with kernel 4.9.11 with similar results.
ibtest
Reported to Dave Penkler
/Bingo
Thanks! It is the same with kernel 4.4.38 and 4.0.4
And fix might be here
Ooops - forgot to initialise the shiny new mutex.
New version in SVN r1658
also tarball linux-gpib-4.0.4rc2.tar.gz in 4.0.4 folder.
/Bingo
Yep it works like a charm with 4.4.38, extra kudos for Dave.
Also Agilent stiil works:)
[ 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[6]=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=0
Update: It was successfully tested with 4.9.11 kernel.
Fun w. a $11 OrangePi Zero
The 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.
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 : RasPi
Best hw performance : Odroid
For 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
@plesa
Without 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