[Tinyos-help] output file when we compile a cpp code in tinyos

2006-08-02 Thread primalfear 69
hello everybody..
 
Am new to tinyos. When i compile a nesc file by "make mica2" or "make pc" am getting an exe file as output and an *.srec file.. (which is in hex... hope this is the file to be dumped in controller)

My problem is am just getting an exe file when i compile for a Cpp code. Is there any other output fileif so which is the path
 
Regards 
Primalfear 
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] motelist

2006-08-02 Thread Sudha Krishna

Hi,


I am getting the following error when I execute the  "motelist" command:

error, could not open key HKLM\SYSTEM\CurrentControlSet\Enum\FTDIBUS


This question may have come up before, but my search through the
archive did not yield any result.  How can I fix the above error? I am
using tinyos version 1.1.15.

--
thanks
sudha
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Help. How to change the default LPL state?

2006-08-02 Thread Hui KANG

Hi, Liu Jia,
You can use the componenet CC1000RadioIniM, and then call the command
SetListeningMode(3) to turn radion into low duty cycle.

Regards,
Hui

On 8/2/2006, "Winston Liu" <[EMAIL PROTECTED]> wrote:

>Hi,
>
>I'm using Surge_Reliable and met a problem when trying
>to change the default LPL state.
>The file CC1000Const.h defines
>
>// duty cycle max packetseffective
>throughput
>// -  -
>-
>// 100% duty cycle42.93 packets/sec  12.364kbps
>// 35.5% duty cycle   19.69 packets/sec   5.671kbps
>// 11.5% duty cycle8.64 packets/sec   2.488kbps
>// 7.53% duty cycle6.03 packets/sec   1.737kbps
>// 5.61% duty cycle4.64 packets/sec   1.336kbps
>// 2.22% duty cycle1.94 packets/sec   0.559kbps
>// 1.00% duty cycle0.89 packets/sec   0.258kbps
>
>I tried to modify the default state in
>CC1000RadioIntM.nc, but it doesn't work?
>
>Anybody can tell me how to modify the default LPL
>state?
>Thanks in advance.
>
>Regards,
>Winston
>
>
>
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>___
>Tinyos-help mailing list
>Tinyos-help@Millennium.Berkeley.EDU
>https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] RADIO_916BAND_CHANNEL_00 undeclared

2006-08-02 Thread Michael Schippling

At minimum those are all defined in:
...contrib\xbow\tos\platform\mica2\CC1000Const.h
And pulled in by ...contrib\xbow\apps\MakeXbowlocal

MS

miguel erazo wrote:

Hi all,

I am developing some code and when I try to compile it I get the error:
 
/RADIO_916BAND_CHANNEL_00 undeclared/
 
Could someone help me please?


Regards,
Miguel Erazo


Groups are talking. We´re listening. Check out the handy changes to 
Yahoo! Groups. 
 






___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] RADIO_916BAND_CHANNEL_00 undeclared

2006-08-02 Thread miguel erazo
Hi all,I am developing some code and when I try to compile it I get the error:     RADIO_916BAND_CHANNEL_00 undeclared     Could someone help me please?   Regards,Miguel Erazo 
		Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. ___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problems with javacomm

