Hi Mayur,

Updated the DictionaryDemo in CVS. It should now compile (it won't actually work yet - explanation in a moment) in TinyOS 2.x as long as you have the following directories included (all from the rincon contrib directory in 2.x cvs):

* /tos/lib/blackbook
* /tos/lib/blackbook/boot
* /tos/lib/blackbook/core
* /tos/lib/blackbook/interfaces

And platform-specific DirectStorage implementations:
* /tos/chips/at45db  - for mica*
* /tos/chips/stm25p  - for telosb's

It's going to compile, but there are bugs inside of Blackbook still that prevent it from working correctly. What should happen is, everytime you reboot the mote, your leds increment to show you how many times the mote has been rebooted. Right now it's getting stuck.

We have been actively working on fully debugging Blackbook and are making a lot of progress. In fact, this problem may already be solved and we'll need to update the contrib CVS. A full working version of it should be available late January/early February. Right now, it's best not to try to get a system fully operational using the current Blackbook 2.x file system implementation because of the current bugs; however, my team is moving forward with deployments. These deployments are scheduled to be released toward the end of February that are dependent upon the Blackbook file system. We're building the applications using the Blackbook interface while knowing we won't be able to fully plug it in until later on this month.

Blackbook will do everything you want it to do below, except delete the data that your mote already sent. This is a property of flash, you can write at the byte level but have to erase at a much larger size (typically 256 bytes - 65535 bytes at a time). If you're interested in implementing a circular buffer to store data, you should take a look at the LogStorage interface.

1. Create a file
  - BFileWrite.open()

2. Start writing some data
  - BFileWrite.append()

3. The other module will access this file
  - BFileRead.open() / BFileRead.read()

4. Find the read pointer to start reading from the point left on an earlier occassion and sending the read data over
   the radio
- BFileRead.seek() / BFileRead.skip(), but BFileRead.read() will automatically continue reading where you left off last time as long as you don't close the file in between.

5. The sent data after confirmation from the acks will need to be deleted.
- Can't delete data out of a file once it's been written. You'll need to close the file, delete the file, and re-open the file if you want this type of behavior.


Hope that helps,
-David





On Wed, 10 Jan 2007 23:36:14 +0530
 "Mayur Maheshwari" <[EMAIL PROTECTED]> wrote:
Hi David,

I have started building the application which will use the interfaces
provided by the File System.

I am using two modules wired together which will do the following:
1. Create a file
2. Start writing some data
3. The other module will access this file
4. Find the read pointer to start reading from the point left on an earlier
occassion and sending the read data over
   the radio
5. The sent data after confirmation from the acks will need to be deleted.

Let me know if we have the preceding interfaces which can be used by the
modules.

I started using BBFS but the first part of the problem came when I did "make telosb" of the DictionaryDemo App in its respective directory. I have copied the errors. I am using cygwin and the directory structure is like this:

/opt/msp430/..
/opt/tinyos-2.x/..
/opt/tinyos-2.x-contrib/rincon/..

I got the following errors and I am quite sure that the environment variables are not set at all for the Contrib directory. Other TinyOS 2.0 apps are compiling correctly. Let me know the if this is due to not setting the
environment variables.

Mayur [EMAIL PROTECTED] /
$ cd opt/tinyos-2.x-contrib/rincon/apps/

Mayur [EMAIL PROTECTED] /opt/tinyos-2.x-contrib/rincon/apps
$ ls
BlackbookBridge DirectStorageViewer InternalFlashViewer MediaFormat DictionaryDemo ExternalFlashViewer InternalModifyViewer tests

Mayur [EMAIL PROTECTED] /opt/tinyos-2.x-contrib/rincon/apps
$ cd DictionaryDemo/

Mayur [EMAIL PROTECTED] /opt/tinyos-2.x-contrib/rincon/apps/DictionaryDemo
$ ls
DictionaryDemoC.nc DictionaryDemoM.nc Makefile build readme.txt

Mayur [EMAIL PROTECTED] /opt/tinyos-2.x-contrib
/rincon/apps/DictionaryDemo
$ make telosb
mkdir -p build/telosb
   compiling DictionaryDemoC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow
-DDEF_TOS_AM_
GROUP=0x7d -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
-I.
./../media/STM25P -I../../ -I../../core -I../../interfaces -I../../boot
-I../.
./../../tos/lib/State   DictionaryDemoC.nc -lm
In component `DictionaryDemoC':
DictionaryDemoC.nc:48: component Main not found
DictionaryDemoC.nc:48: component BlackbookDictionaryC not found
In file included from DictionaryDemoC.nc:48:
In component `DictionaryDemoM':
DictionaryDemoM.nc:46: interface BBoot not found
DictionaryDemoM.nc :46: interface BBoot not found
DictionaryDemoM.nc:47: interface BDictionary not found
DictionaryDemoM.nc:47: interface BDictionary not found
DictionaryDemoM.nc:68: syntax error before `result_t'
DictionaryDemoM.nc :68: `booted' is not in interface `BBoot'
DictionaryDemoM.nc: In function `BBoot.booted':
DictionaryDemoM.nc:69: interface has no command or event named `init' DictionaryDemoM.nc:70: `result' undeclared (first use in this function) DictionaryDemoM.nc:70: (Each undeclared identifier is reported only once
DictionaryDemoM.nc:70: for each function it appears in.)
DictionaryDemoM.nc:71: interface has no command or event named `open'
DictionaryDemoM.nc : At top level:
DictionaryDemoM.nc:85: syntax error before `result_t'
DictionaryDemoM.nc:85: `opened' is not in interface `BDictionary'
DictionaryDemoM.nc: In function `BDictionary.opened':
DictionaryDemoM.nc :86: `result' undeclared (first use in this function) DictionaryDemoM.nc:87: interface has no command or event named `retrieve'
DictionaryDemoM.nc: At top level:
DictionaryDemoM.nc:95: syntax error before `result'
DictionaryDemoM.nc:95: `closed' is not in interface `BDictionary'
DictionaryDemoM.nc:105: syntax error before `result_t'
DictionaryDemoM.nc:105: `inserted' is not in interface `BDictionary'
DictionaryDemoM.nc:115: syntax error before `result_t'
DictionaryDemoM.nc:115: `retrieved' is not in interface `BDictionary'
DictionaryDemoM.nc: In function `BDictionary.retrieved':
DictionaryDemoM.nc :116: `result' undeclared (first use in this function) DictionaryDemoM.nc:127: interface has no command or event named `insert'
DictionaryDemoM.nc: At top level:
DictionaryDemoM.nc:135: syntax error before `result_t'
DictionaryDemoM.nc:135: `removed' is not in interface `BDictionary'
DictionaryDemoM.nc:144: syntax error before `result_t'
DictionaryDemoM.nc:144: `nextKey' is not in interface `BDictionary'
DictionaryDemoM.nc:151: syntax error before `result_t'
DictionaryDemoM.nc:151: `fileIsDictionary' is not in interface `BDictionary'
In component `DictionaryDemoC':
DictionaryDemoC.nc:50: cannot find `StdControl'
DictionaryDemoC.nc:52: no match
DictionaryDemoC.nc:53: cannot find `BDictionary'
make: *** [exe0] Error 1

Mayur [EMAIL PROTECTED] /opt/tinyos-2.x-contrib
/rincon/apps/DictionaryDemo
$



Regards
Mayur

--
Mayur Maheshwari([EMAIL PROTECTED])

"Karmanye Vadhikaraste Ma Phaleshu Kadachana,
Ma Karma Phala Hetur Bhurmatey Sangostva Akarmani"

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to