[Tinyos-help] Re: TOSBase / OscilloscopeRF - rssi reading Plzzz help

2007-07-28 Thread Michael Schippling
Base received radio packet.\n");


if (call Get_Voltage.getData() == SUCCESS) {
err_v = SUCCESS;
}

if ((!Msg->crc) || (Msg->group != TOS_AM_GROUP) || !err_v || Batt_Voltage 
== 0x)
  return Msg;


	if (uartCount < UART_QUEUE_LEN) {


/**/

atomic {
Msg->data[26]=Batt_Voltage>>8 & 0xff;

Msg->data[27]=Batt_Voltage>>0 & 0xff;



#ifdef PLATFORM_MICA2
Msg->data[28]=(Msg->strength>>8) & 0xff;
#endif

Msg->data[29]=(Msg->strength>>0) & 0xff;


#ifdef PLATFORM_MICAZ
Msg->data[28]=Msg->lqi;
#endif
}   


/*/
  memcpy(&uartQueueBufs[uartIn], Msg, sizeof(TOS_Msg) + 2);
  uartCount++;

  if( ++uartIn >= UART_QUEUE_LEN ) uartIn = 0;

  if (!uartBusy) {
if (post UARTSendTask()) {
  uartBusy = TRUE;
}
  }
} else {
  dropBlink();
}




return Msg;
  }
  
  task void UARTSendTask() {

dbg (DBG_USR1, "TOSBase forwarding Radio packet to UART\n");

if (uartCount == 0) {

  uartBusy = FALSE;

} else {

  if (call UARTSend.send(&uartQueueBufs[uartOut]) == SUCCESS) {
call Leds.greenToggle();
  } else {
failBlink();
post UARTSendTask();
  }
}
  }

  event result_t UARTSend.sendDone(TOS_MsgPtr msg, result_t success) {

if (!success) {
  failBlink();
} else {
  uartCount--;
  if( ++uartOut >= UART_QUEUE_LEN ) uartOut = 0;
}

post UARTSendTask();


return SUCCESS;
  }

  event TOS_MsgPtr UARTReceive.receive(TOS_MsgPtr Msg) {
processUartPacket(Msg, FALSE, 0);
return Msg;
  }

  event TOS_MsgPtr UARTTokenReceive.receive(TOS_MsgPtr Msg, uint8_t Token) {
processUartPacket(Msg, TRUE, Token);
return Msg;
  }

  void processUartPacket(TOS_MsgPtr Msg, bool wantsAck, uint8_t Token) {
bool reflectToken = FALSE;

dbg(DBG_USR1, "TOSBase received UART token packet.\n");

if (radioCount < RADIO_QUEUE_LEN) {
  reflectToken = TRUE;

  memcpy(&radioQueueBufs[radioIn], Msg, sizeof(TOS_Msg));

  radioCount++;
  
  if( ++radioIn >= RADIO_QUEUE_LEN ) radioIn = 0;
  
  if (!radioBusy) {

if (post RadioSendTask()) {
  radioBusy = TRUE;
}
  }
} else {
  dropBlink();
}

if (wantsAck && reflectToken) {
  call UARTTokenReceive.ReflectToken(Token);
}
  }

  task void RadioSendTask() {

dbg(DBG_USR1, "TOSBase forwarding UART packet to Radio\n");

if (radioCount == 0) {

  radioBusy = FALSE;

} else {

  radioQueueBufs[radioOut].group = TOS_AM_GROUP;
  
  if (call RadioSend.send(&radioQueueBufs[radioOut]) == SUCCESS) {

call Leds.redToggle();
  } else {
failBlink();
post RadioSendTask();
  }
}
  }

  event result_t RadioSend.sendDone(TOS_MsgPtr msg, result_t success) {

if (!success) {
  failBlink();
} else {
  radioCount--;
  if( ++radioOut >= RADIO_QUEUE_LEN ) radioOut = 0;
}

post RadioSendTask();

return SUCCESS;
  }

  void dropBlink() {
#ifdef TOSBASE_BLINK_ON_DROP
call Leds.yellowToggle();
#endif
  }

  void failBlink() {
#ifdef TOSBASE_BLINK_ON_FAIL
call Leds.yellowToggle();
#endif
  }
}  



4.) Counting from 0 from the start of the data payload,

For Mica2:

byte:26 27  28  
29

value:  Vbatt_MSBVbatt_LSBRSSI_MSB  RSSI_LSB


For Micaz

byte:26 27  28  
29

value:  Vbatt_MSBVbatt_LSB  LQI RSSI

Vbatt in millivolts.

IMP###

Refer CC1000 datasheet for the o/p specifications of the RSSI pin.


5.) The formula for calculating the values in dBm are 


V_rssi (volts)  = V_batt (volts) * adcCounts / 1024.0;

RSSI_dBm = -50.0 * V_rssi - 45.5;    // for CC1000 at 915 MHz!

where adcCounts is the 16 bit RSSI value obtained.

whew! that was a long one.

good luck.

Phaneeth




Message: 4
Date: Tue, 24 Jul 2007 12:57:23 -0600
From: Michael Schippling <[EMAIL PROTECTED]>
Subject: Re: [Tinyos-help] TOSBase / OscilloscopeRF - rssi reading
Plzzz help
To: Brian Mulanda <[EMAIL PROTECTED]>
Cc: TINYOS Help 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; 

Re: [Tinyos-help] The interface CC1000Control

2007-07-29 Thread Michael Schippling

First a couple suggestionsupgrade to a later version of TOS1.x,
say something over .7 and use the defines in the
contrib/xbow/apps/MakeXbowlocal file (or just do your development
in the xbow tree, otherwise the CC1000 will not work very well
(in my experience...).

Also setPower() may not have much effect in the simulator. I don't
know if it is implemented in any sensible way.

The doc/tutorial should help you on how to include components,
but here's a quick rundown:

In your config file, something like:

--

/** Robot.nc -- Master Config file for the RoboII Mote application
**/

includes RoboHardware;
includes RoboMsg;

configuration Robot { }
implementation
{
  components Main, RobotM, TimerC, LedsC,
GenericComm as RComm,   // for RADIO & UART comm
CC1000ControlM, // for mica2 radio control
MotionM, RoboMsgM;


  Main.StdControl -> RobotM.StdControl;
  Main.StdControl -> TimerC;

  RobotM.CC1000ControlM-> CC1000ControlM;  // to get radio control functions
  RobotM.RCommControl -> RComm; // to init the radio 
communications



  RobotM.Motion -> MotionM;
  RobotM.RoboMsg -> RoboMsgM;

  // Host commands to be received (from Radio or UART)
  RoboMsgM.RCmdStartMsg -> RComm.ReceiveMsg[AM_ROBOCMDSTARTMSG];
  RoboMsgM.RCmdStopMsg -> RComm.ReceiveMsg[AM_ROBOCMDSTOPMSG];
  RoboMsgM.RCmdStatMsg -> RComm.ReceiveMsg[AM_ROBOCMDSTATMSG];
  RoboMsgM.RCmdDataMsg -> RComm.ReceiveMsg[AM_ROBOCMDDATAMSG];
  // Status replies to send
  RoboMsgM.RStatusMsg -> RComm.SendMsg[AM_ROBOSTATUSMSG];
  RoboMsgM.RDataMsg -> RComm.SendMsg[AM_ROBODATAMSG];

}

--

and in your component module:
--

/** RobotM.nc -- Main program for RoboII
**/

includes RoboMsg;  /* the basic request and status messages */

module RobotM
{
provides interface StdControl;
uses
{   
interface Timer;
interface Leds;
interface StdControl as RCommControl
interface CC1000ControlM;

interface RoboMsg;
}
}
implementation
{
int someFunction()
{
CC1000ControlM.setPower( x );
}

// 
}

--

MS

bou ahm wrote:

HELLO,
I am new to tinyos ,I work on the version Tinyos1.1.0 with the use of 
TOSSIM simulator and nesc language.I want to add the component 
CC1000RadioC in my configuration,the requered interface is CC1000Control 
as it provides SetRFPower(Power) command .please I need a simple exemple 
of use interface CC1000Control and command SetRFPower.

THANK YOU


Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
 vers Yahoo! Mail





___
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] about analog input of tmote sky

2007-07-29 Thread Michael Schippling
I think you are asking what wires to connect to what, is that right?
You need to tie the power grounds of the two systems together
and then run the signal output from the sensor to the tmote's
ADC input.

MS

Chen Bleed wrote:
> Hello, all
>  
>   I am a rookie of mote world. Now I have a tmote sky and want to 
> transmit signal to the analog input on it. I see the expansion pins may 
> help and I find pin 3 is a analog input. Then, I have a problem.
>  
>   I use Sharp GP2D12 IR sensor. It has one 5V Vcc , one GND and one 
> analog output among 2V. If I set up this sensor(Vcc and GND) and code 
> for tmote sky already. May I just connect one analog output of IR sensor 
> into analog input of tmote sky ??
>  
>   Because I know tmote only has not over 3 V voltage, I dont use its VCC 
> and GND in expansion to connect to IR sensor(needs 5V). So, just one 
> analog output line of IR sensor can do anything??
>  
> thx, all and sorry for my bad English.
>  
> Chen, Chien Mao
> 
> 
> 
> 用部落格分享照片、影音、趣味小工具和最愛清單,盡情秀出你自己 — Windows 
> Live Spaces 
> 
> 
> 
> 
> ___
> 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] Serial Forwarder

2007-07-30 Thread Michael Schippling

As far as I know moteIF is pretty much it in Java. You can use it
to connect directly to the serial port on the MIBs, etal. If you
want to slim things down, look at Packetizer.java where most of
the rubber meets the road. Also there are examples in C in the tools
tree, and C# seems to be possible if you search this list.

MS

ZhuoHao Sum wrote:

Hi all,

I would like to enquire if there are any alternatives to using the 
serial forwarder and moteIF to connect to the motes?


thanx!
ZhuoHao




___
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] how to read analogue input on telosb (T-Mote Sky)?

2007-07-30 Thread Michael Schippling

Did deeper into DemoSensor. First of course you have to figure out
which one and where it is...I don't (yet) have a tmote dev environment,
but for the Mica's it's in tos/sensorboards/micasb/DemoSensorC.nc

What you will find is that it is a dimly veiled layer over an ADC input,
which, IMHO, just obscures and obfuscates the usage...

MS



Akos Maroy wrote:

Hi,

I'm trying to read the analogue input channels from my T-Mote Sky mote
(telosb platform), but even though I read through the sensor tutorial, I
don't really know how. Can someone give me some help?

I saw that there's an ADC interface, as defined in TEP 101. And on the
telosb platfrom, I would use one of the 8 channels of the MSP430 platfrom
using the AdcReadClient or some similar interface. But, the TestAdc sample
application refers to the DemoSensor, so a lot of questions remain open
for me. For example:

- how do I specify which input I'd like to read from?


Is there a sample application somewhere, that demonstrates how to use
this? What I'm trying to do is read ADC0, ADC1 and ADC2 from the extension
connector of T-Mote Sky, see page 21 here:
http://moteiv.com/products/docs/tmote-sky-datasheet.pdf

Thanks for all pointers,


Akos


___
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] Java configuration problem

2007-07-30 Thread Michael Schippling

Assuming you already have .../tinyos-*/tools/java in your CLASSPATH,
there's probably nothing more you can do to help.

It seems that the no arg constructor Message() is private in
tools/java/net/tinyos/message/Message.java, and bean-like systems
usually use those constructors as the default instantiator.
So I'm not sure that they are meant to co-exist...

MS




Alessandro Turella wrote:

Hi guys,

I'm using a debian box, with netbeans gui, I've installed tinyos by 
apt-get etc.

I get an error in netbeans:

cannot find symbol
symbol : constructor Message()
location: class net.tinyos.message.Message

i don't know what's wrong,

I've imported the namespace with
import net.tinyos.message.*;
...
i red that i could be a misconfiguration of CLASSPATH but i don't know 
how to set it correctly!


i can't go out from this! Please give me a help!


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3820 - Mon Jul 30 14:13:24 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 30 Jul07 - SIGN2.DEF 30 Jul07 - MACRO.DEF 30 Jul07
by Markus Madlener @ http://www.copfilter.org


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3820 - Mon Jul 30 14:13:24 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 30 Jul07 - SIGN2.DEF 30 Jul07 - MACRO.DEF 30 Jul07
by Markus Madlener @ http://www.copfilter.org

___
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] how to read analogue input on telosb (T-Mote Sky)?

2007-07-30 Thread Michael Schippling

Well, yeah...But doesn't every platform also have the "raw" ADC implementation
which provides exactly the same interface, with a (well, to my low-level mind)
more straightforward connection to the external world? Admittedly there are
some 'tricks' that need to be performed to get, e.g., the micasb Photo/Temp
sensors to work. But the extra "Demo" layer increases obscurity without
providing any additional modularity. And making changes, say Photo to Temp,
requires editing a file in the "system" area rather than directly in the app.

Anyway, Software Design is still a Black Art...
MS


Joe Polastre wrote:

What you will find is that it is a dimly veiled layer over an ADC input,
which, IMHO, just obscures and obfuscates the usage...


Yes, however every platform has a DemoSensor, which allows demos (not
applications) to be written and compiled irregardless of the platform
(thus the prefix "Demo")

-Joe

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


Re: [Tinyos-help] How can I receive message of two different types?

2007-07-31 Thread Michael Schippling

Read up on GenericComm.

But briefly, in a header file you assign arbitrary 16 bit message
identifiers and their associated data structures:

/** Message types
 **/
enum
{
  // Status Reply to Host (Send)
  AM_ROBOSTATUSMSG = 10,// normal robot status
  AM_ROBODATAMSG = 11,  // dump of internal data tables
  // Host Commands (Receive)
  AM_ROBOCMDSTARTMSG = 32,  // Start motion
  AM_ROBOCMDSTOPMSG,// Stop immediately
  AM_ROBOCMDSTATMSG,// Status: return current status
  AM_ROBOCMDDATAMSG // Status: return internal data tables
};

Then in a config file you define a set of message handlers:

 // Host commands to be received (from Radio or UART)
  RoboMsgM.RCmdStartMsg -> GenericComm.ReceiveMsg[AM_ROBOCMDSTARTMSG];
  RoboMsgM.RCmdStopMsg -> GenericComm.ReceiveMsg[AM_ROBOCMDSTOPMSG];
  RoboMsgM.RCmdStatMsg -> GenericComm.ReceiveMsg[AM_ROBOCMDSTATMSG];
  RoboMsgM.RCmdDataMsg -> GenericComm.ReceiveMsg[AM_ROBOCMDDATAMSG];
  // Status replies to send
  RoboMsgM.RStatusMsg -> GenericComm.SendMsg[AM_ROBOSTATUSMSG];
  RoboMsgM.RDataMsg -> GenericComm.SendMsg[AM_ROBODATAMSG];

And in the code module (RoboMsg.nc in this case) you create the
methods for each:

/**
* Signalled when the Start Command AM is received.
* @return The free TOS_MsgPtr.
*/
event TOS_MsgPtr RCmdStartMsg.receive(TOS_MsgPtr m)
{
...
return m;   
}

/** task to send StatusMsg
**/
task void messageTask()
{
...
call RStatusMsg.send( TosBaseId, sizeof(RoboStatusMsg), statmsgp );
}


MS






Peizhao Hu wrote:

Hi

I have three motes:

Mote(Base) - receive sensing data from Mote(Sensor) nodes and forward 
them to PC.
Mote(Sensor) - sense temperature readings, and listen to Mote(Base) for 
changing of sampling rate, etc; and listen to Mote(Reference) for 
location reference points to calculate its current position.

Mote(Reference) - periodically broadcast its location.

So, how can I implement the Mote(Sensor) to receive two different 
message types when they arrived?
My current TinyOS application is a modification of AntiTheft app, but 
not sure how I can distinguish these different message types.




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


Re: [Tinyos-help] Wiring parameterised interfaces

2007-07-31 Thread Michael Schippling

I think you need to wire the Timer StdControl:

 Main.StdControl -> TimerC;

Yong, Chee Yeew wrote:

Hello all,

I am having a bit of a problem wiring parameterised interfaces. The program
is as below.

I keep getting the error: 
"MyTimers.start() not connected".


I am not sure why it is complaining when I clearly have MyTimers wired in
the Configuration file.
My environment is Cygwin with TinyOS 1.1.10.

Thanks for any help/advice.

Regards,
Chee

=
Configuration file (TestC.nc):
configuration TestC {
}
implementation {
  components Main, TestM, TimerC;
  Main.StdControl -> TestM;
  TestM.MyTimers[0] -> TimerC.Timer[unique("Timer")];
  TestM.TimerControl -> TimerC;
}

==
Module file (TestM.nc):
module TestM {
  provides interface StdControl;
  uses {
interface Timer as MyTimers[uint8_t tid];
interface StdControl as TimerControl;
  }
}
implementation {
  event result_t MyTimers.fired[uint8_t tid]() {
return SUCCESS;
  }

  command result_t StdControl.init() {
return call TimerControl.init();
  }

  command result_t StdControl.start() {
call TimerControl.start();
call MyTimers.start[0](TIMER_ONE_SHOT, 1000);
return SUCCESS;
  }

  command result_t StdControl.stop() {
return SUCCESS;
  } 
}

***
Please consider the environment before printing this email.
***
This email and any files transmitted with it are intended solely for the use of
the individual or entity to whom they are addressed and may not be divulged to
any third party without the express permission of the originator.  Any views
expressed in this message are those of the individual sender, except where the
sender specifically states them to be the views of Thales Research & Technology
(UK) Limited.
***

___
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] Receiving messages via TOSBase

2007-07-31 Thread Michael Schippling

See my code bolus for an example using mica's and T1:
http://www.etantdonnes.com/Motes/robocode.tar.gz

I'm not sure what you mean by "typecast at TOSBase",
it should pretty much be a transparent pass-through.
Perhaps you are not calculating CRCs correctly or have
the wrong total message length?

MS

antonio gonga wrote:

Hey All,
I'm sending query packets from a Java Application to a Mote but I'm 
unable to typecast the message at TOSBase and consequently

I don't receive nothing.

Does anyone know how to send messages to a mote via TOSBase?

Thanks in advance..
-antonio.

***
Gonga, Antonio Oliveira
e-mail: [EMAIL PROTECTED]
Cell Phone: +46762320854
***




Local listings, incredible imagery, and driving directions - all in one 
place! Find it! 





___
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] HDLC problem with BaseStationCC2420

2007-08-01 Thread Michael Schippling

I believe that "they" changed the message structure slightly in T2
so as to be incompatible with any previous host software...Look
into the equivalent of types/AM.h to see what needs to be modified.

MS

Hristo Bojkov wrote:

Hello tinyOS coders,
 
I am new to TinyOS2. I have used TinyOS 1.1 for 6 months. When I tried 
to switch our application to TinyOS2, I discovered strange problem. The 
packets that I've received from BaseStationCC2420 are not in HDLC format 
as the packets were from TOSBase of TOS1.1. I read through app.c file 
and there in the code I saw files that are related to Serial 
communication and HDLC, but still the packets are strange. There is no 
FLAG byte 7E, also the 42 byte showing the NoACK type is missing, I am 
receiving just bytes without known for me format. The BaseStationCC2420 
is compiled with "make telosb" and no change is made. The receiving 
application on PC is the same which we use for TOS1.1 and is capable of 
decoding HDLC.
 
This is example of the received bytes, and there is no pause, I just cut 
the lines for the mail, they are consecutive:


4788C86C4C442764A4EB9FF47C00FA080821000A0EC4A464A4A4A464E

4A4A4A5FFF07C00FA080821000A0ECFE8C9A3F7868AC0C9A1CE32321

EE47C00FA080821000A0F04E4E4246464A46764A4AABFF07C00FA080821000A0F0F242

Do I miss something?

 Is there a setting I haven't set for HDLC to be used for encoding?

 


Platform: Timote Sky

Host OS: WinXP

 

 




Free Animations for your email - By IncrediMail! Click Here! 






___
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] Wiring parameterised interfaces

2007-08-01 Thread Michael Schippling

I accidentally hit send, or some combination of keys that said send,
and didn't complete the message. The other thing I was going to mention,
because I haven't seen the array usage:
TestM.MyTimers[0] -> TimerC.Timer[unique("Timer")];
maybe leave the [0] off? That's the way I use the TimerC module anyway.

MS

Yong, Chee Yeew wrote:

Thanks for the reply, but I wish it was that easy to solve.

I believe the problem to be that I am wiring the Timer erroneously in TestC.
However, I cannot put my finger on why my wiring is not acceptable to ncc. 


Chee


-Original Message-----
From: Michael Schippling [mailto:[EMAIL PROTECTED]
Sent: 31 July 2007 18:57
To: Yong, Chee Yeew 
Cc: tinyos-help@Millennium.Berkeley.EDU

Subject: Re: [Tinyos-help] Wiring parameterised interfaces


I think you need to wire the Timer StdControl:

  Main.StdControl -> TimerC;

Yong, Chee Yeew wrote:

Hello all,

I am having a bit of a problem wiring parameterised 

interfaces. The program

is as below.

I keep getting the error: 
"MyTimers.start() not connected".


I am not sure why it is complaining when I clearly have 

MyTimers wired in

the Configuration file.
My environment is Cygwin with TinyOS 1.1.10.

Thanks for any help/advice.

Regards,
Chee

=
Configuration file (TestC.nc):
configuration TestC {
}
implementation {
  components Main, TestM, TimerC;
  Main.StdControl -> TestM;
  TestM.MyTimers[0] -> TimerC.Timer[unique("Timer")];
  TestM.TimerControl -> TimerC;
}

==
Module file (TestM.nc):
module TestM {
  provides interface StdControl;
  uses {
interface Timer as MyTimers[uint8_t tid];
interface StdControl as TimerControl;
  }
}
implementation {
  event result_t MyTimers.fired[uint8_t tid]() {
return SUCCESS;
  }

  command result_t StdControl.init() {
return call TimerControl.init();
  }

  command result_t StdControl.start() {
call TimerControl.start();
call MyTimers.start[0](TIMER_ONE_SHOT, 1000);
return SUCCESS;
  }

  command result_t StdControl.stop() {
return SUCCESS;
  } 
}



**
*

Please consider the environment before printing this email.


**
*
This email and any files transmitted with it are intended 

solely for the use of
the individual or entity to whom they are addressed and may 

not be divulged to
any third party without the express permission of the 

originator.  Any views
expressed in this message are those of the individual 

sender, except where the
sender specifically states them to be the views of Thales 

Research & Technology

(UK) Limited.


**
*

___
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] Maximum timer interval for MicaZ?

2007-08-01 Thread Michael Schippling

TimerC uses Timer/Counter1 which is 16 bits, so that's a theoretical max.
But you would have to go look at the code, or experiment, to see if there's
more headroom eaten up by data munging...
MS


Siirtola Harri wrote:

I'll need vry long measurement intervals for my application. What's
the maximum value for parameter 'interval' with MicaZ? 22,118,400
(0x1518000) binary milliseconds is 4 hours and fits in an uint32_t, does
it work? Or do I have to establish a counter?

Regards,

Harri



___
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] how to read analogue input on telosb (T-Mote Sky)?

2007-08-01 Thread Michael Schippling

Well, look at the micasb version. It wraps Photo (or Temp, I never remember)
which further wraps ADC (which does actually do something in-between...).
I'm going to assume that the telosb internal voltage sensor is implemented
as some kind of ADC as well. The basic pattern is:

// in some method, often Timer.fired(), start a conversion:
 call ADC.getData();


// Then create an event to catch the conversion result:
async event result_t ADC.dataReady( uint16_t data )
{
// do something with "data"
...

return SUCCESS;
}

