Difference between revisions of "Troubleshooting"

From Contiki
Jump to: navigation, search
(Permission denied)
Line 12: Line 12:
 
  sudo adduser <username> dialout
 
  sudo adduser <username> dialout
  
If that doesnot work
 
If you are getting an error
 
/dev/ttyUSB0  Can't open port
 
Error 1
 
followed by errors in the make file
 
  
Trying the following command which should give  the desired output
 
make TARGET=sky sky-motelist
 
(sky can be replaced by the mote which is being used e.g z1)
 
 
The desired output
 
../../tools/sky/motelist-linux
 
Reference  Device          Description
 
---------- ---------------- ---------------------------------------------
 
M4A7J5HF  /dev/ttyUSB0    Moteiv tmote sky
 
 
This means it is a common serial port connection problem with Ubuntu 12.04 LTS.
 
 
sudo apt-get remove modemmanager
 
 
sudo adduser $USER dialout (or)
 
sudo usermod -a -G dialout $USER // adds the user to the dialout
 
// replace $USER by the username
 
sudo reboot
 
id -Gn
 
And check now if the device is attached to the dialout user group.
 
 
ls -l /dev/ttyUSB0
 
crw-rw---- 1 root dialout 188, 0 Mar  5 19:58 /dev/ttyUSB0
 
 
There is no need to mess with dev rules or u permissions
 
 
-----------------------------------------------------------------------------------------------------------
 
If you get a error saying
 
 
make: ../../tools/sky/serialdump-linux: Command not found
 
make: *** [login] Error 127
 
 
Try the following question if the answers are true then this procedure for troubleshooting
 
Are you using a 64bit version of Ubuntu?
 
Are you using a Ubuntu 12.04 LTS or newer versions of it?
 
 
Now, try few commands like
 
ldd serialdump-linux
 
 
The output look similar to the following
 
ldd serialdump-linux
 
        linux-gate.so.1 =>  (0xf772d000)
 
        libc.so.6 => /lib32/libc.so.6 (0xf75b4000)
 
        /lib/ld-linux.so.2 (0xf772e000)
 
 
Then it means that you have to install 32-bit packages.
 
Remember to add i386 architecture or you won't be able to install 32-bit packages:
 
sudo dpkg --add-architecture i386
 
sudo apt-get update
 
sudo apt-get install ia32-libs
 
  
 
===== Issue with make login =====
 
===== Issue with make login =====

Revision as of 21:13, 5 March 2014

Back to Main Page

Permission denied

If you try to connect to a mote and receive a permission error, you may need to add yourself to the dialout group. The error may look something like the following:

/home/user/contiki/tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
connecting to /dev/ttyUSB0 (115200)
/dev/ttyUSB0: Permission denied
make: *** [login] Error 255

To resolve the issue, simply use the following command:

sudo adduser <username> dialout


Issue with make login

If you are trying to execute the serial-dump application (contiki/tools/sky/serialdump-linux) and see the message: "No such file or directory", it means that you are running in a 64-bit operating system that does not have proper 32-bit libraries installed. Since serialdump-linux is a pre-compiled 32-bit tool you need to execute the following command to install the necessary libraries:

sudo apt-get install ia32-libs