Re: [Tinyos-help] iris radio locked - returns BUSY forever

2012-10-29 Thread Oldrine Lewis

 Small Correction to a typo in my previous post
LowPowerListeningLayerP is waiting for *stopdone()* but that is never triggered 
cos RF230DriverLayerP is locked


-Original Message-
From: András Bíró [mailto:andras.b...@unicomp.hu] 
Sent: Wednesday, October 24, 2012 2:52 PM
To: Miklos Maroti
Cc: Oldrine Lewis; tinyos-help@millennium.berkeley.edu
Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever

Hi Guys,

This is probably irrelevant, but I never had the time to check it: On
the rf212 radio with RADIO_DEBUG turned on, I get an assert sometimes:
The driver gets a PLL_LOCK interrupt, with CMD_NONE, STATE_RX_ON, but
it works after that.
This bug is probably LPL related, but who knows.

Andris

On Wed, Oct 24, 2012 at 8:21 PM, Miklos Maroti  wrote:
> Interesting. This seems geniune then. Can you please produce a minimal
> version of the test (remove everything that is not needed to reproduce
> the bug). Do you see any difference if you do not define
> TASKLET_IS_TASK? Miklos
>
> On Wed, Oct 24, 2012 at 1:17 PM, Oldrine Lewis  wrote:
>> Thanks again. I will upload the critical files that deal with TX, RX.
>>
>> Another observation I forgot to mention in my previous posts - I did not 
>> notice any lockups when I used hardware acks. I noticed the lockups only 
>> after using software acks.
>>
>>
>>
>>
>>
>> -Original Message-
>> From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos Maroti
>> Sent: Wednesday, October 24, 2012 2:11 PM
>> To: Oldrine Lewis
>> Cc: tinyos-help@millennium.berkeley.edu
>> Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever
>>
>> I am just wondering how the user level code is written, maybe the bug
>> is there. If you have a public repository, then I will take a look.
>> Basically I wanted to see how you receive and resend the message.
>> Miklos
>>
>> On Wed, Oct 24, 2012 at 1:04 PM, Oldrine Lewis  wrote:
>>> Hi Miklos,
>>> Thanks for the speedy response. My entire project is quite large... is 
>>> there any specific portion/part I can extract  that would be more useful ?
>>>
>>> The portion of code I initially posted is from RF230DriverLayerP.nc
>>>
>>> tasklet_async command error_t RadioSend.send(message_t* msg)
>>> {
>>> uint16_t time;
>>> uint8_t length;
>>> uint8_t* data;
>>> uint8_t header;
>>> uint32_t time32;
>>> void* timesync;
>>>
>>> if( cmd != CMD_NONE || state != STATE_RX_ON || ! 
>>> isSpiAcquired() || radioIrq )
>>> {
>>> FormatDbgStr("FAT : 
>>> cmd=%d,st=%d,spAq=%d,rIrq=%d\r\n",cmd, state,isSpiAcquired(), radioIrq );
>>> return EBUSY;
>>> }
>>> ...
>>> ...
>>> ...
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Lewis
>>>
>>>
>>>
>>> -Original Message-
>>> From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos 
>>> Maroti
>>> Sent: Wednesday, October 24, 2012 1:58 PM
>>> To: Oldrine Lewis
>>> Cc: tinyos-help@millennium.berkeley.edu
>>> Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever
>>>
>>> Can you post your code too? Miklos
>>>
>>> On Wed, Oct 24, 2012 at 12:53 PM, Oldrine Lewis  wrote:
 I have four Iris nodes and all are broadcasting (flooding the network)  a
 message. Each node after receiving a msg waits for a random period and
 re-broadcasts the msg.

 I noticed that after a few seconds the radio stack locks up and returns
 EBUSY forever.

 I put a few debug statements in RadioSend.send() (file =
 RF230DriverLayerP.nc).





 if( cmd != CMD_NONE || state != STATE_RX_ON || ! isSpiAcquired() || 
 radioIrq
 )

 {

  FormatDbgStr("FAT : cmd=%d,st=%d,spAq=%d,rIrq=%d\r\n",cmd,
 state,isSpiAcquired(), radioIrq );

  return EBUSY;

 }

 The error log I got looked like this before the send failed.



 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 FAT : cmd=0,st=7,spAq=1,rIrq=0

 It seems that the state and cmd variable somehow get out of sync.

 Other settings in makefile

 CFLAGS += -DTASKLET_IS_TASK



 I am investigating this further and would like to know if anyone has
 experienced something similar



 Thanks in advance.
>>>

Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread András Bíró
Yep, it seems Eric's version of tinyos-tools doesn't have uisp. That's
ok, I would like to remove uisp from tinyos as well, since avrdude
does everything what uisp can and more.

You could force the make sytem to use avrdude with PROGRAMMER=avrdude
environment variable.

Eric, you should remove the uisp related stuff from the makefiles of
the avr platforms like this (related platforms: mica2, mica2dot,
micaz, iris, btnode2) in tinyprod:
https://github.com/tinyprod/prod/blob/master/support/make/micaz.target
Just change the line "PROGRAMMER ?= uisp" to "PROGRAMMER ?= avrdude".

I would also remove the uisp lines from all the avr programmer extras
(mib510, avrisp, avrispmkii, eprb, dapa), and the platforms (usually
some PROGRAMMER_PART define), but that's just cosmetics, it makes the
makefiles understandable, if you set the PROGRAMMER to avrdude, the
uisp parts will never run again.

Andris

On Mon, Oct 29, 2012 at 4:05 PM, David Rodenas  wrote:
> Hi Andras
>
> As I said, I got the uisp package from the
> http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html.
> In particular, it seems to me that the owner of the page has updloaded this
> package to a personal host: http://azadeha.at.ifi.uio.no/uisp.tar.gz. I
> downloaded it, installed and it works perfect.
>
> Regarding the version of my tinyos-tools, it is the latest one, which
> corresponds to the TinyOS-2.1.2 version (I do not remember if the repository
> is the tiny-prod, managed by Eric Decker I think...). What I can say is that
> this TinyOS version lacks of this package and also it should be part of the
> tinyos-tools.
>
> Regards
>
> David
>
>> Date: Mon, 29 Oct 2012 15:01:43 +0100
>
>> Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS
>> 2.1.2)
>> From: andras.b...@unicomp.hu
>> To: drod...@outlook.com
>> CC: tinyos-help@millennium.berkeley.edu
>
>>
>> Hi David,
>>
>> You were right. Uisp should be part of tinyos-tools, did you
>> installled it? If you did, what repository did you used? What's the
>> version of your tinyos-tools?
>>
>> Andris
>>
>> On Mon, Oct 29, 2012 at 10:26 AM, David Rodenas 
>> wrote:
>> > Thanks Eric, I thought that problem didn't have nothing to do with
>> > ubuntu
>> > packages. In any case, after installing the uisp package, I got the
>> > following error: "Direct Parallel Access not defined".
>> >
>> > Thereby, I looked for any solution and I found out the following web
>> > page:
>> >
>> > http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html.
>> > Here, the owner of the page explains how to solve this same issue.
>> > Hence,
>> > anyone that has this problem, check that page.
>> >
>> > Now it works. Again, thanks.
>> >
>> > David
>> >
>> >
>> >
>> > 
>> > Date: Mon, 29 Oct 2012 02:01:06 -0700
>> > Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and
>> > TinyOS
>> > 2.1.2)
>> > From: cire...@gmail.com
>> > To: drod...@outlook.com
>> > CC: tinyos-help@millennium.berkeley.edu
>> >
>> >
>> >
>> > you are missing the program "uisp": Universal In-System Programmer.
>> >
>> > try: sudo apt-get install uisp
>> >
>> > in the future if you are looking for something, try
>> > http://packages.ubuntu.com
>> >
>> >
>> > On Mon, Oct 29, 2012 at 1:48 AM, David Rodenas 
>> > wrote:
>> >
>> > Hi all
>> >
>> > I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu
>> > 12.04)
>> > when I try to install any app on MicaZ. For example, with Blink:
>> >
>> > ---
>> > $ make micaz install mib520,/dev/ttyUSB0
>> > mkdir -p build/micaz
>> > compiling BlinkAppC to a micaz binary
>> > ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
>> > -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
>> > -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
>> > -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"user\"
>> > -DIDENT_HOSTNAME=\"user-vbox\" -DIDENT_USERHASH=0x41040a3eL
>> > -DIDENT_TIMESTAMP=0x508e415dL -DIDENT_UIDHASH=0xfb0b11caL
>> > -fnesc-dump=wiring
>> > -fnesc-dump='interfaces(!abstract())'
>> > -fnesc-dump='referenced(interfacedefs,
>> > components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc
>> > -lm
>> > compiled BlinkAppC to build/micaz/main.exe
>> > 2044 bytes in ROM
>> > 51 bytes in RAM
>> > avr-objcopy --output-target=srec build/micaz/main.exe
>> > build/micaz/main.srec
>> > avr-objcopy --output-target=ihex build/micaz/main.exe
>> > build/micaz/main.ihex
>> > writing TOS image
>> > cp build/micaz/main.srec build/micaz/main.srec.out
>> > installing micaz binary using mib510
>> > uisp -dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9
>> > -dpart=ATmega128
>> > --wr_fuse_e=ff --erase --upload if=build/micaz/main.srec.out --verify
>> > make: uisp: Command not found
>> > make: *** [program] Error 127
>> > ---
>> >
>> > Any idea? All the help possible is appreciated.
>> >
>> > Regards,
>> >
>> > David
>> >
>> >
>> > __