I too am sure there was a good reason behind the design approach,
however I'm not always clear on what it might be...
MS

Akos Maroy wrote:

Did deeper into DemoSensor. First of course you have to figure out
which one and where it is...I don't (yet) have a tmote dev environment,
but for the Mica's it's in tos/sensorboards/micasb/DemoSensorC.nc


DemoSensorC on telosb simply calls the internal voltage sensor - it's not
related to any of the ADC's :(


What you will find is that it is a dimly veiled layer over an ADC input,
which, IMHO, just obscures and obfuscates the usage...


it's true there are a lot of abstraction layers - and it makes it hard to
figure out what to do :( having said this, I'm sure there is good reason
behind this design approach.


Akos


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


Re: [Tinyos-help] Reciving and Sending messages via TOSBase_TinyOS-1.x_micaz

2007-08-01 Thread Michael Schippling

That looks like it should work. You do know that there is another
yellowToggle() call in the standard TOSBase, right? Maybe they are
competing with each other...

Also by printing out messages, does this mean you are running a
simulator? Perhaps you can debug in and look at what's actually
happening...

MS

antonio gonga wrote:


Hey MS,
I'm using Micaz and I changed TOSBase to work with Micaz->
   //CC1000RadioIntM as RMac,/* mica2 */
 CC2420RadioM as RMac,/* micaz */
It's really  a bit strange, I'm correctly receiving messages from Motes 
in the Java Application, but whenever I send messages to the motes I 
have problems.
all expected behavior is ok. The red led is toggling it means that the 
messages are being forwarded by the TOSBase... but the typecast to 
querMsg it's not working.

my query Structure is:
typedef struct queryMsg{
uint16_t msgType;  //
uint16_t destID;
uint16_t upperth;
uint16_t  lowerth;
}

I send this values in a Java Application(I used MIG to generates the 
queryMsg.java file.):

queryMsg query = new queryMsg();
 query.set_destID(11);
 query.set_msgType(03);
 query.set_upperth(123);
 query.set_lowerth(120);

I use  MoteIF.send to send the messages
try{
mote.send(MoteIF.TOS_BCAST_ADDR, query);
   }catch(Exception ex){ ex.printStackTrace(); }

and in the TOSBase I do  this:
event TOS_MsgPtr UARTTokenReceive.receive(TOS_MsgPtr Msg, uint8_t Token) {
TOS_MsgPtr  pBuf;
queryMsg *p;
   
p =(queryMsg*)Msg->data;

if(p->msgType == 3)
call Leds.yellowToggle();  // as I set msgType= 3I expect the 
yellow led to toggle... but it's not working.

 //rest of the code suppressed..
} // end of UARTTokenReceive.receive

I printed the messages inside of the Sender.send method and what is 
being printed is like this:

sent: 8 0 0 0 0 0 -1 -1 10 125 3 0 11 0 123 0 120 0  and decoding it is:
8 0 0 0 0 0 -1 -1 TOS_BCAST_ADDR
10 -> AMType
125 -> TOS_AM_GROUP
3 0 ->msgType
11 0 ->destID
123 0 ->upperth
120 0 ->lowerth.
I don't understand what is wrong... maybe what is missing is the length 
of the message but I also printed it ans it's equal to 18

please help me...

thanks in advance
-antonio gonga





See what you’re getting into…before you go there. Check it out! 






___
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] Regarding XML Parser for TinyOS

2007-08-01 Thread Michael Schippling

I agree...since you need a proxy of some kind on a PCish host,
I would put parsing and encoding software there instead of pushing
it all the way out to the sensors. Appropriate Technology and all...
MS


J. Ryan Stinnett wrote:
As I said, the largest packet would be about 256 bytes, but the standard 
T2 application data length is 28 bytes, which seems far too small for 
tagged data of any more than the simplest kind.  This would mean you'd 
likely have to split your data across multiple packets, which also adds 
more complexity.  Keep in mind that micaz motes only have 4 KB of RAM, 
so you could run out of RAM quickly if you increase the data length or 
store a large number of packets.  Also, the XML parser could cause a 
huge increase in code size.


Most likely, you should be able to do without XML.  With more details on 
your specific application, perhaps someone could suggest an alternative.


- Ryan

Adi Mallikarjuna Reddy V wrote:
Ofcourse, what ever your saying regarding the XML on a sensor node is 
right. As you said, it is the application that forced us to think in 
this way.
 
What do you think are the possible obstacles in using XML format for 
messages and then parsing them at the sensor nodes.
 
Regards

Adi

 
On 8/2/07, *J. Ryan Stinnett* <[EMAIL PROTECTED] 
> wrote:


Interesting, so there apparently is an XML library...  However, I 
still

can't see a real need for that on a mote.  I've found that XML can be
useful way to store data on a computer that is connect to a sensor
network, but on the motes themselves I can't see why you'd want to go
that route.  Is there a particular reason or application that led
you to
consider XML?

- Ryan

Adi Mallikarjuna Reddy V wrote:
 > Hi Ryan,
 >
 > Later when I searched for it, I found something called TinyXML at
 > http://ics.yeditepe.edu.tr/tnl/html/tinyxml.html. Have look at  
it. I

 > didnt explore the capabilities of it.
 >
 > Regards
 > Adi
 >
 >
 > On 8/2/07, *J. Ryan Stinnett* < [EMAIL PROTECTED]
 >>
 > wrote:
 >
 > If you mean parsing XML data in messages sent via the radio,
I don't
 > think that would be very feasible.  XML is a pretty verbose
format, and
 > the largest packet the CC2420 can send is around 256
bytes.  It would
 > probably be best to stick with more compact data
representations.
 >
 > - Ryan
 >
 > Adi Mallikarjuna Reddy V wrote:
 >  > Hi all,
 >  >
 >  > Has any one tried out having an XML parser running on the
sensor
 > nodes
 >  > along with TinyOS/nesC? Something like TinyXMLParser,
which can
 >  > interpret the XML messages that a node receives?.
 >  >
 >  > Any suggestions on this line would be of great helpful.
 >  >
 >  > Regards
 >  > Adi
 >  >
 >  > --
 >  > ---
 >  > I was always alone in this world,
 >  > wanted to be loved,by someone.
 >  > I always had teary eyes,
 >  > wanted it to be wiped by someone.
 >  > --
 >
 >
 >
 >
 > --
 > ---
 > I was always alone in this world,
 > wanted to be loved,by someone.
 > I always had teary eyes,
 > wanted it to be wiped by someone.
 > --




--
---
I was always alone in this world,
wanted to be loved,by someone.
I always had teary eyes,
wanted it to be wiped by someone.
--

___
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] HDLC problem with BaseStationCC2420

2007-08-02 Thread Michael Schippling

I'm still a T1 luddite, since it works for me...
I hope someone else can look at the files in question
and answer the question in question.
MS


Hristo Bojkov wrote:
Thanks Michael, 
In the AM.h in TOS2 there are few defines only for addresses. The message

structure for the radio is changed, but the HDLC packets should be in same
format. The defines about HDLC are in fact in Serial.h and I can see that
flag byte is the same, so HDLC enabled program for TOS 1 should read serial
packets from TOS 2. See the enum: 
   enum  {
   HDLC_FLAG_BYTE = 0x7e, 
   HDLC_CTLESC_BYTE = 0x7d, 
   }; 


So I know I've miss something, but for now I am not able to see where is the
problem.

HB

---Original Message--- 
 
From: Michael Schippling 
Date: 01.08.2007 г. 19:59:19 
To: Hristo Bojkov 
Cc: Tinyos-help@Millennium.Berkeley.EDU 
Subject: Re: [Tinyos-help] HDLC problem with BaseStationCC2420 
 
I believe that "they" changed the message structure slightly in T2 
So as to be incompatible with any previous host software...Look 
Into the equivalent of types/AM.h to see what needs to be modified. 
 
MS 
 
Hristo Bojkov wrote: 
Hello tinyOS coders, 

I am new to TinyOS2. I have used TinyOS 1.1 for 6 months. When I tried 
to switch our application to TinyOS2, I discovered strange problem. The 
packets that I've received from BaseStationCC2420 are not in HDLC format 
as the packets were from TOSBase of TOS1.1. I read through app.c file 
and there in the code I saw files that are related to Serial 
communication and HDLC, but still the packets are strange. There is no 
FLAG byte 7E, also the 42 byte showing the NoACK type is missing, I am 
receiving just bytes without known for me format. The BaseStationCC2420 
is compiled with "make telosb" and no change is made. The receiving 
application on PC is the same which we use for TOS1.1 and is capable of 
decoding HDLC. 

This is example of the received bytes, and there is no pause, I just cut 
the lines for the mail, they are consecutive: 

4788C86C4C442764A4EB9FF47C00FA080821000A0EC4A464A4A4A464E 

4A4A4A5FFF07C00FA080821000A0ECFE8C9A3F7868AC0C9A1CE32321 

EE47C00FA080821000A0F04E4E4246464A46764A4AABFF07C00FA080821000A0F0F242 

Do I miss something? 

Is there a setting I haven't set for HDLC to be used for encoding? 




Platform: Timote Sky 
Host OS: WinXP 
 
___

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] C struct questions in TinyOS

2007-08-02 Thread Michael Schippling

You are right about
typedef struct { int16_t var; } MateValueVariable;
being functionally equivalent to
typedef int16_t MateValueVariable;

However the usage would be a bit different.
For the first you would do:
MateValueVariable x;
x.val = NNN;
and the second:
MateValueVariable x;
x = NNN;

Since there are two examples of seeming redundancy, and they have
the same member name "val", someone may be trying to imitate Object
Disoriented overloading or something. You'd have to go look at
the use in the code to see if there was rhyme or reason. One reason
would be that using a struct allows for future expansion of ...Variable
without having to modify existing code.

MS


Supasate Choochaisri wrote:

Hi all,

I'm not quite familiar with C language, so I doubt about the following 
codes in Mate (TinyOS-VM) :


1: typedef struct {
2:   int16_t var;
3: } MateValueVariable;
4: 
5: typedef struct {


6:   uint8_t type;
7:   uint8_t size;
8:   int16_t entries[MATE_BUF_LEN];
9: } MateDataBuffer;
10: 
11: typedef struct {

12:   MateDataBuffer* var;
13: } MateBufferVariable;
14: 
15: typedef struct {


16:   uint8_t type;
17:   union {
18: MateValueVariable value;
19: MateBufferVariable buffer;
20:   };
21: } MateStackVariable;


Line 1-3, compare to "typedef int16_t MateValueVariable", how difference 
is it?


Line 11-13, why do we have to use this struct? why not just change line 
9 to MateBufferVariable and delete line 11-13?


Thanks in advance,

Supasate




___
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] How to Send Msgs fromTOSBase to a Mote Using GenricComm

2007-08-02 Thread Michael Schippling

That code looks correct to me. Start by sending to BCAST addr
just in case you have a moteID mismatch. Also check that you
have the right xmit frequency and power defines. Have you
even gotten a radio message to work, like with one of the
demo apps? The apps/MicaHWVerify program tests radio connectivity.
MS


antonio gonga wrote:

Hey all,
I'm trying to send messages from the TOSBase to a Mote... I receive the 
packet correctly in TOSBase.. but the Mote is not receiving...

I need your suggestions...
configuration Receiver {
}
implementation {
components Main, ReceiverM;
components GenericComm as Comm;
components IntToLeds;
   
Main.StdControl -> ReceiverM.StdControl;

Main.StdControl ->IntToLeds.StdControl;
Main.StdControl -> Comm;
   
 ReceiverM.RadioControl ->Comm.Control;

ReceiverM.RadioReceive ->Comm.ReceiveMsg[0xa];
//ReceiverM.RadioSend ->Comm;
IntToLeds.IntOutput <-ReceiverM.IntOutput;
}
___
includes AM;
includes queryMsg;
module ReceiverM {
provides {
interface StdControl;   
}uses{

interface StdControl as RadioControl;
interface IntOutput;
//interface Receive as Bcast;
   
interface ReceiveMsg as RadioReceive;   
//interface BareSendMsg as RadioSend;   
}

}
implementation {

command result_t StdControl.init() {
call RadioControl.init();
return SUCCESS;
}
command result_t StdControl.start() {
call RadioControl.start();
return SUCCESS;
}

command result_t StdControl.stop() {
call RadioControl.stop();
return SUCCESS;
}
event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr Msg) {
TOS_MsgPtr pBuf = Msg;
queryMsg *p =(queryMsg*)Msg->data;
call IntOutput.output(0x7);
return pBuf;   
}

event result_t IntOutput.outputComplete(result_t success){
return SUCCESS;
  }
}
I think that the code is OK..



Missed the show?  Watch videos of the Live Earth Concert on MSN. See 
them now! 





___
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] AM_INTMSG or TOS_BCAST_ADDR

2007-08-02 Thread Michael Schippling
On the issue of not filtering by moteID...
T1 GenericComm on micas does, and your mod of send is correct.
However I've heard tales of that not happening on this list,
but I don't remember what combination of modules and platforms
were at issue. You could try a search and see if anything turns up.
MS


Urs Hunkeler wrote:
> Hi,
> 
> Think of AM_INTMSG as something like a port number. It does not identify
> a mote. TOS_BCAST_ADDR is a broadcast address. All nodes that physically
> receive the message will forward it to the application layer. You can
> find more information in this paper: http://www.tinyos.net/papers/ammote.pdf
> 
> Cheers,
> Urs
> 
> 
> Chen Bleed schrieb:
>>  
>> Hello, all
>>  
>> Now I am studying for Lesson 4 of TinyOS 1.x tutorial.I have two tmote 
>> sky(s) and I also have a problem.
>>  
>> The file IntToRfm.nc has the line "IntToRfmM.Send -> 
>> Comm.SendMsg[AM_INTMSG];"I consult IntMsg.h and find out the value of 
>> AM_INTMSG is 4(by default, you can change).
>>  
>> The id of One of my tmote is 3. I upload CntToLedsAndRfm program.The other 
>> tmote whose id is 4. I upload RfmToLeds program.It works fine.
>>  
>> When I change the code in IntToRfmM.nc/* code - start */if (call 
>> Send.send(TOS_BCAST_ADDR, sizeof(IntMsg), &data))  return SUCCESS;/* code - 
>> end */
>>  
>> to code/* code - start */if (call Send.send(0x000a, sizeof(IntMsg), &data))  
>> return SUCCESS;/* code - end */
>>  
>> I want to transmit message to mote 10 but mote 4 still receives messages.(I 
>> know TOS_BCAST_ADDR is 0x).Then I run CntToLedsAndRfm on TinyViz and 
>> create 30 motes.I see all motes has shot radio purple line to mote 10(use 
>> radio plugin).I am confused!!!
>>  
>> So, I cannot change this result(mote 4 receives messages) even if I modify 
>> the destination address??Indeed, I dont know the relation between AM_INTMSG 
>> and TOS_BCAST_ADDR.Does anyone explain it??
>> thx all, and sorry for my bad English.Chen, Chien Mao
> ___
> 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] Environment Variables (path is empty in tinyos) !!!!

2007-08-03 Thread Michael Schippling
Do what somebody just someone else to do...

printenv > env.txt

and send us the env.txt file (it should be plain-text
and not too long, so just copy and paste it into the email).

To set a PATH variable do something like this:

export PATH="/cygdrive/c/JAVA/j2sdk1.4.2_04/bin:\
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:.:$PATH:\
/cygdrive/c/PROGRAMS/BIN/WIN32APP:/cygdrive/c/PROGRAMS/BIN"

or CLASSPATH, which is what toscheck is complaining about:

export CLASSPATH=".;$TOSROOT/tools/java/jars/tinytools.jar"

You'll need to changed the actual paths in those variables
to match your own system. Do "man bash" to see a description
of just about everything you can do in the command shell, or
try googling CLASSPATH, etc for details.

MS

mejda chouaieb wrote:
> 
> Hello, all
>  
> Now I am studying Lesson 1 of TinyOS 2.x tutorial.
> I have two tmote sky(s) (Telosb) and I also have a problem.
> I have installed tinyos in windows and when I type tos-check-env I have 
> these warnings ( I joned a printscreen). the path variable is empty when 
> I type echo $path there is nothing.
> can someone help me please? thank you in advance.
>  
> 
> 
> 
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
>  vers Yahoo! Mail
> 
> 
> 
> 
> ___
> 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] MicaHWVerify hardware_check problem

2007-08-04 Thread Michael Schippling

With a little Internot sleuthing I think I found "stargate" at:
http://www.xbow.com/Products/productdetails.aspx?sid=229
I believe it is an alternate base-station approach. Assuming
that you are running the HWVerify on a separate host, you
probably need to use an IP address instead of serial.
Rummage in the stargate doc (if any) and see how you access
it from the external world. They might even have a MOTECOM
setting for it.

MS

Brian Mulanda wrote:


Are you also using a MIB### programming board? If so, what kind?

-Brian


On 8/3/07, *shankar sens* < [EMAIL PROTECTED] 
> wrote:


Hi,

I am trying to check newly brought Micaz mote with MicaHWVerify
(TinyOS 1.1.11 ). Micaz motes are programmed using Stargate.

The LEDs on the mote are blinking as a binary counter. But when
harware_check is run, i am getting the following error:

1)

Hardware check started
[EMAIL PROTECTED]:57600: resynchronising
java.io.IOException: not open
at
net.tinyos.packet.StreamByteSource.writeBytes(StreamByteSource.java:91)
at net.tinyos.packet.Packetizer.writeFramedPacket
(Packetizer.java:362)
at
net.tinyos.packet.Packetizer.writeSourcePacket(Packetizer.java:176)
at
net.tinyos.packet.AbstractSource.writePacket(AbstractSource.java:116)
at net.tinyos.packet.PhoenixSource.writePacket
(PhoenixSource.java:127)
at net.tinyos.message.Sender.send(Sender.java:145)
at net.tinyos.message.MoteIF.send(MoteIF.java:200)
at hardware_check.run(hardware_check.java:84)
at hardware_check.main(hardware_check.java:142)
java.io.IOException: closed
at
net.tinyos.packet.AbstractSource.failIfClosed(AbstractSource.java:97)
at
net.tinyos.packet.AbstractSource.writePacket(AbstractSource.java:113)
at net.tinyos.packet.PhoenixSource.writePacket
(PhoenixSource.java:127)
at net.tinyos.message.Sender.send(Sender.java:145)
at net.tinyos.message.MoteIF.send(MoteIF.java:200)
at hardware_check.run(hardware_check.java:84)
at hardware_check.main(hardware_check.java:142)

2) Also the following message is displayed on stargate console when
the mote is connected:

error: no packet handler for tos type 0x0a  


Please let me know what might be wrong.

Thanks,
Shankar



___
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 mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Environment Variables (path is empty in tinyos) !!!!

2007-08-06 Thread Michael Schippling

Well you have what looks like a good PATH, and I just noticed you
complained that "echo $path" is empty, which is right because it's
case sensitive...only PATH is of interest to cygwin.

If I remember correctly tos-check complained about a missing CLASSPATH
which is a Java variable, and in fact you don't seem to have one.
I stand by my suggestion for setting that. You can add it to your
$HOME/.bashrc file (or .bash_profile ... I forget which).
Or put it in the MyComputer...EnvironmentVariables panel.

Have you tried to do any TOS compiles? Are there other problems?

MS

mejda chouaieb wrote:


"printenv > env.txt" gives this :
HOMEPATH=\Documents and Settings\mejda
MANPATH=/usr/local/man:/usr/share/man:/usr/man:
APPDATA=C:\Documents and Settings\mejda\Application Data
HOSTNAME=missy_18
MSP430TOOLS=/opt/msp430
TERM=cygwin
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 8, GenuineIntel
WINDIR=C:\WINDOWS
OLDPWD=/cygdrive/c/cygwin/opt/tinyos-2.x
USERDOMAIN=MISSY_18
OS=Windows_NT
ALLUSERSPROFILE=C:\Documents and Settings\All Users
USER=mejda
!::=::\
LD_LIBRARY_PATH=:/opt/msp430/lib
TEMP=/cygdrive/c/DOCUME~1/mejda/LOCALS~1/Temp
COMMONPROGRAMFILES=C:\Program Files\Fichiers communs
USERNAME=mejda
PROCESSOR_LEVEL=6
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/PROGRA~1/ATT/Graphviz/bin:/opt/msp430/bin
MAN_PATH=:/opt/msp430/man
PWD=/cygdrive/c/cygwin/opt/tinyos-2.x/tests
SYSTEMDRIVE=C:
USERPROFILE=C:\Documents and Settings\mejda
CLIENTNAME=Console
PS1=\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$
LOGONSERVER=\\MISSY_18
PROCESSOR_ARCHITECTURE=x86
!C:=C:\cygwin\bin
SHLVL=1
HOME=/home/mejda
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
HOMEDRIVE=C:
PROMPT=$P$G
COMSPEC=C:\WINDOWS\system32\cmd.exe
PYTHONPATH=:/opt/msp430/lib/python2.3/site-packages/
TMP=/cygdrive/c/DOCUME~1/mejda/LOCALS~1/Temp
SYSTEMROOT=C:\WINDOWS
PRINTER=
CVS_RSH=/bin/ssh
PROCESSOR_REVISION=0f08
MAKE_MODE=unix
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
PROGRAMFILES=C:\Program Files
NUMBER_OF_PROCESSORS=1
SESSIONNAME=Console
COMPUTERNAME=MISSY_18
_=/usr/bin/printenv

and I want to know if something is missing in these variables ?!
I have to port tinyos to an other plateform so i have to understand 
tinyos2.x and especially telos fonctionalites verry well. so if someone 
can give me some links or doc it will be verry nice, because i'm new in 
tinyos world ;-)

Thank you all
----- Message d'origine 
De : Michael Schippling <[EMAIL PROTECTED]>
À : mejda chouaieb <[EMAIL PROTECTED]>
Cc : tinyos-help@Millennium.Berkeley.EDU
Envoyé le : Vendredi, 3 Août 2007, 20h01mn 30s
Objet : Re: [Tinyos-help] Environment Variables (path is empty in 
tinyos) 


Do what somebody just someone else to do...

printenv > env.txt

and send us the env.txt file (it should be plain-text
and not too long, so just copy and paste it into the email).

To set a PATH variable do something like this:

export PATH="/cygdrive/c/JAVA/j2sdk1.4.2_04/bin:\
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:.:$PATH:\
/cygdrive/c/PROGRAMS/BIN/WIN32APP:/cygdrive/c/PROGRAMS/BIN"

or CLASSPATH, which is what toscheck is complaining about:

export CLASSPATH=".;$TOSROOT/tools/java/jars/tinytools.jar"

You'll need to changed the actual paths in those variables
to match your own system. Do "man bash" to see a description
of just about everything you can do in the command shell, or
try googling CLASSPATH, etc for details.

MS

mejda chouaieb wrote:
 >
 > Hello, all
 >  
 > Now I am studying Lesson 1 of TinyOS 2.x tutorial.
 > I have two tmote sky(s) (Telosb) and I also have a problem.
 > I have installed tinyos in windows and when I type tos-check-env I have
 > these warnings ( I joned a printscreen). the path variable is empty when
 > I type echo $path there is nothing.
 > can someone help me please? thank you in advance.
 >  
 >

 >
 > 
 > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails
 > <http://www.trueswitch.com/yahoo-fr/> vers Yahoo! Mail
 >
 >
 > 
 >
 > ___
 > Tinyos-help mailing list
 > Tinyos-help@Millennium.Berkeley.EDU
 > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
<http://www.trueswitch.com/yahoo-fr/> vers Yahoo! Mail




Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
<http://www.trueswitch.com/yahoo-fr/> vers Yahoo! M