2006-08-02 Thread Anton Riedl
I'm not quite sure if it's the same for Tmotes, but for micaz I use /dev/ttyUSB0 for programming and /dev/ttyUSB1 for communication (on Ubuntu with TinyOS 2.x, though).Anton On Aug 2, 2006, at 1:40 PM, Claro Noda wrote:Frabrizio:did you sorted out the FTDI drivers correctly?remember there is a serial<->USB interface on the Tmote.the drivers are probably part of the kernel and  the motelist output make me guess you did. but, besides, the javacomm, in linux uses the RXTX. You might be willing to check:http://wass.homelinux.net/howtos/Comm_How-To.shtmlI'm not sure if this applies to the Tmote, though. There is no reference to it in: http://www.moteiv.com/community/Tmote_Linux_installMaybe somebody else in the list can advise.we are entertaining the idea of moving to ubuntu, so i might keep an eye on this thread :) Claro.On 02/08/06, Fabrizio Stefani <[EMAIL PROTECTED]> wrote: Hi all,   I'm using Ubuntu 6.06, TinyOS 1.1, Java 1.5.0_06, JavaComm 3.0, GCC4.0.3, Tmote tools 2.0.2.To install all I followed this guides:  http://www.chadmetcalf.com/tinyos-1x-on-ubuntu/   http://www.moteiv.com/community/Tmote_Linux_installI can program the tmotes, but I'm having some problems with the javacommbecause trying to test the Oscilloscope application the program gives mean error and stops. $ motelistReference  Device   Description--  ---M4A9N70Z   /dev/ttyUSB0 Moteiv tmote sky$ export MOTECOM=serial@/dev/ttyUSB0:tmote $ java net.tinyos.tools.ListenError on serial@/dev/ttyUSB0:57600: java.io.IOException: Couldn'tconfigure /dev/ttyUSB0If I try to use some other java applications for testing the serialport, such as BlackBox, it seems to work. $ export CLASSPATH BlackBox.jar:$CLASSPATH$ java BlackBox -p /dev/ttyUSB0Opening port /dev/ttyUSB0/dev/ttyUSB0: PORT_OWNED [by this application]and the GUI opens giving me informations on that port. So what's happening with the serial connection with the tmote?Can you help me?___Tinyos-help mailing listTinyos-help@Millennium.Berkeley.EDUhttps://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help  ---___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Help. How to change the default LPL state?

2006-08-02 Thread Winston Liu
Hi,
 
I'm using Surge_Reliable and met a problem when trying
to change the default LPL state.
The file CC1000Const.h defines 
 
// duty cycle max packetseffective
throughput
// -  - 
-
// 100% duty cycle42.93 packets/sec  12.364kbps
// 35.5% duty cycle   19.69 packets/sec   5.671kbps
// 11.5% duty cycle8.64 packets/sec   2.488kbps
// 7.53% duty cycle6.03 packets/sec   1.737kbps
// 5.61% duty cycle4.64 packets/sec   1.336kbps
// 2.22% duty cycle1.94 packets/sec   0.559kbps
// 1.00% duty cycle0.89 packets/sec   0.258kbps
 
I tried to modify the default state in
CC1000RadioIntM.nc, but it doesn't work?
 
Anybody can tell me how to modify the default LPL
state?
Thanks in advance.
 
Regards,
Winston




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Maximum datarate on CC1000 radio

2006-08-02 Thread Michael Schippling

Ok, let's review just this much...I'm confused.

I think you have a system with three motes
   one mote transmits messages at some rate -- Source
   the second receives and re-transmits those messages -- Relay
   the third is TOSBase, which receives (hopefully) everything -- Base

Your chart indicates that all Source messages are received at the Relay,
and that almost all messages, from everyone, are missed at the Base.
Is that what you meant to say? I assume that you have some tricky way
of determining how many messages are received at the Relay which doesn't
depend on them being received at the Base...

I think others have already said this but remember that only one
message can be on-the-air at any time, so the Source and Relay are
competing for air-time. If the Source is flooding the channel then
the two will compete for transmit windows. And, as I said in my
experience, the CC1000 backoff-retry isn't as good as one would hope
so messages go missing.

One experiment to try is to just measure the Source to Base message rate
with no Relay in the picture. And do that from both Source and Relay
positions to make sure you don't have some kind of multi-path interference
or other radio reception problem.

Also, I assume that the motes don't attempt to transmit a new message until
they have gotten a sendDone(). You shouldn't get the done() until the
backoff-retries have completed, and you should also be able to tell if the
transmit was successful or not.

MS

venkatesh s wrote:


Thanks for your kind reply Phil and Michael...
 
What about if i make the nodes to communicate in a single range, and 
force them to come on hop., which means there shouldn't be hidden node 
problems..
 
