0

I'm running into a problem attempting to upload the "blink" app onto the motes. I can't seem to run the command make telosb reinstall bsl,/dev/ttUSB0 or make telosb reinstall while in the apps/Blink directory, which is preventing me from moving on with my project. I've tried as a user, superuser, and as root. I've outlined below the responses from variable commands. [Running Ubuntu 16.04, TinyOS 2.1.2, ncc version 1.4.2, nescc version 1.3.6]

(A)With root and the make telosb command I get back:

mkdir -p build/telosb compiling BlinkAppC to a telosb binary ncc -o build/telosb/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"liam-Latitude-E\" -DIDENT_USERHASH=0x9236fe46L -DIDENT_TIMESTAMP=0x59384a62L -DIDENT_UIDHASH=0xdc08609fL BlinkAppC.nc -lm compiled BlinkAppC to build/telosb/main.exe 2538 bytes in ROM 56 bytes in RAM msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex writing TOS image

(B)With regular user and the make telosb command I get back:

mkdir -p build/telosb /bin/sh: 1: cannot create build/telosb/ident_flags.txt: Permission denied /home/liam/tinyos-main/support/make/ident_flags.extra:13: recipe for target 'ident_cache' failed make: *** [ident_cache] Error 2

(C)With a super user and the sudo make telosb command I get back:

make: *** No rule to make target 'telosb'. Stop.

(D)With root and the make telosb reinstall command I get back:

cp build/telosb/main.ihex build/telosb/main.ihex.out found mote on /dev/ttyUSB0 (using bsl,auto) installing telosb binary using bsl tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Mass Erase... Transmit default password ... Invoking BSL... Transmit default password ... Current bootstrap loader version: 1.61 (Device ID: f16c) Changing baudrate to 38400 ... MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Mass Erase... Transmit default password ... Invoking BSL... Transmit default password ... Current bootstrap loader version: 1.61 (Device ID: f16c) Changing baudrate to 38400 ... Traceback (most recent call last): File "/usr/bin/tos-bsl", line 1918, in <module> main(0); File "/usr/bin/tos-bsl", line 1843, in main speed=speed, File "/usr/bin/tos-bsl", line 1218, in actionStartBSL self.actionChangeBaudrate(speed) #change baudrate File "/usr/bin/tos-bsl", line 1345, in actionChangeBaudrate self.serialport.setBaudrate(baudrate) AttributeError: 'Serial' object has no attribute 'setBaudrate' /home/liam/tinyos-main/support/make/msp/bsl.extra:45: recipe for target 'program' failed make: *** [program] Error 1

(E)Whereas with a regular user and make telosb reinstall I get back:

cp build/telosb/main.ihex build/telosb/main.ihex.out cp: cannot create regular file 'build/telosb/main.ihex.out': Permission denied /home/liam/tinyos-main/support/make/msp/msp.rules:92: recipe for target 'setid' failed make: *** [setid] Error 1

I have been all over the internet and online forums and haven't found a fix yet. I researched around (D) and found that perhaps python 2 might have changed the name of 'setBaudRate' variable. I'm not sure how to change that either.

Thank you for your time and help!

edit: added ncc and nescc versions.

l joyce
  • 1
  • 2

1 Answers1

0

This stack overflow answer is applicable to TinyOS.

So it turns out that pyserial 3.0.1 is not compatible with the TinyOS app, Blink. I'm fairly certain that pyserial 3.0.1 came with the package for TinyOS. To fix this, use the command sudo pip install "pySerial>=2.0,<=2.99999". For me, it kicked back:

The directory '/home/liam/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/liam/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pySerial<=2.99999,>=2.0 Installing collected packages: pySerial Found existing installation: pyserial 3.0.1 DEPRECATION: Uninstalling a distutils installed project (pySerial) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling pyserial-3.0.1: Successfully uninstalled pyserial-3.0.1 Successfully installed pySerial-2.7

But the blink app still uploaded and worked fine.

l joyce
  • 1
  • 2