Re: [Tinyos-help] MicaHWVerify hardware_check problem

2007-08-06 Thread Michael Schippling

I'm sending this back to the help list in case someone else can...

Looking at the hwcheck java, it looks like it thinks it got a
message back, but there are some errors in the message itself.
It may be that the SF on the programmer is not entirely compatible.
I don't use SF or stargate so I can't be much more help...

MS

shankar sens wrote:

Hi,

I set the MOTECOM to sf@: and run hardware_check from PC, i 
get the following output.


Hardware check started
4Mbit flash check failed 255 255 255

A C based serial forward program is running on the programming board.


Is there a solution to this.

Thanks,
Bharath


On 8/4/07, * Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


With a little Internot sleuthing I think I found "stargate" at:
 http://www.xbow.com/Products/productdetails.aspx?sid=229
I believe it is an alternate base-station approach. Assuming
that you are running the HWVerify on a separate host, you
probably need to use an IP address instead of serial.
Rummage in the stargate doc (if any) and see how you access
it from the external world. They might even have a MOTECOM
setting for it.

MS

Brian Mulanda wrote:
 >
 > Are you also using a MIB### programming board? If so, what kind?
 >
 > -Brian
 >
 >
 > On 8/3/07, *shankar sens* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
 >
 > Hi,
 >
 > I am trying to check newly brought Micaz mote with MicaHWVerify
 > (TinyOS 1.1.11 ). Micaz motes are programmed using Stargate.
 >
 > The LEDs on the mote are blinking as a binary counter. But when
 > harware_check is run, i am getting the following error:
 >
 > 1)
 >
 > Hardware check started
 > [EMAIL PROTECTED]:57600: resynchronising
 > java.io.IOException: not open
 > at
 > net.tinyos.packet.StreamByteSource.writeBytes
(StreamByteSource.java:91)
 > at net.tinyos.packet.Packetizer.writeFramedPacket
 > (Packetizer.java:362)
 > at
 >
net.tinyos.packet.Packetizer.writeSourcePacket(Packetizer.java :176)

 > at
 >
net.tinyos.packet.AbstractSource.writePacket(AbstractSource.java:116)

 > at net.tinyos.packet.PhoenixSource.writePacket
 > (PhoenixSource.java:127)
 > at net.tinyos.message.Sender.send(Sender.java:145)
 > at net.tinyos.message.MoteIF.send(MoteIF.java:200)
 > at hardware_check.run(hardware_check.java:84)
 > at hardware_check.main(hardware_check.java:142)
 > java.io.IOException: closed
 > at
 >
net.tinyos.packet.AbstractSource.failIfClosed(AbstractSource.java:97)

 > at
 >
net.tinyos.packet.AbstractSource.writePacket(AbstractSource.java :113)

 > at net.tinyos.packet.PhoenixSource.writePacket
 > (PhoenixSource.java:127)
 > at net.tinyos.message.Sender.send(Sender.java:145)
 > at net.tinyos.message.MoteIF.send (MoteIF.java:200)
 > at hardware_check.run(hardware_check.java:84)
 > at hardware_check.main(hardware_check.java:142)
 >
 > 2) Also the following message is displayed on stargate
console when
 > the mote is connected:
 >
 > error: no packet handler for tos type 0x0a
 >
 > Please let me know what might be wrong.
 >
 > Thanks,
 > Shankar
 >
 >
 >
 > ___
 > Tinyos-help mailing list
 > Tinyos-help@Millennium.Berkeley.EDU
<mailto:Tinyos-help@Millennium.Berkeley.EDU>
 > mailto:Tinyos-help@Millennium.Berkeley.EDU>>
 >
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

<https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help>
 >
<https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

<https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help>>
 >
 >
 >
 >


 >
 > ___
 > Tinyos-help mailing list
 > Tinyos-help@Millennium.Berkeley.EDU
<mailto: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] reading voltage values using Mica2

2007-08-06 Thread Michael Schippling

First your measured voltage should be between 0 and 3 volts
(the mica battery voltage). If it's some kind of proportional
thing it's actually a good idea to use the mica batteries to
power it because they are used as the ADC reference.

Then pick an available ADC input. Here's a pin list I made years ago:
http://www.etantdonnes.com/Motes/ATMEGApins.txt
Connect the sensor ground to mica ground and the output to the ADC in.

Trash DemoSensor in O'scope and replace it with ADCC. In the config
file it's something like this:
 RobotM.Target -> ADCC.ADC[ROBOADC_TARGET];
Readup in the tutorial about how to manipulate config files and trace
the DemoSensor all the way down to ADC world to see an example. My
Motes directory also contains largish and complicated example code
for TOS 1.x.

MS

Akarsha Ramani wrote:
I am a beginner with nesC programming. I am working on an application 
where I need to send voltage values from the node to the base station. I 
am programming Mica2 motes with OscilloscopeRF code to get the voltage 
readings. I am not sure about the channel from which the data needs to 
be collected. 
Can someone provide any inputs on reading voltage values using Mica2 ?


Thanks.


Looking for a deal? Find great prices on flights and hotels 
 
with Yahoo! FareChase.





___
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] Disabling interrupts

2007-08-07 Thread Michael Schippling

It means that no interrupts are serviced until they are enabled again.
You probably don't miss any, unless you overrun due to blocking for too long.
See my last breathless post on this:
https://mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-July/027039.html
and search for "interrupt" on this list for more...
MS


Min Guo wrote:

What is the meaning of "interrupts are disabled"?

Interrupts are disabled when using atomic sections:

atomic {

...

}

On the MSP430 micro controller, does this mean the interrupts will be
delayed after the atomic section, or simply be discarded?

The same question for maskable interrupts: while a maskable interrupt
handler is under execution, a new maskable interrupt comes - in this
case, this new interrupt will be "disabled". Does this mean the new
interrupt be discarded or delayed?

In what case will an interrupt be lost?

Thanks a lot!
Min
___
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] Disabling interrupts

2007-08-07 Thread Michael Schippling

I'm cc'ing back to the help list to keep a record of my mistakes...

I haven't yet worked with the MSP so don't take this as gospel.
Generally interrupts last until they are serviced, and the order
is system dependent, for which I have not seen any documentation.
So if a bunch of different things interrupt they will eventually
get attention. But if the processor is too slow, a second int
could come in from some repetitive process like a timer, and you
will miss the intervening events.

was that the question?
MS

Min Guo wrote:

Thanks. What happens if the same kind of interrupt are generated for
several times? I am not sure, if I understand correctly, MSP430 have a
register for each kind of interrupt. If more than one interrupts of
the same type are generated, will some be lost?

On 8/7/07, Michael Schippling <[EMAIL PROTECTED]> wrote:

It means that no interrupts are serviced until they are enabled again.
You probably don't miss any, unless you overrun due to blocking for too long.
See my last breathless post on this:
https://mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-July/027039.html
and search for "interrupt" on this list for more...
MS


Min Guo wrote:

What is the meaning of "interrupts are disabled"?

Interrupts are disabled when using atomic sections:

atomic {

...

}

On the MSP430 micro controller, does this mean the interrupts will be
delayed after the atomic section, or simply be discarded?

The same question for maskable interrupts: while a maskable interrupt
handler is under execution, a new maskable interrupt comes - in this
case, this new interrupt will be "disabled". Does this mean the new
interrupt be discarded or delayed?

In what case will an interrupt be lost?

Thanks a lot!
Min
___
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] reading whole port in Mica 2

2007-08-08 Thread Michael Schippling

There's an example of reading PortC in:
   http://www.etantdonnes.com/Motes/AVR128timers.zip
MS


Caloy Diaz wrote:

Hi, may I ask if any of you know how to read a whole port of the Atmel
microcontroller in Mica 2 with just one instruction? All I could read
now is just one pin at a time, say TOSH_READ_INT0_PIN();. I tried
"messing" with the avrhardware.h and hardware.nido.h files, but I get 
errors and the code doesn't work.


Other "port-wide" instructions would also help greatly (i.e. writing a
byte to an output port). I can't seem to figure them out :)

Thank you!

- Caloy



Looking for a deal? Find great prices on flights and hotels 
 
with Yahoo! FareChase.





___
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] Regarding Packet format

2007-08-08 Thread Michael Schippling

In T1 you can look for the various AM.h files to get the TOS_Msg structure.
For instance the mica2 and UART use tos/types/AM.h, whereas the micaz
radio uses: tos/platform/micaz/AM.h (and yes, you pretty much just have
to know which one to look at...although adding a -v to the ncc command
will give some guidance).

The contents of the message payload are defined by "AM" message structures
in each application, e.g., apps/Surge/Surge.h

MS



Adi Mallikarjuna Reddy V wrote:

Hi,
 
I have some doubts regarding the packet format that is followed by the 
TinyOS.
 


   1. I came to know that TOS_Msg is dependent on the radio/platform
  that we have been using. Is that true? If so, where can I find the
  different radio/platform and its corresponding packet format?
   2. Even within TOS_Msg, again there are other components such as
 1. multihop protocol packet format
 2. Surge packet format

  My doubt is what are the other alternatives available to  the 
above formats (multihop and surge)
  3. If anyone of you know about whether other OSs like SOS follow the 
similar method, let me know
 
Regards

Adi

 


--
---
I was always alone in this world,
wanted to be loved,by someone.
I always had teary eyes,
wanted it to be wiped by someone.
--




___
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] Is TOS_BCAST_ADDR "Dest PAN address" ??

2007-08-08 Thread Michael Schippling
If you are using TOS1.x, the description you have is of the
micaz (and I think tmote) RADIO structure. But, depending on
the settings of the host receiver, Listen.java is probably
giving you data in a structure that looks like tos/types/AM.h
-- which matches the UART (and mica2) message.

There is a good description of this at:
http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Packets.pdf

MS

Chen Bleed wrote:
>  
> Hello, all
>  
> Now I am separating values of packet listened by Listen.java. I find a 
> article in 
> http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg06909.html
> It says the format is
> Length (1)
> Frame Control Field (2)
> Dat sequence number (1)
> Dest PAN address (2)
> Dest address (2)
> Active Message ID (1)
> Group ID (1)
> the rest is my data
>  
> Does "Dest PAN address" mean TOS_BCAST_ADDR in AM.h??
>  
> Because I get the value of Dest PAN address is 0x just match 
> TOS_BCAST_ADDR, I guess it.
>  
> could anyone know about this??
>  
> thx all and sorry for my bad English.
>  
>  
> Chen, Chien Mao
>  
> 
> 
> 下載最新版本的 Windows Live Messenger 8.1,分享音樂、共用搜尋,和即時傳 
> 訊好友線上同樂!— 立即下載 
> 
> 
> 
> 
> ___
> 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] Regarding Packet format

2007-08-08 Thread Michael Schippling

It is all, of course, a matter of software

Look for the actual message packet structures in .h files in the various
application's source directories -- those structs are overlaid on the
Msg.data[] buffer. As to how many variations there are and how they work,
that is a matter of conjecture...google may be your friend here.

T1.1.N all have the same directory and file structure. I would recommend
that you get on the higher .N number side of things, 1.1.7 or greater
if you value your sanity.

MS

Adi Mallikarjuna Reddy V wrote:

Hi Michael,
 
Thanks for the prompt reply. I am using TinyOS 1.0 version. I guess even 
there the directory structure is similar, I can look for those things 
mentioned. How about the Multi-hop Protocol format, it has been 
allocated 7 bytes in TOS_Msg structure. Are there any other alternatives 
to this protocol? Like broadcasting, selective flooding etc?
 
Regards,

Adi

 
On 8/8/07, *Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


In T1 you can look for the various AM.h files to get the TOS_Msg
structure.
For instance the mica2 and UART use tos/types/AM.h, whereas the micaz
radio uses: tos/platform/micaz/AM.h (and yes, you pretty much just have
to know which one to look at...although adding a -v to the ncc command
will give some guidance).

The contents of the message payload are defined by "AM" message
structures
in each application, e.g., apps/Surge/Surge.h

MS



Adi Mallikarjuna Reddy V wrote:
 > Hi,
 >
 > I have some doubts regarding the packet format that is followed
by the
 > TinyOS.
 >
 >
 >1. I came to know that TOS_Msg is dependent on the radio/platform
 >   that we have been using. Is that true? If so, where can I
find the
 >   different radio/platform and its corresponding packet format?
 >2. Even within TOS_Msg, again there are other components such as
 >  1. multihop protocol packet format
 >  2. Surge packet format
 >
 >   My doubt is what are the other alternatives available
to  the
 > above formats (multihop and surge)
 >   3. If anyone of you know about whether other OSs like SOS
follow the
 > similar method, let me know
 >
 > Regards
 > Adi
 >
 >
 >
 > --
 > ---
 > I was always alone in this world,
 > wanted to be loved,by someone.
 > I always had teary eyes,
 > wanted it to be wiped by someone.
 > --
 >
 >
 >

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




--
---
I was always alone in this world,
wanted to be loved,by someone.
I always had teary eyes,
wanted it to be wiped by someone.
--

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


Re: [Tinyos-help] help

2007-08-09 Thread Michael Schippling

See this for message decoding tips:
http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Packets.pdf

The A100 values are your samples, in little-endian so the value is 0x00A1.
They are awfully stable (don't change) so I suspect that you are not really
sampling anything. Look into how you've wired DemoSensor or the ADC. You
can poke at my code to see how I went about doing ADC samples in T1:
http://www.etantdonnes.com/Motes/robocode.tar.gz

MS

Akarsha Ramani wrote:


I am a beginner with nesC programming. I am working on an application 
where I need to send voltage values from the node to the base station. I 
am programming Mica2 motes with OscilloscopeRF code to get the voltage 
readings. I am not sure if the data is being collected from the right 
channel as I get readings such as
7E42  0A7D 5D1A 0100 C800 0100 A100 A100 A100 A100 A100 A100 A100 
A100 A100 A100 B0D9 7E.
 
Can someone provide any inputs on reading voltage values using Mica2 ?


Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center. 
 






___
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] Read more than one motes from Oscilloscope

2007-08-10 Thread Michael Schippling

At first glance it looks to me that there is some confusion of "channel"
and "moteID", or actually non-confusion as I don't see where the moteID
gets used, in the net/tinyos/oscope/GraphPanel.java method oscopeReceived().
A quick way to see if it'll work would be to change the channel number
in each re-Mote, but a re-wank of the received code is probably in order.

MS


Alessandro Turella wrote:

Hi guys,

i' modified the Oscilloscope application to read from the ADC.
After this I've modified the java GUI of Oscilloscope but i don't know 
how to display more than one mote on the graph (or somewhere else), when 
i connect more than one mote it doesn't display the 2 different signals 
but only 1 very confused. someone could teach me?


Thanx in advance,
Alex


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3908 - Thu Aug  9 23:32:41 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 9 Aug07 - SIGN2.DEF 9 Aug07 - MACRO.DEF 9 Aug07
by Markus Madlener @ http://www.copfilter.org


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3908 - Thu Aug  9 23:32:41 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 9 Aug07 - SIGN2.DEF 9 Aug07 - MACRO.DEF 9 Aug07
by Markus Madlener @ http://www.copfilter.org

___
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] Re: TestSerial and BaseStationCC2420 not working correctly

2007-08-10 Thread Michael Schippling

Is BaseStation supposed to be sending something back?
Make sure there are messages being sent from the mote someplace.
And also check the silly-slide-switch on the MIB, I believe it
should be in the OFF position.
MS


Sumesh Philip wrote:
I'm trying to carry out tutorial 4 using a mib510 programmer, micaz mote 
and an Aten uc232A usb-to-serial adapter. For both TestSerial and 
BaseStation, the mote is getting packets from the PC (indicated by the 
blinking leds), but there is no read out of the serial port of the PC.


[EMAIL PROTECTED] TestSerial]$ java TestSerial -comm serial@/dev/ttyUSB0:micaz
serial@/dev/ttyUSB0:57600: resynchronising
Sending packet 0
Sending packet 1
Sending packet 2
Sending packet 3
Sending packet 4
Sending packet 5
Sending packet 6

I saw a couple of similar posts sometime back but didn't see any 
responses. Can someone help?


Thanks.




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] A suggestion for all posters

2007-08-10 Thread Michael Schippling

Much too practical and useful. I don't see how it could catch on...
MS

Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

Siirtola Harri wrote:

Hi,

Could it be a good idea to make a signature that contains complete
platform and version info, and always use it when posting to this list?
Getting a reply like "what platform/version are you using?" is quite
common these days. It would also save many words of describing your
setup, in case you remember to do it ;)

Most of us use several devices/programmers, so one could either edit the
sig after writing the email or create different sigs for various
combinations. This is quite easy with email programs. Any comments?

Regards,

Harri

---
Platform: WinXP/Cygwin
TinyOS version: 1.x (MoteWorks 2.0.F)
Programmer: MIB510/MIB600
Device(s): MicaZ
Sensor board: MDA300

___
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] Read more than one motes from Oscilloscope

2007-08-10 Thread Michael Schippling

I'm cc'ing this back to the help list...

Assuming you are using TOS1.x -- did you see that great suggestion
that we add a sig with all our version stuff to the end of each message? --
The Oscope message structure is in: apps\Oscilloscope\OscopeMsg.h
and the sourceMoteID is indeed what it says. However if you are getting
the same ID from different motes you probably didn't install different
IDs when you downloaded. Do something like this:   make X install.N
where X is your platform and N is the ID to use on that mote.

MS


Alessandro Turella wrote:

Michael Schippling ha scritto:

At first glance it looks to me that there is some confusion of "channel"
and "moteID", or actually non-confusion as I don't see where the moteID
gets used, in the net/tinyos/oscope/GraphPanel.java method 
oscopeReceived().

A quick way to see if it'll work would be to change the channel number
in each re-Mote, but a re-wank of the received code is probably in order.

MS 

Hi Michael,
thanx for your answer,

In my mind i thought that any mote sends his identifier inside the 
message, but i can't find where it is too!
can you explain me in which class it is? i cut off any graph instance, i 
preferred to get data in a table, but i need to know the mote they come 
from!!


in Your opinion, have i to search in the java class or in the nesC files 
for the structure of the message?


while debugging i saw that any message received has the same structure 
(of course), they have 5 fields:
this is a typical message (kept in Oscilloscope.java - in 
messageReceived event):


[version=0x0]
[interval=0x100]
[id=0x1]
[count=0x1d3]
[readings=0xff ...etc]

Is the "id" field the one which can switch the provenance of a message? 
because of i have 2 motes sending but the ID is the same for each 
message(ID=1).


How can i do what you wrote? (..to change the channel number in each 
re-Mote, but a re-wank of the received code is probably in order) (what 
do you mean with "re-wank"?)


Thanx



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3911 - Fri Aug 10 22:44:41 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 10 Aug07 - SIGN2.DEF 10 Aug07 - MACRO.DEF 10 Aug07
by Markus Madlener @ http://www.copfilter.org


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta2 (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.1/3911 - Fri Aug 10 22:44:41 2007
AntiVirus: F-PROT 4.6.7 Engine version: 3.16.15
SIGN.DEF 10 Aug07 - SIGN2.DEF 10 Aug07 - MACRO.DEF 10 Aug07
by Markus Madlener @ http://www.copfilter.org


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] A suggestion for all posters

2007-08-12 Thread Michael Schippling

There, see, we're already off on the wrong foot...
Please post a like to your doc, I'd like to see it.
MS


Bernardo Avila Pires wrote:

MIB600, I mean.

2007/8/12, Bernardo Avila Pires <[EMAIL PROTECTED]>:

Nice...

Platform: MacOS X (Tiger)
TinyOS version: 2.x
Programmer: MIB400
Device(s): Mica2, MicaZ
Sensor board: MTS 300, MTS310

Btw, I have written a short tutorial on tinyos, basically covering the
problems I had when trying to set up a wsn. Can I post the link here
so as to submit it to judgment and critic? I would really appreaciate
some feedback to improve it; there are surely many wrong/incompelte
things there...


2007/8/10, Michael Schippling <[EMAIL PROTECTED]>:

Much too practical and useful. I don't see how it could catch on...
MS

Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

Siirtola Harri wrote:

Hi,

Could it be a good idea to make a signature that contains complete
platform and version info, and always use it when posting to this list?
Getting a reply like "what platform/version are you using?" is quite
common these days. It would also save many words of describing your
setup, in case you remember to do it ;)

Most of us use several devices/programmers, so one could either edit the
sig after writing the email or create different sigs for various
combinations. This is quite easy with email programs. Any comments?

Regards,

  Harri

---
Platform: WinXP/Cygwin
TinyOS version: 1.x (MoteWorks 2.0.F)
Programmer: MIB510/MIB600
Device(s): MicaZ
Sensor board: MDA300

___
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



--
"The truth shall set you free"






--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Regarding Packet format

2007-08-13 Thread Michael Schippling

Look to the oft quoted octavetech doc for info about the message and payload:
http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Packets.pdf

In general the stuff that gets put into the data payload is defined as
a struct in a .h file in the app's directory. surgeCmd.h would be one
place to look...

You can modify the payload size by changing TOSH_DATA_LENGTH (in T1 at least).
There are limits and tradeoffs. Search for that string on this list for details.

MS

Adi Mallikarjuna Reddy V wrote:

Hi,

Is maximum packet size of TinyOS is 32 bytes?Moreover in Surge 
application 34 byte packet some times. Surge do send the 22 byte packet. 
What does this packet signify and can any one tell me the packet format?


Regards,
Adi

On 8/9/07, *Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


It is all, of course, a matter of software

Look for the actual message packet structures in .h files in the various
application's source directories -- those structs are overlaid on the
Msg.data[] buffer. As to how many variations there are and how they
work,
that is a matter of conjecture...google may be your friend here.

T1.1.N all have the same directory and file structure. I would recommend
that you get on the higher .N number side of things, 1.1.7 or greater
if you value your sanity.

MS

Adi Mallikarjuna Reddy V wrote:
 > Hi Michael,
 >
 > Thanks for the prompt reply. I am using TinyOS 1.0 version. I
guess even
 > there the directory structure is similar, I can look for those
things
 > mentioned. How about the Multi-hop Protocol format, it has been
 > allocated 7 bytes in TOS_Msg structure. Are there any other
alternatives
 > to this protocol? Like broadcasting, selective flooding etc?
 >
 > Regards,
     > Adi
 >
 >
 > On 8/8/07, *Michael Schippling* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
 >
 > In T1 you can look for the various AM.h files to get the TOS_Msg
 > structure.
 > For instance the mica2 and UART use tos/types/AM.h, whereas
the micaz
 > radio uses: tos/platform/micaz/AM.h (and yes, you pretty much
just have
 > to know which one to look at...although adding a -v to the
ncc command
 > will give some guidance).
 >
 > The contents of the message payload are defined by "AM" message
 > structures
 > in each application, e.g., apps/Surge/Surge.h
 >
 > MS
 >
 >
 >
 > Adi Mallikarjuna Reddy V wrote:
 >  > Hi,
 >  >
 >  > I have some doubts regarding the packet format that is
followed
 > by the
 >  > TinyOS.
 >  >
 >  >
 >  >1. I came to know that TOS_Msg is dependent on the
radio/platform
 >  >   that we have been using. Is that true? If so, where
can I
 > find the
 >  >   different radio/platform and its corresponding
packet format?
 >  >2. Even within TOS_Msg, again there are other
components such as
 >  >  1. multihop protocol packet format
 >  >  2. Surge packet format
 >  >
 >  >   My doubt is what are the other alternatives