Re: [Tinyos-help] cannot program TelosB after setting RST/NMI pin in NMI mode

2012-10-29 Thread Xiaohui Liu
Hi,

I accidentally configured RST/NMI pin from reset to NMI mode by
changing $TOSROOT/tos/platforms/telosa/PlatformP.nc
WDTCTL = WDTPW + WDTHOLD + WDTNMI;

The BSL is not started by the BSL RESET vector if RST/NMI pin is configured
for NMI functionality (NMI bit is set) according to the user's
guide and
erratasheet
(many
variants other than MSP430F1611 report the bug BSL5).

This 
thread
suggests
some additional hardware like the MSP430 Launchpad has to be used to
reprogram it. Is it possible to reprogram my motes without buying
additional hardware?

Thank you very much for your help.

On Mon, Oct 29, 2012 at 5:14 AM, Eric Decker  wrote:

>
>
> On Sun, Oct 28, 2012 at 8:39 PM, Xiaohui Liu  wrote:
>
>> Hi,
>>
>> After RST/NMI pin is configured in NMI mode,
>>
>
> More details please.   What do you mean the pin is configured in NMI mode?
>  I assume you are messing with WDTCTL.
>
> TI's NMI is strange in that it can be masked off.   Also:
>
>  Note: Holding RST/NMI Low
>
> When configured in the NMI mode, a signal generating an NMI event should
>
> not hold the RST/NMI pin low. If a PUC occurs from a different source
> while the NMI signal is low, the device will be held in the reset state
> because a PUC
>
> changes the RST/NMI pin to the reset function.
>
>
>
>> TelosB motes cannot programmed. Detailed information is shown below:
>>
>> */opt/tinyos-2.1.2/apps/Blink$ make telosb reinstall bsl,/dev/ttyUSB0*
>> *cp build/telosb/main.ihex build/telosb/main.ihex.out*
>> *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...*
>> *MSP430 Bootstrap Loader Version: 1.39-goodfet-8*
>> *Mass Erase...*
>> *Traceback (most recent call last):*
>> *  File "/usr/bin/tos-bsl", line 1918, in *
>> *main(0);*
>> *  File "/usr/bin/tos-bsl", line 1833, in main*
>> *for f in toinit: f()*
>> *  File "/usr/bin/tos-bsl", line 1098, in actionMassErase*
>> *0xa506) #Required setting for mass erase!*
>>
>
> you need to look at what is happening at this line and see what the
> program is expecting.
>
>
>>  *  File "/usr/bin/tos-bsl", line 758, in bslTxRx*
>> *rxFrame = self.comTxRx(cmd, dataOut, len(dataOut))  #Send frame*
>> *  File "/usr/bin/tos-bsl", line 440, in comTxRx*
>> *rxHeader, rxNum = self.comRxHeader()#receive header*
>> *  File "/usr/bin/tos-bsl", line 346, in comRxHeader*
>> *if not hdr: raise BSLException("Timeout")*
>> *__main__.BSLException: Timeout*
>> *make: *** [program] Error 1*
>>
>> Can anyone please give some suggestion on how they can be programmed
>> again? This seems also an issue for 
>> MSP430F1491,
>> as shown in bug BSL5.
>>
>
> What exactly have you tried?
>
> Removing power should fully reset things.
>
> But if that doesn't work you may have to resort to programming the chip
> via the JTAG.
>
> eric
>
>
>
>
>>
>> -Xiaohui Liu
>> TelosB
>> T2.1.2
>>
>> ___
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread David Rodenas
Hi Andras
As I said, I got the uisp package from the 
http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html. 
In particular, it seems to me that the owner of the page has updloaded this 
package to a personal host: http://azadeha.at.ifi.uio.no/uisp.tar.gz. I 
downloaded it, installed and it works perfect.
Regarding the version of my tinyos-tools, it is the latest one, which 
corresponds to the TinyOS-2.1.2 version (I do not remember if the repository is 
the tiny-prod, managed by Eric Decker I think...). What I can say is that this 
TinyOS version lacks of this package and also it should be part of the 
tinyos-tools.
Regards
David