I did the following to achive the above, for the 3 node network..
 
Node 2 was forced to receive only node 1 packets (i.e, the route packets)

Node 1 was forced to receive both node 2 and node 0 (Rx) packets.
Node 0(Rx)  was forced to receive only node 1 packets..
 
I used this logic in the event of Receive message in MultihopLEPSM.nc 
file.  so, this was routing the packets on hop but on a single range..
 
Under this case, i get the same results..
 
I thought of capturing why actually the packets are lost using a 
TOSBase.  It seems that TOSBase also missed some packets. I have 
tabulated the results below, so that it will be clear..
 
ID  |  SentPackets | Packets received  | Packet Drops  |  Packet Drops  | 
___| |   for forwarding | at  Rx  |   at 
TOSBase  |
  1 |  1000 |996  |1000 
|   994  |
  2 |  1000 | 0 |  
994|997 |

__ |
 
I really wonder over here, why there is no packet loss for node 1.  I 
experimented almost 10 - 12 times. It gave me almost the same results.. 
Few packets of node 2 were not received by node 1, while node 2 says he 
has sent to medium..  Also, TOSBase was able to receive more packets of 
node 2 than node1..
 
Is there such that the preamble getting corrupted which makes the packet 
totally lost at node1??


 





___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] MSP410

2006-08-02 Thread Srikant Yennamandra
Hello

My name is Srikant. I am a newbie to the world of wireless sensor
networks. I have been working with the MSP410 sensors (same as the ones
used in the exscal project) for quite sometime now. I found some of the
source files for this sensor located under /contrib/exscal. I was
wondering if there were any pre-written applications that were out
there for this particular sensor. 

I have been trying to write my own versions of the Sense and oscilloscope applications for the MSP410 without any luck. 

Any suggestions on how to write these applications ?

Thanks in advance

Srikant
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Problems with javacomm

2006-08-02 Thread Claro Noda
Frabrizio:did you sorted out the FTDI drivers correctly?remember there is a serial<->USB interface on the Tmote.the drivers are probably part of the kernel and  the motelist output make me guess you did. 
but, besides, the javacomm, in linux uses the RXTX. You might be willing to check:http://wass.homelinux.net/howtos/Comm_How-To.shtmlI'm not sure if this applies to the Tmote, though.
There is no reference to it in: http://www.moteiv.com/community/Tmote_Linux_installMaybe somebody else in the list can advise.we are entertaining the idea of moving to ubuntu, so i might keep an eye on this thread :)
Claro.On 02/08/06, Fabrizio Stefani <[EMAIL PROTECTED]> wrote:
Hi all,   I'm using Ubuntu 6.06, TinyOS 1.1, Java 1.5.0_06, JavaComm 3.0, GCC4.0.3, Tmote tools 
2.0.2.To install all I followed this guides:  http://www.chadmetcalf.com/tinyos-1x-on-ubuntu/  
http://www.moteiv.com/community/Tmote_Linux_installI can program the tmotes, but I'm having some problems with the javacommbecause trying to test the Oscilloscope application the program gives mean error and stops.
$ motelistReference  Device   Description--  ---M4A9N70Z   /dev/ttyUSB0 Moteiv tmote sky$ export MOTECOM=serial@/dev/ttyUSB0:tmote
$ java net.tinyos.tools.ListenError on serial@/dev/ttyUSB0:57600: java.io.IOException: Couldn'tconfigure /dev/ttyUSB0If I try to use some other java applications for testing the serialport, such as BlackBox, it seems to work.
$ export CLASSPATH BlackBox.jar:$CLASSPATH$ java BlackBox -p /dev/ttyUSB0Opening port /dev/ttyUSB0/dev/ttyUSB0: PORT_OWNED [by this application]and the GUI opens giving me informations on that port.
So what's happening with the serial connection with the tmote?Can you help me?
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Which ADC module to use

