Here's what I'm seeing, correct me if I'm wrong.

The CC2420BaseStation receives messages over the radio through CC2420ActiveMessageC's Receive interface. This interface goes through an address check before delivery:

    if (call AMPacket.isForMe(msg)) {
return signal Receive.receive[call AMPacket.type(msg)](msg, payload, len - CC2420_SIZE);
    } ...

In my local version of CC2420BaseStation, I made a copy of CC2420ActiveMessageP.nc into the CC2420BaseStation directory and removed this check.

Note that connecting the base station to the snoop interface isn't what you want either - then you receive every message except messages destined for the base station's address.

-David



On Tue, 30 Jan 2007 08:29:03 -0800
 Philip Levis <[EMAIL PROTECTED]> wrote:
On Jan 30, 2007, at 6:40 AM, Alban Hessler wrote:

Hi everyone,

We have found a small bug in the file CC2240ControlP.nc for the BaseStationCC2420 application of T2.

In order to be a sniffer (that's what BaseStation is according to the readme), the BaseStation should disable the address filtering of the CC2420. For that to be done, it must explicitly set the bit to 0 in the registry, as the default reset value is 1. (datasheet of CC2420, p.65)

So the code to set the configuration register in CC2240ControlP.nc should be the following:

call MDMCTRL0.write( (( 1 << CC2420_MDMCTRL0_RESERVED_FRAME_MODE ) |
      ( 2 << CC2420_MDMCTRL0_CCA_HYST ) |
      ( 3 << CC2420_MDMCTRL0_CCA_MOD ) |
      ( 1 << CC2420_MDMCTRL0_AUTOCRC ) |
      ( 2 << CC2420_MDMCTRL0_PREAMBLE_LENGTH )) &
      ~( 1 << CC2420_MDMCTRL0_ADR_DECODE));


Notice the added mask at the end of the instruction.

Best Regards,

Alban Hessler & Evgeny Osipov


This isn't necessary. It's not a read-modify-write of the register, just a plain write.

Phil

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

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

Reply via email to