1

I installed tinyos on ubuntu 15.04 following this tutorial: http://tinyos.stanford.edu/tinyos-wiki/index.php/Automatic_installation

My telosb is well detected:

root@liberty:/opt/tinyos-release-tinyos-2_1_2/apps/Blink# motelist
Reference  Device           Description
---------- ---------------- ---------------------------------------------
FTYP7UJV   /dev/ttyUSB0     FTDI MTM-CM5000MSP

My tinyos.env:

    root@liberty:/opt/tinyos-release-tinyos-2_1_2# cat tinyos.env 

# Here we setup the environment
# variables needed by the tinyos 
# make system
export TOSROOT="/opt/tinyos-release-tinyos-2_1_2/"
export TOSDIR="$TOSROOT/tos"
export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
export MAKERULES="$TOSROOT/support/make/Makerules"
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python
echo "setting up TinyOS on source path $TOSROOT"

My tos-check-env:

tomski@liberty:~$ tos-check-env
Path:
   /usr/local/sbin
   /usr/local/bin
   /usr/sbin
   /usr/bin
   /sbin
   /bin
   /usr/games
   /usr/local/games

Classpath:

   /usr/src/tinyos/support/sdk/java/tinyos.jar
   /opt/tinyos-2.1.2/support/sdk/java
   /opt/tinyos-2.1.2/support/sdk/java/tinyos.jar
   .
   /usr/lib/jvm/java-6-openjdk-i386/lib
   /usr/lib/jvm/java-6-openjdk-i386/lib



rpms:
   /usr/bin/rpm


nesc:
   /usr/bin/nescc
   Version: nescc: 1.3.4


perl:
   /usr/bin/perl
   Version: v5.20.2) built for i686-linux-gnu-thread-multi-64int

flex:

bison:

java:
   /usr/bin/java

--> WARNING: The JAVA version found first by tos-check-env may not be   version 1.4 or version 1.5, one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5

graphviz:
   /usr/bin/dot
   dot - graphviz version 2.38.0 (20140413.2041)

--> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.


   tos-check-env completed with errors:

  --> WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5
  --> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.

My java version:

tomski@liberty:~$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.15.04.1)
OpenJDK Server VM (build 24.79-b02, mixed mode)

when I compile:

root@liberty:/opt/tinyos-release-tinyos-2_1_2/apps/Blink# make telosb
make: *** No rule to make target 'telosb'.  Stop.

I have build-essentials, nescc, gcc, make etc..

Many thanks in advance for your help

