Total Pageviews

Saturday, September 13, 2014

Jetson TK1 : boot problem - issue with libglx.so

You know something went wrong when things goes too smoothly. After flash the board for a few time to fix WiFi driver and install ROS Indigo my screen black out went I try to reboot it. Screen show streams of text while booting, then Nvidia logo show up and then went blank after that.

Don't to flash it once again, I search some more and found that I am not the only one and this (luckily). Problem, figure out by this guy, is that file libglx.so being replace by some update or process causing the board can't display properly. The fix is easy, go back to your host computer's download folder where you download Tegra124_Linux_R19.3.0_armhf.tbz2 package when to prepare to compile The Grinch kernel.
  • Unpack Tegra124_Linux_R19.3.0_armhf.tbz2
    • You we get Linux_for_Tegra folder.
  • Find Linux_for_Tegra/nv_tegra/nvidia_drivers.tbz2 and unpack it.
  • Navigate to usr/lib/xorg/modules/extensions/ there you will have the original libglx.so file.
  • Copy the original libglx.so file from host computer to the TK1 board, place it in the same usr/lib/xorg/modules/extensions/ folder. You may backup the TK1's libglx.so file first by change its name to something like libglx.so.bak
  • Cross your finger and reboot. 
  • If you boot into Ubuntu GUI screen then you're done! better to keep the new libglx.so file just in case we need it again. By copy and rename it to libglx.so.original.
 I hope all the smart guys at Nvidia will figure out the cause and way to get around this soon.

Jetson TK1, day2


https://devtalk.nvidia.com/default/topic/747574/embedded-systems/jetson-tk1-boot-issue/?offset=17#4308726

The problem is that after I move to The Grinch kernel and do some update & upgrade I can't reboot back to the Ubuntu screen. I tried ssh into it and its seem to working just fine. No choice, I decided to flash the board again, but I got a message "flash fail" and hence process to follow the Hint #1. After 2 times of flashing the board, problem still persist.

I then try to undo the Hint #1 by (follow this link for instructions)

remove
losetup --find --show system.img
And replace with
losetup /dev/loop0 system.img > /dev/null 2>&1
And flash it one more time. This time I able to update & upgrade and install ROS indigo (for ARM, bare-bone package) while able to reboot back to Ubuntu screen.

PS: I also tried to install ROS Indigo from source, which went fine, but actually someone (up there?) make an installation for Ubuntu-ARM architecture already, you can follow a link here.