available
 > to  the
 >  > above formats (multihop and surge)
 >  >   3. If anyone of you know about whether other OSs like SOS
 > follow the
 >  > similar method, let me know
 >  >
 >  > Regards
 >  > Adi
 >  >
 >  >
 >  >
 >  > --
 >  > ---
 >  > I was always alone in this world,
 >  > wanted to be loved,by someone.
 >  > I always had teary eyes,
 >  > wanted it to be wiped by someone.
 >  > --
 >  >
 >  >
 >  >
 >


 >  >
 >  > ___
 >  > Tinyos-help mailing list
 >  > Tinyos-help@Millennium.Berkeley.EDU
<mailto:Tinyos-help@Millennium.Berkeley.EDU>
 > <mailto:Tinyos-help@Millennium.Berkeley.EDU
<mailto:Tinyos-help@Millennium.Berkeley.EDU>>
 >  >
 >   

Re: [Tinyos-help] SerialForwarder doesn't show messages.

2007-08-13 Thread Michael Schippling

The LEDs should blink on the TOSBase mote if it is getting/sending radio
messages. I would try using Listen or ListenRaw to see if anything
is coming through when the LEDs flash. If no TOSBase flashing, check your
radio freq and power settings during compile. Especially on mica2, the
power is set way low when using the 'regular' apps tree.

MS

Hemanth wrote:

Hi,

I have a TinyOS-1.x installation in Ubuntu . The hardware platform is 
MICA2 & MIB520.


In a test case, I have CntToLedsAndRfm uploaded on one mote A and the 
TOSBase uploaded on the mote B mounted at the base station. The LEDs on 
mote A blink at different frequencies as specified in the 
CntToLedsAndRfm application. Then, I started 
net.tinyos.sf.SerialForwarder with the options -comm 
serial@/dev/ttyUSB0:57600 and have successfully started the serialport 
monitor server but couldn't see the messages being received by TOSBase @ 
Mote A.


Does anybody have any suggestion to resolve this problem?

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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] how to determine voltage level from sensor reading? (telosb)

2007-08-14 Thread Michael Schippling

You'll have to go look at the schematics, or horrorssearch whatever
doc there is...to see if it's the same paradigm as the mica's. On Mica2,Z
the Voltage reading is coming from a fixed-value-ref where the ADC ref
is the actual battery voltage. So as the battery droops the fixed-ref
seems to increase, as does the ADC reading. Knowing the fixed-ref and the
number of conversion bits leads to some simple algebra to get battery voltage.

MS


Ákos Maróy wrote:

Sorry for having such basic questions again - I'm using the telosb
platform, and I'm trying to deduct the voltage level being read from the
values I get from the sensor.

my assumption is that the sensor is reading the voltage value.

I also understand that the sensor can be set up differently depending on
the sref value in the documentation.

but still, is there a formula on how to deduct the voltage measured
based on the sensor reading?


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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] I have warnings !!!!

2007-08-14 Thread Michael Schippling

Assuming you have a graphviz installed, it's probably a newer version
so you can ignore those messages. Try "type dot" and if it shows anything
you're probably OK.

You _could_ fix the CLASSPATH warnings by adding those elements
in one of the bash startup files. Or better, they should probably
be set already by TOS specific scripts, often in /etc/profile.d
so you could go figure out why you aren't getting that service...

See "man bash" for details on scripts and env variables, and
google CLASSPATH for info on what it means.

MS


mejda chouaieb wrote:

Hello All,
I have upgraded tinyos from 1.x to 2.x and when I type "tos-check-env" I 
have these warnings :
--> WARNING: The graphviz (dot) version found by tos-check-env is not 
1.10. Please update your graphviz version if you'd like to use the 
nescdoc documentation generator.


tos-check-env completed with errors:
--> WARNING: CLASSPATH may not include 
C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar

. Please ensure that C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar
 is in your CLASSPATH or you may experience configuration problems
--> WARNING: CLASSPATH may not include '.' (that is,  the symbol for the 
current working directory). Please add '.' to your CLASSPATH or you may 
experience configuration problems.
--> WARNING: The graphviz (dot) version found by tos-check-env is not 
1.10. Please update your graphviz version if you'd like to use the 
nescdoc documentation generator.
 
I'm working with 2 Tmote sky (telosb, moteiv)
I'm also trying to modify code but I don't know how to compile it and to 
install it in my tmote, can someone help me please ? I'm new in tinyos 
world and i'm verry confused because every thing is new for me so please 
help me and thank you in advance.
 



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
 vers Yahoo! Mail





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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] SendMsg.sendDone() - not signaled

2007-08-22 Thread Michael Schippling

send() returns fail when it is still working on a message
(and for reasons...), so this may indicate that you are
trying to send too fast. That's the original point of the
pending state variable, so make sure you have that logic
worked out correctly.

MS


Ittipong Khemapech wrote:

Hi Urs,

Thanks for your suggestion. I tried and got the same result. Seems that the

call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg), &local_msg);

returns SUCCESS only for the first time it's called. If I put the

pending = FALSE;

in if-statement, it'll always make the if condition in the event 
SendMsg.sendDone() return FALSE.


Any further suggestions would be appreciated.

Ittipong

On 22/08/07, *Urs Hunkeler* <[EMAIL PROTECTED] > 
wrote:

Hi,

In the task SendPacket() you always set pending to FALSE. Try to set it
only to false if there was an error:

  task void SendPacket() {
IkTestMsg *message = (IkTestMsg *)local_msg.data;
if (!pending)
{
  pending = TRUE;
  message->addr = TOS_BCAST_ADDR;
  message->cnt = counter;
  atomic {
message->src = TOS_LOCAL_ADDRESS;
  }
  if (call SendMsg.send (TOS_BCAST_ADDR, sizeof(IkTestMsg),
&local_msg))
  {
dbg(DBG_USR1, "Sending Message\n");
dbg(DBG_USR1, "Source address = %d\n", message->src);
dbg(DBG_USR1, "Value = %d\n", counter);
pending = FALSE;
  }
}
dbg(DBG_USR1, "Pending message in buffer!\n");
  }

Cheers,
Urs


Ittipong Khemapech schrieb:
 > Hi,
 >
 > I have some problems with the SendMsg.sendDone() as it's not
signaled. My
 > files/modules are as follows:
 >
 > [..]
 >   task void SendPacket() {
 > IkTestMsg *message = (IkTestMsg *)local_msg.data;
 > if (!pending)
 > {
 >   pending = TRUE;
 >   message->addr = TOS_BCAST_ADDR;
 >   message->cnt = counter;
 >   atomic {
 > message->src = TOS_LOCAL_ADDRESS;
 >   }
 >   if (call SendMsg.send(TOS_BCAST_ADDR, sizeof(IkTestMsg),
&local_msg))
 >   {
 > dbg(DBG_USR1, "Sending Message\n");
 > dbg(DBG_USR1, "Source address = %d\n", message->src);
 > dbg(DBG_USR1, "Value = %d\n", counter);
 >   }
 >   pending = FALSE;
 > }
 > dbg(DBG_USR1, "Pending message in buffer!\n");
 >   }
 > [..]
 >
 >
 > I am running my modules in TOSSIM (TinyOS 1.x) and Cygwin. Seems
to me that
 > after the first sending, there is a message pending in the buffer.
 >
 > Any suggestions would be appreciated.
 >
 > Many thanks,
 > Ittipong





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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Error happened when I upload the program on Mica2.

2007-08-29 Thread Michael Schippling

I'm cc'ing this back to the help list where someone may be able to...

From this is seems that your sensor is not working, perhaps not wired
or powered correctly. But I would first start with a simple radio
message transmission, like CntToRfm, to make sure that you have
connectivity. Then I would review all the connection issues with
your sensor. Without all the specs and schematics I can't help more.

MS


Dear Michael:

Thank you so much for your answer.
I tried again. And that error disappears.
 
Currently, I am using Micro Power Oximeter Board 31392B1. I attached one mica2 to the Micro Power Oximeter Board 31392B1. And  Micro Power Oximeter Board 31392B1 was connected to a 1300 Single Patient Adult Sensor, which is used to collect the data of heart pressure and so on.


I have attached some photo to show the situation.

I have uploaded the program to this mica2 using MIB510. When I turned on the 
switch of  mica2(433MHZ), the light in 1300 Single Patient Adult Sensor can't 
be turned on. Normally, the light should be on, so that it can collect the 
heart pressure data.

On the other side,  another mica2 is connected to the MIB510 board, the MIB510 
is connected to a desktop, which can show up the data collected by the mica2.

After I entered the command 
java
 net.tinyos.tools.Listen 
 the light on the mica2 attached to the MIB510 keep on flashing. But there is no 
input signal as the 1300 Single Patient Adult Sensor doesn't work. 


The result on the screen turns out to be like this:
$ java net.tinyos.tools.Listen
test
[EMAIL PROTECTED]:57600: resynchronising

And nothing happened next. Normally, a window should pop up showing the real 
time
data collected by the other mica2.

I have attached some photos showing what is the situation. Please have a look 
at it.

I really appreciate if you can give me some advice about that.

Thank you so much!

Sincerely,
Bo Xu

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


Re: [Tinyos-help] Need Help

2007-08-30 Thread Michael Schippling

You don't seem to have the TOSComm package installed correctly.
Look for instructions online or in the manuals.
MS


Iyad tumar wrote:

Hi i still face the same problem, to make
communication between PC and the telosB and i still
get this message

" Exception in thread "main"
java.lang.NoClassDefFoundError: TestSerial" (even
though the current directory is in the classpath)

well i face too a problem when i try to open serial
forwarder i got the following message and i think its
related to the same problem i need your help pls.
the command: 
$ java net.tinyos.sf.SerialForwarder 


the output:
Listening to [EMAIL PROTECTED]:57600
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Listening for client connections on port 9002
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error
[EMAIL PROTECTED]:57600 died - restarting
Could not open com1: TOSComm JNI library runtime
error: flush: Input/output error


Best Regards.
Iyad Tumar.
Jacobs university Bremen
Germany


   


Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Trouble with Oscilloscope GUI java application in tinyOS-2.x

2007-09-01 Thread Michael Schippling

You may be using the wrong (older) version of Java,
or worse, compiling with one version and running with another.
I suspect that TOS requires 1.5++. "type java" and/or "which javac"
may provide clues.

I hate GUI's...
MS

sergio mena doce wrote:

Hi to all.


We are two students of the Technical University of Catalonia (UPC).


We're getting started in the tinyOS environment. The situation is the 
following: we are working with tinyOS 2x (Beta version) under Ubuntu 
7.04 Operative System. We are doing the tutorials of tinyOS 2x (tinyOS 
web page) and we've arrived to the lesson 5 and we have a problem at the 
end of the lesson.


As first step we've compiled  Oscilloscope application:


[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope$ make telosb

mkdir -p build/telosb

compiling OscilloscopeAppC 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=   OscilloscopeAppC.nc -lm


compiled OscilloscopeAppC to build/telosb/main.exe

   14660 bytes in ROM

 380 bytes in RAM

msp430-objcopy --output-target=ihex build/telosb/main.exe 
build/telosb/main.ihex


writing TOS image

 


And we've installed the Oscilloscope application in three motes:

[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope$ make telosb reinstall,n

tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump 
--target ihex build/telosb/main.ihex build/telosb/main.ihex.out-1 
TOS_NODE_ID=1 ActiveMessageAddressC$addr=1


found mote on /dev/ttyUSB0 (using bsl,auto)

installing telosb binary using bsl

tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out-1

MSP430 Bootstrap Loader Version: 1.39-telos-8

Mass Erase...

Transmit default password ...

Invoking BSL...

Transmit default password ...

Current bootstrap loader version: 1.61 (Device ID: f16c)

Changing baudrate to 38400 ...

Program ...

14692 bytes programmed.

Reset device ...

rm -f build/telosb/main.exe.out-1 build/telosb/main.ihex.out-1
 
In a fourth mote we've installed the BaseStation application and we've 
started the SerialForwarder like tells the tutorial:  
java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb
 
Next we've compiled the java application and we obtain seven warnings:


[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope/java$ make

javac *.java

--

1. WARNING in ColorCellEditor.java (at line 17)

public class ColorCellEditor extends AbstractCellEditor

 ^^^

The serializable class ColorCellEditor does not declare a static final 
serialVersionUID field of type long


--

--

2. WARNING in Data.java (at line 11)

import java.util.*;

   ^

The import java.util is never used

--

--

3. WARNING in Graph.java (at line 13)

import java.awt.event.*;

   ^^

The import java.awt.event is never used

--

4. WARNING in Graph.java (at line 16)

import java.util.*;

   ^

The import java.util is never used

--

5. WARNING in Graph.java (at line 19)

class Graph extends JPanel

  ^

The serializable class Graph does not declare a static final 
serialVersionUID field of type long


--

--

6. WARNING in Window.java (at line 38)

class MoteTableModel extends AbstractTableModel {

  ^^

The serializable class MoteTableModel does not declare a static final 
serialVersionUID field of type long


--

7. WARNING in Window.java (at line 108)

static class MoteColor extends JLabel implements TableCellRenderer {

 ^

The serializable class MoteColor does not declare a static final 
serialVersionUID field of type long


--

7 problems (7 warnings)jar cf oscilloscope.jar *.class
 
Finally we've tried to run the Oscilloscope GUI application and we have 
several errors whose reason we don't understand and we're not able to 
solve:
 


[EMAIL PROTECTED]:/opt/tinyos-2.x/apps/Oscilloscope/java$ ./run

Exception in thread "main" java.awt.AWTError: No suitable parent found 
for Component.


   at javax.swing.JColorChooser.createDialog(libgcj.so.70)

   at ColorCellEditor.(ColorCellEditor.java:25)

   at Window.setup(Window.java:160)

   at Oscilloscope.run(Oscilloscope.java:54)

   at Oscilloscope.main(Oscilloscope.java:126)
 What is the problem?

What can we do to solve this?
We would very grateful for your help.


Prueba algunos de los nuevos servicios en línea que te ofrece Windows 
Live Ideas: tan nuevos que ni siquiera se han publicado oficialmente 
todavía. Pruébalo 





_

Re: [Tinyos-help] Micaz antenna extension

2007-09-05 Thread Michael Schippling

The micaZ's (and other 2420 radio motes) run at approx the same frequency
as 802.11b -- your favorite wireless networking wavelength. So any antenna
that works for wireless will work for 2420's. The connector is an MMCX,
which is _really_ painful to assemble, but it comes standard on some antennas
so if you can find a pre-assembled cable go for it. Note that it is
NOT an MCX even though they look at first glance to be the same...

MS

Munaretto, Daniele wrote:

One can remove the original antenna (just unplugged it) and replace it with
the new one, for instance.
Hoping it helps
Cheers
Daniele

 
 
Daniele Munaretto

Researcher
 
DoCoMo Communications Laboratories Europe GmbH

Landsbergerstraße 312  80687 Munich  Germany
 
Mobile  :   +49- 162-  2919-218

Office   :   +49-  89- 56824-218
Fax  :   +49-  89- 56824-300
 
[EMAIL PROTECTED]
visit us in http://www.docomolab-euro.com 
 
Managing Directors (Geschäftsführer): 
Dr. Toru Otsu, Dr. Narumi Umeda, Kazushige Yoshida

Amtsgericht München, HRB 132967

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marios
Milis
Sent: Wednesday, September 05, 2007 10:28 AM
To: tinyos-help@Millennium.Berkeley.EDU
Subject: [Tinyos-help] Micaz antenna extension

Dear all,

We work on an application with Micaz nodes and we would like to extend
the length of their antennas (i.e to be 2-3 meters away of the node).
Could anyone help us on this?
Thanks a lot in advance

Kind regards 
Marios





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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] tos-install-jni

2007-09-06 Thread Michael Schippling

First thing is I wouldn't install java in "Program Files" because the
space in the dirname will just become more and more problematic.
Second, you probably do not have a PATH correctly set to your Java
installation, you should not have to make those symbolic links. This
may be the result of the P_F space thing...So go back and redo your
Java install into something like C:/Java and check that you have that
bin directory in your PATH when it's all over.

Then, in their great wisdom, TOS installers use the "locate-jre"
script to find Java in order to install stuff, and this seems to
only work sometimes. Search this list for advice on locate-jre
and look (in T1 at least) at: tools/scripts/locate-jre

I'm not sure where tinyos.jar is supposed to be -- assuming you
are using T2 anyway -- again some searching back on this list
may help.

MS


Deepesh Jain wrote:

I am using Cygwin
 
When I run any java program it is giving error
 
--

The toscommJNI library was not found.
Check that your tinyos-tools package is installed and try rerunning 
tos-install-jni.

Aborting.
--
 
Now when I run tos-install-jni

It gives the message
Java not found, not installed JNI code
 
 
I have installed java at c:\program files\java\jdk1.5.0_06
 
Also on cygwin when i type java or javac it displays java help.

I am also able to comple .java files after using these commands
 cd /usr/local/bin
 ln -s /cygdrive/c/"Program Files"/java/jdk1.5.0_06/bin/javac.exe 
 ln -s /cygdrive/c/"Program Files"/java/jdk1.5.0_06/bin/java.exe 
 
this commands has created two shortcuts in usr/local/bin folder.
 
 
 
please do tell me what class path I should set, also I have no 
tinyos.jar or no path is set to it.

If it is required tell me how should I get tinyos.jar
 
 
Thanks in advance.
Deepesh 



5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. 
 






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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] sequences of sync and async commands, tasks

2007-09-06 Thread Michael Schippling

Yes, you have to use globals to pass arguments to tasks, so do something
like this and set the values in your async function before posting the task:

uint16_t  *buf;
uint16_t buflen;

task void SendReadingsTask1() { ... }

You can't guarantee order of task execution, but you can sequence them
by posting a new task from the end of a previous one.

MS

John Griessen wrote:

I'm making a read-A2D-then-broadcast-send-data app.

The first thing to do in a sequence is async:
Msp430Adc12MultiChannel.dataReady(uint16_t *buf, uint16_t buflen) is the
next I need to do a sync function:
call AMSend.getPayload(&pkt)
and use buf and buflen to do some reads and writes,
then another sync function:
call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(MoistureSensorsMsg))

The compiler issues warnings about sync from async event, but finishes.
The TinyOS Programming guide says to use a task...  but a task doesn't 
seem to allow passing parameters...  how would I use the buf and buflen 
variables?


Would you first copy buf and buflen to global variables?
Is there a way to sequence small tasks to run in order?
Do they automatically run in order, so results of one are available to 
the next if put in global variables?


Here's an attempt I made to use tasks that is broken -- buf is unknown 
inside the function, parameters don't get passed to a task:

===
  task void SendReadingsTask1(uint16_t  *buf, uint16_t buflen)
{
MoistureSensorsMsg* rmspkt = (MoistureSensorsMsg*) (call 
AMSend.getPayload(&pkt));
  //cast result of .getPayload to pointer of nx_struct 
MoistureSensorsMsg*

rmspkt->nodeid = TOS_NODEID;
rmspkt->timestamp = timestamp;
 if ( buflen == 12 )   // 12 Adc values in a vector, len == 12
   {
   rmspkt->adc00 = buf[0];
   rmspkt->adc01 = buf[1];
   rmspkt->adc02 = buf[2];
   rmspkt->adc03 = buf[3];
   rmspkt->adc04 = buf[4];
   rmspkt->adc05 = buf[5];
   rmspkt->adc10 = buf[6];
   rmspkt->adc11 = buf[7];
   rmspkt->adc12 = buf[8];
   rmspkt->adc13 = buf[9];
   rmspkt->adc14 = buf[10];
   rmspkt->adc15 = buf[11];
   //rmspkt struct is now filled with new data.
   if (call AMSend.send(AM_BROADCAST_ADDR, &pkt, 
sizeof(MoistureSensorsMsg)) == SUCCESS) {

 call Leds.led2On();  //debug aid
 busy = TRUE;  //the data is queued to go out.
 }
   }
 else
.
.
.
==
What is the right way to handle this?

Thanks,

John Griessen


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] MoteIF try catch on java

2007-09-06 Thread Michael Schippling

It's entirely possible that moteIF doesn't throw any Exceptions.
You will probably have to dig through it's code to see, but for
the most part the compiler should whine if they exist and are not
caught. Or was the question about how to use try-catch itself?

MS


ZhuoHao Sum wrote:

Hi,

I'm working on tinyos and SF stuff..

I'm writing an application to connect using SF. Anyone knows how I can 
implement a try catch with the instantiation of moteIF?


thks & regards,
ZHuoHao




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Re: help required run cygwin command from java

2007-09-06 Thread Michael Schippling

This is something I have never figured out how to do correctly
so I can only toss some ideas your way...maybe looking at the
cygwin.com site will help.

What you seem to want to do is to run a cygwin bash script from
an MSDOGS command shell, right?

The first place to look is reading the bash manual page.
From a bash shell type:  man bash

However that hasn't helped me on this. Your a.sh script contains
bash commands and needs to be interpreted by that shell. The man
page seems to indicate that you can run a script file something
like "bash a.sh", but that doesn't work for me. It might just be
an issue of getting the right environment settings, but
"bash -l a.sh" doesn't seem to work right either...

I can however do this from DOS:
bash -c "echo some stuff; type java"
so you could put your short script on the command line itself...

Anyway, your b.sh script is being interpreted by DOS,
so it starts bash, which exits immediately, and then tries to
run the subsequent commands in the DOS shell. Each line is a
separate DOS command... DOS doesn't seem to have the equivalent
of the "Here Document" to embed scripts, but you could try
using different files somehow.

mostly useless, I know...
MS

amrit kumar wrote:

Hi All,
 
I am attaching the shell script(b.sh) in the mail, which when run does 
not go beyond login (screen shot attached). The commands which are in 
the shell are not being executed at the login prompt :(
 
a.sh is a modified script which when run after the login screen is 
working fine.
 
If you see closely both a and b.sh are different only in their login 
command (it exists in a and not in b).
 
Let me know the reason/suggestion/resolution*.. It is very urgent..*
 
Saikat , Its not asking for any password or username.Can there be some 
issue due to this.
 
Thanking you in advance,
 
Amrit
 
 
 
 

 
On 9/5/07, *amrit kumar* <[EMAIL PROTECTED] > 
wrote:


Hi All,
 
I am currently working on Tiny OS related stuff and am stuck with

the following problem. Please let me know if you have a solution.
 
A part of the *java code* is required to do the following :
 
1. Open bash shell (cygwin) from command prompt by running "bash --

login  i" on command prompt
 
  i.e "bash -- login  i"  does this on command prompt. bash shell

prompt is displayed after this.
 
2. On the same bash login(bash shell prompt) change directory to 
"C:\tinyos\cygwin\opt\tinyos-1.x\apps\Bombilla"
 
  i.e  $ cd C:/tinyos/cygwin/opt/tinyos-1.x/apps/Bombilla
 
3. On the same prompt run "make pc" command
 
i.e $ make pc
 
 
All this has to be done through java. I even tried creating a shell

file to the above and calling the same from java, but every time the
shell gets stuck at step 1.It shows the login prompt but It does not
execute any command after 1st step.
 
Let me know your suggestions/solutions.
 
Thanks,

Amrit
 
 





--
Amrit kumar
B.tech Computer  Science Engg
ISM DHANBAD

http://a4amri.tripod.com 





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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Problems with serial communication PC -> GenericBase

2007-09-07 Thread Michael Schippling

If you are formatting the send string yourself you are probably
bound to do something wrong. Usually the CRC calculation, but
it could be anything...If you are using Java, look at the
Packetizer.java class to do the heavy lifting. You can see an
example of sending and receiving in my (old) code bolus:
http://www.etantdonnes.com/Motes/robocode.tar.gz

MS

David Sanchez wrote:

Dear All,

 > > > I'm actually working in a TinyOS project with mica2 motes and MIB510
 > > > gateway, all of CROSSBOW.
 > > >
 > > > I have written a program in java for PC-Mote communication. The 
Mote -> PC
 > > > it works correctly and I can view the messages that the motes 
send but the

 > > > side PC -> Mote it doesn't work right.
 > > >
 > > > I am trying to send the 7E 42 04 00 11 7D 5D 00 01 01 7E but 
motes in the

 > > > network have anything.
 > > >
 > > > PD: The program in the motes is symple so I think the problem it 
is how to

 > > > send the data via the MIB510 and the serial packet format.
 > > >
 > > > Anybody can help me?,
 > > >
 > > > Thanks in advance,
 > > >
 > > > see you son,

David
*
David Sánchez Sánchez
Systems Integration Dept. (Power Devices and Systems)
Centre Nacional de Microelectrònica (CNM-CSIC)
Campus Universitat Autònoma de Barcelona (UAB)
08193 Bellaterra (Barcelona)
Tel. (+34) 93 594 77 00, Ext. 2216, 2225, 2226
Fax. (+34) 93 580 14 96
E-mail: [EMAIL PROTECTED]
Web site: www.cnm.es
* 



___
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] Packet loss problem micaz

2007-09-07 Thread Michael Schippling

Loosing 2% is not too bad actually, but under your ideal conditions
you should be doing better. Your surmise about send contention is
probably correct, but the only way I know to fix it is to implement
some kind of ACK-retry mechanism.

MS


Wojciech Czylok wrote:

Hello,
we are working on a research projekt about wireless sensor networks and 
got a problem with packet loss under TinyOS 2.0.1
We use micaz family motes and our goal was to build a network topology 
like a repeater.
The mote A sends packets (containing its TOS_NODE_ID and a counter) to 
its neighbour mote B.

We used the application BlinkToRadio for this purpose.
Mote B uses our application BlinkToRadioReceive. It receives the packet 
from "A", reads its information and sends a
new packet with this information to its neighbour C. This Mote does the 
same thing as Mote B. The last mote in this
chain uses the programm BaseStation and receives the packet. We use the 
java program Listen to read the packages

from the serial port.

If we set up a 1-to-1 connection between BlinkToRadio and BaseStation 
(without any repeating motes in between), then we have no packet loss at 
all.
For every mote we add to the chain, the packet loss rises about 2%. The 
packet loss even occurs, if the motes are lying
right next to each other. It also doesn't depend on the period of the 
timer, which tells the first mote to send packets.

The percentage of packet loss remains.
We wrote a few other test programs to examine this behaviour. So we 
checked the following:

- storing received packets on the forwarding motes before sending
- using tasks instead of functions in the events
But after all, the packet loss did not improve. The packet loss always 
rises about 2% for each mote we add.
We assume that there is a problem when a mote receives a message and 
wants to send at the same time.



Output example from Listen. The last two bytes represent the counter:

00 00 00 00 00 04 00 06 00 01 00 35
00 00 00 00 00 04 00 06 00 01 00 36
00 00 00 00 00 04 00 06 00 01 00 37
//PAKETLOSS!
00 00 00 00 00 04 00 06 00 01 00 3A
00 00 00 00 00 04 00 06 00 01 00 3B
// ... //
00 00 00 00 00 04 00 06 00 01 00 83
00 00 00 00 00 04 00 06 00 01 00 84
00 00 00 00 00 04 00 06 00 01 00 85
//PAKETLOSS!
00 00 00 00 00 04 00 06 00 01 00 87
00 00 00 00 00 04 00 06 00 01 00 88


Does anyone have some ideas for a solution or experiences the same problem?


Thanks for you help,

Marco Dreier & Wojciech Czylok

Attachement:
You will find the code of our BlinkToRadioReceiveC.nc attached,  which 
should forward the packets.
The wiring is found in BlinkToRadioReceiveApp.nc, but we don't attach it 
because it should be ok.   


//BlinkToRadioReceiveC.h
#ifndef BLINKTORADIORECEIVE_H
#define BLINKTORADIORECEIVE_H

enum
{
  AM_BLINKTORADIOMSG = 6,
  TIMER_PERIOD_MILLI = 250
};

typedef nx_struct BlinkToRadioMsg
{
  nx_uint16_t nodeid;
  nx_uint16_t counter;
}
BlinkToRadioMsg;

#endif




//BlinkToRadioReceive.nc
#include "BlinkToRadioReceive.h"

module BlinkToRadioReceiveC
{
  uses interface Boot;
  uses interface Leds;

  uses interface Packet;
  uses interface AMPacket;
  uses interface AMSend;
  uses interface SplitControl as AMControl;

  uses interface Receive;

}

implementation
{
  bool busy = FALSE;
  message_t pkt;
  uint16_t counter = 0;
  uint16_t received_counter = 0;
  uint16_t received_id = 0;

  task void Task_sendPacket()
  {
if (!busy)
{
  //packing new packet with received information
  BlinkToRadioMsg* new_btrpkt = (BlinkToRadioMsg*)(call 
Packet.getPayload(&pkt, NULL));

  new_btrpkt->nodeid = received_id;
  new_btrpkt->counter = received_counter;
  //send packet to neigbour mote
  if (call AMSend.send(0x02, &pkt, sizeof(BlinkToRadioMsg)) == SUCCESS)
  {
  call Leds.led2Toggle();
  busy = TRUE;
  }
}
  }

  event void Boot.booted()
  {
call AMControl.start();
  }

  event void AMControl.startDone(error_t err)
  {
if (err != SUCCESS)
{
  call AMControl.start();
}
  }

  event void AMControl.stopDone(error_t err)
  {}

  event void AMSend.sendDone(message_t* msg, error_t error)
  {
if (&pkt == msg)
{
  busy = FALSE;
}
  }

  event message_t* Receive.receive(message_t* msg, void* payload, 
uint8_t len)

  {
   if (len == sizeof(BlinkToRadioMsg))
{
 //get information from packet
 BlinkToRadioMsg* btrpkt = (BlinkToRadioMsg*)payload;
 received_counter = btrpkt->counter;
 received_id = btrpkt->nodeid;
  call Leds.led1Toggle();
 // call task to send packet to next mote
 post Task_sendPacket();
}
return msg;
   }

}

And here is the slightly modified version of BlinkToRadio (also without 
wiring):


//BlinkToRadio.h
#ifndef BLINKTORADIO_H
#define BLINKTORADIO_H

enum
{
  AM_BLINKTORADIOMSG = 6,
  TIMER_PERIOD_MILLI = 250
};

typedef nx_struct BlinkToRadioMsg
{
  nx_uint16_t nodeid;
  nx_uint16_t counter;
}
BlinkToRadioMsg;

#endif


//BlinkToRadioC.nc
#include 
#inclu

[Tinyos-help] Re: run cygwin command from java : work around found with a new problem :)

2007-09-07 Thread Michael Schippling

Java processes have a Runtime object which has an exec() method,
but again I have been unsuccessful in my minimal attempts to
use it.
MS


amrit kumar wrote:

Hi All,
 
Schip,
Thanks for the effort.It was gud to see that u atleast made an 
attempt to extend what both of us seem to know
 
However from my side, I seem to have found a work around that now 
requires the code from a file (a.sh) to be copy pasted on the bash 
shell. I was just trying around a lot of things and came across that 
this works fine ..
 
1. From 'run'  start a bash shell ( bash.exe) , make sure the bash path 
is set in path variable.

2. copy paste the whole of a.sh command on the bash shell...
 
I know it is a low level kinda work around ... but it works :)
 
