Re: [Tinyos-help] mig generates crap code

2010-09-10 Thread Bíró András
Hi,

I had this problem too, the generated code had methodes like this:

public static boolean isSigned_nx_struct ctrl_msg 10 96()

My solution was to downgrade to perl 5,10.x, but I will try your patch.

Andras Biro

On Fri, Sep 10, 2010 at 5:52 PM, Chih-Ming Hsieh
 wrote:
> Hi,
>
> I have a question about the code generation of mig. I was trying the example
> TestSerial from tutorial but the code generated by mig (java) was not
> compilable. After some digging, I figured out that migdecode.pm actually did
> the wrong parsing. I have to modify this file into following version in
> order to get the correct generated code.
>
>
> hs...@pc09:/usr/lib/ncc> diff migdecode.pm.orig migdecode.pm
> 50c50
> < for (@spec) {
> ---
>> foreach $spec(@spec) {
> 56,57c56,57
> <   split / /, $1;
> <   ($field, $type, $offset, $bitlength) = @_;
> ---
>>   @my_field = split(' ', $spec);
>>   ($field, $type, $offset, $bitlength) = @my_field;
>
> But I don't see anyone on the mailing list having the same problem, at least
> the result from the search shows that. So does anyone know whether this
> modification is necessary or just my environment has problem?
>
> I am using following packages under OpenSuse11.3
> - nesc-1.3.1-1.fc9.i386.rpm
> - tinyos-2.1.1-3.ubuntu.noarch.rpm
> - tinyos-deputy-1.1-1.fc9.i386.rpm
> - tinyos-tools-1.4.0-3.ubuntu.i386.rpm
>
> And my perl is v5.12.1.
>
>
> Thanks in advance.
>
> Best regards,
> Jimmy Hsieh
>
> ___
> 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] mig generates crap code

2010-09-14 Thread Bíró András
Hi Jimmy,

Your patch worked for me too. I reported it as bug:
https://sourceforge.net/tracker/?func=detail&aid=3066006&group_id=56288&atid=480036

Andris

2010/9/13 Chih-Ming Hsieh :
> Hi Andras,
>
> Yes, this was exactly what I encountered. Good to know that I am not the
> only one facing this problem.
>
> Best regards,
> Jimmy
>
> 2010/9/10 Bíró András 
>>
>> Hi,
>>
>> I had this problem too, the generated code had methodes like this:
>>
>> public static boolean isSigned_nx_struct ctrl_msg 10 96()
>>
>> My solution was to downgrade to perl 5,10.x, but I will try your patch.
>>
>> Andras Biro
>>
>> On Fri, Sep 10, 2010 at 5:52 PM, Chih-Ming Hsieh
>>  wrote:
>> > Hi,
>> >
>> > I have a question about the code generation of mig. I was trying the
>> > example
>> > TestSerial from tutorial but the code generated by mig (java) was not
>> > compilable. After some digging, I figured out that migdecode.pm actually
>> > did
>> > the wrong parsing. I have to modify this file into following version in
>> > order to get the correct generated code.
>> >
>> >
>> > hs...@pc09:/usr/lib/ncc> diff migdecode.pm.orig migdecode.pm
>> > 50c50
>> > < for (@spec) {
>> > ---
>> >> foreach $spec(@spec) {
>> > 56,57c56,57
>> > <   split / /, $1;
>> > <   ($field, $type, $offset, $bitlength) = @_;
>> > ---
>> >>   @my_field = split(' ', $spec);
>> >>   ($field, $type, $offset, $bitlength) = @my_field;
>> >
>> > But I don't see anyone on the mailing list having the same problem, at
>> > least
>> > the result from the search shows that. So does anyone know whether this
>> > modification is necessary or just my environment has problem?
>> >
>> > I am using following packages under OpenSuse11.3
>> > - nesc-1.3.1-1.fc9.i386.rpm
>> > - tinyos-2.1.1-3.ubuntu.noarch.rpm
>> > - tinyos-deputy-1.1-1.fc9.i386.rpm
>> > - tinyos-tools-1.4.0-3.ubuntu.i386.rpm
>> >
>> > And my perl is v5.12.1.
>> >
>> >
>> > Thanks in advance.
>> >
>> > Best regards,
>> > Jimmy Hsieh
>> >
>> > ___
>> > 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] sendDone() never called

2008-10-15 Thread Bíró András
Hello,

I'm new in tinyos, and get that problem in the RadioCountMsg tutorial 
program with the packets.py TOSSIM script. I used the meyer-heavy.txt 
for the noise model and my topo.txt is this:

1  2 -54.0
2  1 -55.0
1  3 -60.0
3  1 -60.0
2  3 -64.0
3  2 -64.0

just like in the tutorial. And the output is:

DEBUG (0): RadioCountToLedsC: timer fired, counter is 1.
DEBUG (0): RadioCountToLedsC: packet sent.
Delivering  Message 
   [counter=0x7]
   to 0 at  3172603258
DEBUG (0): Received packet of length 2.
DEBUG (0): LEDS: Led0 on.
DEBUG (0): LEDS: Led1 on.
DEBUG (0): LEDS: Led2 on.

I've also added a dbg() line into the AMSend.sendDone(..) event, so I'm 
sure that the problem is between the send and the sendDone event.

So what could be the problem?

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


Re: [Tinyos-help] Any new development for the Atmega128RFA1?

2010-11-20 Thread Bíró András
Hello!

First of all, sorry for the late answer. We're and Philipp Sommer is
working on it:
http://szte-wsn.svn.sourceforge.net/
https://github.com/phsommer/tinyos-main/
In our version (szte-wsn), the radio (only basic oparation mode), i2c,
uart and timers are working and tested.
We're using avr-libc 1.6.8. (you can found packages on our sourceforga page)

Andris

On Mon, Nov 8, 2010 at 2:36 PM, Anderson Jr Nascimento
 wrote:
> Hello all,
> Recently there have been (at least) two development boards come out for the
> new Atmega128RFA1. One is sold by Sparkfun
> (http://www.sparkfun.com/commerce/product_info.php?products_id=9734) and the
> other is sold by a German company Dresden Elektronik
> (http://www.dresden-elektronik.de/shop/prod111.html?language=en).
> I was wondering if anyone has picked up one of those, or otherwise has
> started any TinyOS development for this chip.
> Thanks,
> Anderson
> ___
> 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] How to sample the light sensor?

2011-07-11 Thread Bíró András
Then it depends on the sensorboard: If you're using mts3xx or mts1xx,
it's called PhotoC. On mts400 it's called Taos2550C.

Andris

On Mon, Jul 11, 2011 at 8:14 PM, Geo Gkolfin  wrote:
> I am using iris motes...
> ___
> 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] How to sample the light sensor?

2011-07-14 Thread Bíró András
On Thu, Jul 14, 2011 at 6:44 PM, Geo Gkolfin  wrote:
> Hello,
> I still cannot get it! In the beginning I had included DemoSensorC component
> wired with  Read interface and everything worked fine. In order to use the
> light sensor instead I replaced (at MineAppC.nc):
> components new DemoSensorC() as Sensor;
> with:
> components new PhotoC();
> and also replaced:
> App.Read -> Sensor;
> with:
> App.Read -> PhotoC;
> At MineC.nc I have:
> uses interface Read;

That seems good.

> I execute "make iris" and I get:
> In component `ThisAppC':
> ThisAppC.nc:18: component PhotoC not found
> ThisAppC.nc:18: component `PhotoC' is not generic
> ThisAppC.nc:29: no match
> make: *** [exe0] Error 1
> The tinyos-2.1.0/tos/sensorboards/mts300/PhotoC.nc looks different than the
> .nc files in tos/interfaces directory and it confuses me a lot, but at least
> it describes PhotoC as generic:
> "generic configuration PhotoC()"

The error message is confusing, but the point is "not found".

> I am very confused. What do I miss? Must I add something in Makefile too?

Yes, that's your problem. Try adding this line:

SENSORBOARD=mts300

Andris

> Any help would be appreciated!
> Thank in advance,
> Georgia
>
>
>
>
>
>
> 2011/7/11 Bíró András 
>>
>> 2011/7/11 Geo Gkolfin :
>> > So I will use it as described in tinyos-2.1.0/tos/sensorboards, right?
>>
>> I don't have this file, so I don't know.
>> But check the /apps/test library, it's a good place to start, if
>> there's no documentation.
>> eg. mts300: /apps/tests/mts300/PhotoTemp/
>>
>> Andris
>> Q
>> > Thank you very much!!!
>> > Georgia
>> >
>> > 2011/7/11 Bíró András 
>> >>
>> >> Then it depends on the sensorboard: If you're using mts3xx or mts1xx,
>> >> it's called PhotoC. On mts400 it's called Taos2550C.
>> >>
>> >> Andris
>> >>
>> >> On Mon, Jul 11, 2011 at 8:14 PM, Geo Gkolfin 
>> >> wrote:
>> >> > I am using iris motes...
>> >> > ___
>> >> > 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] How to build updated toolchain for AVR8

2011-08-08 Thread Bíró András
Hello!

You could use the newest toolchain, there won't be any compilation
errors, but some code doesn't work with that, probably becouse the
better optimization in gcc (I had problems with the rf230 radio and
the at45db flash chips).

Current toolchain: binutils 2.17; gcc 4.1.2; avr-libc 1.4.7, avrdude 5.4

SVN version: Probably this will be the toolchain for the next tinyos
release. The main reason to update is the atmega128rfa1 support.

Patches: Most of them came from the winavr project (and they're
usually backport bugfixes from the newer toolchain):
http://winavr.cvs.sourceforge.net/viewvc/winavr/patches/ except:
-dollarsign.patch (for backward compatibility: nesc did need it some time ago)
-rfa1-*.patch (atm128rfa1 support)
-makeinfo411.patch (needed to compile binutils info files with
makeinfo 4.11 and newer)

Patches at Razvan's repository: these are also winavr patches and the
dollar sign patch, but merged into one file per package.

Andris

On Sun, Aug 7, 2011 at 6:01 PM, Martin Cerveny  wrote:
> Hello.
>
> What is the up-to-date version and patchset of toolchain for TinyOS on AVR 
> platforms ?
> Does anyone analyzed/combined patches from many sources ?
> Why the tinyos using older releases, will be updated ?
>
> Thanks for answers, Martin Cerveny
>
> ---
>
> I found following:
>
> GNU sources (without patches):
>
> binutils:       2.21
> gcc:            4.5.3 (4.6.1 is problematic)
> avr-libc:       1.7.1
> nesc:           1.3.3
> avarice:        2.10
> avrdude:        5.10
> gdb:            7.3
> simulavr:       0.1.2.7
>
> TinyOS CVS (tools/avr-toolchain):
>
> binutils:       2.17 + patches
> gcc:            4.1.2 + patches
> avr-libc:       1.6.7
> nesc:           1.3.1
> avarice:        -
> avrdude:        5.10
> gdb:            -
> simulavr:       -
>
> Toolchain by Razvan (git://hinrg.cs.jhu.edu/git/razvanm/tinyos-2.x.git 
> tools/avr):
>
> binutils:       2.17 + patches
> gcc:            4.1.2 + patches
> avr-libc:       1.4.7
> nesc:           1.3.3
> avarice:        -
> avrdude:        5.4
> gdb:            -
> simulavr:       -
>
> Toolchain by Atmel 
> (http://www.atmel.com/dyn/resources/prod_documents/avr8-gnu-toolchain-3.2.3.314-readme.pdf)
>
> binutils:       2.20.1 + patches?
> gcc:            4.5.1 + patches?
> avr-libc:       1.7.1 + patches?
> nesc:           -
> avarice:        -
> avrdude:        -
> gdb:            6.7.1 + patches?
> simulavr:       -
>
> Toolchain by avr-libc 
> (http://www.nongnu.org/avr-libc/user-manual/install_tools.html) with
> recommened patches from freebsd.org (http://www.freebsd.org/ports/devel.html):
>
> binutils:       2.20_1
> gcc:            3.4.6_1/4.2.4_2/4.3.4_2
> avr-libc:       1.7.0,1
> nesc:           -
> avarice:        2.10
> avrdude:        5.10
> gdb:            6.8
> simulavr:       0.1.2_16
>
> Debian (with patches, stable/unstable):
>
> binutils:       2.20.1-1/2.20.1-2
> gcc:            4.3.5-1/4.5.3-1
> avr-libc:       1.6.8-2/1.7.1-2
> nesc:           -
> avarice:        2.10-3/2.10-3
> avrdude:        5.10-3/5.10-3
> gdb:            6.4.90.dfsg-3/7.2-1
> simulavr:       0.1.2.2-6.1/0.1.2.2-6.1
>
> 
> ___
> 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] TinyOS with msp-gcc-4.4.2: no known targets

2011-08-11 Thread Bíró András
Hello Tobe,

If you installed tinyos 2.1.1 from a debian package, your TOSROOT
should point to /opt/tinyos-2.1.1
I don't have much experience with the msp430 platforms,  but I had
problems with newer gcc on avr (some chips didn't work)

Andris

On Thu, Aug 11, 2011 at 2:26 PM, Klunz  wrote:
> Hello everyone,
>
> I'm working on a API that already supports MantisOS and FreeRTOS and am
> supposed to integrate TinyOS-support into this API.
> I have a toolchain with msp-gcc-4.4.2, that is working fine for Mantis and
> FreeRTOS.
>
> I now just added the necessary packages to set up TinyOS by simply following
> the instructions here:
> http://docs.tinyos.net/tinywiki/index.php/Installing_TinyOS_2.1.1#Two-step_install_on_your_host_OS_with_Debian_packages,
> starting with step 4.
>
> When I try to compile the Blink example application I get the following
> error:
>
>
>
>
> [tobe@camboinhas:apps/Blink]$ make telosb
> mkdir -p build/telosb
>     compiling BlinkAppC to a telosb binary
> ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -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=\"tobe\" -DIDENT_HOSTNAME=\"camboinhas\"
> -DIDENT_USERHASH=0xe22c913bL -DIDENT_TIMESTAMP=0x4e43c76cL
> -DIDENT_UIDHASH=0xb16798d6L  BlinkAppC.nc -lm
> Unknown target telosb
> Known targets for TinyOS directory $TOSROOT/tos
> and the specified include directories are:
> none.
> make: *** [exe0] Fehler 2
>
>
>
> I read here that this error is mostly caused by an incorrect environment
> set-up.
> However, printenv gives me:
>
> 
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/msp430-gcc-4.4.2/bin
> 
> TOSROOT=/opt/tinyos-2.x
> TOSDIR=$TOSROOT/tos
> MAKERULES=/opt/tinyos-2.x/support/make/Makerules
> CLASSPATH=/opt/tinyos-2.x/support/sdk/java/tinyos.jar:.
>
>
> so I guess its set-up correct.
>
>
> I have to admit I am fairly new to the whole thing, so I might very well do
> some very basic mistake.
> Looking at older messages on this list I'm not entirely sure if
> msp430-gcc-4.4.2 is even working with what I installed.
>
> Andy help is greatly appreciated, thanks in advance
>
> Sincerely
> tobe
>
>
>
>
>
>
>
>
> ___
> 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] How to upgrade avr-gcc in tinyos to a newer version?

2011-08-16 Thread Bíró András
Hello!

Use this repository:
http://tinyos.stanford.edu/tinyos/dists/ubuntu/
It has a patched toolchain with rfa1 support. Upgrading gcc may cause
problems (better optimisation reveals unfixed bugs in tinyos), but
it's needless for rfa1 support. Binutils and gcc only have to know
that rfa1 uses avr5 asm, and its memory limits.

By the way, we wrote a bunch of rfa1 code (which will probably go to
the main tinyos svn):
http://sourceforge.net/projects/szte-wsn/develop

Andris

On Tue, Aug 16, 2011 at 10:43 AM, soahil shuaib  wrote:
> Hello everyone!
> The avr-gcc version that comes with TinyOS is 4.1.2. I am working on
> atmega128rfa1 and it is not supported by this version. The least version
> that supports it is 4.3.2. Now i tried to install gcc-avr (version  4.3.3-1
> as it appears) using Synaptic package manager in Ubuntu and ended up getting
> errors of the like
>
> E: /var/cache/apt/archives/binutils-avr_2.18-4ubuntu1_i386.deb: trying to
> overwrite '/usr/bin/avr-size', which is also in package avr-binutils-tinyos
> 0
> E: /var/cache/apt/archives/gcc-avr_1%3a4.3.3-1_i386.deb: trying to overwrite
> '/usr/bin/avr-gcov', which is also in package avr-gcc-tinyos 0
>
> If any could help me and suggest some solution to this problem it would be
> really appreciated.
>
> Each day new devices are being released and older version of the gcc
> compiler in the toolchain do not support these devices anymore. Why not we
> have the latest versions of compilers and other necessary tools in the
> TinyOS toolchain. It would definitely relieve many of us from troubles and
> errors. I would like the community to discuss this topic.
>
> Thank you very much.
>
>
> Regards,
> Sohail
>
> ___
> 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] How to upgrade avr-gcc in tinyos to a newer version?

2011-08-16 Thread Bíró András
Hello,

First of all, your original problem:
You need to remove the tinyos avr toolchain to install an other one
(avr-binutils-tinyos, etc). Sorry, I should have write this in my
previous mail.

2011/8/16 Martin Cerveny :
> Hello.
>
> On Tue, 16 Aug 2011, Bíró András wrote:
>>
>> Upgrading gcc may cause
>> problems (better optimisation reveals unfixed bugs in tinyos).
>
> Is there any document/links (i do not see any issue in
> http://code.google.com/p/tinyos-main/issues/list)
> where the problems are described ?

No, this is only my experience. (When I first needed rfa1 support, I
tried the avr toolchain came with my linux distro. That was gcc 4.5.?
and binutils 2.20.) I don't remember clearly, but I think I had
problems with rf230 and/or at45db on iris.

> I need newer avr toolchain (atmega1284p and leter for atmega644p).

I think 644p is supported in the stanford repository toolchain.
I still think it's easier to patch the old toolchain (and newer libc).

If you decide to patch (or compile from source), try these scripts:
http://tinyos-main.googlecode.com/svn/trunk/tools/avr-toolchain/

I used this to create the deb packages in the stanford repository (and
the rpms on our sourceforge page). It's easy to add a patch, and it
should be easy to change the version.
Check the winavr project, they have patches for 1284p support for
binutils 2.19/gcc 4.2.2. It's easy to correct the patches for binutils
2.17/gcc 4.1.2, I did the same with rfa1.

Andris

> Now I applied some patches for bintuls2.19/gcc4.5.3 and compile with "-O0".
>
> Thanks, Martin Cerveny

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


Re: [Tinyos-help] How to upgrade avr-gcc in tinyos to a newer version?

2011-08-16 Thread Bíró András
Hello Sohail,

2011/8/16 soahil shuaib :
> Dear Andris,
> Thank you very much for the information.
> Let me take some more guidance and help from you.
> After looking for quite a while at the Stanford repository, i think i should
> do the following (i am newbie to linux)
>
> Check what distribution of Ubuntu i am using (i am using jaunty)
> See what debian packages are released for that distro
> Install them

Yes, this should work, but there's an easyer way:
https://help.ubuntu.com/community/Repositories/Ubuntu#Adding%20Other%20Repositories
The standord repositorys apt line for jaunty is: "deb
http://tinyos.stanford.edu/tinyos/dists/ubuntu/ jaunty"

> I already have a tinyos installation, would the above steps remove the
> previous installation. Would it work if i just install the avr-gcc debian
> package?

The tinyos packages (nesc, tinyos, tinyos-tools) are completly
independent from the toolchains.
The packages from the stanford repo should remove the official ubuntu
toolchain, and update the tinyos toolchain and the official ubuntu
toolchain should remove the standord packages. If they won't then
there's a bug in the package descriptors, please inform me of it.

Andris

> I would be really grateful if you could give some more help. correct me if i
> am following the wrong strategy and describe the necessary course of actions
> a bit more specifically.
>
> Your work with rfa1 would be really helpful. Thank you for sharing the
> information.
>
>
> Regards,
> Sohail
>
>
>
>
> 
> From: Bíró András 
> To: soahil shuaib 
> Cc: "tinyos-help@millennium.berkeley.edu"
> 
> Sent: Tuesday, August 16, 2011 3:34 PM
> Subject: Re: [Tinyos-help] How to upgrade avr-gcc in tinyos to a newer
> version?
>
> Hello!
>
> Use this repository:
> http://tinyos.stanford.edu/tinyos/dists/ubuntu/
> It has a patched toolchain with rfa1 support. Upgrading gcc may cause
> problems (better optimisation reveals unfixed bugs in tinyos), but
> it's needless for rfa1 support. Binutils and gcc only have to know
> that rfa1 uses avr5 asm, and its memory limits.
>
> By the way, we wrote a bunch of rfa1 code (which will probably go to
> the main tinyos svn):
> http://sourceforge.net/projects/szte-wsn/develop
>
> Andris
>
> On Tue, Aug 16, 2011 at 10:43 AM, soahil shuaib  wrote:
>> Hello everyone!
>> The avr-gcc version that comes with TinyOS is 4.1.2. I am working on
>> atmega128rfa1 and it is not supported by this version. The least version
>> that supports it is 4.3.2. Now i tried to install gcc-avr (version
>> 4.3.3-1
>> as it appears) using Synaptic package manager in Ubuntu and ended up
>> getting
>> errors of the like
>>
>> E: /var/cache/apt/archives/binutils-avr_2.18-4ubuntu1_i386.deb: trying to
>> overwrite '/usr/bin/avr-size', which is also in package
>> avr-binutils-tinyos
>> 0
>> E: /var/cache/apt/archives/gcc-avr_1%3a4.3.3-1_i386.deb: trying to
>> overwrite
>> '/usr/bin/avr-gcov', which is also in package avr-gcc-tinyos 0
>>
>> If any could help me and suggest some solution to this problem it would be
>> really appreciated.
>>
>> Each day new devices are being released and older version of the gcc
>> compiler in the toolchain do not support these devices anymore. Why not we
>> have the latest versions of compilers and other necessary tools in the
>> TinyOS toolchain. It would definitely relieve many of us from troubles and
>> errors. I would like the community to discuss this topic.
>>
>> Thank you very much.
>>
>>
>> Regards,
>> Sohail
>>
>> ___
>> 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] How to upgrade avr-gcc in tinyos to a newer version?

2011-08-16 Thread Bíró András
Hello Sohail,

Sorry, I just realized: jaunty is really old (and unsopported by
canonical), you can't install the new toolchain from the repository
(it needs glibc 2.13, which is released with lucid). If you really
want to use jaunty, you should compile the packages for yourself with
the scripts I mentioned earlier
(http://tinyos-main.googlecode.com/svn/trunk/tools/avr-toolchain/).

Andris

2011/8/16 Bíró András :
> Hello Sohail,
>
> 2011/8/16 soahil shuaib :
>> Dear Andris,
>> Thank you very much for the information.
>> Let me take some more guidance and help from you.
>> After looking for quite a while at the Stanford repository, i think i should
>> do the following (i am newbie to linux)
>>
>> Check what distribution of Ubuntu i am using (i am using jaunty)
>> See what debian packages are released for that distro
>> Install them
>
> Yes, this should work, but there's an easyer way:
> https://help.ubuntu.com/community/Repositories/Ubuntu#Adding%20Other%20Repositories
> The standord repositorys apt line for jaunty is: "deb
> http://tinyos.stanford.edu/tinyos/dists/ubuntu/ jaunty"
>
>> I already have a tinyos installation, would the above steps remove the
>> previous installation. Would it work if i just install the avr-gcc debian
>> package?
>
> The tinyos packages (nesc, tinyos, tinyos-tools) are completly
> independent from the toolchains.
> The packages from the stanford repo should remove the official ubuntu
> toolchain, and update the tinyos toolchain and the official ubuntu
> toolchain should remove the standord packages. If they won't then
> there's a bug in the package descriptors, please inform me of it.
>
> Andris
>
>> I would be really grateful if you could give some more help. correct me if i
>> am following the wrong strategy and describe the necessary course of actions
>> a bit more specifically.
>>
>> Your work with rfa1 would be really helpful. Thank you for sharing the
>> information.
>>
>>
>> Regards,
>> Sohail
>>
>>
>>
>>
>> 
>> From: Bíró András 
>> To: soahil shuaib 
>> Cc: "tinyos-help@millennium.berkeley.edu"
>> 
>> Sent: Tuesday, August 16, 2011 3:34 PM
>> Subject: Re: [Tinyos-help] How to upgrade avr-gcc in tinyos to a newer
>> version?
>>
>> Hello!
>>
>> Use this repository:
>> http://tinyos.stanford.edu/tinyos/dists/ubuntu/
>> It has a patched toolchain with rfa1 support. Upgrading gcc may cause
>> problems (better optimisation reveals unfixed bugs in tinyos), but
>> it's needless for rfa1 support. Binutils and gcc only have to know
>> that rfa1 uses avr5 asm, and its memory limits.
>>
>> By the way, we wrote a bunch of rfa1 code (which will probably go to
>> the main tinyos svn):
>> http://sourceforge.net/projects/szte-wsn/develop
>>
>> Andris
>>
>> On Tue, Aug 16, 2011 at 10:43 AM, soahil shuaib  wrote:
>>> Hello everyone!
>>> The avr-gcc version that comes with TinyOS is 4.1.2. I am working on
>>> atmega128rfa1 and it is not supported by this version. The least version
>>> that supports it is 4.3.2. Now i tried to install gcc-avr (version
>>> 4.3.3-1
>>> as it appears) using Synaptic package manager in Ubuntu and ended up
>>> getting
>>> errors of the like
>>>
>>> E: /var/cache/apt/archives/binutils-avr_2.18-4ubuntu1_i386.deb: trying to
>>> overwrite '/usr/bin/avr-size', which is also in package
>>> avr-binutils-tinyos
>>> 0
>>> E: /var/cache/apt/archives/gcc-avr_1%3a4.3.3-1_i386.deb: trying to
>>> overwrite
>>> '/usr/bin/avr-gcov', which is also in package avr-gcc-tinyos 0
>>>
>>> If any could help me and suggest some solution to this problem it would be
>>> really appreciated.
>>>
>>> Each day new devices are being released and older version of the gcc
>>> compiler in the toolchain do not support these devices anymore. Why not we
>>> have the latest versions of compilers and other necessary tools in the
>>> TinyOS toolchain. It would definitely relieve many of us from troubles and
>>> errors. I would like the community to discuss this topic.
>>>
>>> Thank you very much.
>>>
>>>
>>> Regards,
>>> Sohail
>>>
>>> ___
>>> 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] How to upgrade avr-gcc in tinyos to a newer version?

2011-08-17 Thread Bíró András
Hello, Sohail.

2011/8/17 soahil shuaib :
> Dear Andris,
> Thank you for the detailed information.
> At the university lab i have the karnic distribution of ubuntu.

The new packages will only work on lucid (10.04) and newer (the older
distros are unsopported by canonical too). For older distros (like
karmic), you need to compile them for yourself with the
/tools/avr-toolchain scripts.

Andris

> Using the above mentioned distro I added the stanford repository in my
> software sources. Then using Synaptic package manager i choose the stanford
> repository as my origin and reinstalled all the tinyos tools.
> Then as a test when i make the Null app it compiles to success for all the
> platforms except rfa1.
>
> But still it is not working for the rfa1. May be my methodology was wrong or
> something else that i cant say.
> I am using the code developed for rcb128rfa1 by Philllip Sommer downloaded
> from
>
> https://github.com/phsommer/tinyos-main
>
> Looking forward for your helping comments.
>
>
> Regards,
> Sohail
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Has anyone used AVRISP mk2 with tinyos?

2011-08-18 Thread Bíró András
Sohail,

I think the avrdude in the stanford repository (5.10) has usb support.
At least I used it with -Pusb for avrdragon.

Andris

On Thu, Aug 18, 2011 at 11:22 AM, soahil shuaib  wrote:
> Dear Mr. Janos,
> Thank you for the information.
> Tinyos uses avrdude for programming avr platforms. When i compile an
> application and install it using AVRISP mk2 and give the usb device name, it
> returns error. The possible reason , as you have describesd, is that the
> avrdude does not support usb. Moreover it tries to access the parallel port
> for programming instead of usb serial port.
> One possible solution could be like this:
>
> Take the ihex file that is produced
> Program the platform with that ihex using avrdude (as you have mentioned) or
> more easily with avr studio.
>
>  Is the above strategy right?
>
> Regards,
> Sohail
>
> 
> From: Janos Sallai 
> To: soahil shuaib 
> Cc: tinyos forum 
> Sent: Monday, August 15, 2011 8:07 PM
> Subject: Re: [Tinyos-help] Has anyone used AVRISP mk2 with tinyos?
>
> Sohail:
>
> You will need an avrdude with USB support. Just get the sources, also
> the sources of libusb, and compile your own. The one that can be
> downloaded from tinyos.net will not work.
>
> Janos
>
> On Sat, Aug 13, 2011 at 5:28 AM, soahil shuaib  wrote:
>> Hello everyone!
>>
>>
>> Has anyone used the in-system programmer AVRISP mk2 for programming using
>> tinyos? Tinyos supports AVRISP and i was trying to use the mentioned
>> programmer but faced errors.
>>
>> Any help in this regard would be appreciated.
>>
>> Thanks,
>> Sohail
>>
>>
>>
>>
>> ___
>> 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 mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Has anyone used AVRISP mk2 with tinyos?

2011-08-19 Thread Bíró András
Sorry, thats my mistake, I forgot to install libusb-dev before
compiling avrdude. Here are the recompiled packages with usb support:
http://shell.sch.bme.hu/~biroandris/pkg/
They will also be in the repository soon.

Andris

2011/8/19 soahil shuaib :
> Dear Janos Sallai,
> As per the command line you mentioned, i entered the following to compile
> and install the Blink application on my platform:
>
> PROGRAMMER=avrdude make rcb128rfa1 install,1 avrispmkii,usb
>
> It worked fine and the application compiled. But when it came to avrdude
> programming the platform, the following was the output and it ended in an
> error:
>
> installing rcb128rfa1 binary using avrispmkii
> avrdude -cavrispmkII -Pusb -U hfuse:w:0x99:m -pm128rfa1 efuse:w:0xff:m
> -C/etc/avrdude/avrdude.conf  -U flash:w:build/rcb128rfa1/main.srec.out-123:a
> avrdude was compiled without usb support.
>
> avrdude done.  Thank you.
>
> make: *** [program] Error 1
>
> It appears that avrdude does not recognizes the usb. I am using a linux
> distro and tinyos was installed using stanford repository.
> Any help or suggestion would be really appreciated.
> Thanks,
> Sohail
>
>
>
>

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


Re: [Tinyos-help] Problems faced while Compiling "RadioCountToLeds" for the rfa1 platform

2011-08-23 Thread Bíró András
Hi Sohail,

If you're using the rfa1 codes of Philip Sommer or us
(szte-wsn.sf.net), you should use it with tinyos-svn.

Andris

2011/8/23 soahil shuaib :
> Dear All,
>
> I am compiling the "RadioCountToLeds" app for the rfa1 platform for the
> radio performance. I encountered many errors. Initially the compiler
> reported that it could not find interfaces defined in the RFA1RadioP.nc like
> SoftwareAckConfig, UniqueConfig, CsmaConfig  etc.
> To solved this problem i found the definition of these files in rf2xx folder
> (in tinyos-2.1.1) in chips. Copied them to the folder
> /chips/atm128rfa1/radio The above errors are resolved. But some other
> unresolvable errors are occurring like (a few snippets of the actual message
> are copied in italics below )
> In component `RFA1RadioC':
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioC.nc:111: component
> `RadioAlarmC' is not generic
>
> In component `RFA1RadioP':
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioP.nc:223: `getBytes'
> is not in interface `TrafficMonitorConfig'
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioP.nc:70:
> `TrafficMonitorConfig.getUpdatePeriod' not implemented
>
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioC.nc:242: component
> `SoftwareAckLayerC' is not generic
>
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc:236:
> implicit declaration of function `RADIO_ASSERT'
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc: In
> function `changeState':
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc:259:
> implicit declaration of function `RADIO_ASSERT'
> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc: In
> function `RadioSend.send':
> I am hopeful that above information would be sufficient for you in
> understanding the problem.
>
> Looking forward for your helping comments.
>
> Thanks and regards,
> Sohail
>
>
>
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Problems faced while Compiling "RadioCountToLeds" for the rfa1 platform

2011-08-23 Thread Bíró András
Sorry, I didn't remember correctly. If you're using Philipp Sommer's
git, you don't need tinyos main, just check out and set up the
TOSROOT, TOSDIR, MAKERULES, CLASSPATH variables.
If you're using our code (szte-wsn.sf.net), you should check out
tinyos-main and copy the /tos/chips/atm128rfa1 from our repository to
the the tinyos-main source tree.

Andris

2011/8/23 soahil shuaib :
> Dear Andirs,
> Thanks for the information.
> I typed tinyos svn in google and it took me to following
>
> http://code.google.com/p/tinyos-main/source/browse/
> Now when i checked under the head of platforms, i could not find any
> platforms of rfa1. Neither was there there atmrfa1 under the head of chips.
> Would you give the address where i can find tinyos svn.
>
> Thanks and regards,
> Sohail
> 
> From: Bíró András 
> To: soahil shuaib 
> Cc: tinyos 
> Sent: Tuesday, August 23, 2011 12:42 PM
> Subject: Re: Problems faced while Compiling "RadioCountToLeds" for the rfa1
> platform
>
> Hi Sohail,
>
> If you're using the rfa1 codes of Philip Sommer or us
> (szte-wsn.sf.net), you should use it with tinyos-svn.
>
> Andris
>
> 2011/8/23 soahil shuaib :
>> Dear All,
>>
>> I am compiling the "RadioCountToLeds" app for the rfa1 platform for the
>> radio performance. I encountered many errors. Initially the compiler
>> reported that it could not find interfaces defined in the RFA1RadioP.nc
>> like
>> SoftwareAckConfig, UniqueConfig, CsmaConfig  etc.
>> To solved this problem i found the definition of these files in rf2xx
>> folder
>> (in tinyos-2.1.1) in chips. Copied them to the folder
>> /chips/atm128rfa1/radio The above errors are resolved. But some other
>> unresolvable errors are occurring like (a few snippets of the actual
>> message
>> are copied in italics below )
>> In component `RFA1RadioC':
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioC.nc:111: component
>> `RadioAlarmC' is not generic
>>
>> In component `RFA1RadioP':
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioP.nc:223: `getBytes'
>> is not in interface `TrafficMonitorConfig'
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioP.nc:70:
>> `TrafficMonitorConfig.getUpdatePeriod' not implemented
>>
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1RadioC.nc:242: component
>> `SoftwareAckLayerC' is not generic
>>
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc:236:
>> implicit declaration of function `RADIO_ASSERT'
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc: In
>> function `changeState':
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc:259:
>> implicit declaration of function `RADIO_ASSERT'
>> /opt/tinyos-2.1.1/tos/chips/atm128rfa1/radio/RFA1DriverLayerP.nc: In
>> function `RadioSend.send':
>> I am hopeful that above information would be sufficient for you in
>> understanding the problem.
>>
>> Looking forward for your helping comments.
>>
>> Thanks and regards,
>> Sohail
>>
>>
>>
>
>
>

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


Re: [Tinyos-help] about micaz

2011-09-28 Thread Bíró András
Hi Mohamed,

The transmit power of the cc2420 (and any 802.15.4 chip) is really
low: 0dBm=1mW (about 0.3mA at 3.3V). However a received packet needs
much more signal processing then a transmitted one (check the block
diagram: 
http://www.ti.com/general/docs/datasheetdiagram.tsp?diagramId=SWRS041B&genericPartNumber=CC2420&isFunctional=Y&isFunctional=Y).

Andris

On Wed, Sep 28, 2011 at 9:14 PM, Mohamed Maalej  wrote:
> Hi all,
> Concerning the Micaz mote, when I take a look on its datasheet I read that
> the receive mode (19.7 mA) consumes more energy than the transmit mode (17.4
> mA) thing that is unusual (see datasheet of mica2 mote for example).
> Can you explain to me what is the reason, or if I'm missing something ?
>
> --
> Mohamed Maâlej
> Tél: 96481112
>
> ___
> 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] Interfacing with iris motes

2011-10-10 Thread Bíró András
Hi,

You will need the file tos/platforms/mica/MicaBusC.nc. This config
provides almost all the pins as GeneralIO, and gives you 8 ADC.
There's also an i2c, spi and usart, which you can use directly from
the mcu driver.

Andris

On Mon, Oct 10, 2011 at 5:09 PM, srikanth pasumarthy
 wrote:
> My project is on home automation where we would like to remotely control
> electrical appliances.
>
>   We need to interface our circuit with iris mote using 51 pin expansion
> connector. But, in all the docs I have seen they are interfacing sensor
> boards with motes and couldn't get idea of how to use these 51 pins without
> sensor board.
>
> Is there some way we can program and use some pins(of 51) as digital I/O
> pins?
> ___
> 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] Interfacing with iris motes

2011-10-10 Thread Bíró András
Hi Srkanth,

There's not much example code as far as I know. Check the
tos/sensorboards/mts300, mts400 and mda100 sensorboard drivers' lower
levels.
There's also a TEP about low level IO (you should probably start with this):
http://www.tinyos.net/tinyos-2.1.0/doc/html/tep117.html

Andris

2011/10/10 srikanth pasumarthy :
> Hi Andris,
>    Thank you very much for quick reply and information.
>    Can you share with me any materials/tutorials/examples which involves
> usage of any of these 51 pins.
> Srikanth.
>
> 2011/10/10 Bíró András 
>>
>> Hi,
>>
>> You will need the file tos/platforms/mica/MicaBusC.nc. This config
>> provides almost all the pins as GeneralIO, and gives you 8 ADC.
>> There's also an i2c, spi and usart, which you can use directly from
>> the mcu driver.
>>
>> Andris
>>
>> On Mon, Oct 10, 2011 at 5:09 PM, srikanth pasumarthy
>>  wrote:
>> > My project is on home automation where we would like to remotely control
>> > electrical appliances.
>> >
>> >   We need to interface our circuit with iris mote using 51 pin expansion
>> > connector. But, in all the docs I have seen they are interfacing sensor
>> > boards with motes and couldn't get idea of how to use these 51 pins
>> > without
>> > sensor board.
>> >
>> > Is there some way we can program and use some pins(of 51) as digital I/O
>> > pins?
>> > ___
>> > 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] net.tinyos.tools.Listen and Micaz

