Jetson TX2 does not detect my USB laser range finder

Hi,

I update the jetson TX2 with newest jetpack 3.1. (I haven’t tried on previous jetpack) I attached the Laser Range finder URG-04LX via amazon usb hub. according to internet it is supposed to add a new thing in /dev/ folder like /dev/ttyACM0 but it does not. The response to lsusb is not different when the sensor is connected and when it is not connected.

The USB hub has its external power. and connected to the USB 3.0 port of jetson.

When I connect it directly, it is not working as well.

When I connect the sensor to my Desktop Ubuntu 16.04 PC, it is working and I have /dev/ttyACM0

What can be wrong??

this is the laser scanner:
https://www.hokuyo-aut.jp/search/single.php?serial=165

I just want to add that in lsusb command I have something for the sensor but I need the /dev/ address to get data. true?

this is the lsusb output

Bus 002 Device 007: ID 2109:8110 VIA Labs, Inc. Hub
Bus 002 Device 006: ID 2109:8110 VIA Labs, Inc. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 022: ID 248a:8367 Maxxter 
Bus 001 Device 024: ID 15d1:0000  
Bus 001 Device 021: ID 2109:2811 VIA Labs, Inc. Hub
Bus 001 Device 020: ID 2109:2811 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and line 5 is for the laser sensor

The ACM module is not built for the kernel by default. You must build the module and install it.

Thanks a lot.

I followed one of the tutorials you have upon this
https://www.youtube.com/watch?v=fxWObd1nK4s

I got this error:

hardware/nvidia/soc/t18x/kernel-dts/tegra186-soc/tegra186-trusty.dtsi
hardware/nvidia/soc/t18x/kernel-dts/tegra186-soc/tegra186-soc-vcm-prod.dtsi
hardware/nvidia/soc/t18x/kernel-dts/tegra186-soc/tegra186-soc-sata.dtsi
scripts/kconfig/qconf  Kconfig
QXcbConnection: Could not connect to display 
scripts/kconfig/Makefile:22: recipe for target 'xconfig' failed
make[1]: *** [xconfig] Aborted (core dumped)
Makefile:531: recipe for target 'xconfig' failed
make: *** [xconfig] Error 2

But I am using the main nvidia download webiste and following your scripts in command line. Thanks again for grat tutorials. If I have some questions, I will come back to you.

The video is for JetPack 3.0 (L4T 27.1). The scripts have not been updated for L4T 28.1. There have been some changes to the source layout from the previous version.

How to get to know what should I do myself?

Rightnow in builind the kernel I have an error in make -j6 command. No idea how to solve it

nvidia@tegra-ubuntu:~/Toolkits/kernel/kernel-4.4$ make -j6
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
cp -u  arch/arm64/boot/dts/
cp: missing destination file operand after 'arch/arm64/boot/dts/'
Try 'cp --help' for more information.
arch/arm64/boot/dts/Makefile:97: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 1
arch/arm64/Makefile:105: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs....

There’s no easy answer here yet. I am currently working on scripts to build the kernel, but your guess is as good as mine as to what issues may be lurking on the way to a successful build.

I have not yet installed R28.1 (too many other things need to be done), but one of the first things you want to do is save a copy of the default “/proc/config.gz”, and then use that for any starting configuration during a kernel build. What was your initial kernel configuration before starting the build?

The failure is in building a device tree, but you probably only need Image and modules. After all configuration and configuration edits, instead of “make -j6” use “make Image” and “make modules”. This will skip device tree build, and most often you will not need a new device tree.

Guys you are talking too advanced. I don’t understand you. Do you have any tutorial about this stuff? What’s exactly kernel? Module? Image? Device tree?

I am totaly new into these stuff. I am not profi developer.

Please introduce a tutorial about these topics to make myself more familiar.

The kernel is basically the brain and spinal cord. Drivers to operate hardware are part of the kernel. A module is also part of the kernel, but it can be loaded/unloaded on a running system…the kernel image itself cannot. Typically there is a kernel with most features built into it, and a few options chosen later by creating a module instead of rebuilding the whole kernel. You don’t need to be a developer to build a kernel, but you do need to be a bit tech-savvy. With a desktop PC this is somewhat simplified…with an embedded system it gets a bit more complicated.

So “Image” is the name of the file which is the kernel. Building a new kernel means building a new image. Building a module implies working with the original Image, but perhaps adding a file to where modules are searched for.

The device tree is a shorthand notation for assigning various settings to hardware. Basically it is associated with setting up hardware before its use…but these are settings which can be changed, though not often…so it is called hardware when it is hard wired, firmware when it can be changed but changes how the hardware behaves, and software when it is independent of how the hardware works. In a desktop motherboard the BIOS would set up much of the firmware…in an embedded system you have to do more to set this up before the system starts booting.