> Date: Mon, 29 Oct 2012 15:01:43 +0100
> Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 
> 2.1.2)
> From: andras.b...@unicomp.hu
> To: drod...@outlook.com
> CC: tinyos-help@millennium.berkeley.edu
> 
> Hi David,
> 
> You were right. Uisp should be part of tinyos-tools, did you
> installled it? If you did, what repository did you used? What's the
> version of your tinyos-tools?
> 
> Andris
> 
> On Mon, Oct 29, 2012 at 10:26 AM, David Rodenas  wrote:
> > Thanks Eric, I thought that problem didn't have nothing to do with ubuntu
> > packages.  In any case, after installing the uisp package, I got the
> > following error: "Direct Parallel Access not defined".
> >
> > Thereby, I looked for any solution and I found out the following web page:
> > http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html.
> > Here, the owner of the page explains how to solve this same issue. Hence,
> > anyone that has this problem, check that page.
> >
> > Now it works. Again, thanks.
> >
> > David
> >
> >
> >
> > 
> > Date: Mon, 29 Oct 2012 02:01:06 -0700
> > Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS
> > 2.1.2)
> > From: cire...@gmail.com
> > To: drod...@outlook.com
> > CC: tinyos-help@millennium.berkeley.edu
> >
> >
> >
> > you are missing the program "uisp": Universal In-System Programmer.
> >
> > try:   sudo apt-get install uisp
> >
> > in the future if you are looking for something, try
> > http://packages.ubuntu.com
> >
> >
> > On Mon, Oct 29, 2012 at 1:48 AM, David Rodenas  wrote:
> >
> > Hi all
> >
> > I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu 12.04)
> > when I try to install any app on MicaZ. For example, with Blink:
> >
> > ---
> > $ make micaz install mib520,/dev/ttyUSB0
> > mkdir -p build/micaz
> > compiling BlinkAppC to a micaz binary
> > ncc -o build/micaz/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow
> > -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> > -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> > -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"user\"
> > -DIDENT_HOSTNAME=\"user-vbox\" -DIDENT_USERHASH=0x41040a3eL
> > -DIDENT_TIMESTAMP=0x508e415dL -DIDENT_UIDHASH=0xfb0b11caL -fnesc-dump=wiring
> > -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
> > components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
> > compiled BlinkAppC to build/micaz/main.exe
> > 2044 bytes in ROM
> >   51 bytes in RAM
> > avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec
> > avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex
> > writing TOS image
> > cp build/micaz/main.srec build/micaz/main.srec.out
> > installing micaz binary using mib510
> > uisp -dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9 -dpart=ATmega128
> > --wr_fuse_e=ff   --erase --upload if=build/micaz/main.srec.out --verify
> > make: uisp: Command not found
> > make: *** [program] Error 127
> > ---
> >
> > Any idea? All the help possible is appreciated.
> >
> > Regards,
> >
> > David
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> >
> >
> >
> > --
> > Eric B. Decker
> > Senior (over 50 :-) Researcher
> >
> >
> >
> > ___
> > Tinyos-help mailing list
> > Tinyos-help@millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] iris radio locked - returns BUSY forever