Things went too smoothly, what else can go wrong? ... my Ubuntu screen gone again :(

Friday, September 12, 2014

Jetson TK1, day1



I recently got this new, cheap development from Nvidia called Jetson Tk1. The main highlight of these board is that its contain 192 GPU core inside. Unlike another microcomputer board like Raspberry Pi or BeagleBone black, TK1 is able to run Ubuntu 14.04 (ARM version) with decent graphic and response.

I got my board from newEgg website for around 300 SGD, for some reason you cannot buy the board from Nvidia's website if you are not in the US.
 
First boot-up went fine, just plug-in the 12 volt power supply that come with the board and it will boot into command-line screen. There you will see Nvidia driver install script, just execute that and it will restart and land you to Ubuntu's GUI screen.

Unfortunately, the kernel that chipped with TK1 (at least the one I got) doesn't support WiFi dongle. Searching around the web gave me 2 options.

Option 1:
Download RTL8192CU here and follow the procedure in comment #9 to include the driver into current kernel.

Option 2:
Follow an instruction from Nvidia development forum to upgrade kernel to The Grinch which added support for Wifi dongle and many more device.

I don't think totally wipe out an original kernel (option 2) since day 1 is not a very good idea, so I go for option 1, which went smoothly. After reboot the TK1 detect my WiFi dongle and able to connect to WiFi network with ease of Network manager with GUI.

After a while (like 10 minutes) I thought move on to The Grinch (option 2) might be a better ideal because I am planing to install ROS and OpenCV onto it, upgrade a kernel after will not be so easy.

That's when problems start to come up ...

Friday, July 12, 2013

Configure ROS package rosserial on Ubuntu

Some commonly missing step after install arduino IDE is forget to add yourself into "dialout" and "tty" group. You can do so by the following command.

$sudo usermod -a -G tty yourUserName
and
$sudo usermod -a -G dialout yourUserName

To use rosserial, after you have done everything in the rosserial's tutorial and try to complie (or verify) your code you might got an error message like the following :

In file included from /Users/kevin/Documents/Arduino/libraries/ros_lib/ros.h:39,
             from HelloWorld.cpp:6:
  /Users/kevin/Documents/Arduino/libraries/ros_lib/ArduinoHardware.h:38:22: error: WProgram.h: No such file or directory

You fix it by go to the mentioned file, in this case, located at "/Users/kevin/Documents/Arduino/libraries/ros_lib/"

$cd /Users/kevin/Documents/Arduino/libraries/ros_lib/
$gedit ArduinoHardware.h

Replace the line "#include WProgram.h" with the following

  #if defined(ARDUINO) && ARDUINO >= 100
 #include "Arduino.h"
 #else
 #include "WProgram.h"
 #endif

Go back to the IDE and compile the code again, and it should be fine. 

Thursday, July 11, 2013

Setup Canon iRC2380i printer on Linux Ubuntu

Canon-Europe website provide Linux driver for Canon iRC2380i printer. Just download CQue 2.0.5 Linux Driver DEB (32 bits or 64 bits version, depend on your machine) from the link. After download, double-click on the DEB file and Ubuntu Software Center should come up and you can install it from there.

After driver is installed successfully, go to System Settings -> Printing -> Add -> Click on Network Printer and wait for a while. Canon C2380/2550 should be on the list and you are done.


However, SMART need to set up  a department account (department ID and password) to protect the printer from unauthorized users. Unfortunately, the driver doesn’t support department account directly from GUI. The following guide will show how to do just that.


After you install the CQue Linux driver as mentioned above, you should have PPD folder locate at /opt/cel/ppd.

  • In terminal
$cd /opt/cel/ppd
$ls

  • Here you will see a long list of supported drivers, our Canon iRC2380i’s driver is named “cel-irc1028-pcl-en.ppd.gz” we need to unzip (using gzip) and modify it.
still in the /opt/cel/ppd folder
$gzip -d cel-irc1028-pcl-en.ppd.gz

  • Now you should have unziped file named “cel-irc2380-pcl-en.ppd” which we need to modify.
$sudo gedit cel-irc2380-pcl-en.ppd

  • Locate a line similar to (you can use find function (Ctrl+f) in gedit to find this line)
*NickName: "Canon iR C2380/2550 PCL
And modify it to
*NickName: "Canon iR C2380/2550 PCL SMART”

  • And also locate line
*ShortNickName: "Canon iR C2380/2550 PCL"
And modify it to
*ShortNickName: "Canon iR C2380/2550 PCL SMART"

  • Next locate line
*DefaultUserID: None
And modify “None” to your department’s ID, for example
*DefaultUserID: 12345

  • Last Locate line
*DefaultUserPassword: None
And modify “None” to your department’s password, for example
*DefaultUserPassword: 6789

  • You are done! Save the file and exit.

  • Back to System Settings -> Printing you should see the Canon iRC2380i icon there. Right-click -> Properties -> Settings -> Make and Model -> Change -> Choose “Provide PPD file” -> on the sidebar click on “File system” -> opt -> cel -> ppd -> chose the cel-irc2380-pcl-en.ppd we just edited. -> Select option “Use the new PPD … as is”

  • Now you will be back to Printer Properties window, in Settings you should see the Make and Model field is now write “Canon iR C2380/2550 PCL SMART”, which indicate that the printer are now using the PPD file we just edited.

  • Everything’s done … go try to print something.


Reference : XIN.at
Tested on Ubuntu 12.04 on 11 Jul 2013.

Wednesday, July 10, 2013

Fix an error when run apt-get update

I got an error after run an apt-get update recently, the error message look like these

W: Failed to fetch http://ppa.launchpad.net/jonls/redshift-ppa/ubuntu/dists/precise/main/source/Sources  404  Not Found

To fix it you can run the following command

gksu software-properties-gtk

and remove the problematic package (ppa.launchpad.net in this case), and then try apt-get update again.

Tuesday, July 9, 2013

Remove lengthly word from command promtp

There are many kind of script out there,but this is what suite me best. The script limit a command prompt to 30 character, if longer than that its will show only the first 12 and last 15 characters. The "\h" in the last line is added to show a hostname, convenient if you often work on remote machine.

To use, just put the following text in ./bashrc file. 

#--- Custom terminal, cutout lengthly word ---
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1='[\h:$CurDir] \$ '