2006-08-02 Thread Ian Welch
Hi, Currently I'm using the Atm128AdcC module and I'm a bit confused on how to use the Atm128AdcMultiple interface. How do I set my next conversion to be on another channel? This is what I have so far. I get a conflicting types error message for 
Multiple.dataReady when I try to compile, have I done somethign wrong in the event?InsoleAppC.nc**implementation { components Atm128AdcC as MyADC;     InsoleC.Multiple    -> MyADC;
    InsoleC.Resource    -> MyADC.Resource;        }InsoleC.nc**module InsoleC {   uses interface Atm128AdcMultiple as Multiple;   .   }implementation   {
   .   event void Multiple.dataReady(uint16_t data, bool precise, uint8_t channel, uint8_t *newChannel, uint8_t *newRefVoltage) {        if(precise == TRUE) {            *newChannel = channel+1;            sample[channel + sample_num] = data;
            if(channel == 7) {                 call Resource.release[1]();                post sendPacket();                }            }        }   ..    }Any help would be great. Also, am I using the correct Module? I'm just getting in to 
TOS2.x and still a bit unclear on the order of things.Thanks.
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Tython and importing pytos

2006-08-02 Thread Marguerite A. Doman
Is it possible to import and use pytos and jpype in tython? is it 
necessary? Do I need that link in order to call Java classes in tython? 

I'm having trouble getting import pytos and import jpype to work in 
tython. I am getting 'ImportError: no module named pytos'.

Thanks
Marguerite
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Problems with javacomm

2006-08-02 Thread Fabrizio Stefani

Hi all,
  I'm using Ubuntu 6.06, TinyOS 1.1, Java 1.5.0_06, JavaComm 3.0, GCC 
4.0.3, Tmote tools 2.0.2.


To install all I followed this guides:
 http://www.chadmetcalf.com/tinyos-1x-on-ubuntu/
 http://www.moteiv.com/community/Tmote_Linux_install

I can program the tmotes, but I'm having some problems with the javacomm 
because trying to test the Oscilloscope application the program gives me 
an error and stops.


$ motelist
Reference  Device   Description
--  ---
M4A9N70Z   /dev/ttyUSB0 Moteiv tmote sky

$ export MOTECOM=serial@/dev/ttyUSB0:tmote

$ java net.tinyos.tools.Listen
Error on serial@/dev/ttyUSB0:57600: java.io.IOException: Couldn't 
configure /dev/ttyUSB0


If I try to use some other java applications for testing the serial 
port, such as BlackBox, it seems to work.


$ export CLASSPATH BlackBox.jar:$CLASSPATH
$ java BlackBox -p /dev/ttyUSB0
Opening port /dev/ttyUSB0
/dev/ttyUSB0: PORT_OWNED [by this application]

and the GUI opens giving me informations on that port.

So what's happening with the serial connection with the tmote?
Can you help me?


Thanks,
Fabrizio
_
This email has been ClamScanned !
 www.clamav.net
_
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


RE: [Tinyos-help] HPLTimer3 on Micaz using tinyos-1.x

2006-08-02 Thread Michael Collett
Hi,

My main aim is to get TestAcousticRanging from Vanderbilt working on my Micaz 
using tinyos-1.x….

I’ve tried to rewrite HPLTimer to use timer3 to overcome the micaz radio/timer2 
compatibility issues.

I’ve managed to compile my application now. The problem is that the timer 
doesn’t seem to be firing. The rest of the parts of the app seem to work (LEDs 
respond to received messages etc). The timer call does return success. I’ve 
tried a large range of intervals and scales in case these weren’t compatible.

I’ve found that GenericComm includes TimerJiffyAsync, which uses Timer2. Will I 
need to change this to use timer3 too, to overcome the micaz compatibility 
issues? Is there a more straight-forward way of getting a high frequency ~32us 
timer working on the Micaz?

This problem is really holding my project back, and I’d appreciate any 
suggestions.

Thanks,

Mike