2012-10-29 Thread Oldrine Lewis

I think I have found a sequence of events that have might caused the radio to 
lockup.

File RF230DriverLayerP.nc
 - RadioSend.send()
   * cmd = CMD_NONE
*  Pll Lock Fails ( TRX_STATUS = 0x02)
   * set state = STATE_PLL_ON_2_RX_ON
   
- serviceRadio() due to interrupt 
  * radioIrq = 0x09 , state =  STATE_PLL_ON_2_RX_ON, cmd = CMD_NONE 
  * Do nothing  
-  RadioState.turnOff() called by  LowPowerListeningLayerP::SubControl.stop()
*state = STATE_PLL_ON_2_RX_ON, cmd = CMD_NONE
   *set cmd = CMD_TURNOFF
- changeState()
   *Does nothing 
At this point RF230DriverLayerP has been locked and cannot respond to further 
commands.
LowPowerListeningLayerP is waiting for SendDone() but that is never triggered 
cos RF230DriverLayerP is locked 
  



Lewis, Oldrine G.
Research & Development Engineer,
22400 Davis Drive,
Sutron Corporation,
Sterling, VA-20166.

Ph:  1-703-406-2800 extn. 340
Fax: 1-703-406-2801


-Original Message-
From: András Bíró [mailto:andras.b...@unicomp.hu] 
Sent: Wednesday, October 24, 2012 2:52 PM
To: Miklos Maroti
Cc: Oldrine Lewis; tinyos-help@millennium.berkeley.edu
Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever

