04-07-2014 07:15 PM
I've got a "new" RPi running the latest raspbian release (and I've done apt-get update and apt-get upgrade).
I sftp'd the files in https://decibel.ni.com/content/docs/DOC-25806 to the RPi and attempted to run the install script.
Problem 1: Attempting to run the install.sh script failed:
# sh install.sh
-------------------------------------------------
National Instruments RaspberryPi 600x Installer
-------------------------------------------------
Checking Permissions...
install.sh: 39: install.sh: Syntax error: end of file unexpected (expecting "then")
I believe that's because raspbian (at least, the version I'm running) doesn't have bash. No matter, I just ran the steps by hand.
Problem 2: Attempting to extract install_ws.tar failed:
# tar xvf install_ws.tar -C /
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Upon examination, it appears to be a gzip file, not a tar archive. No worries, I just unzipped it before running tar:
# zcat install_ws.tar > ./foo
# tar xvf foo -C /
I manually completed the rest of the steps in install.sh, plugged in the USB-6008 and was able to run the demo binary:
# /usr/local/bin/natinst/rpi/aiondemand -c 0 -s 500 -t 10000 -v
Detected NI USB Devices
---------------------------------------------
Found: USB0::0x3923::0x717a::0192A5C6::RAW (/dev/bus/usb/001/005)
Confirm: USB0::0x3923::0x717a::0192A5C6::RAW
Problem 3: now what?!? I thought the device was supposed to emit 500 samples on the terminal and quit. Instead, it just sits there until I type ^C. Am I supposed to jumper any wires to trigger it?
FWIW, the green LED on the USB-6008 is blinking, and the device shows up in lsusb:
# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 005: ID 3923:717a National Instruments Corp.
Any hints on how I can get A/D samples from the USB-6008 into the RPi would be greatly appreciated...
01-09-2015 07:02 AM
@fearless_fool
Found this:
With regards to the "unexpected end of file: expecting then" error given by install.sh:
The shell script 'install.sh' downloaded from the NI community website appears to be in DOS format, meaning it terminates lines with CRLF (carriage return + line feed), instead of in UNIX format, which terminates lines with just LF. The Linux shell can't correctly parse the file because it's in the wrong format.
To correctly run the shell script first convert it to unix format by running:
sudo apt-get install dos2unix
dos2unix install.sh"
From here: https://decibel.ni.com/content/thread/15635
Then run sudo sh install.sh