2011-10-11 Thread Bíró András
Hell Sghaier,

You're probably using a mib520 programming board, which has two
virtual serial port, the first one for programming, the second one for
communicating. If you have no other usb serial device, then you should
listen on ttyUSB1.

Andris

On Tue, Oct 11, 2011 at 6:24 PM, Nouha Sghaier  wrote:
> Hello,
>
> I'm using Xubuntos on Vmware for programming my micaz with TinyOS2.x
> applications.
> I followed instructions in lesson 4 about Mote-PC serial communication and
> SerialForwarder
> (http://www.tinyos.net/dist-2.0.0/tinyos-2.0.0/doc/html/tutorial/lesson4.html)
> and I'm facing a problem with java net.tinyos.tools.Listen command.
>
> I installed BaseStation application on a mote and BlinkToRadio application
> on another and when I type java net.tinyos.tools.Listen, the screen is stuck
> in:
> Serial@/dev/ttyUSB0:57600:resynchronising
>
> and no data is displayed!!!
>
> Could someone help me please resolve this problem?
>
> Thank you.
> Nouha SGHAIER
>
>
> ___
> 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] TinyOS setup problem

2011-10-13 Thread Bíró András
Hi Max,

That avr-gcc is really old. Try to reinstall every avr related package
from this repository:
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu/ lucid main