Hi Guys,

This is probably irrelevant, but I never had the time to check it: On
the rf212 radio with RADIO_DEBUG turned on, I get an assert sometimes:
The driver gets a PLL_LOCK interrupt, with CMD_NONE, STATE_RX_ON, but
it works after that.
This bug is probably LPL related, but who knows.

Andris

On Wed, Oct 24, 2012 at 8:21 PM, Miklos Maroti  wrote:
> Interesting. This seems geniune then. Can you please produce a minimal
> version of the test (remove everything that is not needed to reproduce
> the bug). Do you see any difference if you do not define
> TASKLET_IS_TASK? Miklos
>
> On Wed, Oct 24, 2012 at 1:17 PM, Oldrine Lewis  wrote:
>> Thanks again. I will upload the critical files that deal with TX, RX.
>>
>> Another observation I forgot to mention in my previous posts - I did not 
>> notice any lockups when I used hardware acks. I noticed the lockups only 
>> after using software acks.
>>
>>
>>
>>
>>
>> -Original Message-
>> From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos Maroti
>> Sent: Wednesday, October 24, 2012 2:11 PM
>> To: Oldrine Lewis
>> Cc: tinyos-help@millennium.berkeley.edu
>> Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever
>>
>> I am just wondering how the user level code is written, maybe the bug
>> is there. If you have a public repository, then I will take a look.
>> Basically I wanted to see how you receive and resend the message.
>> Miklos
>>
>> On Wed, Oct 24, 2012 at 1:04 PM, Oldrine Lewis  wrote:
>>> Hi Miklos,
>>> Thanks for the speedy response. My entire project is quite large... is 
>>> there any specific portion/part I can extract  that would be more useful ?
>>>
>>> The portion of code I initially posted is from RF230DriverLayerP.nc
>>>
>>> tasklet_async command error_t RadioSend.send(message_t* msg)
>>> {
>>> uint16_t time;
>>> uint8_t length;
>>> uint8_t* data;
>>> uint8_t header;
>>> uint32_t time32;
>>> void* timesync;
>>>
>>> if( cmd != CMD_NONE || state != STATE_RX_ON || ! 
>>> isSpiAcquired() || radioIrq )
>>> {
>>> FormatDbgStr("FAT : 
>>> cmd=%d,st=%d,spAq=%d,rIrq=%d\r\n",cmd, state,isSpiAcquired(), radioIrq );
>>> return EBUSY;
>>> }
>>> ...
>>> ...
>>> ...
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Lewis
>>>
>>>
>>>
>>> -Original Message-
>>> From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos 
>>> Maroti
>>> Sent: Wednesday, October 24, 2012 1:58 PM
>>> To: Oldrine Lewis
>>> Cc: tinyos-help@millennium.berkeley.edu
>>> Subject: Re: [Tinyos-help] iris radio locked - returns BUSY forever
>>>
>>> Can you post your code too? Miklos
>>>
>>> On Wed, Oct 24, 2012 at 12:53 PM, Oldrine Lewis  wrote:
 I have four Iris nodes and all are broadcasting (flooding the network)  a
 message. Each node after receiving a msg waits for a random period and
 re-broadcasts the msg.

 I noticed that after a few seconds the radio stack locks up and returns
 EBUSY forever.

 I put a few debug statements in RadioSend.send() (file =
 RF230DriverLayerP.nc).





 if( cmd != CMD_NONE || state != STATE_RX_ON || ! isSpiAcquired() || 
 radioIrq
 )

 {

  FormatDbgStr("FAT : cmd=%d,st=%d,spAq=%d,rIrq=%d\r\n",cmd,
 state,isSpiAcquired(), radioIrq );

  return EBUSY;

 }

 The error log I got looked like this before the send failed.



 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT : cmd=5,st=5,spAq=1,rIrq=0

 FAT 

[Tinyos-help] help to porting tinyos2

2012-10-29 Thread Giovanni
Hi to all
Sorry anyone can help me to port my software to release tinyos 2.1.1 , I start 
from tinyos 1.x, and I developed on tinyos four years ago.
I use a telosb

SingleTimer

configuration SingleTimer {
  provides interface Timer;
  provides interface StdControl;
}

implementation {
  components TimerC;
  
  Timer = TimerC.Timer[unique("Timer")];
  StdControl = TimerC;
}


BeaconC

includes beacon;

configuration BeaconC{}
implementation
{
components Main,
BeaconM,
TimerC,
LedsC,
HumidityC,
GenericComm as GComm,
CC2420RadioC,
        UARTComm as Comm;
Main.StdControl -> BeaconM.StdControl;
Main.StdControl -> TimerC;
Main.StdControl -> Comm;
Main.StdControl -> GComm;
BeaconM.Timer -> TimerC.Timer[unique("Timer")];
BeaconM.Leds  -> LedsC;
BeaconM.Radio -> CC2420RadioC.SplitControl;
BeaconM.DataMsg -> Comm.SendMsg[AM_BEACONMSGUART];
BeaconM.BeaconSendMsg -> GComm.SendMsg[AM_BEACONMSG];
BeaconM.ReceiveMyMsg -> GComm.ReceiveMsg[AM_BEACONMSG];
BeaconM.HumidityControl -> HumidityC;
BeaconM.Humidity -> HumidityC.Humidity;
BeaconM.Temperature -> HumidityC.Temperature;
BeaconM.HumidityError -> HumidityC.HumidityError;
BeaconM.TemperatureError -> HumidityC.TemperatureError;


}



BeaconM

module BeaconM
{
provides interface StdControl;
uses{
interface SplitControl as HumidityControl;  
interface Timer;
interface Leds;
interface SplitControl as Radio;
interface SendMsg as DataMsg;
interface SendMsg as BeaconSendMsg;
interface ReceiveMsg as ReceiveMyMsg;
interface ADC as Humidity;
interface ADC as Temperature;
interface ADCError as HumidityError;
interface ADCError as TemperatureError;
}
}tinyos-help@millennium.berkeley.edu___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread András Bíró
Hi David,

You were right. Uisp should be part of tinyos-tools, did you
installled it? If you did, what repository did you used? What's the
version of your tinyos-tools?

Andris

On Mon, Oct 29, 2012 at 10:26 AM, David Rodenas  wrote:
> Thanks Eric, I thought that problem didn't have nothing to do with ubuntu
> packages.  In any case, after installing the uisp package, I got the
> following error: "Direct Parallel Access not defined".
>
> Thereby, I looked for any solution and I found out the following web page:
> http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html.
> Here, the owner of the page explains how to solve this same issue. Hence,
> anyone that has this problem, check that page.
>
> Now it works. Again, thanks.
>
> David
>
>
>
> 
> Date: Mon, 29 Oct 2012 02:01:06 -0700
> Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS
> 2.1.2)
> From: cire...@gmail.com
> To: drod...@outlook.com
> CC: tinyos-help@millennium.berkeley.edu
>
>
>
> you are missing the program "uisp": Universal In-System Programmer.
>
> try:   sudo apt-get install uisp
>
> in the future if you are looking for something, try
> http://packages.ubuntu.com
>
>
> On Mon, Oct 29, 2012 at 1:48 AM, David Rodenas  wrote:
>
> Hi all
>
> I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu 12.04)
> when I try to install any app on MicaZ. For example, with Blink:
>
> ---
> $ make micaz install mib520,/dev/ttyUSB0
> mkdir -p build/micaz
> compiling BlinkAppC to a micaz binary
> ncc -o build/micaz/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"user\"
> -DIDENT_HOSTNAME=\"user-vbox\" -DIDENT_USERHASH=0x41040a3eL
> -DIDENT_TIMESTAMP=0x508e415dL -DIDENT_UIDHASH=0xfb0b11caL -fnesc-dump=wiring
> -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
> components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
> compiled BlinkAppC to build/micaz/main.exe
> 2044 bytes in ROM
>   51 bytes in RAM
> avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec
> avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex
> writing TOS image
> cp build/micaz/main.srec build/micaz/main.srec.out
> installing micaz binary using mib510
> uisp -dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9 -dpart=ATmega128
> --wr_fuse_e=ff   --erase --upload if=build/micaz/main.srec.out --verify
> make: uisp: Command not found
> make: *** [program] Error 127
> ---
>
> Any idea? All the help possible is appreciated.
>
> Regards,
>
> David
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Random Packet