It works just fine All this above has to be done from java .. 
hmm .. Your inputs would be very helpful.
 
 
Thanks

Amrit
 
 
 
 



 
On 9/7/07, *Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


This is something I have never figured out how to do correctly
so I can only toss some ideas your way...maybe looking at the
cygwin.com <http://cygwin.com> site will help.

What you seem to want to do is to run a cygwin bash script from
an MSDOGS command shell, right?

The first place to look is reading the bash manual page.
 From a bash shell type:  man bash

However that hasn't helped me on this. Your a.sh script contains
bash commands and needs to be interpreted by that shell. The man
page seems to indicate that you can run a script file something
like "bash a.sh", but that doesn't work for me. It might just be
an issue of getting the right environment settings, but
"bash -l a.sh" doesn't seem to work right either...

I can however do this from DOS:
bash -c "echo some stuff; type java"
so you could put your short script on the command line itself...

Anyway, your b.sh script is being interpreted by DOS,
so it starts bash, which exits immediately, and then tries to
run the subsequent commands in the DOS shell. Each line is a
separate DOS command... DOS doesn't seem to have the equivalent
of the "Here Document" to embed scripts, but you could try
using different files somehow.

mostly useless, I know...
MS

amrit kumar wrote:
 > Hi All,
 >
 > I am attaching the shell script(b.sh) in the mail, which when run
does
 > not go beyond login (screen shot attached). The commands which