-Original Message-
From: Michael Schippling [mailto:[EMAIL PROTECTED]
Sent: 31 July 2006 20:08
To: Michael Collett
Cc: TinyOS Help (E-mail)
Subject: Re: [Tinyos-help] HPLTimer3 on Micaz using tinyos-1.x


Just a couple tidbits...

nesc -v   will list all the included files, but won't give you the
dependencies you want. You might be able to do some binary searching
by eliminating source files though.

You can also try grepping clock.h in all the source directories,
or use Eclipse or other IDE search facilities. As far as I know
only tos.h is included automagically, without any reference in
a source file.

But why fight nature? Can't you use the common defs in the TOS header
and just add whatever you need in yours?

MS

Michael Collett wrote:
> 
> 
> Hi,
> 
> Thanks for the advice on registers. I’m still trying to get Timer3 to 
> work on my MicaZ using TinyOs-1.x though:
> 
> 1) Can I first check that I have the general shape of the components and 
> interfaces right:
> 
> HPLTimer3M.nc (with HPLTimer3.h)
> 
> / *Clock16.nc /
> 
> Clock3C.nc (with Clock3.h)
> 
> / *Clock16.nc /
> 
> Timer3M.nc (with Timer3.h)
> 
> / *Timer3.nc /
> 
> Timer3C.nc
> 
> / *Timer3.nc /
> 
> MyApplicationM.nc
> 
> (*Interface.)
> 
> 2) Another problem I’m having is that many of the variables I’m trying 
> to use are already defined in Clock.h etc. I’m trying to fix it so that 
> only my version: Clock3.h is included. Despite having accounted for this 
> in all the files involved in my application, when compiling Clock.h is 
> still taken from platform/mica128. This also occurs with HPLTimer1, 
> despite the fact I’ve not included it in any of my application components.
> 
> I could rename all the variables, but I want to make sure that I’m not 
> using the wrong version of the header files somewhere along the line.
> 
> Is there a component which uses a timer which I may be overlooking 
> (Something which is always included at compilation)?
> 
> Thanks,
> 
> Mike
> 
> **
> Wireless Communications
> Enabling Metrology Division
> National Physical Laboratory
> Hampton road
> Teddington
> United Kingdom
> TW11 0LW
> 0208 943 6771
> www.npl.co.uk
> **
> 
> 
> 
> ---
> This e-mail and any attachments may contain confidential and/or
> privileged material; it is for the intended addressee(s) only.
> If you are not a named addressee, you must not use, retain or
> disclose such information.
> 
> NPL Management Ltd cannot guarantee that the e-mail or any
> attachments are free from viruses.
> 
> NPL Management Ltd. Registered in England and Wales. No: 2937881
> Registered Office: Serco House, 16 Bartley Wood Business Park,
> Hook, Hampshire, United Kingdom RG27 9UY
> ---
> 
> 
> 
> 
> ___
> Tinyos-help mailing list
> Tinyos-help@Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

---
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Serco House, 16 Bartley Wood Business Park,
   Hook, Hampshire, United Kingdom  RG27 9UY
---

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] for David Gay: Matchbox

2006-08-02 Thread robycannone

Hi David Gay,
I'm using matchbox with TinyDB. I have seen that you 
implemented a lot of code for TinyDB (expecially the part 
about flash memory)
I'd store permanently an attribute (for example location) 
on the mote but i don't know if i have to use matchbox.

My aim is to run queries like this:

SELECT nodeid,light
FROM sensors
WHERE location = 'Milan'
SAMPLE PERIOD 1024

(so i want to retrieve location's value and compare it 
with Milan).
Is it possible to do this storing the attribute with 
matchbox?
I have thought to integrate the Remote application that 
you implemented with TinyDB. Is the correct way?

Could you give me any advice?
Thanks for all.
Roberto.
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


RE: for David Moss: [Tinyos-help] Help with real node behaviour!Micaz, tinyos 1.x