2012-10-29 Thread mansooreh mollaie
Hi,
I want to send random packet in Tossim!
should I change in Python file or in Tinyos application?
Thanks___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread David Rodenas






Thanks Eric, I thought that problem didn't have nothing to do with ubuntu 
packages.  In any case, after installing the uisp package, I got the following 
error: "Direct Parallel Access not defined". 
Thereby, I looked for any solution and I found out the following web page: 
http://recolog.blogspot.com.es/2011/07/running-tikiridb-with-micaz-motes.html. 
Here, the owner of the page explains how to solve this same issue. Hence, 
anyone that has this problem, check that page. 
Now it works. Again, thanks. 
David



Date: Mon, 29 Oct 2012 02:01:06 -0700
Subject: Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 
2.1.2)
From: cire...@gmail.com
To: drod...@outlook.com
CC: tinyos-help@millennium.berkeley.edu


you are missing the program "uisp": Universal In-System Programmer.
try:   sudo apt-get install uisp
in the future if you are looking for something, try http://packages.ubuntu.com



On Mon, Oct 29, 2012 at 1:48 AM, David Rodenas  wrote:




Hi all
I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu 12.04) 
when I try to install any app on MicaZ. For example, with Blink: 
---
$ make micaz install mib520,/dev/ttyUSB0mkdir -p build/micazcompiling 
BlinkAppC to a micaz binaryncc -o build/micaz/main.exe  -Os -fnesc-separator=__ 
-Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c 
-board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param 
max-inline-insns-single=10 -DIDENT_APPNAME=\"BlinkAppC\" 
-DIDENT_USERNAME=\"user\" -DIDENT_HOSTNAME=\"user-vbox\" 
-DIDENT_USERHASH=0x41040a3eL -DIDENT_TIMESTAMP=0x508e415dL 
-DIDENT_UIDHASH=0xfb0b11caL -fnesc-dump=wiring 
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, 
components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm 
compiled BlinkAppC to build/micaz/main.exe2044 bytes in ROM 
 51 bytes in RAMavr-objcopy --output-target=srec build/micaz/main.exe 
