Re: [Tinyos-help] Reading the usb port without the java Listen (what is the byte RSSI)

2011-11-04 Thread sai manoj
Hi,

I want to copy the message header into payload by creating my own payload
format

This is the Msg format I like to transmit

typedef nx_struct Msg
{
  nx_uint16_t hdr;
  ieee154_header_t header_t;

  nx_uint16_t val;
  nx_uint16_t type;
}Msg;


And in the implementation part I tried 3 different

Msg* btrpkt = (Msg*)(call Packet.getPayload(pkt, sizeof(Msg)));

btrpkt-header_t=getheader(btrpkt);
or
btrpkt-header=ieee154_header_t;
or
btrpkt-header_t.fcf=getFCF(btrpkt);

I need to do copy the header of the data into payload

-- 
SAI MANOJ P D (M.Tech)
International Institute of Information Technology,Bangalore
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Reading the usb port without the java Listen (what is the byte RSSI)

2011-11-04 Thread Michael Schippling
The message header, kinda by definition, is at the beginning of
the message packet before the payload. So trying to get the
header out of the payload is a non-starter... There may be a
Packet.getHeader() or some such method -- I don't use that
module so I don't know. Or you could probably get away with
a cast and structure copy like this:

   btrpkt-header = (ieee154_header_t) pkt;

I'm not sure what pkt is usually it would already
be a pointer passed in to your function from the message
receive code, so the '' may be superfluous.

MS

sai manoj wrote:
 Hi,
 
 I want to copy the message header into payload by creating my own 
 payload format
 
 This is the Msg format I like to transmit
 
 typedef nx_struct Msg 
 {
   nx_uint16_t hdr;
   ieee154_header_t header_t;
   
   nx_uint16_t val;
   nx_uint16_t type; 
 }Msg;
 
 
 And in the implementation part I tried 3 different 
 
 Msg* btrpkt = (Msg*)(call Packet.getPayload(pkt, sizeof(Msg))); 
 
 btrpkt-header_t=getheader(btrpkt);
 or 
 btrpkt-header=ieee154_header_t;
 or 
 btrpkt-header_t.fcf=getFCF(btrpkt);
 
 I need to do copy the header of the data into payload
 
 -- 
 SAI MANOJ P D (M.Tech)
 International Institute of Information Technology,Bangalore
 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Reading the usb port without the java Listen (what is the byte RSSI)

2011-11-03 Thread Michael Schippling
One of the features of the Mote-PC communication is that
the RSSI value is not included... On one hand it makes sense
because that channel doesn't have a radio strength, but on
the other, it causes lots of grief because folks want to see
the strength of the signal received at the base-station,
which is I presume what you are trying to do.

The age-old solution was to reserve a spot in your messages and
modify the base-station code to stuff its RSSI into that slot.

MS

Jorge R. Beingolea G. wrote:
 
 Hi all,
 
 I'm working on an application to process the Telosb, using Oscilloscope 
 application.
 
 I started by collecting and reading data through the USB port, and 
 realized that the process of reading directly from USB port, without the 
 use of command java Listen, 2 bytes are added to the beginning of the 
 frame and 3 to end.
 
 In the package (Oscilloscope application = 36 bytes), I could not 
 identify any byte that corresponds to the RSSI.
 
 What I wonder is if some of the additional bytes (2 before and 3 bytes 
 at end) may be of RSSI and are abstracted when using the command java Listen
 
 could you help me?
 
 
 Jorge
 
 ___
 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 the usb port without the java Listen (what is the byte RSSI)

2011-11-03 Thread Jorge R. Beingolea G.
Hi Michael,

There is no other way?
in my case only installed the application of the oscilloscope, but I'm 
reading directly from the USB port without the aid of some other 
application like: MOTE-PC or java Listen.
when I read the USB port have a few additional bytes, I thought some of 
them could be the RSSI?

you have any idea how can I include the RSSI in the frame?

Thanks..

Jorge


Em 11/3/2011 5:21 PM, Michael Schippling escreveu:
 One of the features of the Mote-PC communication is that
 the RSSI value is not included... On one hand it makes sense
 because that channel doesn't have a radio strength, but on
 the other, it causes lots of grief because folks want to see
 the strength of the signal received at the base-station,
 which is I presume what you are trying to do.

 The age-old solution was to reserve a spot in your messages and
 modify the base-station code to stuff its RSSI into that slot.

 MS

 Jorge R. Beingolea G. wrote:

 Hi all,

 I'm working on an application to process the Telosb, using 
 Oscilloscope application.

 I started by collecting and reading data through the USB port, and 
 realized that the process of reading directly from USB port, without 
 the use of command java Listen, 2 bytes are added to the beginning of 
 the frame and 3 to end.

 In the package (Oscilloscope application = 36 bytes), I could not 
 identify any byte that corresponds to the RSSI.

 What I wonder is if some of the additional bytes (2 before and 3 
 bytes at end) may be of RSSI and are abstracted when using the 
 command java Listen

 could you help me?


 Jorge

 ___
 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 the usb port without the java Listen (what is the byte RSSI)

2011-11-03 Thread Michael Schippling
Sorry, that was the extent of my ideas...
maybe someone smarter and more up-to-date has some better ones.
MS

Jorge R. Beingolea G. wrote:
 Hi Michael,
 
 There is no other way?
 in my case only installed the application of the oscilloscope, but I'm 
 reading directly from the USB port without the aid of some other 
 application like: MOTE-PC or java Listen.
 when I read the USB port have a few additional bytes, I thought some of 
 them could be the RSSI?
 
 you have any idea how can I include the RSSI in the frame?
 
 Thanks..
 
 Jorge
 
 
 Em 11/3/2011 5:21 PM, Michael Schippling escreveu:
 One of the features of the Mote-PC communication is that
 the RSSI value is not included... On one hand it makes sense
 because that channel doesn't have a radio strength, but on
 the other, it causes lots of grief because folks want to see
 the strength of the signal received at the base-station,
 which is I presume what you are trying to do.

 The age-old solution was to reserve a spot in your messages and
 modify the base-station code to stuff its RSSI into that slot.

 MS

 Jorge R. Beingolea G. wrote:

 Hi all,

 I'm working on an application to process the Telosb, using 
 Oscilloscope application.

 I started by collecting and reading data through the USB port, and 
 realized that the process of reading directly from USB port, without 
 the use of command java Listen, 2 bytes are added to the beginning of 
 the frame and 3 to end.

 In the package (Oscilloscope application = 36 bytes), I could not 
 identify any byte that corresponds to the RSSI.

 What I wonder is if some of the additional bytes (2 before and 3 
 bytes at end) may be of RSSI and are abstracted when using the 
 command java Listen

 could you help me?


 Jorge

 ___
 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