2006-08-02 Thread David Moss
I have done a lot of work in this area because my projects require flash.
Flash memory *is* EEPROM.  On your micaz you do have 128kB of ROM memory for
your actual binary program on the chip, which you don't have access to.
512kB external flash memory can store data and whatever else you want on,
and 4kB of RAM memory for variables/arrays to run your program.

For simple logging, check out
http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson8.html  This will append
bytes to the flash and allow you to read them back.


It sounds like, because you're copying full buffers into flash for temporary
storage, you may need something a little different than the logging
functionality.  It's easier to implement a temporary storage on flash than a
permanent storage that is retained after reboot because you don't have to
deal with finding the write location after a reboot; instead, you can erase
the pages of flash you'll use when the mote boots up and start your app
writing at 0x0 each time.

The AT45DB flash on a micaz can do page-level erases, meaning you erase 256
(+8 extra bytes/page) each time you want to erase data.  When you write to
the AT45DB, the data actually goes into a physical RAM buffer on the chip
before being stored to flash.  That means your data won't actually get
written until you flush it to flash.  

Here's a little background on the way flash writes.  The process of writing
on the AT45DB is usually a read-modify-write, which is different than
standard NOR-flash behavior in that the data from a page is first read into
its RAM, the data is modified, the page is erased, and the modified data is
written back to flash.  This prevents data from being corrupted.  Standard
NOR-flash behavior is 1's turn into 0's on write, and 0's turn back to 1's
on erase.  So if you wrote 01101101 to a byte on a NOR-flash (like the
STM25P on tmotes) and then wrote a 10010011 to that same byte location,
you'd end up with 0001 - not what you'd expect.  The AT45DB's
read-modify-write prevents this from happening at the expense of time and
energy.  If you look at the power consumption plot I attached, you can see
this behavior (as well as the required energy!) for a few page writes.  The
flat line is a read, the squiggly lines are writes.  Note that the current
gets up to 70 mA - you'll need some good batteries (not coin cell) to supply
that kind of instantaneous current.

With all that said, you can try the PageEEPROM component to do all that, but
I recommend trying out the component I wrote to do kind of what you're
doing, found in the TinyOS 1.x CVS under /contrib/rincon/apps/FlashBridge.
The FlashBridge component is meant to be a library that you can use in any
application to directly access flash.  

You'll need to download most of that /contrib/rincon directory to get the
demo apps working (including /tos/lib/Transceiver, /tos/lib/State, and
/tools/java/com/rincon/flashbridgeviewer if you want to read the raw flash
onto your computer screen) and you'll need to modify the Makefile to include
the AT45DB directory instead of STM25P.  To try it out, compile and install
the FlashBridge component onto your micaz.  Then, you can connect to the
micaz using serial forwarder and use the Java FlashBridgeViewer app to
interact with the flash and get an idea of its behavior.  The readme is
provided in the /contrib/rincon/apps/FlashBridge/apps/FlashBridgeViewer
directory, and part of it is copied below.

If you're working with a buffer of data that needs to be stored on flash,
I'd recommend breaking them up into 256-byte segments to make them easy to
read/write in page increments.  Let's say you only need to store a few
buffers of data on flash.  On boot, erase the first page of flash (this
isn't good for wear-leveling, but you probably won't reboot 100,000+ times
either):

  call FlashBridge.erase(0);

This will erase the entire first sector - 256 pages of flash, or
256*256=65536 bytes (~1 second erase time).  When you issue a command on
flash, wait for the event to come back before issuing another command.

Now you can start writing at 0x0:

  uint8_t buffer[256];  // Here's your buffer of data you want to store to