Andris

On Thu, Oct 13, 2011 at 2:06 PM, Morgan Reeves
 wrote:
> Hi Everyone,
>
> I have spent the last 3 hours trying to fix this and I'm totally stuck, so
> I'm hoping someone can at least prod me forward towards a solution. I run
> linux 10.04 and I installed following the TinyOS website.  I tried the
> karmic, lucid, and hardy versions, and even the "apt-get upgrade tinyos",
> yet the problem remains.  That is, when I call "make micaz" I get:
>
> mkdir -p build/micaz
>     compiling SimpleAppC 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 -finline-limit=10
> -DIDENT_APPNAME=\"SimpleAppC\" -DIDENT_USERNAME=\"maxwell\"
> -DIDENT_HOSTNAME=\"maxwell-laptop\" -DIDENT_USERHASH=0xf0d57439L
> -DIDENT_TIMESTAMP=0x4e96d083L -DIDENT_UIDHASH=0x6400933dL -fnesc-dump=wiring
> -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
> components)' -fnesc-dumpfile=build/micaz/wiring-check.xml SimpleAppC.nc -lm
> In file included from /opt/tinyos-2.1.1/tos/system/TinySchedulerC.nc:41:
> In component `McuSleepC':
> /opt/tinyos-2.1.1/tos/chips/atm128/McuSleepC.nc: In function
> `McuSleep.sleep':
> /opt/tinyos-2.1.1/tos/chips/atm128/McuSleepC.nc:102: implicit declaration of
> function `pgm_read_byte'
> make: *** [exe0] Error 1
>
> I have seen this `pgm_read_byte' issue crop up many times on the forums, but
> never solved so far as I can tell. If it is useful, I checked:
>
> maxwell@XXX:~/Simple$ avr-gcc --version
> avr-gcc (GCC) 3.3-tinyos
>
> I cannot locate "pgmspace.h" whch is related to this `pgm_read_byte'. My
> directory /usr/avr/ holds only bin and lib, and a grep search yields
> nothing.
>
> Can someone point me in the right direction here?  Much thanks in advance,
> -Max
>
>
>
> ___
> 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] TinyOS setup problem

2011-10-13 Thread Bíró András
Hi,

On Thu, Oct 13, 2011 at 8:00 PM, Andrew Sabelhaus  wrote:
> Hi Max,
>
> From that error message, it seems your issue is now with ncc (the nesC
> compiler.) Even though you updated your avr-gcc packages, did you do
> the same with ncc? The TinyOS wiki should have details for installing

Good idea. You should use nesc 1.3.2 or newer.

> everything manually, instead of relying on Ubuntu's apt-get system, so
> I'd suggest trying to install the ncc libraries manually.

The tinyos wiki currently points to a dead repository. I don't
recommend to by-pass the apt system, it's far worse to install
packages with make install (it's hard to update and remove, and you
probably won't use the correct paths)

> Also, have you edited your environment variables? When a program
> "can't locate" some needed library, then you probably need to add the
> containing folder to your $PATH environment variable. Again, check the
> wiki for more instructions on what environment variables you need, and
> how to use tos-check-env to work all of that out. Best of luck,

I don't think this will be the problem. If the MAKERULES or
TOSDIR/TOSROOT isn't set up correctly, you will get a much nicer error
message. The CLASSPATH doesn't matter if he doesn't use java, and you
shouldn't edit the PATH on linux (that wiki is quite outdated).

I think your problem is still avr-toolchain related.
What's the output of  "dpkg -l|grep avr"? It should be something like this:
ii  avr-binutils-tinyos  2.17-20110726
ii  avr-gcc-tinyos   4.1.2-20110803
ii  avr-libc-tinyos  1.6.7-20110726
ii  avr-optional-tinyos  2.1-20090326
ii  avr-tinyos   2.1-20080806
ii  avr-tinyos-base  2.1-20080806
ii  avrdude-tinyos   5.10-20110819

Andris

>
> Andrew Sabelhaus
> Chapter President, oSTEM at Maryland
> Mechanical Engineering, Class of 2012
> A. James Clark School of Engineering, The University of Maryland, College Park
> andrew.sabelh...@gmail.com - (301) 807-9842
>
>
>
> On Thu, Oct 13, 2011 at 1:34 PM, Morgan Reeves
>  wrote:
>> Hi Andris,
>>
>> Thanks for your reply. I reinstalled from the stanford repository. The error
>> has now changed:
>>
>> /usr/lib/ncc/nesc_nx.h:62:22: error: inttypes.h: No such file or directory
>> /usr/lib/ncc/nesc_nx.h:281: syntax error before `__nesc_ntoh_uint8'
>> /usr/lib/ncc/nesc_nx.h:286: syntax error before `__nesc_hton_uint8'
>> /usr/lib/ncc/nesc_nx.h:288: warning: type defaults to `int' in declaration
>> of `base'
>> etc...
>>
>> it goes on like that. I have checked, and "inttypes.h" is located in my
>> /usr/avr/ directory -- so it's present, it's just not being located by
>> TinyOS. I see that some forum posts on this were solved using:
>>
>> maxwell@XXX: sudo apt-get install build-essential
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> build-essential is already the newest version.
>> 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
>>
>> but as you can see, this is apparently not the source of the problem. Any
>> known fixes for this?
>>
>> Thanks,
>> -Max
>>
>>
>>
>>> Date: Thu, 13 Oct 2011 16:05:22 +0200
>>> Subject: Re: [Tinyos-help] TinyOS setup problem
>>> From: bband...@gmail.com
>>> To: abelianchamel...@hotmail.com
>>> CC: tinyos-help@millennium.berkeley.edu
>>>
>>> Hi Max,
>>>
>>> That avr-gcc is really old. Try to reinstall every avr related package
>>> from this repository:
>>> deb http://tinyos.stanford.edu/tinyos/dists/ubuntu/ lucid main
>>>
>>> Andris
>>>
>>> On Thu, Oct 13, 2011 at 2:06 PM, Morgan Reeves
>>>  wrote:
>>> > Hi Everyone,
>>> >
>>> > I have spent the last 3 hours trying to fix this and I'm totally stuck,
>>> > so
>>> > I'm hoping someone can at least prod me forward towards a solution. I
>>> > run
>>> > linux 10.04 and I installed following the TinyOS website.  I tried the
>>> > karmic, lucid, and hardy versions, and even the "apt-get upgrade
>>> > tinyos",
>>> > yet the problem remains.  That is, when I call "make micaz" I get:
>>> >
>>> > mkdir -p build/micaz
>>> >     compiling SimpleAppC 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 -finline-limit=10
>>> > -DIDENT_APPNAME=\"SimpleAppC\" -DIDENT_USERNAME=\"maxwell\"
>>> > -DIDENT_HOSTNAME=\"maxwell-laptop\" -DIDENT_USERHASH=0xf0d57439L
>>> > -DIDENT_TIMESTAMP=0x4e96d083L -DIDENT_UIDHASH=0x6400933dL
>>> > -fnesc-dump=wiring
>>> > -fnesc-dump='interfaces(!abstract())'
>>> > -fnesc-dump='referenced(interfacedefs,
>>> > components)' -fnesc-dumpfile=build/micaz/wiring-check.xml SimpleAppC.nc
>>> > -lm
>>> > In file included from /opt/tinyos-2.1.1/tos/system/TinySchedulerC.nc:41:
>>> > In component `McuSleepC':
>>> > /opt/tinyos-2.1.1/tos/chips/atm128/McuSleepC.nc: In function
>>> > `McuSleep.sl

Re: [Tinyos-help] TinyOS setup problem

2011-10-13 Thread Bíró András
Hi Max,

On Fri, Oct 14, 2011 at 2:21 AM, Morgan Reeves
 wrote:
> Hi again,
>
> I followed Andrew's suggestion, but I had already updated everything:
>
> maxwell@XXX:~$ nescc --version
> nescc: 1.3.3
> gcc: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
> Copyright (C) 2009 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> so perhaps ncc is not the problem... Following Andris' suggestion, it spits
> out:
>
> ii  avr-binutils    2.13.2.1-2  GNU binutils for the AVR
> platform
> ii  avr-binutils-tinyos 2.17-20110726   Binary utilities supporting
> Atmel's AVR targ
> ii  avr-gcc 3.3tinyos-2 gcc compiled for the AVR
> platform with TinyO
> ii  avr-gcc-tinyos  4.1.2-20110803  The GNU C compiler (cross
> compiler for avr)
> ii  avr-libc-tinyos 1.6.7-20110726  Standard library used to the
> development of
> ii  avr-optional-tinyos 2.1-20090326    Dummy package to pull in all
> optional avr-re
> ii  avr-tinyos  2.1-20080806    Dummy package to pull in all
> avr-related pac
> ii  avr-tinyos-base 2.1-20080806    Dummy package required by
> all avr-tinyos too
> ii  avrdude-tinyos  5.10-20110819   AVRDUDE is an open source
> utility to downloa
> ii  tinyos-required-avr 2.1-20090326    Dummy package to pull in all
> required packag
>
> and I note that I have redundancy in binutils and gcc, so pehaps I should
> remove the non-tinyOS ones?

Yes, that will be your problem. If uninstalling the non-tinyOS
packages won't solve your problem, I recommend to remove all the
packages you listed, and reinstall avr-optional-tinyos (which depends,
therefore reinstall everything you need).

Andris

>
> Thanks,
> -Max
>
>
>
>> Date: Thu, 13 Oct 2011 20:25:32 +0200
>> Subject: Re: [Tinyos-help] TinyOS setup problem
>> From: bband...@gmail.com
>> To: asabe...@umd.edu
>> CC: abelianchamel...@hotmail.com; tinyos-help@millennium.berkeley.edu
>>
>> Hi,
>>
>> On Thu, Oct 13, 2011 at 8:00 PM, Andrew Sabelhaus 
>> wrote:
>> > Hi Max,
>> >
>> > From that error message, it seems your issue is now with ncc (the nesC
>> > compiler.) Even though you updated your avr-gcc packages, did you do
>> > the same with ncc? The TinyOS wiki should have details for installing
>>
>> Good idea. You should use nesc 1.3.2 or newer.
>>
>> > everything manually, instead of relying on Ubuntu's apt-get system, so
>> > I'd suggest trying to install the ncc libraries manually.
>>
>> The tinyos wiki currently points to a dead repository. I don't
>> recommend to by-pass the apt system, it's far worse to install
>> packages with make install (it's hard to update and remove, and you
>> probably won't use the correct paths)
>>
>> > Also, have you edited your environment variables? When a program
>> > "can't locate" some needed library, then you probably need to add the
>> > containing folder to your $PATH environment variable. Again, check the
>> > wiki for more instructions on what environment variables you need, and
>> > how to use tos-check-env to work all of that out. Best of luck,
>>
>> I don't think this will be the problem. If the MAKERULES or
>> TOSDIR/TOSROOT isn't set up correctly, you will get a much nicer error
>> message. The CLASSPATH doesn't matter if he doesn't use java, and you
>> shouldn't edit the PATH on linux (that wiki is quite outdated).
>>
>> I think your problem is still avr-toolchain related.
>> What's the output of "dpkg -l|grep avr"? It should be something like this:
>> ii avr-binutils-tinyos 2.17-20110726
>> ii avr-gcc-tinyos 4.1.2-20110803
>> ii avr-libc-tinyos 1.6.7-20110726
>> ii avr-optional-tinyos 2.1-20090326
>> ii avr-tinyos 2.1-20080806
>> ii avr-tinyos-base 2.1-20080806
>> ii avrdude-tinyos 5.10-20110819
>>
>> Andris
>>
>> >
>> > Andrew Sabelhaus
>> > Chapter President, oSTEM at Maryland
>> > Mechanical Engineering, Class of 2012
>> > A. James Clark School of Engineering, The University of Maryland,
>> > College Park
>> > andrew.sabelh...@gmail.com - (301) 807-9842
>> >
>> >
>> >
>> > On Thu, Oct 13, 2011 at 1:34 PM, Morgan Reeves
>> >  wrote:
>> >> Hi Andris,
>> >>
>> >> Thanks for your reply. I reinstalled from the stanford repository. The
>> >> error
>> >> has now changed:
>> >>
>> >> /usr/lib/ncc/nesc_nx.h:62:22: error: inttypes.h: No such file or
>> >> directory
>> >> /usr/lib/ncc/nesc_nx.h:281: syntax error before `__nesc_ntoh_uint8'
>> >> /usr/lib/ncc/nesc_nx.h:286: syntax error before `__nesc_hton_uint8'
>> >> /usr/lib/ncc/nesc_nx.h:288: warning: type defaults to `int' in
>> >> declaration
>> >> of `base'
>> >> etc...
>> >>
>> >> it goes on like that. I have checked, and "inttypes.h" is located in my
>> >> /usr/avr/ directory -- so it's present, it's just not being located by
>> >> TinyOS. I see that some forum posts on this were solved using:
>> >>
>> >> maxwell@XXX: sudo apt-ge

Re: [Tinyos-help] help please

2011-10-25 Thread Bíró András
Hi Hau!

You should compile the JNI libraries for your platform (it's
precompiled in the tinyos-tools package, but only for x86 platforms),
and add it to your java libraries. You can found it in
/tools/tinyos/java/env and /tools/tinyos/java/serial.

But I think it's easier to compile the c version of serialforwarder
(/support/sdk/c/sf), and you can connect to the c serialforwarder with
your java code (I used this methode successfully with an NSLU2).

Andris

On Tue, Oct 25, 2011 at 5:14 AM, hao liu  wrote:
> I have already booted angstrom on beagle board xM which has USB ports.
> I want to plug the telosb into the USB port of the beagle board and use the
> java listener " net.tinyos.tools.Listen "to listen the serial port of the
> USB.
> I did not install TinyOS tools kit on the angstrom (because I do not know
> how to install, I only know how to install on Ubuntu), instead I install the
> jamVM on angstrom begaleboard and copy the java package which include the
> java listener to the angstrom beagle board. I try to run the java listener
> program, however it does not work.
> I can not make it work, does anybody has experience in this?
> Thanks
> Hao
> ___
> 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] Different compilers within the same TinyOS-2.1

2011-10-26 Thread Bíró András
You can install the packages with "rpm -ivh --ignoreos --force", this
will overwrite the conflicting files.

Andris

On Wed, Oct 26, 2011 at 12:24 PM, David Rodenas Herráiz
 wrote:
> Thanks Eric. I had some problems installing the xscale compiler (for
> Imote2):
> rpm -ivh --ignoreos xscale-elf-gcc-3.4.3-1.cygwin.i386.rpm
> Preparing... ### [100%]
> file /usr/man/man7/fsf-funding.7 from install of xscale-elf-gcc-3.4.3-1
> conflicts with file from package avr-gcc-4.1.2-1
> file /usr/man/man7/gfdl.7 from install of xscale-elf-gcc-3.4.3-1 conflicts
> with file from package avr-gcc-4.1.2-1
> and more...
> I suppose that I'll have to install it manually. Therefore, I don't know
> when but I'll tell you if it finally works.
> David Rodenas Herráiz
>
> 
> Date: Wed, 26 Oct 2011 03:10:34 -0700
> Subject: Re: [Tinyos-help] Different compilers within the same TinyOS-2.1
> From: cire...@gmail.com
> To: drod...@hotmail.com
> CC: tinyos-help@millennium.berkeley.edu
>
> take a look a different .platform files
> A pattern will become apparent.
> You'll see things like...
> -gcc=msp430-gcc
> -mmcu=msp430x1611
> -fnesc-target=msp430
> and like
> -gcc=avr-gcc
> -mmcu=atmega128
> -fnesc-target=avr
>
> I don't know of any documentation for these things.   I mostly fly by the
> seat of my pants when it comes to what these switches do.
>
>
> On Wed, Oct 26, 2011 at 12:44 AM, David Rodenas Herráiz
>  wrote:
>
> Hi Eric
> thanks for your answer. Would you mind giving me some brief instructions to
> do those switches?
> David
>
> 
> Date: Tue, 25 Oct 2011 16:14:58 -0700
> Subject: Re: [Tinyos-help] Different compilers within the same TinyOS-2.1
> From: cire...@gmail.com
> To: drod...@hotmail.com
> CC: tinyos-help@millennium.berkeley.edu
>
>
>
> On Tue, Oct 25, 2011 at 11:25 AM, David Rodenas Herráiz
>  wrote:
>
> Hi everyone
> I am working with Imote2 and MicaZ motes and I want to ask if PXA27x
> (compiler for Imote2) Atmel AVR tools (compiler or MicaZ) might work within
> the same TinyOS-2.1 installation.
>
> Sure.   The toolchain invoked is determined by switches in the .platform
> file for the platform being compiled.
> So it should work fine.
>
>
> Thanks in advance
> 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
>
>
>
>
>
> --
> 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] Problem with serial communication using telosa

2011-10-26 Thread Bíró András
Hi Luis,

I had similar problems with telosa motes, and I don't know what caused
the problem, or how to resolve it, but I found a workaround.
Unofrtunatly it only worked on windows (xp)+cygwin:
Before opening the serial port with the tinyos java apps, I opened it
with rxtx (http://users.frii.com/jarvi/rxtx/). After that, everything
worked as it should.
I used telosb, micaz/mib520a and iris/mib520b motes on that machine
without a problem, both on linux and windows.

Andris

2011/10/26 Luís Pereira :
> Hi Urs,
> I am already using the telos platform. I post a command with tmote because I
> read in some other question to try that way, and it doesn't make any
> difference. I am trying to communicate with the mote using the
> apps/tests/TestLed/Multiled program and I got this outputs:
> MAKE TELOS:
>
> mkdir -p build/telosa
>     compiling TestAppC to a telosa binary
> ncc -o build/telosa/main.exe  -Os -O
> -I/home/luis/documents/tinyos-main-read-only//tos/lib/printf
> -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosa
> -fnesc-cfile=build/telosa/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
> -DIDENT_APPNAME=\"TestAppC\" -DIDENT_USERNAME=\"luis\"
> -DIDENT_HOSTNAME=\"luis-eee\" -DIDENT_USERHASH=0x26cd4331L
> -DIDENT_TIMESTAMP=0x4ea848c1L -DIDENT_UIDHASH=0x63dafe9eL  TestAppC.nc -lm
>     compiled TestAppC to build/telosa/main.exe
>             4994 bytes in ROM
>               77 bytes in RAM
> msp430-objcopy --output-target=ihex build/telosa/main.exe
> build/telosa/main.ihex
>     writing TOS image
>
> MAKE TELOS INSTALL:
>
> mkdir -p build/telosa
>     compiling TestAppC to a telosa binary
> ncc -o build/telosa/main.exe  -Os -O
> -I/home/luis/documents/tinyos-main-read-only//tos/lib/printf
> -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosa
> -fnesc-cfile=build/telosa/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
> -DIDENT_APPNAME=\"TestAppC\" -DIDENT_USERNAME=\"luis\"
> -DIDENT_HOSTNAME=\"luis-eee\" -DIDENT_USERHASH=0x26cd4331L
> -DIDENT_TIMESTAMP=0x4ea84969L -DIDENT_UIDHASH=0x59c6b937L  TestAppC.nc -lm
>     compiled TestAppC to build/telosa/main.exe
>             4994 bytes in ROM
>               77 bytes in RAM
> msp430-objcopy --output-target=ihex build/telosa/main.exe
> build/telosa/main.ihex
>     writing TOS image
> cp build/telosa/main.ihex build/telosa/main.ihex.out
>     found mote on /dev/ttyUSB0 (using bsl,auto)
>     installing telosa binary using bsl
> tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/telosa/main.ihex.out
> rm -f build/telosa/main.exe.out build/telosa/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.10 (Device ID: f149)
> Adjust SP. Load PC with 0x0C22 ...
> Transmit default password ...
> Patch for flash programming required!
> Load and verify patch ...
> Program ...
> 5220 bytes programmed.
> Reset device ...
>
> MOTELIST:
>
> Reference  Device           Description
> --  -
> M4MWCK4F   /dev/ttyUSB0     Moteiv Telos (Rev A 2004-04-27)
>
> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telos
>
> serial@/dev/ttyUSB0:115200: resynchronising
>
> I already put my ttyUSB0 in chmod 666, and I also tried reset the device and
> plug off and plug in the device while in resynchronising like some people
> advice in other posts and nothing work so far.
> Thanks for all the help so far. Hope I can get a solution for this
> Luís Pereira
>
>
> 2011/10/26 Urs Hunkeler 
>>
>> Hi Luís,
>>
>> I just had a look. It appears that telosa, telosb and tmote all use the
>> same baud rate, and that the platform name for telosa on TinyOS is just
>> "telos" (not tmote).
>>
>> TelosA and TelosB/Tmote are similar, but not identical. It is entirely
>> possible that if you compile your programs for the platform "tmote" they
>> will install on the TelosA and maybe even blink the LEDs, but that other
>> things (like serial communication) will not work. When you compile the test
>> programs, did you do a "make telos" (and not "make tmote")? (and similarly
>> "make telos install")
>>
>> If it still doesn't work, could you send us the exact commands that you
>> use (make, make install, java ...Listen...) and the output that you get for
>> each of the commands (e.g., copy/past the text from your terminal)?
>>
>> Cheers,
>> Urs
>>
>>
>> On 10/25/11 11:48 PM, Luís Pereira wrote:
>>>
>>> Hi Rafael,
>>>
>>> well when I run motelist i have:
>>>
>>> Reference Device Description
>>> --  -
>>> M4MWCK4F /dev/ttyUSB0 Moteiv Telos (Rev A 2004-04-27)
>>>
>>> Then i run:
>>>
>>> java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:tmote
>>>
>>> and i got:
>>>
>>> serial@/dev/ttyUSB0:115200: resynchronising
>>>
>>> and the leds of the mote stop blinking.
>>>
>>> Luís Pereira
>>>
>>>
>>> 2011/10/25 Rafael de Oliveira Costa >> 

Re: [Tinyos-help] Problem with serial communication using telosa

2011-10-26 Thread Bíró András
Sorry, those codes are lost, but it's easy to simplify an rxtx
example. Acutally, you only need to list the available serial ports,
since it tries to open them. And again: it only worked on windows.

Andris

2011/10/26 Luís Pereira :
> Hi Bíró,
> Ok I will try to open the usb port with rxtx to see what happen..can you
> send me what program you use to do that?
> Thanks for your help
> Luís Pereira
>
>
> 2011/10/26 Bíró András 
>>
>> Hi Luis,
>>
>> I had similar problems with telosa motes, and I don't know what caused
>> the problem, or how to resolve it, but I found a workaround.
>> Unofrtunatly it only worked on windows (xp)+cygwin:
>> Before opening the serial port with the tinyos java apps, I opened it
>> with rxtx (http://users.frii.com/jarvi/rxtx/). After that, everything
>> worked as it should.
>> I used telosb, micaz/mib520a and iris/mib520b motes on that machine
>> without a problem, both on linux and windows.
>>
>> Andris
>>
>> 2011/10/26 Luís Pereira :
>> > Hi Urs,
>> > I am already using the telos platform. I post a command with tmote
>> > because I
>> > read in some other question to try that way, and it doesn't make any
>> > difference. I am trying to communicate with the mote using the
>> > apps/tests/TestLed/Multiled program and I got this outputs:
>> > MAKE TELOS:
>> >
>> > mkdir -p build/telosa
>> >     compiling TestAppC to a telosa binary
>> > ncc -o build/telosa/main.exe  -Os -O
>> > -I/home/luis/documents/tinyos-main-read-only//tos/lib/printf
>> > -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosa
>> > -fnesc-cfile=build/telosa/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
>> > -DIDENT_APPNAME=\"TestAppC\" -DIDENT_USERNAME=\"luis\"
>> > -DIDENT_HOSTNAME=\"luis-eee\" -DIDENT_USERHASH=0x26cd4331L
>> > -DIDENT_TIMESTAMP=0x4ea848c1L -DIDENT_UIDHASH=0x63dafe9eL  TestAppC.nc
>> > -lm
>> >     compiled TestAppC to build/telosa/main.exe
>> >             4994 bytes in ROM
>> >               77 bytes in RAM
>> > msp430-objcopy --output-target=ihex build/telosa/main.exe
>> > build/telosa/main.ihex
>> >     writing TOS image
>> >
>> > MAKE TELOS INSTALL:
>> >
>> > mkdir -p build/telosa
>> >     compiling TestAppC to a telosa binary
>> > ncc -o build/telosa/main.exe  -Os -O
>> > -I/home/luis/documents/tinyos-main-read-only//tos/lib/printf
>> > -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosa
>> > -fnesc-cfile=build/telosa/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
>> > -DIDENT_APPNAME=\"TestAppC\" -DIDENT_USERNAME=\"luis\"
>> > -DIDENT_HOSTNAME=\"luis-eee\" -DIDENT_USERHASH=0x26cd4331L
>> > -DIDENT_TIMESTAMP=0x4ea84969L -DIDENT_UIDHASH=0x59c6b937L  TestAppC.nc
>> > -lm
>> >     compiled TestAppC to build/telosa/main.exe
>> >             4994 bytes in ROM
>> >               77 bytes in RAM
>> > msp430-objcopy --output-target=ihex build/telosa/main.exe
>> > build/telosa/main.ihex
>> >     writing TOS image
>> > cp build/telosa/main.ihex build/telosa/main.ihex.out
>> >     found mote on /dev/ttyUSB0 (using bsl,auto)
>> >     installing telosa binary using bsl
>> > tos-bsl --telos -c /dev/ttyUSB0 -r -e -I -p build/telosa/main.ihex.out
>> > rm -f build/telosa/main.exe.out build/telosa/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.10 (Device ID: f149)
>> > Adjust SP. Load PC with 0x0C22 ...
>> > Transmit default password ...
>> > Patch for flash programming required!
>> > Load and verify patch ...
>> > Program ...
>> > 5220 bytes programmed.
>> > Reset device ...
>> >
>> > MOTELIST:
>> >
>> > Reference  Device           Description
>> > -- 
>> > -
>> > M4MWCK4F   /dev/ttyUSB0     Moteiv Telos (Rev A 2004-04-27)
>> >
>> > java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telos
>> >
>> > serial@/dev/ttyUSB0:115200: resynchronising
>> >
>> > I already put my ttyUSB0 in chmod 666, and I also tried reset the device
>> > and
>> > plug off and plug in the device while in resynchronising like some
&

[Tinyos-help] deluge improvement questions

2012-03-24 Thread Bíró , András
Hi Guys,

Our company is planning to use deluge for remote programming, but we
have some problems with it, and we're wandering if someone improved it
or someone is improving it.
Our problems:
-Rollback feature would be nice. I know it could be achieved with the
three images, but it could be done automatically, which is obviously
safer
-I think image downloading could be more effective. Currently the
receiver asks for a page, and the sender sends it with unicast. If
sender would broadcast the page, every node which receives could save
it.
-We're usually using heterogen network (different platforms in the
same network, different programs on the same platforms with different
sensorboards), but deluge reprograms everything it can.  It would be
nice if a mote could decide if it should reprogram itself or not.
-Sometimes we want to reprogram only a subset of the nodes, the others
don't even have to download the image, only forward it. This needs a
routing protocol, I think AODV would be OK.

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


Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial

2012-03-27 Thread Bíró , András
Hi,

I think the windows CLASSPATH format is different: It uses ";"
(semicolon) instead of ":" (colon), and "\" (backslash) instead of "/"
(slash).

Andris

On Tue, Mar 27, 2012 at 4:35 PM,   wrote:
>
> Dear all,
>
> I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial
> Communication. I successfully compiled and installed the TestSerial
> application on telosb mote.
>
> However, when I type in the TestSerial directory:
>
> java TestSerial
>
> I get:
>
> The java class is not found:  TestSerial
>
>
> The current directory and the tinyos.jar are included in the CLASSPATH
> as it points to:
> .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java
>
> The TestSerial.class and TestSerialMsg.class were generated in the
> TestSerial directory.
>
> I am using Cygwin on Windows 7.
>
> I hope someone can help me.
> Thanks a lot in advance.
> Tifenn
>
>
>
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ___
> 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] TinyOS + STM32 + Silabs Si4432

2012-03-28 Thread Bíró , András
Hi Oleg,

The silabs driver from szte-wsn is not ready to use, we had some
hardware bug, and we couldn't really test it. We want to finish it,
but right now we have more important projects.

Andris

On Wed, Mar 28, 2012 at 1:44 PM, Oleg Trenkin  wrote:
> Hi All,
>
> I want to use TinyOS on my own device. (STM32F2xx + Si4432)
> But, unfortunantly TinyOS main-tree doesn't support my both devices (MCU &
> Radio).
>
> But I found this:
> STM32 -- http://sourceforge.net/projects/tinyosonstm32/
> Silabs Si443x --
> http://szte-wsn.svn.sourceforge.net/viewvc/szte-wsn/tinyos-2.x/trunk/tos/chips/si443x/
>
> What do you think about using TinyOS with my hardware?
>
> ___
> 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] TinyOS reading from UART byte per byte

2012-03-28 Thread Bíró , András
Hi,

You should use the UartStream/UartByte interfaces provided by PlatformSerialC.

Andris

On Wed, Mar 28, 2012 at 2:34 AM, Jan Ebora  wrote:
> Hello,
>
> I'm just wondering how would one go about reading bytes from the uart and
> changing baud rate. There is barely any tutorials on this matter; I've only
> found tutorials and examples on reading/sending packets, which is a higher
> level protocol. I would like to use the UART rx and tx to echo through
> hyperterminal. I am using iris nodes from memsic with atm128 processor.
> thanks
>
> Jan Ebora
>
> ___
> 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] Unknown target micaz Known targets for TinyOS directory $(TOSROOT)/tos and the specified include directories are: none. make: *** [sim-exe] Error 2

2012-04-01 Thread Bíró , András
Hi,

TOSROOT should be set before any other variable which uses it.

Andris

On Thu, Mar 29, 2012 at 8:29 AM, 柴晓萌  wrote:
> I'm a Chinese student,and I'm sorry for my English speaking. I'm new in
> TinyOS.I have a problem when I run "make micaz sim", I'm using cygwin under
> Win7.I get the following:
> mkdir -p simbuild/micaz
>   placing object files in simbuild/micaz
>   writing XML schema to app.xml
>   compiling BlinkAppC to object file sim.o
> ncc -c -DUSE_DL_IMPORT -fpic  -o simbuild/micaz/sim.o -g -O0 -tossim
> -fnesc-nido
> -tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\)   -Wall
> -Wsha
> dow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb
> -DD
> EFINED_TOS_AM_GROUP=0x22 -finline-limit=10 -DIDENT_APPNAME=\"BlinkAppC\"
> -DI
> DENT_USERNAME=\"cxm\" -DIDENT_HOSTNAME=\"cxm-PC\"
> -DIDENT_USERHASH=0x8e709959L -
> DIDENT_TIMESTAMP=0x4f7407dcL -DIDENT_UIDHASH=0x370bd314L -Wno-nesc-data-race
> Bli
> nkAppC.nc   -fnesc-dump=components -fnesc-dump=variables
> -fnesc-dump=constants -
> fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags
> -fnesc-dumpfile=a
> pp.xml
> Unknown target micaz
> Known targets for TinyOS directory $(TOSROOT)/tos
> and the specified include directories are:
> none.
> make: *** [sim-exe] Error 2
>
> My variable definitions are:
>
> CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;.$TOSROOT/support/sdk/java/tinyos.jar;.
>
> MAKERULES=$(TOSROOT)/support/make/Makerules
>
> PATH=/opt/msp430/bin:/opt/jflashmm:$PATH;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools;%JAVA_HOME%\bin;;%JAVA_HOME%\jre\bin;;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools
>
> TOSDIR=$(TOSROOT)/tos
>
> TOSROOT=/opt/tinyos-2.x
>
> I search the problem on the Internet and find some people having the same
> problem.But there isn't any solution can solve the problem.
>
> I need some help.
>
> ___
> 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] TOSSIM compile error

2012-04-01 Thread Bíró , András
On Fri, Mar 30, 2012 at 8:09 PM, Javier M Mora  wrote:
> On Fri, 30 Mar 2012 14:16:03 -0400
> Newlyn Erratt  wrote:
>
>> I am currently attempting to setup TinyOS on a new machine on OpenSUSE 12.1 
>> and am running into a minor issue.  Compilation works fine for both Micaz 
>> and telosb but when I compile for TOSSIM I get the following error.
>>
>> Two source files specified (PLATFORM_MICAZ and BOARD_MICASB)
>>
>> I have seen a couple of previous emails regarding this but there never 
>> seemed to be a good solution. I am using the rpm installation. Does anyone 
>> have some idea of what may be happening.
>>
>
> The problem is related with gcc 4.6. The interface changed and ncc
> doesn't like at all.
>
> There is a patch for ncc to solve this but easiest solution is
> downgrade gcc to 4.5.

Actually, nesc 1.3.3. has this patch. There's a prebuilt version for
cygwin (http://tinyos.stanford.edu/tinyos/dists/cygwin/) and
debian/ubuntu: (http://tinyos.stanford.edu/tinyos/dists/ubuntu/)

Andris

>
> In debian, my distro, I have installed 4.5 and 4.6 at same time and I changed
> gcc symlink to gcc-4.5.
>
> Now works.
>
> --
> Javier M Mora 
> ___
> 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] Couple of questions about RSSI and UART Receive

2012-04-09 Thread Bíró , András
Hi,

First of all, if you haven't did it already, go through this tutorial:
http://docs.tinyos.net/tinywiki/index.php/Mote-PC_serial_communication_and_SerialForwarder

After that, if you're familiar with java, check the app
$TOSROOT/apps/test/TestSerial and the tinyos.jar source at
$TOSROOT/support/sdk/java (you can also generate javadoc with "ant
javadoc").

Andris


On Mon, Apr 9, 2012 at 8:15 AM, erhan uyar  wrote:
>
> Hi all,
>
> I am working on TinyOS and Iris motes and I have some problems I need to
> solve quickly.
> First of all, I need to send data from PC to motes using serial cable. I
> think I have to use UART Receive but I couldn't find any use of it or
> documentation. Even I did I not quite sure how to sent commands from PC
> using which GUI or tool like cygwin.
> Also I need to learn more info from motes, like parent or neighbor
> nodes, and more importantly RSSI values. I think this information are
> part of health packets but I couldn't find a way to collect it.
>
> If you know any documents regarding this problems, I will look at them.
> Any piece of information is valuable to me right now.
>
> Thank you.
> ---
>  Erhan Uyar
>
>
> ___
> 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] Serialforwarder protocol

2012-04-09 Thread Bíró , András
Hi,

Just write "U " back ('U' is hardcoded, ' ' is the current protocol
version). By the way, the handshake is in the
net.tinyos.packet.SFProtocol class.

Andris

On Mon, Apr 9, 2012 at 8:32 PM, Hamza Khan  wrote:
> I am trying to communicate with the serialforwarder program from an external
> tcpip client (matlab). I have successfully created a tcpip connection to the
> serialforwarder and received the first two bytes "U " (since I am using
> tinyos 2.0). What is the rest of the handshake protocol? And what do i need
> to send to make the sf start sending me the packets it receives. (I figure
> people have reverse engineered and found this out from the
> serialforwarde/mig etc codes)
>
> ___
> 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