I'm using a DVS128 which works great on windows with the jAER software. However I'm having trouble installing the USB drivers for jAER on Ubuntu 12.04. I have the latest version of jAER that was released a few months back and I've tried googling to solve e.g. the make errors I recieve but have had no luck.
I don't know anything about kernel programming or writing usb drivers so I would really appreciate any help I can get!
When I run jAERViewer.sh here's some of the output I receive.
So make seems to have failed/thrown errors and I'm guessing therefore the drivers weren't installed?
jAERViewer opens up but no camera events are displayed on the screen.
./jAERViewer.sh
checking driver...
/dev/retina0 not found; building driver...
~/Summer Research/jAER-runtime/drivers/linux/driverRetinaLinux ~/Summer Research/jAER-runtime
make -C /lib/modules/3.8.0-29-generic/build M=/home/tharun/Summer Research/jAER-runtime/drivers/linux/driverRetinaLinux modules
make[1]: Entering directory /usr/src/linux-headers-3.8.0-29-generic'
make[1]: *** No rule to make targetResearch/jAER-runtime/drivers/linux/driverRetinaLinux'. Stop.
make[1]: Leaving directory /usr/src/linux-headers-3.8.0-29-generic'
make: *** [all] Error 2
installing driver...
please plug in a retina device...
make -C /lib/modules/3.8.0-29-generic/build M= modules
make[1]: Entering directory/usr/src/linux-headers-3.8.0-29-generic'
make[2]: No rule to make target /usr/src/linux-headers-3.8.0-29-generic/arch/x86/syscalls/syscall_32.tbl', needed byarch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.
make[1]: [archheaders] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-29-generic'
make: *** [all] Error 2
~/Summer Research/jAER-runtime
startup jAER...
Dec 18, 2013 1:39:31 AM net.sf.jaer.JAERViewer <init>
WARNING: no Java 6 splash screen to animate
Dec 18, 2013 1:39:31 AM net.sf.jaer.JAERViewer <init>
INFO: java.vm.version=23.7-b01 user.dir=/home/tharun/Summer Research/jAER-runtime/host/java
Dec 18, 2013 1:39:31 AM net.sf.jaer.graphics.AEViewer <init>
INFO: AEViewer starting up...
Dec 18, 2013 1:39:31 AM net.sf.jaer.graphics.AEViewer <init>
INFO: AEChip class name is ch.unizh.ini.jaer.chip.retina.DVS128
Dec 18, 2013 1:39:33 AM net.sf.jaer.hardwareinterface.usb.linux.HardwareInterfaceFactoryLinux buildInterfaceList
WARNING: java.io.FileNotFoundException: /dev/retina0 (No such file or directory)To use DVS128, plug in a retina.
Will check for device file /dev/retina0 again in 29s
See <jAER root="">/drivers/linux/driverRetinaLinux for DVS128 linux driver.
Email m.ebner.1979@gmail.com for driver issues
This is just the initial errors/message I receive. There's a lot more after this but I think they're related to jAERViewer itself as opposed to the USB drivers for the camera..
I've just done a fresh install of Ubuntu 12.04LTS (running a 32 bit version on a 64 bit machine..) and installed openjdk-7-jre-headless. Is there anything else for example that I need to install?
As I mentioned before I know very little about kernel programming and writing usb drivers so I would really appreciate any help I can get or any advice on what to do now and how to get the camera working!
Thanks for the help
Tharun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tharun, thanks for the detailed error log, this is very helpful.
The problem is that every linux distro seems to have a different idea about where to store the system headers, and not all distros include all the necessary packages by default. And at some point someone decided to change the name of some basic USB functions which necessitates still more #ifdef macros. The kernel mode driver Makefile should handle some of these problems but apparently it does not, or became outdated by Ubuntu 12.
Luca, should he be trying the new libusb driver framework for linux?
Does this require jaer1.5 checkout?
They don't have to. It says Eclipse is preferred for Linux, not required, NetBeans should work as well.
I just recommend Eclipse because that's where I test everything on Linux and what I can provide best support for. It also meshes with the Linux philosophy better (open-source) and it's much simpler to install imho. Further, my own empirical evidence suggests that people using Linux full-time tend to already use Eclipse or something else like Emacs as their IDE, I don't personally know anybody working on 100% Linux in Java and using NetBeans (I know that's not a representative sample though ;-) ).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the amazingly fast response Tobi and Luca!
I tried the Libusb drivers and after a bit of tinkering around the camera works with jAERViewer. Thanks for the help! Guess I don't have to learn kernel programming then!
Thanks
Tharun Sonti
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for posting your experience.
Just a few comments:
1) We support any Java7 runtime, testing on both OpenJDK 7 and Oracle JDK 7. Oracle's JDK 6 runtime is EOL since June 2013, so we don't test on Java6 anymore.
2) You don't have to compile or install libusb on your system, in fact, that will do nothing. usb4java, which is the Java package we use to access USB devices, brings and uses its own internal copy of the libusb C library. It does not access or use any other that may be installed on your system.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, that's all there is to it. Once the device is accessible by the user running jAER, it should just work (you can test this easily by doing 'lsusb -v -d 152a:8400' in a terminal, if the user can't access it, there will be an error message mixed in the output somewhere).
As I said, usb4java has its own internal libusb copy, so no further installation is required. That's also one of the reasons we choose it, it's just plug&play, no need for additional software or dependencies outside of it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I own the "other computer" Tharun mentioned above. I ran lsusb -v -d 152a:8400 and it gave me no errors. The following is the output it produced:
Bus 002 Device 007: ID 152a:8400
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x152a
idProduct 0x8400
bcdDevice 0.0e
iManufacturer 1 INI
iProduct 2 DVS128-V1
iSerial 3 0334
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
However, jAER still does not recognise the DVS camera. When I run jAER.sh, it says "please plug in a retina device..." in the console and the viewer window that opens up is titled "WAITING-DVS128-AEViewer." At the top of the viewer it says "Choose desired HardwareInterface from Interface menu." Any help would be greatly appreciated.
Thanks in advance,
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe this is a symptom of the original (deprecated) kernel mode driver trying to install itself. But Luca can answer this better than me.
Luca, could you make sure the wiki (and FAQ) has up to date and complete information about the linux USB driver and that the kernel mode driver is moved to a "deprecated" section?
Thanks, Tobi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Updating the wiki is already on my TODO, I'll get to it soon. :-)
Anyway, the problem here is indeed the usage of the jAER.sh script. That one was made specifically for the old kernel driver, and also hard-codes which libraries are loaded, and it doesn't include usb4java in that list, which explains why it doesn't work.
Please use the developer setup, by running it from either NetBeans or Eclipse IDE.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I'm using a DVS128 which works great on windows with the jAER software. However I'm having trouble installing the USB drivers for jAER on Ubuntu 12.04. I have the latest version of jAER that was released a few months back and I've tried googling to solve e.g. the make errors I recieve but have had no luck.
I don't know anything about kernel programming or writing usb drivers so I would really appreciate any help I can get!
When I run jAERViewer.sh here's some of the output I receive.
So make seems to have failed/thrown errors and I'm guessing therefore the drivers weren't installed?
jAERViewer opens up but no camera events are displayed on the screen.
./jAERViewer.sh
checking driver...
/dev/retina0 not found; building driver...
~/Summer Research/jAER-runtime/drivers/linux/driverRetinaLinux ~/Summer Research/jAER-runtime
make -C /lib/modules/3.8.0-29-generic/build M=/home/tharun/Summer Research/jAER-runtime/drivers/linux/driverRetinaLinux modules
make[1]: Entering directory
/usr/src/linux-headers-3.8.0-29-generic' make[1]: *** No rule to make target
Research/jAER-runtime/drivers/linux/driverRetinaLinux'. Stop.make[1]: Leaving directory
/usr/src/linux-headers-3.8.0-29-generic' make: *** [all] Error 2 installing driver... please plug in a retina device... make -C /lib/modules/3.8.0-29-generic/build M= modules make[1]: Entering directory
/usr/src/linux-headers-3.8.0-29-generic'make[2]: No rule to make target
/usr/src/linux-headers-3.8.0-29-generic/arch/x86/syscalls/syscall_32.tbl', needed by
arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.make[1]: [archheaders] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-29-generic'
make: *** [all] Error 2
~/Summer Research/jAER-runtime
startup jAER...
Dec 18, 2013 1:39:31 AM net.sf.jaer.JAERViewer <init>
WARNING: no Java 6 splash screen to animate
Dec 18, 2013 1:39:31 AM net.sf.jaer.JAERViewer <init>
INFO: java.vm.version=23.7-b01 user.dir=/home/tharun/Summer Research/jAER-runtime/host/java
Dec 18, 2013 1:39:31 AM net.sf.jaer.graphics.AEViewer <init>
INFO: AEViewer starting up...
Dec 18, 2013 1:39:31 AM net.sf.jaer.graphics.AEViewer <init>
INFO: AEChip class name is ch.unizh.ini.jaer.chip.retina.DVS128
Dec 18, 2013 1:39:33 AM net.sf.jaer.hardwareinterface.usb.linux.HardwareInterfaceFactoryLinux buildInterfaceList
WARNING: java.io.FileNotFoundException: /dev/retina0 (No such file or directory)To use DVS128, plug in a retina.
Will check for device file /dev/retina0 again in 29s
See <jAER root="">/drivers/linux/driverRetinaLinux for DVS128 linux driver.
Email m.ebner.1979@gmail.com for driver issues
This is just the initial errors/message I receive. There's a lot more after this but I think they're related to jAERViewer itself as opposed to the USB drivers for the camera..
I've just done a fresh install of Ubuntu 12.04LTS (running a 32 bit version on a 64 bit machine..) and installed openjdk-7-jre-headless. Is there anything else for example that I need to install?
As I mentioned before I know very little about kernel programming and writing usb drivers so I would really appreciate any help I can get or any advice on what to do now and how to get the camera working!
Thanks for the help
Tharun
Tharun, thanks for the detailed error log, this is very helpful.
The problem is that every linux distro seems to have a different idea about where to store the system headers, and not all distros include all the necessary packages by default. And at some point someone decided to change the name of some basic USB functions which necessitates still more #ifdef macros. The kernel mode driver Makefile should handle some of these problems but apparently it does not, or became outdated by Ubuntu 12.
Luca, should he be trying the new libusb driver framework for linux?
Does this require jaer1.5 checkout?
The jAER FAQ needs updating to point to information about the libusb stuff.
https://sourceforge.net/p/jaer/wiki/jAER%20FAQ/
Unfortunately this is not done yet and it is hard to find the information now because the FAQ does not point to it.
See https://sourceforge.net/p/jaer/wiki/jAER%20USB%20Driver%20Install/
and for problems installing the kernel mode driver please search the help forum.
We'll come back to you with more information.
Best, Tobi
Hi Tharun, for jAER on Linux the preferred way nowadays is to use the libusb-based driver and not the kernel one, specifically because of all the compilation and maintainance problems of the kernel solution.
To do so, you just need an up-to-date SVN checkout, and then you can start the software from Eclipse (or NetBeans), please see the following link for instructions on how to set it up on Linux:
https://sourceforge.net/p/jaer/wiki/Developer%20Setup%20Linux/
To summarize:
1) Get SVN checkout (more info at https://sourceforge.net/p/jaer/wiki/Developer%20Setup%20Linux/ )
2) Import project into Eclipse (more info at https://sourceforge.net/p/jaer/wiki/Eclipse%20project%20setup/ )
3) Allow access to USB devices (udev rules, more info at https://sourceforge.net/p/jaer/wiki/jAER%20USB%20Driver%20Install/ )
4) Run & have fun!
Hope this helps, have a nice week!
Why do users have to switch to eclipse if they have already learned and become comfortable in netbeans? Thanks, Tobi
They don't have to. It says Eclipse is preferred for Linux, not required, NetBeans should work as well.
I just recommend Eclipse because that's where I test everything on Linux and what I can provide best support for. It also meshes with the Linux philosophy better (open-source) and it's much simpler to install imho. Further, my own empirical evidence suggests that people using Linux full-time tend to already use Eclipse or something else like Emacs as their IDE, I don't personally know anybody working on 100% Linux in Java and using NetBeans (I know that's not a representative sample though ;-) ).
Hi
Thanks for the amazingly fast response Tobi and Luca!
I tried the Libusb drivers and after a bit of tinkering around the camera works with jAERViewer. Thanks for the help! Guess I don't have to learn kernel programming then!
Thanks
Tharun Sonti
Hi
For anyone who's having trouble with getting the camera to work on linux here's what worked for me following Luca's advice to use libusb.
Downloaded OpenJDK Java 6 or 7 runtime
In the libusb folder:
./configure && sudo make && sudo make install
sudo ldconfig (not sure if this command was needed though..? Not sure what this did)
cd /etc/udev/rules.d
sudo cp 70-persistent-net.rules ./80-persistent-usb.rules
Then in 80-persistent-usb.rules paste in:
SUBSYSTEM=="usb", ATTR{idVendor}=="152a", ATTR{idProduct}=="840?", MODE="0666"
Then restarted the computer and everything worked!
Can now run jAER using eclipse or can just run the jAERViewer.sh shell script now
Cheers
Tharun
Thanks for posting your experience.
Just a few comments:
1) We support any Java7 runtime, testing on both OpenJDK 7 and Oracle JDK 7. Oracle's JDK 6 runtime is EOL since June 2013, so we don't test on Java6 anymore.
2) You don't have to compile or install libusb on your system, in fact, that will do nothing. usb4java, which is the Java package we use to access USB devices, brings and uses its own internal copy of the libusb C library. It does not access or use any other that may be installed on your system.
Hi Luca
So what would someone trying to get jAER to run on Ubuntu need to do? Just add the usb rule and restart their computer?
This is what we tried on another computer running 12.04.3 LTS and don't think this worked. So wondering what else to do.
Regards
Tharun Sonti
Yeah, that's all there is to it. Once the device is accessible by the user running jAER, it should just work (you can test this easily by doing 'lsusb -v -d 152a:8400' in a terminal, if the user can't access it, there will be an error message mixed in the output somewhere).
As I said, usb4java has its own internal libusb copy, so no further installation is required. That's also one of the reasons we choose it, it's just plug&play, no need for additional software or dependencies outside of it.
Hi,
I own the "other computer" Tharun mentioned above. I ran lsusb -v -d 152a:8400 and it gave me no errors. The following is the output it produced:
Bus 002 Device 007: ID 152a:8400
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x152a
idProduct 0x8400
bcdDevice 0.0e
iManufacturer 1 INI
iProduct 2 DVS128-V1
iSerial 3 0334
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
However, jAER still does not recognise the DVS camera. When I run jAER.sh, it says "please plug in a retina device..." in the console and the viewer window that opens up is titled "WAITING-DVS128-AEViewer." At the top of the viewer it says "Choose desired HardwareInterface from Interface menu." Any help would be greatly appreciated.
Thanks in advance,
Alex
I believe this is a symptom of the original (deprecated) kernel mode driver trying to install itself. But Luca can answer this better than me.
Luca, could you make sure the wiki (and FAQ) has up to date and complete information about the linux USB driver and that the kernel mode driver is moved to a "deprecated" section?
Thanks, Tobi
Updating the wiki is already on my TODO, I'll get to it soon. :-)
Anyway, the problem here is indeed the usage of the jAER.sh script. That one was made specifically for the old kernel driver, and also hard-codes which libraries are loaded, and it doesn't include usb4java in that list, which explains why it doesn't work.
Please use the developer setup, by running it from either NetBeans or Eclipse IDE.