I'm trying to communicate with a DrDaq using the latest pi version, the Raspberry Pi 2.
usbdrdaq library installation
The usbdrdaqlinux_0.9-1_armel driver provided by Pico Tech cannot be installed on a Raspberry Pi 2, the architecture now being armhf.
As my operating system is raspbian, I figured that I could follow the instructions relative to the debian OS:
This successfully installed the driver for the armhf architecture.
Small working example
So far, I've been able to compile a small working example provided by PicoTech (see USBDrDAQcon.c attached), using the following command:
Have just tried on a freshly installed Raspberry Pi 2, logged in as pi user, using the same commands, and apart from using sudo on compile due to permissions
[ 2743.218260] usb 1-1.4: new full-speed USB device number 4 using dwc_otg
[ 2743.321982] usb 1-1.4: New USB device found, idVendor=0ce9, idProduct=1014
[ 2743.322005] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2743.322023] usb 1-1.4: Product: PICO DEVICE
[ 2743.322040] usb 1-1.4: Manufacturer: Pico Technology
[ 2860.478891] usb 1-1.4: reset full-speed USB device number 4 using dwc_otg
#include
#include
#include
int main(void)
{
short g_handle;
PICO_STATUS status;
printf("About to open device\n");
status = UsbDrDaqOpenUnit(&g_handle);
if (status != PICO_OK) {
printf("Unable to open device, error code %d\n", status);
} else {
printf("Device opened successfully\n");
UsbDrDaqCloseUnit(g_handle);
}
return 0;
}
[78169.912515] usb 1-1.4: new full-speed USB device number 26 using dwc_otg
[78170.016296] usb 1-1.4: New USB device found, idVendor=0ce9, idProduct=1014
[78170.016328] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[78170.016346] usb 1-1.4: Product: PICO DEVICE
[78170.016364] usb 1-1.4: Manufacturer: Pico Technology
and after I run the example (which shows a USB disconnect):
[78197.052736] usb 1-1.4: reset full-speed USB device number 26 using dwc_otg
[78197.325368] usb 1-1.4: USB disconnect, device number 26
[78197.562623] usb 1-1.4: new full-speed USB device number 27 using dwc_otg
[78197.666350] usb 1-1.4: New USB device found, idVendor=0ce9, idProduct=1014
[78197.666372] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[78197.666384] usb 1-1.4: Product: PICO DEVICE
[78197.666396] usb 1-1.4: Manufacturer: Pico Technology
Any thoughts?
Is this a only strange USB permission problem?
What can I do more to investigate this further?
I normally install raspbian using a standard procedure, but this time the SD card I bought came pre-installed with the noobs OS. As it offered to install raspbian when I first booted it, I figured it would lead to the same result.
I was wrong. Now that I wiped the card and did a fresh raspbian install, everything works great.
For future reference, the raspberry pi 2 can be used to communicate with the DrDaq without problem. Just follow the instructions from my original post. But make sure to nuke the noobs OS (if installed) and perform a fresh raspbian install.
Hi guys. I am new here. Could somebody please provide a download link to a compatible Raspberry PI 2 OS download ?
I assume it will be Raspian, but is the drdaq lib still soft float bound ?
I've followed the steps from the original post to install the required libraries.
I've downloaded the two example files and compiled them ("linux_utils.h" and "USBDrDAQcon.c") using the statement described.
When I run the program I get this message:
USB DrDAQ driver example program
Version 1.0
Opening the device...
Unable to open device
Press any key
To find out whether I'm able to see the device I've done the following:
I've added the "pi" user to the pico-group with:
sudo usermod -G pico your_username
newgrp -
Then I've tried to run the USBTEST-program located at:
/opt/picoscope/share/doc/libusbdrdaq/usbtest
This program returns the following message:
****************************************************************************
* Pico Technology Linux USB Diagnostics *
****************************************************************************
This script looks for Pico USB devices connected to your computer
and checks whether you are able to access them. If your user account
does not have permission to access the devices, the script will try
to suggest how to correct this for your particular Linux installation.
Press enter to continue...
Getting user and group information...
- You are running this script as pi.
- You are in the following groups:
pi pico
Please connect your Pico USB device and press enter to continue...
Pico USB device found: /dev/bus/usb/001/006
- It belongs to root (which is not you) who has permissions rw-
- The members of group pico (which you are in) have permissions rw-
- Everyone else has permissions r-T
- You can write to this device and so will be able to use it.