Hi Ted,

In addition, once a program is installed on the microcontroller, the 
microcontroller takes the program's interrupt vector as a password. 
Access to the memory (other than mass-erasing it) is then only allowed 
if the right password is sent. From the output in step 4 and especially 
5 it looks like tos-bsl is transmitting the default password (no 
interrupt vector programmed, so all entries are 0xFF, I think), which 
does not work since in step 3 you have written your program to the 
microcontroller. By the way, at the very end of the help output of 
tos-bsl (tos-bsl --help) there is this line:

----
If it says "NAK received" it's probably because you specified no or a
wrong password.
----

Try to use the --password option like this:

tos-bsl -c /dev/ttyUSB0 --password=build/telosb/main.ihex --telosb 
--upload=0x0c00 --size= 16 -x

Cheers,
Urs



Razvan Musaloiu-E. wrote:
> Hi!
> 
> On Tue, 18 Aug 2009, Ted Herman wrote:
> 
>> Is there a document (in addition to the tos-bsl.txt distributed with 
>> the toolchain) explaining how tos-bsl works,
>> particularly with a telosb mote?
> 
> You have to use the --telosb flag in order to properly talk to the mote. 
> If you do a tos-bsl --help you'll something like this:
> 
>   --telosb              Implies options --swap-reset-test, --telos-i2c,
>                         --no-BSL-download, and --speed=38400
> 
> -- 
> Razvan ME
> 
>> I tried uploading, but couldn't this to work with a programmed mote. 
>> An example below shows what I tried.
>>
>> Ted
>>
>>   1. First, demonstrate that erase works:
>>
>>
>>       > dhcp:~/userGlow$ tos-bsl -c /dev/ttyUSB0 -e
>>
>>       MSP430 Bootstrap Loader Version: 1.39-telos-8
>>
>>       Use -h for help
>>
>>       Mass Erase...
>>
>>       Transmit default password ...
>>
>>
>>   2. Second, upload some data:
>>
>>
>>       > dhcp:~/userGlow$ tos-bsl -c /dev/ttyUSB0 --upload=0x0c00 
>> --size=16 -x
>>
>>       MSP430 Bootstrap Loader Version: 1.39-telos-8
>>
>>       Use -h for help
>>
>>       Invoking BSL...
>>
>>       Transmit default password ...
>>
>>       Current bootstrap loader version: 1.61 (Device ID: f16c)
>>
>>       0c00  04 0c 0e 0c 31 40 20 02 0b 43 c0 43 0a f6 32 c2  ....1@ 
>> ..C.C..2.
>>
>>
>>   3. Third, download a new program:
>>
>>    
>>
>>       > dhcp:~/userGlow$ make telosb reinstall
>>
>>       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-telos-8
>>
>>       Mass Erase...
>>
>>       Transmit default password ...
>>
>>       Invoking BSL...
>>
>>       Transmit default password ...
>>
>>       Current bootstrap loader version: 1.61 (Device ID: f16c)
>>
>>       Changing baudrate to 38400 ...
>>
>>       Program ...
>>
>>       2246 bytes programmed.
>>
>>       Reset device ...
>>
>>       rm -f build/telosb/main.exe.out build/telosb/main.ihex.out
>>
>>
>>   4. Fourth, try to upload some data:
>>
>>
>>       > dhcp:~/userGlow$ tos-bsl -c /dev/ttyUSB0 --upload=0x0c00 
>> --size=16 -x
>>
>>       MSP430 Bootstrap Loader Version: 1.39-telos-8
>>
>>       Use -h for help
>>
>>       Invoking BSL...
>>
>>       Transmit default password ...
>>
>>       An error occoured:
>>
>>       Timeout
>>
>>
>>   5. Fifth, retry but add the --telosb option
>>
>>
>>       > dhcp:~/userGlow$ tos-bsl -c /dev/ttyUSB0 --telosb 
>> --upload=0x0c00 --size= 16 -x
>>
>>       MSP430 Bootstrap Loader Version: 1.39-telos-8
>>
>>       Use -h for help
>>
>>       Invoking BSL...
>>
>>       Transmit default password ...
>>
>>       An error occoured:
>>
>>       NAK received (wrong password?)
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to