are in
 > the shell are not being executed at the login prompt :(
 >
 > a.sh is a modified script which when run after the login screen is
 > working fine.
 >
 > If you see closely both a and b.sh are different only in their login
 > command (it exists in a and not in b).
 >
 > Let me know the reason/suggestion/resolution*.. It is very
urgent..*
 >
 > Saikat , Its not asking for any password or username.Can there be
some
 > issue due to this.
 >
 > Thanking you in advance,
 >
 > Amrit
 >
 >
 >
 >
 >
 >
 > On 9/5/07, *amrit kumar* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>>
 > wrote:
 >
 > Hi All,
 >
 > I am currently working on Tiny OS related stuff and am stuck with
 > the following problem. Please let me know if you have a
solution.
 >
 > A part of the *java code* is required to do the following :
 >
 > 1. Open bash shell (cygwin) from command prompt by running
"bash --
 > login  i" on command prompt
 >
 >   i.e "bash -- login  i"  does this on command prompt. bash shell
 > prompt is displayed after this.
 >
 > 2. On the same bash login(bash shell prompt) change directory to
 > "C:\tinyos\cygwin\opt\tinyos-1.x\apps\Bombilla"
 >
 >   i.e  $ cd C:/tinyos/cygwin/opt/tinyos-1.x/apps/Bombilla
 >
 > 3. On the same prompt run "make pc" command
 >
 > i.e $ make pc
 >
 >
 > All this has to be done through java. I even tried creating a
shell
 > file to the above and calling the same from java, but every
time the
 > shell gets stuck at step 1.It shows the login prompt but It
does not
 > execute any command after 1st step.
 >
 > Let me know your suggestions/solutions.
 >
 > Thanks,
 > Amrit
 >
 >
 >
 >
 >
 >
 > --
 > Amrit kumar
 > B.tech Compu

Re: Fwd: Re: [Tinyos-help] Error: make: *** No rule to make target `mica2'. Stop.

2007-09-08 Thread Michael Schippling

Please send questions to the TOS help list.

For everything you can do with the cygwin bash shell type: man bash

To set an envvar you can do this:

export MAKERULES=/some/file/name

MS


Bo Xu wrote:

Dear Sir:

Do you know how to set the environment variable MAKERULE?

Thank you so much!

Bo


Note: forwarded message attached.


Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now 
 
(it's updated for today's economy) at Yahoo! Games.


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
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 get 3 ADC Port v alue from Tmote sky‏

2007-09-13 Thread Michael Schippling

I think what you need to do is have separate names for each ADC 'channel'
and call their getData()'s in sequence, something like this:

in the Config file:

  ProjectOtherM.ADCx -> ADCC.ADC[TOS_ADC_SENSORX_PORT];
  ProjectOtherM.ADCy -> ADCC.ADC[TOS_ADC_SENSORY_PORT];
  ProjectOtherM.ADCz -> ADCC.ADC[TOS_ADC_SENSORZ_PORT];

(I'm not sure about your ASSOCIATE_ADC_CHANNEL() stuff, on micaX's
under T1 I simply use the channel number. Is this perhaps T2, or
else I'm still unfamiliar with Tmote specifics...?)

in the code:

after startup or in your timer.fired():

call ADCx.getData();

Then chain the gets in the individual Ready() methods:

   // get data from X channel and fire off Y channel conversion
   async event result_t ADCx.dataReady( uint16_t data )
   {
...
call ADCy.getData();
return SUCCESS;
   }


MS

Chen Bleed wrote:
I want to get three value from tmote sky.I use 3-axis accelerator 
sensor, and I need the X, Y, Z Output.
I'm unable to  get three values at one time, so i try to get one value 
at one time, then get  three times to be a cycle.
(If anyone get some solutione like get three values at one time, please 
tell my how to do.)
This program seems to get only one value.Please help me to solve this 
problem.


* IntMsg.h *
typedef struct IntMsg {
  uint16_t val;
  //uint16_t src;
  uint16_t testval;
  //uint16_t testval2;
  //uint16_t testval3;
} IntMsg;

enum {
  AM_INTMSG = 153
};


* SensorX.h *
enum
{
  TOS_ADC_SENSORX_PORT = unique("ADCPort"),

  TOSH_ACTUAL_ADC_SENSORX_PORT = ASSOCIATE_ADC_CHANNEL(
/*INPUT_CHANNEL_A3,*/
INPUT_CHANNEL_A2,
REFERENCE_VREFplus_AVss,
REFVOLT_LEVEL_1_5
  ),
};


* SensorY.h *
enum
{
  TOS_ADC_SENSORY_PORT = unique("ADCPort"),

  TOSH_ACTUAL_ADC_SENSORY_PORT = ASSOCIATE_ADC_CHANNEL(
/*INPUT_CHANNEL_A1, */
INPUT_CHANNEL_A0,
REFERENCE_VREFplus_AVss,
REFVOLT_LEVEL_1_5
  ),
};


* SensorZ.h *
enum
{
  TOS_ADC_SENSORZ_PORT = unique("ADCPort"),

  TOSH_ACTUAL_ADC_SENSORZ_PORT = ASSOCIATE_ADC_CHANNEL(
/*INPUT_CHANNEL_A2,*/
INPUT_CHANNEL_A1,
REFERENCE_VREFplus_AVss,
REFVOLT_LEVEL_1_5
  ),
};

* ProjectOther.nc *
includes IntMsg;
includes SensorX;
includes SensorY;
includes SensorZ;

configuration ProjectOther {

}

implementation
{
  components Main, ProjectOtherM, TimerC, LedsC, ADCC, GenericComm as Comm;
 
  Main.StdControl -> ProjectOtherM.StdControl;

  ProjectOtherM.Timer -> TimerC.Timer[unique("Timer")];
  Main.StdControl -> TimerC.StdControl;
  ProjectOtherM.Leds -> LedsC.Leds;
  ProjectOtherM.SendMsg -> Comm.SendMsg[AM_INTMSG];
  ProjectOtherM.SubControl -> Comm.Control;
  ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORX_PORT];
  ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORY_PORT];
  ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORZ_PORT];
  ProjectOtherM.ADCControl -> ADCC;
 
}


* ProjectOtherM.nc *
includes IntMsg;
includes SensorX;
includes SensorY;
includes SensorZ;

module ProjectOtherM {
provides {
interface StdControl;
interface IntOutput;
}
uses {
  interface StdControl as SubControl;
  interface SendMsg;
  interface Timer;
  interface Leds;
  interface ADC;
  interface ADCControl;
}
}

implementation {
int state;
bool pending, flag_y, flag_g, flag_r;
TOS_Msg msg_data;
uint16_t ADCval;

void readIRSensor();
task void chooseADCChannel();

/* interface StdControl */
command result_t StdControl.init() {
atomic ADCval = 0;
atomic state = 1;
pending = FALSE;
call Leds.init();
call Leds.redOff();
call Leds.yellowOff();
call Leds.greenOff();
call ADCControl.init();

return call SubControl.init();
}

command result_t StdControl.start() {
call Timer.start(TIMER_REPEAT, 1000);
return call SubControl.start();
}

command result_t StdControl.stop() {
return call SubControl.stop();
}

/* interface IntOutput */
command result_t IntOutput.output(uint16_t value) {
IntMsg *message = (IntMsg *)msg_data.data;

if(!pending)
{
  pending = TRUE;  
  readIRSensor();  
  atomic {

  message->val = ADCval;
/*message->src = TOS_LOCAL_ADDRESS;*/
 if(!(state%3)) message->testval = 0x0099;
 else if((state%3)==1) message->testval = 0x0088;
 else message->testval = 0x0077;
  }
 
  if (call SendMsg.send(0x0111, sizeof(IntMsg), &msg_data))

return SUCCESS;
 
  pending = FALSE;

}
return FAIL;
}
/* interface ADC */
void readIRSensor(){
call Leds.greenToggle();
call ADC.getData();
}
async event result_t ADC.dataReady( uint16_t data ) {
  ADCval = data;
  post chooseADCChannel();
  return SUCCESS;
}

task void chooseADCChannel()
{
  if(!(state%3)) call ADCControl.bindPort( TOS_ADC_SENSORX_PORT, 
TOSH_ACTUAL_ADC_SENSORX_PORT );
  else if((state%3)==1)call ADCControl.bindPort( 
TOS_ADC_SENSORY_PORT, TOSH_ACTU

Re: [Tinyos-help] radio stack cc22420

2007-09-13 Thread Michael Schippling

hmm, you _should_ only get one done per message send,
meaning one from the UART and one from the radio.
Using GenericComm, you need to sequence the sends such
that only one is active at a time. What I have done is
fire off the serial send from the done of the radio send.
If that doesn't work for you, please post the relevant
code and version/platform info.

MS

Leonardo wrote:
Hy guy. I have some problems with stack radio.  in my project I send a 
message on UART and a message on Radio. when i transmit a message on 
UART,  i receive once signal of sendDone and in my project i write in 
this way:


call DataMsg.send(TOS_UART_ADDR,sizeof(beaconMsg), &msg);

but when i trasmit on radio in this way:

call SendMsg.send(TOS_BCAST_ADDR,sizeof(beaconMsg), &msg);

i receive twice signal of sendDone and in this way i have some problem 
that i don't understand... how can i receive only one signal of SendMsg


Please help me

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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] external antenna

2007-09-13 Thread Michael Schippling

Are we sure that the antennas are for the right wavelength?
By "linksys" I guess you mean a dongle from an 802.11b,g
router? Do they have the same connector as your Tmote?
And are the connectors seated well?

Also, you're sure you disabled the internal antenna?
I think there's a capacitor that needs to be removed
on the standard Tmotes.

...I guess I should try this sometime...

MS


André Miguel de Almeida Marrão Rodrigues wrote:

Hello

I have tried these kind of antennas and it also did not work
in an indoor scenario with 2 walls.

For 200mts in your scenario perhaps you should use TMoteMiniPro or other
nodes with a power amplifier.

André

- Original Message - From: "subhash nemani" 
<[EMAIL PROTECTED]>

To: 
Sent: Thursday, September 13, 2007 11:41 AM
Subject: [Tinyos-help] external antenna



we have tmotes without internal antenna and provision for external i.e
SMA connector .i have connected linksys 7dBi antennas
but it is not covering even a distance of 20 mts
what might be the problem???
please help me in this regard
i have tired the power settings using commands at the cygwin prompt
also but no result
atleast i need to transmit the signal for 200mts
plzzz help me 
thank u in advance
___
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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] initializing pointers

2007-09-13 Thread Michael Schippling

You have made a pointer, but it doesn't point to anything...
or more preciesely it is probably initialized to 0, so it
points to the bottom of memory. Since there isn't any mem
management (to speak of) the easiest thing is to create
your array directly:

uint16_t dataArr[SOMEsmallSIZE];

Otherwise the usage is the same as you show.

For all kinds of interesting facts about C, see:
http://en.wikibooks.org/wiki/C_Programming

MS

Islam Hegazy wrote:

Hi all
 
I want to use a dynamic array in my sensor application. Is there a way 
to iniailize the array before using it like the keyword new in C++?
 
I defined the array as : uint16_t *dataArr

when I access it as : dataArr[numData++] = value
it gives a runtime error.
 
I am working with mica2 and TinyOS1.
 
Regards

Islam Hegazy




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] One problem about mica2 frequency

2007-09-13 Thread Michael Schippling

Make sure you have selected the same frequency defines for
both devices in the relevant makefiles. E.g., I have:

PFLAGS += -DCC1K_DEF_FREQ=91670
CFLAGS += -DRADIO_XMIT_POWER=0xFF

Note that the 'regular' apps/Makelocal doesn't set any power
level for mica2's, so that might be a problem.
MS


Bo Xu wrote:

Dear all:

I uploaded a nesC program to a mica2(433Mhz) and the program 
TOSBase(433Mhz) to the other mica2 pluged on the MIB510. 

At first, everything works well. But I changed both of the mica2 motes 
to another type mica2(900Mhz) and it seems that one mica2 can still send 
the data, but the mica2 on the basestation MIB510 can't recieve data. I 
don't know why,
Do you guys have any idea about that? 


Thank you so much!

Sincerely,
Bo



Catch up on fall's hot new shows 
 on Yahoo! TV. Watch previews, get listings, and more!





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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] initializing pointers

2007-09-13 Thread Michael Schippling

I don't know, offhand, how to get an available memory reading
at runtime...hopefully someone else is smarter than me and
will share...

You can see how much RAM you've used at the end of the compile
output and use that as a guide to how large your array can be.
In general you'll have to invent an alloc-from-large-buffer
scheme of some kind if you want to get it at runtime. In that
case you would declare your pointer as you did and then set
it to the result of your alloc-thing before using it.

MS

Islam Hegazy wrote:
The problem that I am facing is that I don't what is the value of 
SomeSmallSize...
I can go the other way around by specifying a large value but I am 
afraid that I may overflow the memory so is there a way to compute the 
available memory?


Islam Hegazy

- Original Message - From: "Michael Schippling" <[EMAIL PROTECTED]>
To: "Islam Hegazy" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, September 13, 2007 2:25 PM
Subject: Re: [Tinyos-help] initializing pointers



You have made a pointer, but it doesn't point to anything...
or more preciesely it is probably initialized to 0, so it
points to the bottom of memory. Since there isn't any mem
management (to speak of) the easiest thing is to create
your array directly:

uint16_t dataArr[SOMEsmallSIZE];

Otherwise the usage is the same as you show.

For all kinds of interesting facts about C, see:
http://en.wikibooks.org/wiki/C_Programming

MS

Islam Hegazy wrote:

Hi all
 I want to use a dynamic array in my sensor application. Is there a 
way to iniailize the array before using it like the keyword new in C++?

 I defined the array as : uint16_t *dataArr
when I access it as : dataArr[numData++] = value
it gives a runtime error.
 I am working with mica2 and TinyOS1.
 Regards
Islam Hegazy




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] initializing pointers

2007-09-14 Thread Michael Schippling

At the end of my T1 "make mica2" I get:

compiled Robot to build/mica2/main.exe
   15998 bytes in ROM
 568 bytes in RAM

MS

Islam Hegazy wrote:

How can I compute the RAM usage at the end of compilation then?

Islam


- Original Message ----- From: "Michael Schippling" <[EMAIL PROTECTED]>
To: "Islam Hegazy" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, September 13, 2007 3:46 PM
Subject: Re: [Tinyos-help] initializing pointers



I don't know, offhand, how to get an available memory reading
at runtime...hopefully someone else is smarter than me and
will share...

You can see how much RAM you've used at the end of the compile
output and use that as a guide to how large your array can be.
In general you'll have to invent an alloc-from-large-buffer
scheme of some kind if you want to get it at runtime. In that
case you would declare your pointer as you did and then set
it to the result of your alloc-thing before using it.

MS

Islam Hegazy wrote:
The problem that I am facing is that I don't what is the value of 
SomeSmallSize...
I can go the other way around by specifying a large value but I am 
afraid that I may overflow the memory so is there a way to compute 
the available memory?


Islam Hegazy

- Original Message - From: "Michael Schippling" 
<[EMAIL PROTECTED]>

To: "Islam Hegazy" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, September 13, 2007 2:25 PM
Subject: Re: [Tinyos-help] initializing pointers



You have made a pointer, but it doesn't point to anything...
or more preciesely it is probably initialized to 0, so it
points to the bottom of memory. Since there isn't any mem
management (to speak of) the easiest thing is to create
your array directly:

uint16_t dataArr[SOMEsmallSIZE];

Otherwise the usage is the same as you show.

For all kinds of interesting facts about C, see:
http://en.wikibooks.org/wiki/C_Programming

MS

Islam Hegazy wrote:

Hi all
 I want to use a dynamic array in my sensor application. Is there a 
way to iniailize the array before using it like the keyword new in 
C++?

 I defined the array as : uint16_t *dataArr
when I access it as : dataArr[numData++] = value
it gives a runtime error.
 I am working with mica2 and TinyOS1.
 Regards
Islam Hegazy


 



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



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] tasks, use of a variable declared in an async event

2007-09-14 Thread Michael Schippling

In general, any variable you define inside the implemenation
braces, but outside of a function, is "global" to the whole
module. Since tasks don't get arguments on their stack you
must use globals like this to pass data. So one fix for your
problem would be to copy buf and buflen to other 'global'
variables before posting the task that uses them.

However...

Since you are copying stuff anyway, and we don't know about the
greater scope of the "buf" that you are getting in dataReady,
you might as well define "rmspkt" as a global directly in your
module implementation, say, just before dataReady(), which it
appears from the code snippet that you have already done, and
do the copy in the async routine. Then, if all was copacetic,
post your Send task and hope for the best.

MS



John Griessen wrote:

I had some tested working code that I had the warning about
sync from async event.   It compiled and moved data though.

So I started reading about tasks and moved the code below from inside 
the async event to a task, and just posted the task inside the event.


Then I get undeclared first use of for buf and buflen


What to do?  The section on tasks seems to say there are no parameters, 
just use the variables in your component.  So, do I need to copy buf and 
buflen to global variables before I can use them?


Instead of that, I could just let the event dataReady put data straight 
into global variables, but I run into snags I don't know how to fix...

The compiler says I am redefining the globals.  How do you let
an event like .dataReady put data into a global variable?

Thanks,

John Griessen

  async event void a2d12ch.dataReady(uint16_t *buf, uint16_t buflen)
  {
post MoistureSensorsMsgSend();
  }

  task void MoistureSensorsMsgSend()
  {
MoistureSensorsMsg* rmspkt = (MoistureSensorsMsg*) (call 
AMSend.getPayload(&pkt));
//cast result of .getPayload to pointer of nx_struct 
MoistureSensorsMsg*

rmspkt->nodeid = TOS_NODEID;
rmspkt->timestamp = timestamp;
call Leds.led1On();  //debug aid
if ( buflen == 12 )   // 12 Adc values in a vector, len == 12
{
  rmspkt->adc00 = buf[0];
  rmspkt->adc01 = buf[1];.
.
.
.
}




--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
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 get 3 ADC Port v alue from Tmote sky�

2007-09-15 Thread Michael Schippling

Sorry
fire-off means call ADCy.getData();
This will start the second (Y) conversion.
Then in ADCy.dataReady() call ADCz.getData();
to start the Z conversion. In ADCz.dataReady()
you could chain back to ADCx.getData() or leave
it to your timer to start the next set.

MS

Chen Bleed wrote:


It seems OK except "// get data from X channel and fire off Y channel 
conversion".

I found no method to fire off.
I use tmote sky
OS: tinyos 1.1.15
 


 > Date: Thu, 13 Sep 2007 11:14:00 -0600
 > From: [EMAIL PROTECTED]
 > To: [EMAIL PROTECTED]
 > CC: tinyos-help@Millennium.Berkeley.EDU
 > Subject: Re: [Tinyos-help] how to get 3 ADC Port value from Tmote sky‏
 >
 > I think what you need to do is have separate names for each ADC 'channel'
 > and call their getData()'s in sequence, something like this:
 >
 > in the Config file:
 >
 > ProjectOtherM.ADCx -> ADCC.ADC[TOS_ADC_SENSORX_PORT];
 > ProjectOtherM.ADCy -> ADCC.ADC[TOS_ADC_SENSORY_PORT];
 > ProjectOtherM.ADCz -> ADCC.ADC[TOS_ADC_SENSORZ_PORT];
 >
 > (I'm not sure about your ASSOCIATE_ADC_CHANNEL() stuff, on micaX's
 > under T1 I simply use the channel number. Is this perhaps T2, or
 > else I'm still unfamiliar with Tmote specifics...?)
 >
 > in the code:
 >
 > after startup or in your timer.fired():
 >
 > call ADCx.getData();
 >
 > Then chain the gets in the individual Ready() methods:
 >
 > // get data from X channel and fire off Y channel conversion
 > async event result_t ADCx.dataReady( uint16_t data )
 > {
 > ...
 > call ADCy.getData();
 > return SUCCESS;
 > }
 >
 >
 > MS
 >
 > Chen Bleed wrote:
 > > I want to get three value from tmote sky.I use 3-axis accelerator
 > > sensor, and I need the X, Y, Z Output.
 > > I'm unable to get three values at one time, so i try to get one value
 > > at one time, then get three times to be a cycle.
 > > (If anyone get some solutione like get three values at one time, 
please

 > > tell my how to do.)
 > > This program seems to get only one value.Please help me to solve this
 > > problem.
 > >
 > > * IntMsg.h *
 > > typedef struct IntMsg {
 > > uint16_t val;
 > > //uint16_t src;
 > > uint16_t testval;
 > > //uint16_t testval2;
 > > //uint16_t testval3;
 > > } IntMsg;
 > >
 > > enum {
 > > AM_INTMSG = 153
 > > };
 > >
 > >
 > > * SensorX.h *
 > > enum
 > > {
 > > TOS_ADC_SENSORX_PORT = unique("ADCPort"),
 > >
 > > TOSH_ACTUAL_ADC_SENSORX_PORT = ASSOCIATE_ADC_CHANNEL(
 > > /* INPUT_CHANNEL_A3,*/
 > > INPUT_CHANNEL_A2,
 > > REFERENCE_VREFplus_AVss,
 > > REFVOLT_LEVEL_1_5
 > > ),
 > > };
 > >
 > >
 > > * SensorY.h *
 > > enum
 > > {
 > > TOS_ADC_SENSORY_PORT = unique("ADCPort"),
 > >
 > > TOSH_ACTUAL_ADC_SENSORY_PORT = ASSOCIATE_ADC_CHANNEL(
 > > /* INPUT_CHANNEL_A1, */
 > > INPUT_CHANNEL_A0,
 > > REFERENCE_VREFplus_AVss,
 > > REFVOLT_LEVEL_1_5
 > > ),
 > > };
 > >
 > >
 > > * SensorZ.h *
 > > enum
 > > {
 > > TOS_ADC_SENSORZ_PORT = unique("ADCPort"),
 > >
 > > TOSH_ACTUAL_ADC_SENSORZ_PORT = ASSOCIATE_ADC_CHANNEL(
 > > /* INPUT_CHANNEL_A2,*/
 > > INPUT_CHANNEL_A1,
 > > REFERENCE_VREFplus_AVss,
 > > REFVOLT_LEVEL_1_5
 > > ),
 > > };
 > >
 > > * ProjectOther.nc *
 > > includes IntMsg;
 > > includes SensorX;
 > > includes SensorY;
 > > includes SensorZ;
 > >
 > > configuration ProjectOther {
 > >
 > > }
 > >
 > > implementation
 > > {
 > > components Main, ProjectOtherM, TimerC, LedsC, ADCC, GenericComm as 
Comm;

 > >
 > > Main.StdControl -> ProjectOtherM.StdControl;
 > > ProjectOtherM.Timer -> TimerC.Timer[unique("Timer")];
 > > Main.StdControl -> TimerC.StdControl;
 > > ProjectOtherM.Leds -> LedsC.Leds;
 > > ProjectOtherM.SendMsg -> Comm.SendMsg[AM_INTMSG];
 > > ProjectOtherM.SubControl -> Comm.Control;
 > > ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORX_PORT];
 > > ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORY_PORT];
 > > ProjectOtherM.ADC -> ADCC.ADC[TOS_ADC_SENSORZ_PORT];
 > > ProjectOtherM.ADCControl -> ADCC;
 > >
 > > }
 > >
 > > * ProjectOtherM.nc *
 > > includes IntMsg;
 > > includes SensorX;
 > > includes SensorY;
 > > includes SensorZ;
 > >
 > > module ProjectOtherM {
 > > provides {
 > > interface StdControl;
 > > interface IntOutput;
 > > }
 > > uses {
 > > interface StdControl as SubControl;
 > > interface SendMsg;
 > > interface Timer;
 > > interface Leds;
 > > interface ADC;
 > > interface ADCControl;
 > > }
 > > }
 > >
 > > implementation {
 > > int state;
 > > bool pending, flag_y, flag_g, flag_r;
 > > TOS_Msg msg_data;
 > > uint16_t ADCval;
 > >
 > > void readIRSensor();
 > > task void chooseADCChannel();
 > >
 > > /* interface StdControl */
 > > command result_t StdControl.init() {
 > > atomic ADCval = 0;
 > > atomic state = 1;
 > > pending = FALSE;
 > > call Leds.init();
 > > call Leds.redOff();
 > > call Leds.yellowOff();
 > > call Leds.greenOff();
 > > call ADCControl.init();
 > >
 > > return call SubControl.init()

Re: [Tinyos-help] Reading packet from UART in TOSSIM

2007-09-15 Thread Michael Schippling

hmmm, I don't use TOSSIM but it's possible that they made the
assumption that node 0 is the base-station (usually running
"TOSBase") and that other nodes would talk to the PC through
that one. In a 'real' mote system that would be the general
case, although you _can_ assign any ID to the mote in the base
adapter in order to confuse things.

MS

Ray kah wrote:

Hi

I tried to send packets to the UART. Through SF (java 
net.tinyos.sf.SerialForwarder -comm [EMAIL PROTECTED]), I used 
Listen.java to view all the packets . The packet is "7E 00 12 7D 02 << 
00 FF >>",  where << 00 FF >> is my data. Here 00 is the node Id which I 
set before sending.


Unfortunately, I can only view those coming from node 0.

Can I also view packets from other nodes too ? How different is this 
from the real motes?


Thank you.

Regards,
Ray




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Reading packet from UART in TOSSIM

2007-09-15 Thread Michael Schippling

Perhaps I'm missing the point...you are using:
   -comm [EMAIL PROTECTED]
which, I think, means you are talking to a simulator
rather than a real system. Am I confused?

If you are using a simulator, as I said I don't use TOSSIM so
I don't know how it works or if 'they' designed the message
passing system to incorporate more than one source. In the
'real' world the PC can only receive messages via a base-station,
which is nominally node 0, so TOSSIM may imitate that.

Also I'm not clear on your multi-hop-debug-packet thing.
Wouldn't you shut off sending at the source? If your
base-station is running TOSBase, all messages addressed to
the BaseID and BCAST will pass-thru to the PC -- however I
believe it may filter out messages addressed to other MoteIDs.

MS

Ray kah wrote:

Hi Michael

I used to forward debug packets multi-hop over the radio to the 
basestation (node 0), and then towards the PC for displaying. But now, I 
want to remove the debug from the radio.


I don't understand, so is it possible to receive packets from other nodes ?

Please explain. Thank you.

Ray

On 9/16/07, *Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


hmmm, I don't use TOSSIM but it's possible that they made the
assumption that node 0 is the base-station (usually running
"TOSBase") and that other nodes would talk to the PC through
that one. In a 'real' mote system that would be the general
case, although you _can_ assign any ID to the mote in the base
adapter in order to confuse things.

MS

Ray kah wrote:
 > Hi
 >
 > I tried to send packets to the UART. Through SF (java
 > net.tinyos.sf.SerialForwarder -comm [EMAIL PROTECTED]), I used
 > Listen.java to view all the packets . The packet is "7E 00 12 7D
02 <<
 > 00 FF >>",  where << 00 FF >> is my data. Here 00 is the node Id
which I
 > set before sending.
 >
 > Unfortunately, I can only view those coming from node 0.
 >
 > Can I also view packets from other nodes too ? How different is this
 > from the real motes?
 >
 > Thank you.
 >
 > Regards,
 > Ray
 >
 >
 >

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

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew




--
Regards,
Ray


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] libstdc++.so.6 package dependancy while installing graphviz.

2007-09-15 Thread Michael Schippling

If you are using rpm to install you can try the --nodeps option.
Also I believe graphviz is only used for some documentation
generation so it shouldn't hang up development...well...any
more than the rest of the missing documentation...

MS

hamsa jega wrote:

Hi,
 
Thank you for your reply. I went ahead and installed fedora core 4 and 
tinyos 2. I was doing ok till I had to install graphviz, I get a 
dependance message for libstdc++.so.6. I was able to find this package 
using

$ locate libstdc++.so.6
and /usr/lib is in the path as well. Still I am unable to install 
graphviz. I am also stuck when it comes to running Listen. I am not able 
to solve this. Please let me know if you know how I can work around this.
 
Thanks,

Hamsa




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Running TOSSIM on Vista

2007-09-15 Thread Michael Schippling

I might point out that the TOS toolchain does work on Widows XP
and there has been some chatter about Vista on this list. You
can search back and see if anything useful transpired, and look
at tinyos.net for various platform distributions. Otherwise I'm
pretty much at the beginning of the just-use-Linux rope myself...

MS

John Griessen wrote:

Darshana Wickramaratne wrote:
 I am running
Windows Vista (not by choice) on my laptop and also have a copy of 
Cygwin installed.


I would like to know if there is any way to get the TOSSIM simulator 
started if I was to create a VMWare image of the XubuntOS Live CD 
image ISO file.  If this is possible, what steps would I have to go 
through?



VMWare Player is reported to play the edgy version of XubuntOS.
I imagine VMWare supports Vista, and their site will tell you more..

I find Xubuntos installed directly to be much more beneficial than
dealing with Windows interoperability and versions.  I recommend getting 
another old laptop with excellent battery life instead of top processor 
speed and use xubuntos directly, and get quick startup.


John G




--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Reading packet from UART in TOSSIM

2007-09-16 Thread Michael Schippling

In a real mote system you could have many host-adapters connected
to individual serial ports, or better, hanging off a USB hub. Each
mote would then have a different port address on the PC host. You
would have to run a SerialForwarder process for each or write your
own process to listen to all the ports at once.

I think that's what you were asking?

MS

Ray kah wrote:
Yes, I am using TOSSIM now. I would like to receive all nodes' UART 
messages through SF, even though only the base-station in connected to a 
PC.


In real-system, I can have each motes connected to a PC to receive the 
UART messages ?


For my multi-hop app, I used Surge and include some debug/statistic data 
inside the surge payload. This gets forwarded to the base-station which 
ineventually get display using Listen. I can achieve this now, but I 
want to reduce the payload size since the statistic/debug info is not 
required always.


On 9/16/07, *Michael Schippling* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Perhaps I'm missing the point...you are using:
-comm [EMAIL PROTECTED]
which, I think, means you are talking to a simulator
rather than a real system. Am I confused?

If you are using a simulator, as I said I don't use TOSSIM so
I don't know how it works or if 'they' designed the message
passing system to incorporate more than one source. In the
'real' world the PC can only receive messages via a base-station,
which is nominally node 0, so TOSSIM may imitate that.

Also I'm not clear on your multi-hop-debug-packet thing.
Wouldn't you shut off sending at the source? If your
base-station is running TOSBase, all messages addressed to
the BaseID and BCAST will pass-thru to the PC -- however I
believe it may filter out messages addressed to other MoteIDs.

MS

Ray kah wrote:
 > Hi Michael
 >
 > I used to forward debug packets multi-hop over the radio to the
 > basestation (node 0), and then towards the PC for displaying. But
now, I
 > want to remove the debug from the radio.
 >
 > I don't understand, so is it possible to receive packets from
other nodes ?
 >
 > Please explain. Thank you.
 >
 > Ray
 >
 > On 9/16/07, *Michael Schippling* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
 >
 > hmmm, I don't use TOSSIM but it's possible that they made the
 > assumption that node 0 is the base-station (usually running
 > "TOSBase") and that other nodes would talk to the PC through
 > that one. In a 'real' mote system that would be the general
 > case, although you _can_ assign any ID to the mote in the base
 > adapter in order to confuse things.
 >
 > MS
 >
 > Ray kah wrote:
 >  > Hi
 >  >
 >  > I tried to send packets to the UART. Through SF (java
 >  > net.tinyos.sf.SerialForwarder -comm
[EMAIL PROTECTED]), I used
 >  > Listen.java to view all the packets . The packet is "7E 00
12 7D
 > 02 <<
 >  > 00 FF >>",  where << 00 FF >> is my data. Here 00 is the
node Id
 > which I
 >  > set before sending.
 >  >
 >  > Unfortunately, I can only view those coming from node 0.
 >  >
 >  > Can I also view packets from other nodes too ? How
different is this
 >  > from the real motes?
 >  >
 >  > Thank you.
 >  >
 >  > Regards,
 >  > Ray
 >  >
 >  >
 >  >
 >


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

<https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help>
 >
 > --
 > Platform: WinXP/Cygwin
 > TinyOS version: 1.x, Boomerang
 > Programmer: MIB510
 > Device(s): Mica2, MicaZ, Tmote
 > Sensor board: homebrew
 >
 >
 >
 >
 > --
 > Regards,
 > Ray

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew




--
Regards,
Ray


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] write data into sensor network

2007-09-18 Thread Michael Schippling

I you are using TOS1.x look at apps/SimpleCmd for an example
of sending data to a mote. I believe the host side java demo
that runs this is in tools/java/net/tinyos/tools/BcastInject.java

T2 probably has something similar.

MS


Leonardo wrote:
hy guy... i wanna write data by uart from pc to sensor. how can i do 
to capture new data in sensor??? what is the event to set???

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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] One application connected to several SerialForwarder

2007-09-18 Thread Michael Schippling

Perhaps Urs's advice has helped the initial problem but I would
recommend that you just skip the SF processes and go directly to the
serial ports. You could start a java thread to wait on each port and
deliver the data for whatever processing you wish...

Anyway there is indication in the T1 tools that you can do something
like this:

PacketSource ps = BuildSource.makePacketSource( "" );
ps.open(PrintStreamMessenger.err);

while( (packet = ps.readPacket()) != null )
// do stuff

where "" is what you would normally put in the MOTECOM
environment variable, e.g.: [EMAIL PROTECTED]:mica2

MS


[EMAIL PROTECTED] wrote:

The problem is that I would like to connect several base stations to a
juste one pc in the way that they can communicate to the java
application which is running on this pc.

My idea was to have a SerialForwarder for each base station in the way
that they can communicate to my application on diffrent ports.
That's why I need to use SerialForwarder rather than any other packet
source.
Does anybody have an idea about how can I handel the problem below:
Cheers,
B.

"I create a SerialForwarder and I try to associate it to moteIF object
as below:

PhoenixSource source =
BuildSource.makePhoenix(BuildSource.makeSF(this.hostname,9002),PrintStreamMessenger.err);

   MoteIF mote=new MoteIF(source);

When I run the programe I get this:

[EMAIL PROTECTED]:9002 died - exiting (java.net.ConnectException: Connection
refused)

I've checked there is no other SerialForwarder or another application which
is running on this port .I've tried to unset MOTECOM but it's useless"
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Msp430Adc12MultiChannel global variable question

2007-09-18 Thread Michael Schippling

I think the complaint is simply that you have 'global'
and a local stack variables with the same name.
I'd just change this:

async event void a2d12ch.dataReady(uint16_t *buffer, uint16_t bufferlen)

to something like this:

async event void a2d12ch.dataReady(uint16_t *b, uint16_t bl)

However, you are not doing anything with those args in the function.
I don't know the ADC interface but I would think that you'll need
to copy them to globals somehow before posting the task,
assuming of course that you are hoping to use their values.

MS

John Griessen wrote:

Hello,

I have some compiler warnings I'm not sure the best way to tidy up.
as far as I understand about the Msp430Adc12MultiChannel  interface
and by digging into its code, the buffer specified by AdcConfigure
is intended as the place for results to land after running the .getData

The trouble is the interface seems to work with a call that declares it 
again...  So, what is the intent?  Should I create yet another buffer

and copy the buffer contents again just to use Msp430Adc12MultiChannel?

What is a more compact, efficient way that I am not seeing yet?

Thanks,

John Griessen

===

In file included from ReadMoistureSensorsC.nc:12:
In component `ReadMoistureSensorsP':
ReadMoistureSensorsP.nc:111: warning: declaration of `buffer' shadows 
global declaration

ReadMoistureSensorsP.nc:26: warning: location of shadowed declaration
ReadMoistureSensorsP.nc:111: warning: declaration of `bufferlen' shadows 
global declaration

ReadMoistureSensorsP.nc:27: warning: location of shadowed declaration
ReadMoistureSensorsP.nc: In function 
`ReadMoistureSensorsP$Resource$granted':

ReadMoistureSensorsP.nc:86: warning: unused variable `defaultconfig'
compiled ReadMoistureSensorsC to build/ecosens1/main.exe
   14196 bytes in ROM
 338 bytes in RAM


code files related to the above message are:

http://www.ecosensory.com/a2d12chP.nc
http://www.ecosensory.com/a2d12chC.nc
http://www.ecosensory.com/a2d12ch.h
http://www.ecosensory.com/ReadMoistureSensorsC.nc
http://www.ecosensory.com/ReadMoistureSensorsP.nc
http://www.ecosensory.com/ReadMoistureSensors.h
http://www.ecosensory.com/Msp430Adc12.h  (unmodified -- for reference)




--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Connection Timed Out

2007-09-18 Thread Michael Schippling

I don't think MOTECOM is significant to downloading programs,
only 'listening' to data messages. I believe the tmote system
has some magic for determining what USB port to use for downloads.
You might try reviewing the setup info in the tmote manual,
I remember there being some way to explicitly ref the port you want.

MS

John Griessen wrote:

Aravind Ravisankar wrote:


This doesn't happen all the time but is very frequent. Sometimes when I
restart my system it helps and I am able to successfully install but then
the errort gets back after some time.


Does the USB communication timeout come on a system with other
USB devices attached?  Are they using it much?

Do you have MOTECOM= set to something in your environment variables?

John Griessen



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] One application connected to several SerialForwarder

2007-09-18 Thread Michael Schippling

Lets run this back to the help list, since I don't fully understand the
question

If you want a physical connection between mote and PC you need one
MIB5x0 (or whatever) and one USB or serial 'port' per mote. Aside
from expense, I don't know that there is any limit to the number
of any of those you may use (well, maybe 256 ports or something...).

I'm not sure why you want so many base-stations. We may have
a terminology problem because your use of "server" and "client"
has me confused. But if what you really want is a bunch of motes
hardwired to a PC, then the approach metcalfc and I have outlined
should do you fine. Each PacketSource is directly mapped to a single
port, and thus a single mote, and keeping track of which is which is
just, as they say, a matter of software...

MS

[EMAIL PROTECTED] wrote:
I'm using tinyos-2.0,I think that that will work as 
Michael proposed but it still limits the number of 
base station that I can connect and also all theses BS's

should be physically connected to the pc.

The whole idea is that I have several base stations as clients
and one sever.Each client wants to connect to the sever in 
order to send sensing messages to its table in a data base.