Do know that there are lots of Linux tutorials out there on configuring a kernel. It will be a learning curve, it won’t be impossible. Something which will give you an advantage is to know that on a running Jetson there will be a file in directory “/proc”. That file is “config.gz”. This is not a real file, it is actually in RAM and is a reflection of the running kernel’s configuration…that configuration being one of every feature or option the kernel was built to support. To change a kernel you start with the original configuration, and only then do you make changes for what you want.

Your “make -j6” command did not specify anything specific to build, so it tried to build everything. If one part needed another part, and if that part had not been configured, you would get an error. The file “/proc/config.gz” can be copied to where your kernel source is, then uncompressed with “gunzip config.gz”. Copy it to name “.config” and the kernel build will see it (“cp config .config” will do the copy). If you run “make menuconfig” you will get an application for human-readable editing of kernel features. You will need to understand how to do that before you can do anything significant. Try it, then “make mrproper” to clean it all out and start over…practice. You can use “make nconfig” for an alternate version of menuconfig which gives you some ability to search for symbols (such as the shorthand name of a driver you want to install for your device). “make xconfig” is a graphical version. You may need to install the devel version of the ncurses5 package to get these to work…this is an Ubuntu adminstration topic and not particular to kernels or Jetsons.

When you “make -j6 Image”, then you make the kernel image. When you “make -j6 modules”, then you make dynamically insertable modules which can become part of a kernel as it runs. The part in the error about dtbs is about firmware, and you don’t need this to change to do what you want…your command which did not name Image or modules wanted to build everything. You don’t need everything.

In the download page for your version of L4T is Documentation. This has much of what you want for basic procedures, although it is not a tutorial. For R27.1 see:
https://developer.nvidia.com/embedded/linux-tegra-271

For the R28.1 which was released yesterday, see:
https://developer.nvidia.com/embedded/linux-tegra

Search google for “configure linux kernel tutorial”. Understand that the Image file is an uncompressed file, but that different versions of compression are used with different hardware and different flavors of boot loader software. So if you see zImage, or bzImage, or uImage, just think “Image” since the Jetson does not use compression. Any time you build a compressed version it will build Image first, and then create a compressed version as well. Just build Image since you don’t need a compressed version.

There are also topics on cross-compiling. When you build a kernel (the “make -j6”) you are building it for the computer you are building on. With various options the kernel will be built on your desktop PC, but target a different type of computer. Building for the PC on a PC is native compile for copy to a native architecture. Building on a PC for copy to a Jetson is cross compile to a foreign architecture. When this is the case you need to install extra tools on the PC (JetPack can probably do this). You also need some extra compile options (often something starting with “O=” or similar). There are a lot of steps, you’ll just need find a place to start based on the Document download of one of those above URLs.

Btw, if you use Windows and it detects a new device and asks if you want to install a driver for it, this is basically what you are doing. Someone has compiled a driver for your architecture and made it available on the internet…then the driver is downloaded and installed. Your PC is used to create the driver and then the module is being manually copied to the Jetson. Mostly the drivers are out there, but you have to manually tell the system how to build and install the driver, it isn’t automatic.

Thanks a lot for the detailed description. I will work on it more

I followed the new video of JetsonHacks. thanks a lot.
https://youtu.be/tDZF7ntLbxc

I have tried it, I do not have a screen right now for the jetson. I am running everything through the SSH. I chanegd the make xconfig to make menuconfig to be able change the config in terminal. Everything works witout error but after reboot the output of uname -r is the same as before and there is no ttyACM0 in /dev/ when the laser scanner is connected. What can be wrong? Do you think if I flash the jetson again with jetpack, it would help? I flashed it last week I guess. Are there any change in JetPack 3.1 after the first release??

I should add that I am booting from the SSD hard drive.

I guess still the kernel from internal memory is used and I updated the kernel in SSD external Hard drive. Shall I change the copy script to copy to internal memory?? Can it be correct?
I deleted all files from the internal memory completley and now the jetson does not boot up :D I have to reflash it.

@Kangalow The other thing is that when I was making the kernel in the external SSD, the makeKernel script was running much shorter than when I am doing everything in internal memory.

I reflashed the jetson with JetPack 3.1, rebuild the kernel using the video (including ACM Module)

and then copied everything to SSD.

Now the Hokuyo laser scanner is working in ROS.
This helped for that as well: http://answers.ros.org/question/243232/how-to-install-hokuyo_nodeurg_node-on-kinetic/

Thanks

I don’t know the exact setup you are using, but if you are booting from the eMMC and then setting your root drive to the SSD (this is common), you must copy the newly built kernel Image file to the /boot directory of the eMMC. The provided script copyImage.sh copies the Image file to the boot directory of the current drive. For example, if you build everything on the SSD (which as you noted is much faster), the new Image file ends up on the /boot directory on the SSD. You should then copy the new Image over to the eMMC /boot directory so that the machine uses it to boot.

Thanks for the response, The question is how can I boot from the SSD then?

This isn’t related to the original question. Please open a new thread to ask this so that others can benefit when searching.