tom
  • 55
  • 1
  • 9
  • Please paste an output of the `export` command. – maral Aug 16 '15 at 09:29
  • Hello maral, where should I type "export"? in Blink? – tom Aug 16 '15 at 10:45
  • In a console, to show environmental variables. – maral Aug 16 '15 at 16:31
  • Hello maral, here is the output of "export":tomski@liberty:~$ export declare -x CLASSPATH="/usr/lib/jvm/java-6-openjdk-i386/lib:.:/usr/src/tinyos/support/sdk/java/tinyos.jar:/opt/tinyos-release-tinyos-2_1_2//support/sdk/java:." declare -x CLUTTER_IM_MODULE="xim" declare -x COLORFGBG="15;0" declare -x DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-e755d4Ofr3,guid=809b18b518da95ef56a8f80c55d22b2f" declare -x DEFAULTS_PATH="/usr/share/gconf/plasma.default.path" declare -x DESKTOP_SESSION="plasma" declare -x DISPLAY=":0" declare -x GS_LIB="/home/tomski/.fonts" – tom Aug 18 '15 at 08:16
  • declare -x GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:/home/tomski/.gtkrc-2.0:/home/tomski/.config/gtkrc-2.0" declare -x GTK_IM_MODULE="ibus" declare -x GTK_MODULES="overlay-scrollbar" declare -x GTK_RC_FILES="/etc/gtk/gtkrc:/home/tomski/.gtkrc:/home/tomski/.config/gtkrc" declare -x HOME="/home/tomski" declare -x JAVA_HOME="/usr/lib/jvm/java-6-openjdk-i386/" declare -x KDE_FULL_SESSION="true" declare -x KDE_MULTIHEAD="false" declare -x KDE_SESSION_UID="1000" declare -x KDE_SESSION_VERSION="5" declare -x KONSOLE_DBUS_SERVICE=":1.368" declare -x KONSOLE_DBUS_SESSION="/Sessions/1" – tom Aug 18 '15 at 08:19
  • declare -x KONSOLE_DBUS_WINDOW="/Windows/1" declare -x KONSOLE_PROFILE_NAME="Shell" declare -x LANG="en_US.UTF-8" declare -x LANGUAGE="" declare -x LC_ADDRESS="fr_FR.UTF-8" declare -x LC_IDENTIFICATION="fr_FR.UTF-8" declare -x LC_MEASUREMENT="fr_FR.UTF-8" declare -x LC_MONETARY="fr_FR.UTF-8" declare -x LC_NAME="fr_FR.UTF-8" declare -x LC_NUMERIC="fr_FR.UTF-8" declare -x LC_PAPER="fr_FR.UTF-8" declare -x LC_TELEPHONE="fr_FR.UTF-8" declare -x LC_TIME="fr_FR.UTF-8" declare -x LESSCLOSE="/usr/bin/lesspipe %s %s" declare -x LESSOPEN="| /usr/bin/lesspipe %s" – tom Aug 18 '15 at 08:19
  • declare -x LIBGL_DRIVERS_PATH="/usr/lib/fglrx/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/dri" declare -x LOGNAME="tomski" declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;3 – tom Aug 18 '15 at 08:22
  • 1:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*. – tom Aug 18 '15 at 08:24
  • lc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:" declare -x MAKERULES="/opt/tinyos-release-tinyos-2_1_2//support/make/Makerules" declare -x MANDATORY_PATH="/usr/share/gconf/plasma.mandatory.path" declare -x OLDPWD declare -x PAM_KWALLET_LOGIN="/tmp//tomski.socket" – tom Aug 18 '15 at 08:25
  • declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" declare -x PROFILEHOME="" declare -x PWD="/home/tomski" declare -x PYTHONPATH=":/opt/tinyos-release-tinyos-2_1_2//support/sdk/python" declare -x QT4_IM_MODULE="ibus" declare -x QT_IM_MODULE="ibus" declare -x QT_PLUGIN_PATH="/usr/lib/i386-linux-gnu/qt5/plugins:/lib/kde5/plugins/" declare -x QT_QPA_PLATFORMTHEME="appmenu-qt5" declare -x SESSION_MANAGER="local/liberty:@/tmp/.ICE-unix/1679,unix/liberty:/tmp/.ICE-unix/1679" declare -x SHELL="/bin/bash" – tom Aug 18 '15 at 08:26
  • declare -x SHELL_SESSION_ID="b7129806e2ee4000bbaba999456901dc" declare -x SHLVL="1" declare -x SSH_AGENT_PID="1526" declare -x SSH_AUTH_SOCK="/tmp/ssh-Dz4PBDgD0xGN/agent.1457" declare -x TERM="xterm" declare -x TOSDIR="/opt/tinyos-release-tinyos-2_1_2//tos" declare -x TOSROOT="/opt/tinyos-release-tinyos-2_1_2/" declare -x USER="tomski" declare -x WINDOWID="50331654" declare -x XAUTHORITY="/tmp/xauth-1000-_0" declare -x XCURSOR_THEME="breeze_cursors" declare -x XDG_CONFIG_DIRS="/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings" declare -x XDG_CURRENT_DESKTOP="KDE" – tom Aug 18 '15 at 08:27
  • declare -x XDG_DATA_DIRS="/usr/share/plasma:/usr/local/share/:/usr/share/" declare -x XDG_RUNTIME_DIR="/run/user/1000" declare -x XDG_SEAT="seat0" declare -x XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0" declare -x XDG_SESSION_CLASS="user" declare -x XDG_SESSION_COOKIE="ba06fcf466c403dc198e148b557d7c08-1439836975.705993-434314640" declare -x XDG_SESSION_DESKTOP="KDE" declare -x XDG_SESSION_ID="2" declare -x XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session1" declare -x XDG_SESSION_TYPE="x11" declare -x XDG_VTNR="7" declare -x XMODIFIERS="@im=ibus" – tom Aug 18 '15 at 08:28
  • You compile the application as root, while invoked the `export` command as a normal user tomski. I suspect that the environmental variables `TOSROOT` and so on (declared in tinyos.env) are not set when you log in as root. Try compiling the application as a user or check whether these variables are set when you are root. – maral Aug 19 '15 at 15:44
  • Try removing the trailing slash on your TOSROOT path (i.e. you should really use export TOSROOT="/opt/tinyos-release-tinyos-2_1_2"), this is causing a double-slash i your export variables MAKERULES and TOSDIR. Also, are you sure the directory '/opt/tinyos-release-tinyos-2_1_2//support/make' actually contains the Makerules file and that you have permissions to read it? – James Allen Aug 27 '17 at 16:53

3 Answers3

0

perform every task as a super user and the queries will be resolved. for e.g.:

$ sudo touch tinyos-env
$ sudo nano tinyos-env

perform the copy and change the TOSROOT path accordingly also copy the same file to your ~/.bashrc file and perform every application as a super user

$ sudo su

Though this post is bit too late, the last comment of the thread helped to resolve this query for TinyOS on Ubuntu-15.04 for me recently.

Shan-Desai
  • 3,101
  • 3
  • 46
  • 89
0

maybe you can do it without the root privileges, but under the user privileges.
then: cd /opt/tinyos-release-tinyos-2_1_2/apps/Blink
then: sudo chmod -R 777 .
then: make telosb

  • This would give just the application files read, write and execute permissions to everybody in the universe. Perhaps `chown -R tomski:tomski /opt/tinyos-release-tinyos-2_1_2` would be better, which would give the tinyos distribution (including the Makerules, which appear to not be running correctly) the correct permissions to just tom. – James Allen Aug 27 '17 at 17:02
  • @JamesAllen I think you are right, thank your. How nice you are! – Minghang Yang Aug 29 '17 at 03:46
0

Old post, but the previous answers are not completely clear.

You have to point to that tinyos.env file. In order to do that, from your home directory: Open the .bashrc file:

sudo nano .bashrc

On the bottom of your .bashrc file, add the line:

source <path_to_tinyos_folder>/tinyos.env

Of course the file tinyos.env contains the setup enviroment variables.

edoardesd
  • 109
  • 1
  • 8