In the other words, the application is just a datalogger.
So if my server receives a sensing message it should know
to which table should  send it.
For instance,I have a single client version of this application
(one BS communicates with one application)but I try to create
a multiclient version.
BB.

En réponse à [EMAIL PROTECTED]:


Granted I'm using T2 but I do this all the time w/ the Java sdk (not
much is different then the T1 ver).

You create a MoteIF per sf and keep track of which is which (map?).

I'm guessing you have a separate problem. Config or otherwise.


On 9/18/07, Michael Schippling <[EMAIL PROTECTED]> wrote:

Perhaps Urs's advice has helped the initial problem but I would
recommend that you just skip the SF processes and go directly to the
serial ports. You could start a java thread to wait on each port and
deliver the data for whatever processing you wish...

Anyway there is indication in the T1 tools that you can do something
like this:

PacketSource ps = BuildSource.makePacketSource(

"" );

ps.open(PrintStreamMessenger.err);

while( (packet = ps.readPacket()) != null )
// do stuff

where "" is what you would normally put in the

MOTECOM

environment variable, e.g.: [EMAIL PROTECTED]:mica2

MS


[EMAIL PROTECTED] wrote:

The problem is that I would like to connect several base stations to

a

juste one pc in the way that they can communicate to the java
application which is running on this pc.

My idea was to have a SerialForwarder for each base station in the

way

that they can communicate to my application on diffrent ports.
That's why I need to use SerialForwarder rather than any other

packet

source.
Does anybody have an idea about how can I handel the problem

below:

Cheers,
B.

"I create a SerialForwarder and I try to associate it to moteIF

object

as below:

PhoenixSource source =


BuildSource.makePhoenix(BuildSource.makeSF

(this.hostname,9002),PrintStreamMessenger.err);

   MoteIF mote=new MoteIF(source);

When I run the programe I get this:

[EMAIL PROTECTED]:9002 died - exiting (java.net.ConnectException:

Connection

refused)

I've checked there is no other SerialForwarder or another

application

which

is running on this port .I've tried to unset MOTECOM but it's

useless"

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU


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

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU


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

--
Chad @ Home


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


Re: [Tinyos-help] Msp430Adc12MultiChannel global variable question

2007-09-18 Thread Michael Schippling

I beg to differ...Yes. The compiler warning is because you have
identical names in different scopes and no way, bless C's little
heart, of distinguishing them. So it's trying to tell you that
you may have made a scoping mistake.

But the point is, I think, that the YadaYadaMultiWhatever interface,
with which I have never interacted, seems to want you to give it
a buffer to work with -- which may be the function of the configure()
method (or conversely, the method of the configure() function). Or at
least, you seem to believe that fact

Assuming at minimum that the former is true, then, with some non-zero
probability (of a value, given my past experiences with TOS design,
I wouldn't hazard more than a low order of magnitude guess), your
global buffer[] is being passed back to you as the dataReady(*buffer),
where the dataReady(bufferlen) is the number of valid values contained
therein, which "might" "sometimes" match your BUFFER_SIZE.

Whew, that was fun to write...but I should stop reading Trollope...

Anyway, probably, dataReady() is getting the same global "buffer"
pointer but you've declared two different instances of it so C is
confused. I'd guess that you can just use your already extant global
buffer, but you might want to check or save the dataReady() bufferlen
because it may not send you a full deck each time. As I said before,
to get rid of the warnings just change the local names -- and for
extra credit, all the names themselves are arbitrary as long as the
types map to each other.

MS


John Griessen wrote:

Michael Schippling wrote:

I think the complaint is simply that you have 'global'
and a local stack variables with the same name.
I'd just change this:

async event void a2d12ch.dataReady(uint16_t *buffer, uint16_t bufferlen)

to something like this:

async event void a2d12ch.dataReady(uint16_t *b, uint16_t bl)

However, you are not doing anything with those args in the function.


No, they were the same as the globals because that is what I think the 
intent of
the Msp430Adc12MultiChannel interface is for that array and length 
variable.


I'm asking for clarification of how to use it
since a copy seems redundant and doesn't match with some of the 
readme.txt and TEP

descriptions.

John Griessen


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Msp430Adc12MultiChannel global variable question

2007-09-19 Thread Michael Schippling

Almost, but still not quite...

Yes to the first part. Most likely the global "buffer",
and the dataReady() "buffer" argument reference the
same address in memory, and the names you give to that
address are arbitrary (so use different names). But no
to the second part. If they ref the same address, no
copying should be necessary. I would however be careful
with the buflength, as it should tell you how much of that
buffer is actually used on each dataReady() call.

Without going way out of my way and reading the interface spec
for what you are using I can't go much further with advice. But
one thing I would worry about is how long values are valid in your
buffer. If you start another conversion set before you gobble
up the results of the last one, you may get mixed results. In
that case making a copy would be indicated.

MS

John Griessen wrote:

Michael Schippling wrote:



Anyway, probably, dataReady() is getting the same global "buffer"
pointer but you've declared two different instances of it so C is
confused.


I see what you're saying now.  The pointer is aimed at the same
memory cells even though dataReady() can't return it in the same named 
variable.  Copying it to the global scope is necessary just because of 
the way dataReady() is written.


Jan Hauer if you're seeing this and I've still got it wrong, please tell 
me.


John Griessen



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] How can I get a nodeId?

2007-09-19 Thread Michael Schippling

in T1 it's the macro: TOS_LOCAL_ADDRESS
but I think "they" changed the name in T2
so do a little googling.
MS


[EMAIL PROTECTED] wrote:

Hi ,

I wanna get a nodeId,for being clear I'm not talking about the
AM type or AM address of a node,but the id which is associated
to a node during the installation like in commande below:

"tinynode install,1"

I'm using the tinynodes and tinyos-2.x.

Rgds,
B.



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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

___
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 call functions in other nesC file

2007-09-19 Thread Michael Schippling

The Blink demo app ought do ya then.
MS


Chan kenniel wrote:
Thanks Philip, I have found that too, actually since I am kind of rush 
for the project, so I would appreciate if there's any simple way
for me to learn wiring of nesC programming, I don't have enough time to 
read the whole tutorial, that's why I write to ask question here,
but still thanks for your answering :- ),  but could anyone please give 
me a simple example for me about my question?

Thanks a lot.

Regards,
Kenneth


On 9/20/07, *Philip Levis* <[EMAIL PROTECTED] 
> wrote:


On Sep 19, 2007, at 5:05 AM, Chan kenniel wrote:

 > Hi Amartya, thanks for your prompt reply, actually the sendMsg is
 > provided in Forwarder.nc , could you
 > please give me some tutorial about how to use the wiring in nesC?
 > could you please give me a simple
 > example?
 >

http://www.tinyos.net/tinyos-2.x/doc/html/tutorial

has a bunch of tutorials.

Phil




--
Best wishes,
Kenneth Chan


Wish you have a good day!




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] C and nesC problems

2007-09-21 Thread Michael Schippling

In T1 there are some host side C programs in tools/src
Also search back on this list. I believe the thing that
is missing is the CRC calculation for sending messages,
and I know I've seen reports of this being hacked in
various non-Java languages.

MS

Chan kenniel wrote:

Dear all,

I have modified the oscillcope application to send message to PC by 
connecting to the serial forwarder, however, this is nesC to nesC 
communication.
I am wondering whether there's any way to write a C file to send message 
to serial forwarder ? If there is, could you please give me an example?


Thanks a lot.


--
Best wishes,
Kenneth Chan


Wish you have a good day!




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Question about printf

2007-09-21 Thread Michael Schippling

Does 'regular' printf() guarantee that now?
I remember having to do fflush() if I really wanted to see something.
MS


Philip Levis wrote:

On Sep 21, 2007, at 4:21 PM, Kevin Klues wrote:

I'm not sure I understand your concern. How is it different than 
printf(3)?


When your printf returns, are you assured that the string has been 
written? I.e., does it block?


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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Question about printf

2007-09-21 Thread Michael Schippling

What will they think of next...

If you believe that the newline _always_ triggers an implicit fflush()
I'm perfectly happy to join your club. But that's kinda hidden symantics.
My memory is rather faulty but I'm reasonably sure that didn't happen on
the VAX under BSD in 1983...I remember staying up all night waiting for
my first debug message to poot out because I didn't flush it.

Probably the more interesting issues are how to make the TOS debug printf()
as transparent as possible, and how to swap it out when it's no longer needed.
Someone mentioned that it would be nice to not have to wire it (I think it
would be nice to not have to wire...well...anything...but that's just me).
But maybe we could have a null implementation to use to wire-it-out?

MS

Philip Levis wrote:

On Sep 21, 2007, at 5:56 PM, Michael Schippling wrote:


Does 'regular' printf() guarantee that now?
I remember having to do fflush() if I really wanted to see something.


C stdlib printf(3) does not always block. But it can block, and you can 
make it block on flushing the buffer.[1]  This might seem like a little 
nit, but it can bite you. E.g.:


call Foo.x();
printf("Got past Foo.x()\n");
call Foo.y();
printf("Got past Foo.y()\n");

Phil

[1] 
http://books.google.com/books?id=iRa-3L4jLhEC&pg=PA84&lpg=PA84&dq=printf+flush+newline+buffer&source=web&ots=dWntcq9i9J&sig=_r66dlfabrAEkJ8ltMzuRLysKj4 



--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] Reading RSSI values using TOS_Msg->Strength field

2007-09-24 Thread Michael Schippling

I can't swear that that specific code works, but what it is trying to do
is extract the received signal strength from each message and stick it
into a, maybe, unused byte of the message packet before resending it
over the UART. If you look for "strength" in the file you sent you
will see this in RadioReceive.receive():
gRxBufPoolTbl[gRxHeadIndex] ->data[20] = Msg->strength;
So it's overwriting data byte 20 with the "rssi" of that message. But it
is not changing the data length of the message so it is probably assuming
that the packets you are receiving are already at least that long.
If that is not the case then Listen and other receivers will ignore it.
The easiest solution is to make sure you are sending full sized messages
from your re-Motes. And better, you should create a message type that
has byte 20 reserved for this use...

The actual message structure is in:  tos/types/AM.h (in T1 anyway)
and you can get, hopefully, as much as you need to know about messages
by going through the tutorial and looking at samples like CntToRFM and
Oscilloscope.

MS

ram kishore wrote:

Hi Everyone,

I have a mote(mica2) configured as base station using TOS Base 
application found in /tinyos1.x/contrib/xbow/apps.I use serialforwarder 
and Listen tool to see the transmitted packets.I want to read the RSSI 
value of the transmitted packets also.After scanning mailing lists, I 
found this link and implemented the solution:


 
http: 
//mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-July/026935.html 



Unfortunately,I failed.As a newbie,I dont have any idea of whats going 
on(Just a baby in the woods).Plz live me with any pointers, as how 
to change the TOSBaseM.nc file in order to read the RSSI values.
   
Many Thanks in advance,

Kishore




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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] TOS_Msg length invalid

2007-09-24 Thread Michael Schippling

I did find this when googling "TOS_Msg length is invalid"
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2005-July/010467.html
but I think it's more relevant to micaz/2 issues.

If ListenRaw works for you, you may be able to see the actual messages and
decode where it's going wrong. Or else debug into Listen to see the data
where the error occurs.

MS

lamiaimeil wrote:

Hi all,
I have this problem with my new application that I
never had before. When I type the command:

MOTECOM=serial at COM5:tmote java
net.tinyos.tools.Listen

the prompt answer me:

TOS_Msg length is invalid:
header_length=10,real_length=16 ... modifying msg to
fit

I also try:

java net.tinyos.sf.SerialForwarder -comm serial at
COM5:tmote

but I've got the same answer. Any ideas? Please help
me.
Thanks.
Andrea


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

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


--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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


Re: [Tinyos-help] TestSerial application problem

2007-09-24 Thread Michael Schippling

Check that your CLASSPATH points to the tos tools. Mine is:
  export CLASSPATH=".;C:/cygwin/opt/tinyos-1.1.7/tools/java/classes"
but it might be just .../java, or you may have a jar file.

MS


Ferry Cialis wrote:

Hi,
I'm trying out Lesson 4 for tinyos-2.x on Mote-PC serial communication. 
I've tried compiling the TestSerial program but I've got lots of errors 
as shown below. It seems that I have some problems with the Java Path, 
perhaps in the environment variables. How should I configure the Java 
correctly ? I'm using Windows XP SP2 and cygwin.

Please advice me as I'm still quite new to tinyos and cygwin.
Thank you

Regards,
Ferry