build/micaz/main.srec
avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex
writing TOS imagecp build/micaz/main.srec build/micaz/main.srec.out
installing micaz binary using mib510
uisp -dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9 -dpart=ATmega128  
--wr_fuse_e=ff   --erase --upload if=build/micaz/main.srec.out --verifymake: 
uisp: Command not found
make: *** [program] Error 127---
Any idea? All the help possible is appreciated. 
Regards,
David

  

___

Tinyos-help mailing list

Tinyos-help@millennium.berkeley.edu

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



-- 
Eric B. Decker
Senior (over 50 :-) Researcher





  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] cannot program TelosB after setting RST/NMI pin in NMI mode

2012-10-29 Thread Eric Decker
On Sun, Oct 28, 2012 at 8:39 PM, Xiaohui Liu  wrote:

> Hi,
>
> After RST/NMI pin is configured in NMI mode,
>

More details please.   What do you mean the pin is configured in NMI mode?
 I assume you are messing with WDTCTL.

TI's NMI is strange in that it can be masked off.   Also:

 Note: Holding RST/NMI Low

When configured in the NMI mode, a signal generating an NMI event should

not hold the RST/NMI pin low. If a PUC occurs from a different source while
the NMI signal is low, the device will be held in the reset state because a
PUC

changes the RST/NMI pin to the reset function.



> TelosB motes cannot programmed. Detailed information is shown below:
>
> */opt/tinyos-2.1.2/apps/Blink$ make telosb reinstall bsl,/dev/ttyUSB0*
> *cp build/telosb/main.ihex build/telosb/main.ihex.out*
> *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...*
> *MSP430 Bootstrap Loader Version: 1.39-goodfet-8*
> *Mass Erase...*
> *Traceback (most recent call last):*
> *  File "/usr/bin/tos-bsl", line 1918, in *
> *main(0);*
> *  File "/usr/bin/tos-bsl", line 1833, in main*
> *for f in toinit: f()*
> *  File "/usr/bin/tos-bsl", line 1098, in actionMassErase*
> *0xa506) #Required setting for mass erase!*
>