flash
  uint32_t flashWriteAddress = 0;  // the next location to write to on flash

  void writeToFlash() {
call FlashBridge.write(flashWriteAddress, &buffer, sizeof(buffer));  //
Write the entire buffer to flash.
  }

  // Wait for the event to come back
  event void FlashBridge.writeDone(uint32_t addr, void *buf, uint32_t len,
result_t result) {
if(result) {
  // SUCCESS! update our write location to the next page, or something.
  // Note that if we only erased sector 0 on boot, anything after
address 0x1 (the 257'th page on flash) 
  // may not be valid to write to
  flashWriteAddress += len;
}
  }

The FlashBridge component extends the PageEEPROM component incase you want
to try to use the PageEEPROM component directly.  Then you can check out how
it works in FlashBridge's AT4

[Tinyos-help] Debugging Tmotes using JTAG with Boomerang on WinXP

2006-08-02 Thread Christian Behrens
Hi all, 

I have been facing severe trouble trying to use the JTAG interface for
debugging my Tmotes. I am using Boomerang on WinXP. I have built my own jtag
adaptor from reading in TI's app notes and datasheets. It seems to work as I
can successfully read out the device type of the Tmote. I use a TI USB-FET
device for debugging. I also tried with a parallel port debugger but I face
the same problems. It seems like being a software issue. 

Here is what I did to debug a programme. 

1. I have downloaded the new Files (HIL.dll, MSP430.dll,
msp430-gdbproxy.exe) from www.soft-switch.com. I have copied them into
/opt/msp430/bin. 
   Furthermore, I have installed the mspgcc to get a new version of the
msp430-gdb.exe. 

   When I run the msp430-gdbproxy (using $ msp430-gdbproxy --port=
msp430 TIUSB) it seems to work out (at least it shows the right device).

-
Remote proxy for GDB, v0.7.1, Copyright (C) 1999 Quality Quorum Inc.
MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details
use `--warranty' option. This is Open Source software. You are
welcome to redistribute it under certain conditions. Use the
'--copying' option for details.

debug: MSP430_Initialize()
debug: MSP430_Configure()
debug: MSP430_VCC(3000)
debug: MSP430_Identify()
info:  msp430: Target device is a 'MSP430F1611' (type 42)
debug: MSP430_Configure()
notice:msp430-gdbproxy.exe: waiting on TCP port 
-

2. In a new window I compiled an App (e.g. blink) using make tmote (telosb)
debug. This should generate the necessary debug info. 
   Then I change the directory to /built/tmote and try to use the
msp430-gdb, but I may not use any commands in the gdb. (e.g. monitor erase,
load main.exe)

---
$ msp430-gdb main.exe
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=msp430"...
(gdb) monitor erase
"monitor" command not supported by this target.

(gdb) load main.exe
You can't do that when your target is `exec'
(gdb)
---

   I also tried by putting the debug switch into the makefile but the result
is the same. 
   Do I have to first connect to the gdbproxy using "target cisco
[host]:[port]"? I tried to, but I seems to be freezing (or at least terribly
slow)!

3. I got the tip from another user to update the USB-FET. But I even failed
to run the self-test. 

--
$ msp430-gdbproxy msp430 --selftest-usb-fet

Remote proxy for GDB, v0.7.1, Copyright (C) 1999 Quality Quorum Inc.
MSP430 adaption Copyright (C) 2002 Chris Liechti and Steve Underwood