$ make micaz
mkdir -p build/micaz
javac *.java
TestSerial.java:35: package net.tinyos.message does not exist
import net.tinyos.message.*;
^
TestSerial.java:36: package net.tinyos.packet does not exist
import net.tinyos.packet.*;
^
TestSerial.java:37: package net.tinyos.util does not exist
import net.tinyos.util.*;
^
TestSerial.java:39: cannot find symbol
symbol: class MessageListener
public class TestSerial implements MessageListener {
   ^
TestSerial.java:41: cannot find symbol
symbol  : class MoteIF
location: class TestSerial
  private MoteIF moteIF;
  ^
TestSerial.java:43: cannot find symbol
symbol  : class MoteIF
location: class TestSerial
  public TestSerial(MoteIF moteIF) {
^
TestSerial.java:68: cannot find symbol
symbol  : class Message
location: class TestSerial
  public void messageReceived(int to, Message message) {
  ^
TestSerialMsg.java:7: package net.tinyos.message does not exist
public class TestSerialMsg extends net.tinyos.message.Message {
 ^
TestSerialMsg.java:67: package net.tinyos.message does not exist
public TestSerialMsg(net.tinyos.message.Message msg, int base_offset) {
   ^
TestSerialMsg.java:76: package net.tinyos.message does not exist
public TestSerialMsg(net.tinyos.message.Message msg, int 
base_offset, int da

ta_length) {
   ^
TestSerial.java:91: cannot find symbol
symbol  : class PhoenixSource
location: class TestSerial
PhoenixSource phoenix;
^
TestSerial.java:94: cannot find symbol
symbol  : variable PrintStreamMessenger
location: class TestSerial
  phoenix = BuildSource.makePhoenix (PrintStreamMessenger.err);
^
TestSerial.java:94: cannot find symbol
symbol  : variable BuildSource
location: class TestSerial
  phoenix = BuildSource.makePhoenix (PrintStreamMessenger.err);
^
TestSerial.java:97: cannot find symbol
symbol  : variable PrintStreamMessenger
location: class TestSerial
  phoenix = BuildSource.makePhoenix(source, PrintStreamMessenger.err );
^
TestSerial.java:97: cannot find symbol
symbol  : variable BuildSource
location: class TestSerial
  phoenix = BuildSource.makePhoenix(source, PrintStreamMessenger.err );
^
TestSerial.java:100: cannot find symbol
symbol  : class MoteIF
location: class TestSerial
MoteIF mif = new MoteIF(phoenix);
^
TestSerial.java:100: cannot find symbol
symbol  : class MoteIF
location: class TestSerial
MoteIF mif = new MoteIF(phoenix);
 ^
TestSerialMsg.java:18: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:24: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:33: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:42: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:51: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:60: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:69: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:78: cannot find symbol
symbol  : method amTypeSet(int)
location: class TestSerialMsg
amTypeSet(AM_TYPE);
^
TestSerialMsg.java:134: cannot find symbol
symbol  : method getUIntBEElement(int,int)
location: class TestSerialMsg
return (int)getUIntBEElement(offsetBits_counter(), 16);
^
TestSerialMsg.java:141: cannot find symbol
symbol  : method setUIntBEElement(int,int,int)
location: class TestSerialMsg
setUIntBEElement(offsetBits_counter(), 16, value);
^
27 errors
make: *** [TestSerial.class] Error 1


-

Re: [Tinyos-help] bandwidth obtained with TinyOS2

2007-09-25 Thread Michael Schippling

Quite some time ago I tried to characterize speed and reliability
and came up with about 100 default sized messages/sec for the micaz.
However, there is some question that this might have been limited by
the serial port speed so it's to be taken with a grain...

My report is here: http://www.etantdonnes.com/Motes/report_micaz/
and you may try searching back on this list for various discussions
of why you don't get 250Kb.

MS


Jordi Llosa wrote:
Hi, I just tried to find which is the best bandwidth that the tmote sky, 
the micaz, or the imote can obtain, with just a part of motes working, 
but I didn't find it out. I read that they use the zigbee but this 
doesn't means that they can transmit at 250kbps. Does somebody know it? 

 
thanks
 
--

[EMAIL PROTECTED] 
696444871




___
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] transmission range

2007-09-25 Thread Michael Schippling

You can of course add antennas of various kinds. The mica2's have
the advantage of being in the RFID freq range so there are some
standard things available. I found some in the digikey catalog.
MS


Jacob Sorber wrote:
Radio range will depend on how close to the ground you are.  The range 
you are describing for your mica2's seems about right for a mote on the 
ground.  If you can put them on a pole or in a tree, you will improve 
your range considerably.


You might also want to look at the XE1205 radio on the tinynode (from 
shockfish).  At 30kbps we've been able to get 500m+ near the ground and 
near water with the whip antennae they come with.  They claim that you 
can get 1km+ with a data rate of 1.2kbps, but tinyos doesn't currently 
support any data rate under 30kbps.


Jacob

On 9/25/07, *Demin Wang* < [EMAIL PROTECTED] > 
wrote:


We used 2.4GHz 8.5 dBi antennas on MicaZs and can reach maximum 400
meters with the maximum transmission power.

demin

On 9/25/07, Tony Han <[EMAIL PROTECTED]
> wrote:
 > Hi folks,
 >
 > I try to use mica2 sending data for 100m in certain area (have a
few trees
 > and a creek around), but now, with 900MHz mica2, I get only 10 m
in that
 > environment, and if I use 433MHz mica2, I got 30m, still far less
than 100m.
 > I use TinyOS 1.1.15. I set the transmission power to the maximum
value in
 > MakeXbowlocal file.
 >
 > My question: is there any other "mote" has a longer range? or is
there any
 > antenna can improve the TX and RX distance?
 >
 > I saw people deal with reduce the range for micaz, but please
someone help
 > in increase the range.
 >
 > Thank you in advance
 >
 > Tony
 >
 >
 >
 >
 >
 >
 > ___
 > 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

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


Re: [Tinyos-help] Data Viewing

2007-09-25 Thread Michael Schippling

I write Q&D message classes to print what I want
and plug them into lightweight things like Listen.
Too many years of hexdumps, I guess...
MS


John W. Barron wrote:
With all the PrintF questions, I was wondering... How does everyone view 
their data. If I send a Message_t to serail what are my options besides 
hex? I mostly send PrintF messages to serail and read the Comm port with 
Windows Hyperterminal. I KNOW there are better ways, but how to "decode" 
fields in the Message_t varible to ASCII?


Thanks
John Barron

Winxp/cygwin
moteiv Tmote Sky
TOS 2.0.2


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] transmission range

2007-09-25 Thread Michael Schippling

In my cursory experience, the 'Zs seem to be more reliable
but also more environment sensitive. The higher the freq the
more line-o-sight it becomes. And 2.4G is an absorption band
for water...on the other hand there are more cheap antenna
options because it matches up with WiFi.

MS


Tony Han wrote:

Thank you all,

I think the transmission distance is also deeply effected by the 
environment. I use the same mica2 433MHz at the other places, I got 
about 60m, and for 900MHz mica2, I got 25m, but when I put everything to 
that site, the distance reduced to 30 m and 10 m respectively. I think 
that is because the grass, the tree and river absorb the signal and made 
it harder to listen to each other. I never use micaz before, is 2.4GHz 
has less inference from the environment?  I think I definitely need use 
a high gain antenna, but should I move to 2.4G micaz or stay with mica2? 
Thank you again, and I will let you know the testing results.


Tony

On 9/25/07, *José Manuel Sánchez-Matamoros Pérez* 
<[EMAIL PROTECTED] > wrote:


I have used mica2 motes at 900MHz and i get more than 20 meters with
a mote on the ground. On this experiment we don't configure the mote
at the max power, so i think we can obtain a greater distance easily.

Another think you must to check is the battery level.


On 9/25/07, *Jacob Sorber* < [EMAIL PROTECTED]
> wrote:

Radio range will depend on how close to the ground you are.  The
range you are describing for your mica2's seems about right for
a mote on the ground.  If you can put them on a pole or in a
tree, you will improve your range considerably.

You might also want to look at the XE1205 radio on the tinynode
(from shockfish).  At 30kbps we've been able to get 500m+ near
the ground and near water with the whip antennae they come
with.  They claim that you can get 1km+ with a data rate of
1.2kbps, but tinyos doesn't currently support any data rate
under 30kbps.

Jacob


On 9/25/07, * Demin Wang* < [EMAIL PROTECTED]
> wrote:

We used 2.4GHz 8.5 dBi antennas on MicaZs and can reach
maximum 400
meters with the maximum transmission power.

demin

On 9/25/07, Tony Han <[EMAIL PROTECTED]
> wrote:
>  Hi folks,
>
>  I try to use mica2 sending data for 100m in certain area
(have a few trees
>  and a creek around), but now, with 900MHz mica2, I get
only 10 m in that
>  environment, and if I use 433MHz mica2, I got 30m, still
far less than 100m.
>  I use TinyOS 1.1.15. I set the transmission power to the
maximum value in
>  MakeXbowlocal file.
>
>  My question: is there any other "mote" has a longer range?
or is there any
>  antenna can improve the TX and RX distance?
>
>  I saw people deal with reduce the range for micaz, but
please someone help
>  in increase the range.
>
>  Thank you in advance
>
>  Tony
>
>
>
>
>
>
>  ___
>  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





___
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

Re: [Tinyos-help] Using a USB port to connect to a MIB510 Programming Board

2007-09-26 Thread Michael Schippling

My USB converter loaded a driver as COM3 which maps to /dev/ttyS2
in later versions of cygwin. You can see the port assignment
in the "Device Manager" under (on XP at least)
ControlPanel-AdminTools-ComputerManagement
Look for Ports. I found that the port number changed depending
on which USB input I used...

Another way to copy-paste in the bash window is to turn on
Quick Edit and Insert modes (or maybe just one or the other...)
by RT-clicking on the top bar and going to Properties-Options.
Then you can select text with the LT-mouse, copy it with the
first RT-click, and paste it with a second RT-click. You can
paste any text in the clipboard with a single RT-click.

MS


Khew U-Wei wrote:

Hi Everyone,

Thanks so much for the helpful replies.

I tried all the suggestions but still receive error messages,

I tried:
MIB510='/dev/ttyUSB0' make mica2 install.0 mib510
and the error was:
Error: No such file or directory ->  /dev/ttyUSB0
make [1]: ***[reinstall.0] Error 1
make: ***[install.0] Error 2

I tried:
MIB510='/dev/ttyUSB1' make mica2 install.0 mib510
the error was the same:
Error: No such file or directory ->  /dev/ttyUSB1
make [1]: ***[reinstall.0] Error 1
make: ***[install.0] Error 2

Another question is, how do we check the hardware settings for the ports 
that are being used?


I know this question is a bit silly but how can we copy the error 
messages or any other messages from the cygwin window? The text cant be 
highlighted to copy.


Looking forward to ya replies. Thank you very much.

regards,
U-Wei




___
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] Graphviz on Cygwin?

2007-09-26 Thread Michael Schippling

I stared here:
http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html
and got to this:
http://www.graphviz.org/Download..php

hopefully that's what you need.
MS


Bo Zhang wrote:

Can anyone let me know how to install Graphviz on Cygwin?

Thanks in advance

Bo




___
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] Reading RSSI values using TOS_Msg->Strength field

2007-09-26 Thread Michael Schippling

Since the data[] array is bytes, only one byte (the LSB) is assigned.
One quick fix it is to do two assignments, knowing that everybody
expects multi-byte data to be in little-endian order:
data[2] = strength & 0xff;
data[3] = strength >> 8;

MS


RamKishore wrote:

Hi Michael,
   You pointed the right problem.The assumption that 
packet length will be automatically get adjusted at base station was 
wrong.When full length messages were sent ,it really worked.*Thank you 
very very much*.One small question regarding RSSI values read and 
interpretation.
I was trying to read counter value sent by 
transmitter, RSSI and crc values with message length set to 6 .As per 
AM.h file,strength and crc fields are 16 bit .To achieve this the 
following additions are made to previous code.


gRxBufPoolTbl[gRxHeadIndex]->data[2] = Msg->strength;
   gRxBufPoolTbl[gRxHeadIndex]->data[3] = Msg->crc;
   The output is shown below:

  length   counter   RSSI crc  FF FF 00 
7D06  02 00   3942   00 00

FF FF 00 7D06  03 00   2DE2   00 00
FF FF 00 7D06  04 00   2D02   00 00
FF FF 00 7D06  05 00   2EA2   00 00

As seen, rssi and  crc values are  8bit only.I thought  crc  is being  
over-written on  remaining RSSI 8 bits, I made the following changes to 
code:

gRxBufPoolTbl[gRxHeadIndex]->data[2] = Msg->strength;
   gRxBufPoolTbl[gRxHeadIndex]->data[4] = Msg->crc;
I have the corresponding output:

 length   counter   RSSI  CRC   FF FF 00 
7D06  02 00   3900  42   00 00

FF FF 00 7D06  03 00   2D   00  E2   0000
FF FF 00 7D06  04 00   2D   00  02   0000
FF FF 00 7D06  05 00   2E00 A2   0000

Are these values correct ; what is their interpretation?

Thank you very much  for your time and patience.

Thanks once again,
Kishore



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


Re: [Tinyos-help] Using a USB port to connect to a MIB510 Programming Board

2007-09-26 Thread Michael Schippling

The COMx syntax is, unfortunately, only useful with older cygwin
versions that 'came with' TOS pre 1.1.10(or 11?). In some uses
with some newer versions "they" started using the nNIX /dev syntax.
I am purposely vague about the "somes" because I don't remember if
download and message comm are fellow travelers, or if COM still works
for one, and there is no way to squeeze a "version number" from cygwin
(...actually there is: "cygcheck -s" will cough up a dll version, but
everyone seems to deny it's applicability...).

Anyway the bottom line is: try every possible combination of chars...

MS


Urs Hunkeler wrote:

Hi,

Since in your message you ask for advise on cygwin I assume you're
running cygwin? If so, I think you cannot use unix-like device names for
the serial port. There was a message on the mailing list a few hours ago
that described how you can find out on Windows which port name was
assigned to a usb <-> serial converter.

Since I'm not using windows, I might nor remember everything correctly.
Basically you can right-click on my computer, then select manage system,
then device manager. In the device manager you'll find an entry about
ports. In there you should see the port name and a short description.

Once you know the port name, for instance COM7, you can use this as
parameter to the make command. You'll probably use a command like:

make mica2 install,0 mib510,COM7

Cheers,
Urs


Khew U-Wei wrote:

Hi Everyone,

Thanks so much for the helpful replies.

I tried all the suggestions but still receive error messages,

I tried:
MIB510='/dev/ttyUSB0' make mica2 install.0 mib510
and the error was:
Error: No such file or directory ->  /dev/ttyUSB0
make [1]: ***[reinstall.0] Error 1
make: ***[install.0] Error 2

I tried:
MIB510='/dev/ttyUSB1' make mica2 install.0 mib510
the error was the same:
Error: No such file or directory ->  /dev/ttyUSB1
make [1]: ***[reinstall.0] Error 1
make: ***[install.0] Error 2

Another question is, how do we check the hardware settings for the ports
that are being used?

I know this question is a bit silly but how can we copy the error
messages or any other messages from the cygwin window? The text cant be
highlighted to copy.

Looking forward to ya replies. Thank you very much.

regards,
U-Wei




___
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] Using a USB port to connect to a MIB510 Programming Board

2007-09-27 Thread Michael Schippling

try ttySn with a capital S...and as we have interated,
depending on the version of cygwin you are saddled with
it may still use COMn+1
MS

Khew U-Wei wrote:

Hi Everyone,

i checked the "device manager" and click the "Universal Serial Bus 
controllers" there is a new entry when i connect my USB adapter, 
"FTDIFT8U2XX Device". When I clicked on the properties, its location 
states "Location 0 (USB <-> Serial)"


However I tried this command again:
MIB510='/dev/ttyusb0' make mica2 install.0 mib510

This is the msg:
Error: No such file or directory
 -> /dev/ttyUSB0
make[1]: *** [reinstall.0 ] Error 1
make[1]: Leaving directory 
`/cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/TOSBas

e'
make: *** [install.0] Error 2

So I checked the "Ports (COM & LPT)" and the USB Serial Port (COM5) is 
active. So i entered this command:

MIB510='/dev/ttys5' make mica2 install.0 mib510

This is the error msg:
Error: No such file or directory
 -> /dev/ttys5
make[1]: *** [reinstall.0] Error 1
make[1]: Leaving directory `/cygdrive/c/tinyos/cygwin/opt/tinyos- 
1.x/apps/TOSBas

e'
make: *** [install.0] Error 2

I changed to another USB port and checked the "Device Manager". The USB 
Serial Port (COM7) is active to I entered:

MIB510='/dev/ttys7' make mica2 install.0 mib510

This is the error msg:
Error: No such file or directory
 -> /dev/ttys7
make[1]: *** [reinstall.0] Error 1
make[1]: Leaving directory 
`/cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/TOSBas

e'
make: *** [install.0] Error 2

May I know where did I go wrong?

Best regards,
U-Wei

On 9/27/07, *Michael Schippling* < [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


The COMx syntax is, unfortunately, only useful with older cygwin
versions that 'came with' TOS pre 1.1.10(or 11?). In some uses
with some newer versions "they" started using the nNIX /dev syntax.
I am purposely vague about the "somes" because I don't remember if
download and message comm are fellow travelers, or if COM still works
for one, and there is no way to squeeze a "version number" from cygwin
(...actually there is: "cygcheck -s" will cough up a dll version, but
everyone seems to deny it's applicability...).

Anyway the bottom line is: try every possible combination of chars...

MS


Urs Hunkeler wrote:
 > Hi,
 >
 > Since in your message you ask for advise on cygwin I assume you're
 > running cygwin? If so, I think you cannot use unix-like device
names for
 > the serial port. There was a message on the mailing list a few
hours ago
 > that described how you can find out on Windows which port name was
 > assigned to a usb <-> serial converter.
 >
 > Since I'm not using windows, I might nor remember everything
correctly.
 > Basically you can right-click on my computer, then select manage
system,
 > then device manager. In the device manager you'll find an entry about
 > ports. In there you should see the port name and a short description.
 >
 > Once you know the port name, for instance COM7, you can use this as
 > parameter to the make command. You'll probably use a command like:
 >
 > make mica2 install,0 mib510,COM7
 >
 > Cheers,
 > Urs
 >
 >
 > Khew U-Wei wrote:
 >> Hi Everyone,
 >>
 >> Thanks so much for the helpful replies.
 >>
 >> I tried all the suggestions but still receive error messages,
 >>
 >> I tried:
 >> MIB510='/dev/ttyUSB0' make mica2 install.0 mib510
 >> and the error was:
 >> Error: No such file or directory ->  /dev/ttyUSB0
 >> make [1]: ***[reinstall.0] Error 1
 >> make: ***[install.0] Error 2
 >>
 >> I tried:
 >> MIB510='/dev/ttyUSB1' make mica2 install.0 mib510
 >> the error was the same:
 >> Error: No such file or directory ->  /dev/ttyUSB1
 >> make [1]: ***[reinstall.0] Error 1
 >> make: ***[install.0] Error 2
 >>
 >> Another question is, how do we check the hardware settings for
the ports
 >> that are being used?
 >>
 >> I know this question is a bit silly but how can we copy the error
 >> messages or any other messages from the cygwin window? The text
cant be
 >> highlighted to copy.
 >>
 >> Looking forward to ya replies. Thank you very much.
 >>
 >> regards,
 >> U-Wei
 >>
 >>
 >>
--

Re: [Tinyos-help] Create a serial packet

2007-09-27 Thread Michael Schippling

Most likely you have not calculated the CRC correctly...
danielw just sent a message about how to do this in T2:
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-September/028109.html
MS

Roberto wrote:

I forgot an important (in my opinion) detail:
at the mica side, I would like recevie packet send by serial port (UART) 
using these followuing statements:


  event message_t *UartReceive.receive[am_id_t id](message_t *msg, void 
*payload, uint8_t len) {...}


Help me, please
   

2007/9/27, Roberto Gioè <[EMAIL PROTECTED] 
>:


Hi,
yes I'm italian.
I'm still looking for a solution to my problem: send data from a pc
(or a stargate) to a mote using the serial port.
I hope someone help me to found a solution very soon
good luck

RG

2007/9/27, Leonardo <[EMAIL PROTECTED] >:

Ciao sei Italiano?? se si mi daresti delle guide per mandare
pacchetti tramite serial? io devo fare un programma in C# e devo
madare dati al sensore...

If you are not italian :D
Can you send me tutorial, guidelines or any documents to create
and a packet for send it by serial?
thanks
Leonardo

Roberto Gioè ha scritto:

Hi all.
I would like create a packet to send to a micaz by a serial port.
The creation ot the packet must be done in a pc using an
application written in C.
I use TinyOs-2.x
I create the packet with the following statements:
--
char output_buffer[TOS_PACKET_LENGTH];//TOS_PACKET_LENGTH=41

//output_buffer is initialized to zero

void create_packet() {

  /* Setup packet header information */
  output_buffer[0] = 0x7e; //Frame
  output_buffer[1] = 69; //SERIAL_PROTO_PACKET_NOACK
  output_buffer[2] = 0x00; //Sequence number byte: SerialP
  output_buffer[3] = 0xff; //Destination Address
  output_buffer[4] = 0xff;  //Destination Address
  output_buffer[5] = 0x00;  //Source Address
  output_buffer[6] = 0x00;  //Source Address
  output_buffer[7] = 28;//Payload length
  output_buffer[8] = 0; //Group ID
  output_buffer[9] = 6; //AMType
  
  /* Payload */

  output_buffer[10]='c';
  output_buffer[11]='i';
  output_buffer[12]='a';
  output_buffer[13]='o';
 
  /* CRC bytes and end frame */

  output_buffer[TOS_PACKET_LENGTH-3] = 200;
  output_buffer[TOS_PACKET_LENGTH-2] = 197;
  output_buffer[TOS_PACKET_LENGTH-1] = 0x7e;
--
 When I send this packet to the micaz mote no leds fire!
Is the packet format correct? I read more times the guidelines
to create a packet and I read the Serial.h file too.
Thanks for your answer

Roberto
 




___
Tinyos-help mailing list


Tinyos-help@Millennium.Berkeley.EDU 

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

 







--
Platform: Linux Fedora
TinyOS version: 2.x
Programmer: MIB510
Device(s): Micaz, Stargate




___
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] DVcc on TelosB/TmoteSky when powered from USB

2007-09-27 Thread Michael Schippling

Boy, that's a tough one...I'm not entirely sure without looking up all
the chips but I think when powered by the USB it goes sorta like this:

page 3 top-left "USB Interface"
U22 pin 4 -- power from host -- becomes U_VCC
U25 TC55RP33 -- does some magic to make -- P_DVCC

page 3 top-right "Mote Power"
P_DVCC -- goes through D22 to become -- VCCin
 (I'm not clear on the use of a Zener here, if that is what it is...)

page 1 top-right "Power"
VCCin -- goes through L2 to become -- DVCC

But, if as you say, ( PWR_CONN) U4 pin 1 - VCCin - does not connect
to D22 pin2 - VCCin - then all bets are off. Make sure you got the
right pin of the diode when doing the continuity check, or the
right polarity if checking through the diode...

MS

xi zhang wrote:

Hi all,
I'm trying to profile the power consumption of the TelosB mote when 
powered from USB. I've looked at the schematics of TelosB but I could 
not figure out how the DVcc is generated when powered through the USB. 
In addition, I would also like to know where is the Vccin (which is fed 
to diode D22) generated since a short circuit test has shown that it is 
not from power supply U4.
 
Thank you very much!
 
Best Regarts,

Xi Zhang




___
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] Using a USB port to connect to a MIB510 Program ming Board

2007-09-27 Thread Michael Schippling

Well, there is progress at least...

I found these two in help looking for "Programmer is not responding":
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2006-February/014555.html
http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2004-January/002799.html
(although on review of the first one I was not as helpful as
I wish I might have been...)

Check the power and connections of your programmer and mote too.
MS



Khew U-Wei wrote:

Hi Everyone,

I tried using /ttys4 for my (COM5):
$ MIB510='/dev/ttys4' make mica2 install.0 mib510

and this is the error:
Programmer is not responding.
make[1]: *** [reinstall.0] Error 2
make[1]: Leaving directory `/cygdrive/c/tinyos/cygwin/opt/tinyos- 
1.x/apps/TOSBa

e'
make: *** [install.0] Error 2


I tried it on (COM7):
$ MIB510='/dev/ttys6' make mica2 install.0 mib510

and this is the error:
Programmer is not responding.
make[1]: *** [ reinstall.0] Error 2
make[1]: Leaving directory 
`/cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/TOSBas

e'

Best regards,
U-Wei


On 9/27/07, * Murray, Ben* < [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


I believe that this was stated before, but...
ttyS0 = COM1
ttyS1 = COM2
ttyS2 = COM3
etc
so your COM5 might well be ttyS4, ...but it's NOT ttyS5! You did try
ttyS4 as well right?
 
 
e.g.

--putting:--
$ MIB510='COM0' make micaz install.0 mib510
 
--results in:--

Please use /dev/ttyS/ rather than COM0 (the latter often doesn't work)
Error: No such file or directory
 -> /dev/ttyS/
make: *** [program] Error 1
 
 
 
--whilst putting:--

$ MIB510='COM1' make micaz install.0 mib510
 
--results in:--

Please use /dev/ttyS0 rather than COM1 (the latter often doesn't work)
Firmware Version: 2.1
Atmel AVR ATmega128 is found.
Uploading: flash
 
Fuse High Byte set to 0xd9
 
Fuse Extended Byte set to 0xff

rm -f build/micaz/main.exe.out-0 build/micaz/main.srec.out-0
 
 
try

MIB510='/dev/ttys4' make mica2 install.0 mib510
 
 


-Original Message-
*From:* [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
[mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]*On Behalf
Of *Khew U-Wei
*Sent:* 27 September 2007 15:17
*To:* tinyos-help@Millennium.Berkeley.EDU
<mailto:tinyos-help@Millennium.Berkeley.EDU>
*Subject:* Re: [Tinyos-help] Using a USB port to connect to a
MIB510 Programming Board

Hi Everyone,

i checked the "device manager" and click the "Universal Serial
Bus controllers" there is a new entry when i connect my USB
adapter, "FTDIFT8U2XX Device". When I clicked on the properties,
its location states "Location 0 (USB <-> Serial)"

However I tried this command again:
MIB510='/dev/ttyusb0' make mica2 install.0 mib510

This is the msg:
Error: No such file or directory
 -> /dev/ttyUSB0
make[1]: *** [reinstall.0 ] Error 1
make[1]: Leaving directory
`/cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/TOSBas
e'
make: *** [install.0] Error 2

So I checked the "Ports (COM & LPT)" and the USB Serial Port
(COM5) is active. So i entered this command:
MIB510='/dev/ttys5' make mica2 install.0 mib510

This is the error msg:
Error: No such file or directory
 -> /dev/ttys5
make[1]: *** [reinstall.0] Error 1
make[1]: Leaving directory
`/cygdrive/c/tinyos/cygwin/opt/tinyos- 1.x/apps/TOSBas
e'
make: *** [install.0] Error 2

I changed to another USB port and checked the "Device Manager".
The USB Serial Port (COM7) is active to I entered:
MIB510='/dev/ttys7' make mica2 install.0 mib510

This is the error msg:
Error: No such file or directory
 -> /dev/ttys7
make[1]: *** [reinstall.0] Error 1
make[1]: Leaving directory
`/cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/TOSBas
e'
make: *** [install.0] Error 2

May I know where did I go wrong?

Best regards,
U-Wei

On 9/27/07, *Michael Schippling* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:

The COMx syntax is, unfortunately, only useful with older cygwin
versions that 'came with' TOS pre 1.1.10(or 11?). In some uses
with some newer versions "they" started using the nNIX /dev
syntax.
I am purposely vague about the "somes" because I don

Re: [Tinyos-help] DVcc on TelosB/TmoteSky when powered from USB

2007-09-27 Thread Michael Schippling

You have any idea why that diode is (or appears to be) a Zener?
And there's a diode-drop issue, isn't there?

Just idle curiosity...
MS


Robert Szewczyk wrote:

Michael is correct here: the power from the USB connector U4 (about
5V) goes through a U25 which is a voltage regulator that produces
3.3V.  That voltage goes through the diode so that the USB side of the
mote is not reverse-powered when the mote runs on batteries and the
mote is disconnected from USB.

Cheers,

Rob

On 9/27/07, Michael Schippling <[EMAIL PROTECTED]> wrote:

Boy, that's a tough one...I'm not entirely sure without looking up all
the chips but I think when powered by the USB it goes sorta like this:

page 3 top-left "USB Interface"
U22 pin 4 -- power from host -- becomes U_VCC
U25 TC55RP33 -- does some magic to make -- P_DVCC

page 3 top-right "Mote Power"
P_DVCC -- goes through D22 to become -- VCCin
  (I'm not clear on the use of a Zener here, if that is what it is...)

page 1 top-right "Power"
VCCin -- goes through L2 to become -- DVCC

But, if as you say, ( PWR_CONN) U4 pin 1 - VCCin - does not connect
to D22 pin2 - VCCin - then all bets are off. Make sure you got the
right pin of the diode when doing the continuity check, or the
right polarity if checking through the diode...

MS

xi zhang wrote:

Hi all,
I'm trying to profile the power consumption of the TelosB mote when
powered from USB. I've looked at the schematics of TelosB but I could
not figure out how the DVcc is generated when powered through the USB.
In addition, I would also like to know where is the Vccin (which is fed
to diode D22) generated since a short circuit test has shown that it is
not from power supply U4.

Thank you very much!

Best Regarts,
Xi Zhang




___
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] Re: Diferent components in TOSSIM

2007-09-27 Thread Michael Schippling

darn...I thought:


--
"The truth shall set you free"


Was quite relevant to the Subject: line...

MS


Bernardo Avila Pires wrote:

Greetings

  I am sorry for having sent the empty e-mail.
  Is there any way to simulate different components in TOSSIM? I've 
tried to mask the components as one (by starting only the parts I needed 
for each node), but it has not worked. The fake component did not work 
whereas both components worked well individually.
  I am interested in attempting to change TOSSIM so that each node 
can have a different component. Is this plausible?

 Well, that is all for now.
   Regards,
Bernardo





___
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] DVcc on TelosB/TmoteSky when powered from USB

2007-09-28 Thread Michael Schippling

At this point I feel I should fall back on "magic" as an answer...
I have, occasionally and accidentally, powered MOS circuits
through input lines. Maybe there's enough leakage.
MS

xi zhang wrote:

Hi,
Thanks for the reply. However, when I remove the D22 diode, the LEDs 
still blink when powered through USB. Why is that so?
 
Best Regards,

Xi

 
2007/9/27, Michael Schippling <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>>:


Boy, that's a tough one...I'm not entirely sure without looking up all
the chips but I think when powered by the USB it goes sorta like this:

page 3 top-left "USB Interface"
U22 pin 4 -- power from host -- becomes U_VCC
U25 TC55RP33 -- does some magic to make -- P_DVCC

page 3 top-right "Mote Power"
P_DVCC -- goes through D22 to become -- VCCin
(I'm not clear on the use of a Zener here, if that is what it is...)

page 1 top-right "Power"
VCCin -- goes through L2 to become -- DVCC

But, if as you say, ( PWR_CONN) U4 pin 1 - VCCin - does not connect
to D22 pin2 - VCCin - then all bets are off. Make sure you got the
right pin of the diode when doing the continuity check, or the
right polarity if checking through the diode...

MS

xi zhang wrote:
 > Hi all,
 > I'm trying to profile the power consumption of the TelosB mote when
 > powered from USB. I've looked at the schematics of TelosB but I could
 > not figure out how the DVcc is generated when powered through the
USB.
 > In addition, I would also like to know where is the Vccin (which
is fed
 > to diode D22) generated since a short circuit test has shown that
it is
 > not from power supply U4.
 >
 > Thank you very much!
 >
 > Best Regarts,
 > Xi Zhang
 >
 >
 >

 >
 > ___
 > Tinyos-help mailing list
 > Tinyos-help@Millennium.Berkeley.EDU
<mailto:Tinyos-help@Millennium.Berkeley.EDU>
 >
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
<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] MOTE mica2 Serial Communication

2007-09-29 Thread Michael Schippling

It's binary. Hyperterm want's ASCII...
MS


Dimuthu Jayasingha wrote:

Hello.
 
I am using mica2 mote platform and I need to access the serial data 
coming from mote.
When I use "Listen" provided in the tinyos tools I can clearly see the 
packet.
But when I access the the serial through hyper terminal I bet some 
garbage values.

I set the hyper terminal settings as follows.
Baud rate=56700
Data bits=8
parity Bits=none
Flow control =none.
I would like to know why I can not view the packet from the hyper terminal.
 
 
Thank you.

Dimuthu Jayasingha.
University of Moratuwa, Sri Lanka.
[EMAIL PROTECTED] 
[EMAIL PROTECTED] 
 
 





___
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] TOSH_SIGNAL and TOSH_INTERRUPT

2007-10-01 Thread Michael Schippling

I believe you have it right. Except I'd have to go analyze the controller's
manuals to see if there is a notion of interrupt priority -- more likely
any enabled int can preempt a TOSH_INTERRUPT(). I think the A,B_EVENTS() 
will execute in the interrupt context from whence they were called. So

in this case SIGNAL(Y) will not fire and preempt SIGNAL(X) or A_EVENT().

But in _most_ cases pending interrupts will fire as soon as a TOSH_SIGNAL()
returns. So you are not likely to miss them unless you overrun by getting
more than one of the same type before you can service it.

MS

Man-Ki Yoon wrote:

Hi all.

I want to know the difference between TOSH_SIGNAL and TOSH_INTERRUPT.

AFAIK, TOSH_SIGNAL can’t be preempted by any other external interrupts!

On the other hand, TOSH_INTERRUPT can be preempted by other external 
interrupts which have higher priority!


Is it right?

If so, the execution thread starting from TOSH_SIGNAL can’t be preempted 
by any other external interrupts? Or only TOSH_SIGNAL portion?


In other words,

TOSH_SIGNAL(X) {

signal A_MODULE.A_EVENT();

}

TOSH_SIGNAL(Y) {

signal B_MODULE.B_EVENT();

}

Assume that A_MODULE.A_EVENT() is called by TOSH_SIGNAL and is 
executing, and at that time, TOSH_SIGNAL(Y) is fired.


1)  TOSH_SIGNAL(Y) can’t be fired.

2)  TOSH_SIGNAL(Y) can be fired. And it preempts A_MODULE.A_EVENT().

Which is correct?

Best regards,

Man-Ki Yoon




___
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


  1   2   3   4   5   6   7   8   9   10   >