you need to look at what is happening at this line and see what the program
is expecting.


> *  File "/usr/bin/tos-bsl", line 758, in bslTxRx*
> *rxFrame = self.comTxRx(cmd, dataOut, len(dataOut))  #Send frame*
> *  File "/usr/bin/tos-bsl", line 440, in comTxRx*
> *rxHeader, rxNum = self.comRxHeader()#receive header*
> *  File "/usr/bin/tos-bsl", line 346, in comRxHeader*
> *if not hdr: raise BSLException("Timeout")*
> *__main__.BSLException: Timeout*
> *make: *** [program] Error 1*
>
> Can anyone please give some suggestion on how they can be programmed
> again? This seems also an issue for 
> MSP430F1491,
> as shown in bug BSL5.
>

What exactly have you tried?

Removing power should fully reset things.

But if that doesn't work you may have to resort to programming the chip via
the JTAG.

eric




>
> -Xiaohui Liu
> TelosB
> T2.1.2
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread Eric Decker
you are missing the program "uisp": Universal In-System Programmer.

try:   sudo apt-get install uisp

in the future if you are looking for something, try
http://packages.ubuntu.com


On Mon, Oct 29, 2012 at 1:48 AM, David Rodenas  wrote:

> Hi all
>
> I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu
> 12.04) when I try to install any app on MicaZ. For example, with Blink:
>
> ---
> *$ make micaz install mib520,/dev/ttyUSB0*
> *mkdir -p build/micaz*
> *compiling BlinkAppC to a micaz binary*
> *ncc -o build/micaz/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
> -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"user\"
> -DIDENT_HOSTNAME=\"user-vbox\" -DIDENT_USERHASH=0x41040a3eL
> -DIDENT_TIMESTAMP=0x508e415dL -DIDENT_UIDHASH=0xfb0b11caL
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm *
> *compiled BlinkAppC to build/micaz/main.exe*
> *2044 bytes in ROM*
> *  51 bytes in RAM*
> *avr-objcopy --output-target=srec build/micaz/main.exe
> build/micaz/main.srec*
> *avr-objcopy --output-target=ihex build/micaz/main.exe
> build/micaz/main.ihex*
> *writing TOS image*
> *cp build/micaz/main.srec build/micaz/main.srec.out*
> *installing micaz binary using mib510*
> *uisp -dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9
> -dpart=ATmega128  --wr_fuse_e=ff   --erase --upload
> if=build/micaz/main.srec.out --verify*
> *make: uisp: Command not found*
> *make: *** [program] Error 127*
> ---
>
> Any idea? All the help possible is appreciated.
>
> Regards,
>
> David
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] make: uisp: command not found (MicaZ and TinyOS 2.1.2)

2012-10-29 Thread David Rodenas
Hi all
I am getting the following error on TinyOS-2.1.2 (installed on Ubuntu 12.04) 
when I try to install any app on MicaZ. For example, with Blink: 
---$ make micaz install mib520,/dev/ttyUSB0mkdir -p build/micazcompiling 
BlinkAppC to a micaz binaryncc -o build/micaz/main.exe  -Os -fnesc-separator=__ 
-Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c 
-board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param 
max-inline-insns-single=10 -DIDENT_APPNAME=\"BlinkAppC\" 
-DIDENT_USERNAME=\"user\" -DIDENT_HOSTNAME=\"user-vbox\" 
-DIDENT_USERHASH=0x41040a3eL -DIDENT_TIMESTAMP=0x508e415dL 
-DIDENT_UIDHASH=0xfb0b11caL -fnesc-dump=wiring 
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, 
components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm 
compiled BlinkAppC to build/micaz/main.exe2044 bytes in ROM 
 51 bytes in RAMavr-objcopy --output-target=srec build/micaz/main.exe 
build/micaz/main.srecavr-objcopy --output-target=ihex build/micaz/main.exe 
build/micaz/main.ihexwriting TOS imagecp build/micaz/main.srec 
build/micaz/main.srec.outinstalling micaz binary using mib510uisp 
-dprog=mib510 -dserial=/dev/ttyUSB0 --wr_fuse_h=0xd9 -dpart=ATmega128  
--wr_fuse_e=ff   --erase --upload if=build/micaz/main.srec.out --verifymake: 
uisp: Command not foundmake: *** [program] Error 127---
Any idea? All the help possible is appreciated. 
Regards,
David
  ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help