GDBproxy comes with ABSOLUTELY NO WARRANTY; for details
use `--warranty' option. This is Open Source software. You are
welcome to redistribute it under certain conditions. Use the
'--copying' option for details.

notice:msp430: TI USB FET self-test requested
debug: MSP430_Initialize()
debug: MSP430_FET_SelfTest()
error: msp430: Hardware Self Test Error (40)
debug: MSP430_Initialize()
debug: MSP430_Configure()
debug: MSP430_VCC(3000)
debug: MSP430_Identify()
error: msp430: Could not find device (or device not supported) (4)
debug: MSP430_VCC(0)
debug: MSP430_VCC(3000)
debug: MSP430_Reset(ALL_RESETS)
debug: MSP430_Close()
Assertion failed: !msp430_status.is_open, file target_msp430.c, line 745

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
-

Another thing is when I try to source the gdb.ini I get back the following:


$ source gdb.ini
bash: target: command not found


I have also seen that there is a walkthrough for JTAG debugging for a linux
installation of TinyOS. 
But the points given there do not address my problem. 

Maybe someone can help me with this problem. Any help is appreciated. 


Thanks. 


Christian




___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] commands in cygwin.

2006-08-02 Thread jurin dan



hi,

   did anybody know the command line to execute a patch in cygwin?

   thx

_
Play Q6 for your chance to WIN great prizes.  
http://q6trivia.imagine-live.com/enca/landing


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Flash, not EEPROM memory

2006-08-02 Thread Munaretto, Daniel
Hi all,
  i'm using micaz motes, Atmega128 Radio Unit and Tinyos 1.x.
I received a lot of informations by people in list about how to use EEPROM 
memory (4 Kbytes) but not about Flash (128 Kbytes)..
 
And in my folders i have only files about the using of EEPROM memory.
 
Does anyone know about Flash memory?Could anyone say to me where to find and 
download files for reading and writing on Flash?and how to use them? i'm 
lossing myself..
 
Any help will be really appreciated!
Thanks very much!
Daniele

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Duplicate packets while listening using TOSBase

2006-08-02 Thread Harish Prabhu
Hi All,  During heavy load conditions, net.tinyos.tools.Listen repeats packets too many times.  I am using a Tmote Sky.  Does anyone know the reason for this ?  Is it due to the FTDI driver on the PC ( I use Windows XP) ?
  Or is it a hardware problem related to the FT232BM chip on the Tmote or CC2420 ?Regards,Harish
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Tinyos1.x,micaz mote,ATmega128,FLASH!!

2006-08-02 Thread Simon Willis
Have a look at tutorial 8. 
http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson8.html


It uses the logger component to perform datalogging into Flash. That 
should get you started.


I had problems last week using the Flash on mica2, because it was using 
the wrong PageEEPROM files. For some reason the compiler was getting the 
files from the /platform/mica directory instead of /lib/flash/AT45DB. 
This cause it to throw an error during compilation about PageEEPROM.  
I'm pretty new at TinyOS and couldn't work out how to fix it, so I just 
copied the necessary files from /lib/flash into the same directory as my 
program and it worked. I'd be interested to know if you have similar 
problems.


Simon

Munaretto, Daniel wrote:


Hi all,
i found some files in www.tinyos.net/tinyos-1.x/tos/  for using the FLASH memory. I 
transferred these files to my "FLASH" folder in tinyos-1.x/tos/lib  but now i 
don't know how to use them. Previously in this folder there were only ByteEEPROM.nc, 
ByteEEPROMC.nc, PageEEPROM.h, PageEEPROM.nc, PageEEPROMShare.nc.

My project needs more memory than the available RAM (only 4 Kbytes), so we 
think to write data on FLASH.

Does anyone know how to handle these files?  like BlockStorage.h, BlockRead.nc, 
BlockWrite.nc, FormatStorage.nc, Mount.nc, Storage.h, FlashWP.nc, 
StorageRemap.nc

Do i need other files?

Please, every help will be really appreciated!
Thanks very much,
cheers
Daniele

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Tinyos1.x,micaz mote,ATmega128,FLASH!!

2006-08-02 Thread Munaretto, Daniel
Hi all,
i found some files in www.tinyos.net/tinyos-1.x/tos/  for using the FLASH 
memory. I transferred these files to my "FLASH" folder in tinyos-1.x/tos/lib  
but now i don't know how to use them. Previously in this folder there were only 
ByteEEPROM.nc, ByteEEPROMC.nc, PageEEPROM.h, PageEEPROM.nc, PageEEPROMShare.nc.
 
My project needs more memory than the available RAM (only 4 Kbytes), so we 
think to write data on FLASH.
 
Does anyone know how to handle these files?  like BlockStorage.h, BlockRead.nc, 
BlockWrite.nc, FormatStorage.nc, Mount.nc, Storage.h, FlashWP.nc, 
StorageRemap.nc
 
Do i need other files?
 
Please, every help will be really appreciated!
Thanks very much,
cheers
Daniele

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help