RF230 MAC
[Wireless]

The equivalent IEEE 802.15.4 (2003/2006) header file for the mac primitives. More...

Data Structures

struct  ieee_15_4_manager
 The interface structure for the 802.15.4 quasi-MAC. More...

Modules

 SICSLoWMAC Implementation

Files

file  ieee-15-4-manager.c
 

Interfaces the 802.15.4 MAC to upper network layers.


file  ieee-15-4-manager.h
 

Example glue code between the existing MAC code and the Contiki mac interface.


file  mac.c
 

The IEEE 802.15.4 (2003/2006) MAC utility functions.


file  zmac.h
 

The IEEE 802.15.4 (2003/2006) MAC utility functions.


Defines

#define MPDU_OVERHEAD   (11)
 This overhead includes FCF, DSN, DEST_PAN_ID, DEST_ADDR, SOURCE_ADDR, & FCS.

Typedefs

typedef struct ieee_15_4_manager ieee_15_4_manager_t
 The interface structure for the 802.15.4 quasi-MAC.

Functions

void ieee_15_4_init (ieee_15_4_manager_t *pieee_15_4_manager)
 initializes the 802.15.4 manager layer.
void mac_init (void)
 Initializes the (quasi) 802.15.4 MAC.

Variables

ieee_15_4_manager_t ieee15_4ManagerAddress
 Interface structure for this module.
uint8_t phyCurrentChannel
 The RF channel to use for all following transmissions and receptions (see 6.1.2).
uint64_t macCoordExtendedAddress
 The 64-bit address of the coordinator/router through which the network layer wishes to communicate.
uint16_t macCoordShortAddress
 The 16-bit short address assigned to the coordinator through which the network layer wishes to communicate.
uint64_t macDestAddress
 This address is the 64-bit address that will be used as the mechanism to provide a destination to the upper layers.
uint8_t macDSN
 The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.
uint16_t macDstPANId
 The 16-bit identifier of the PAN on which the device is sending to.
uint16_t macSrcPANId
 The 16-bit identifier of the PAN on which the device is operating.
uint16_t macShortAddress
 The 16-bit address that the device uses to communicate in the PAN.
uint64_t macLongAddr
 Our own long address.
ieee_15_4_manager_t ieee15_4ManagerAddress
 Interface structure for this module.
uint8_t phyCurrentChannel
 The RF channel to use for all following transmissions and receptions (see 6.1.2).
uint64_t macCoordExtendedAddress
 The 64-bit address of the coordinator/router through which the network layer wishes to communicate.
uint16_t macCoordShortAddress
 The 16-bit short address assigned to the coordinator through which the network layer wishes to communicate.
uint64_t macDestAddress
 This address is the 64-bit address that will be used as the mechanism to provide a destination to the upper layers.
uint8_t macDSN
 The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.
uint16_t macDstPANId
 The 16-bit identifier of the PAN on which the device is sending to.
uint16_t macSrcPANId
 The 16-bit identifier of the PAN on which the device is operating.
uint16_t macShortAddress
 The 16-bit address that the device uses to communicate in the PAN.

Scan variables

Global variables and defines for scan.



uint8_t msduHandle
bool iAmCoord
bool autoModes
uint16_t macShortAddr
uint64_t macLongAddr
 Our own long address.

FCF Values

Pre-defined data frame control field (FCF) values.



#define FCF_NO_ACK   (0x8841)
#define FCF_ACK_REQ   (0x8861)

Pre-defined network addresses

Hardcoded various "network" addresses, for use when testing.



#define DEST_PAN_ID   (0xABCD)
#define SOURCE_PAN_ID   (0xABCD)
#define LONG_ADDR_1   (0xFFEEDDCCBBAA1100LL)
#define LONG_ADDR_2   (0x1122334455667788LL)
#define LONG_ADDR_3   (0xDDEEAADDBBEEEEFFLL)
#define LONG_ADDR_4   (0x0123456789ABCDEFLL)
#define SOURCE_ADDR   (0x1234)
#define FCF_ACK   (0x0002)
#define TX_OPTION_NOACK   (0)
#define TX_OPTION_ACK   (1)
#define LONG_ADDR_LEN   (8)

FCF element values definitions

These are some definitions of values used in the FCF.

See the 802.15.4 spec for details.



#define BEACONFRAME   (0x00)
#define DATAFRAME   (0x01)
#define ACKFRAME   (0x02)
#define CMDFRAME   (0x03)
#define BEACONREQ   (0x07)
#define IEEERESERVED   (0x00)
#define NOADDR   (0x00)
 Only valid for ACK or Beacon frames.
#define SHORTADDRMODE   (0x02)
#define LONGADDRMODE   (0x03)
#define NOBEACONS   (0x0F)
#define BROADCASTADDR   (0xFFFF)
#define BROADCASTPANDID   (0xFFFF)
#define IEEE802154_2003   (0x00)
#define IEEE802154_2006   (0x01)
#define SECURITY_LEVEL_NONE   (0)
#define SECURITY_LEVEL_128   (3)
#define PSDULEN   (127)

Detailed Description

The equivalent IEEE 802.15.4 (2003/2006) header file for the mac primitives.


Define Documentation

#define NOADDR   (0x00)

Only valid for ACK or Beacon frames.

Definition at line 117 of file zmac.h.


Typedef Documentation

The interface structure for the 802.15.4 quasi-MAC.


Function Documentation

void ieee_15_4_init ( ieee_15_4_manager_t pieee_15_4_manager  ) 

initializes the 802.15.4 manager layer.

Parameters:
pieee_15_4_manager Pointer to ieee_15_4_manager

Referenced by PROCESS_THREAD().

void mac_init ( void   ) 

Initializes the (quasi) 802.15.4 MAC.

This function should be called only once on startup.

Todo:
Find a better location to load the IEEE address.

Referenced by PROCESS_THREAD().


Variable Documentation

Interface structure for this module.

Author:
Eric Gnoske <egnoske@gmail.com> Blake Leverett <bleverett@gmail.com> Mike Vidales <mavida404@gmail.com> Colin O'Flynn <coflynn@newae.com>

Definition at line 77 of file mac.c.

Interface structure for this module.

Author:
Eric Gnoske <egnoske@gmail.com> Blake Leverett <bleverett@gmail.com> Mike Vidales <mavida404@gmail.com> Colin O'Flynn <coflynn@newae.com>

Definition at line 77 of file mac.c.

The 16-bit short address assigned to the coordinator through which the network layer wishes to communicate.

A value of 0xfffe indicates th the coordinator is only using it's 64-bit extended address. A value of 0xffff indicates that this value is unknown. The default value is 0xfff.

Definition at line 104 of file mac.c.

Referenced by sicslowmac_resetRequest().

The 16-bit short address assigned to the coordinator through which the network layer wishes to communicate.

A value of 0xfffe indicates th the coordinator is only using it's 64-bit extended address. A value of 0xffff indicates that this value is unknown. The default value is 0xfff.

Definition at line 104 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint64_t macDestAddress

This address is the 64-bit address that will be used as the mechanism to provide a destination to the upper layers.

The default value is 0xfff.

Definition at line 110 of file mac.c.

uint64_t macDestAddress

This address is the 64-bit address that will be used as the mechanism to provide a destination to the upper layers.

The default value is 0xfff.

Definition at line 110 of file mac.c.

uint8_t macDSN

The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.

The default is a random value within the range.

Definition at line 116 of file mac.c.

Referenced by sicslowmac_dataRequest(), and sicslowmac_resetRequest().

uint8_t macDSN

The sequence number (0x00 - 0xff) added to the transmitted data or MAC command frame.

The default is a random value within the range.

Definition at line 116 of file mac.c.

Referenced by sicslowmac_dataRequest(), and sicslowmac_resetRequest().

uint16_t macDstPANId

The 16-bit identifier of the PAN on which the device is sending to.

If this value is 0xffff, the device is not associated. The default value is 0xffff.

Definition at line 122 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint16_t macDstPANId

The 16-bit identifier of the PAN on which the device is sending to.

If this value is 0xffff, the device is not associated. The default value is 0xffff.

Definition at line 122 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint64_t macLongAddr

Our own long address.

This needs to be read from EEPROM or other secure memory storage.

Definition at line 145 of file mac.c.

uint64_t macLongAddr

Our own long address.

This needs to be read from EEPROM or other secure memory storage.

Definition at line 145 of file mac.c.

Referenced by mac_createEthernetAddr(), mac_createSicslowpanLongAddr(), menu_process(), and sicslowmac_resetRequest().

uint16_t macShortAddress

The 16-bit address that the device uses to communicate in the PAN.

If the device is the PAN coordinator, this value shall be chosen before a PAN is started. Otherwise, the address is allocated by a coordinator during association. A value of 0xfffe indicates that the device has associated but has not been allocated an address. A value of 0xffff indicates that the device does not have a short address. The default value is 0xffff.

Definition at line 139 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint16_t macShortAddress

The 16-bit address that the device uses to communicate in the PAN.

If the device is the PAN coordinator, this value shall be chosen before a PAN is started. Otherwise, the address is allocated by a coordinator during association. A value of 0xfffe indicates that the device has associated but has not been allocated an address. A value of 0xffff indicates that the device does not have a short address. The default value is 0xffff.

Definition at line 139 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint16_t macSrcPANId

The 16-bit identifier of the PAN on which the device is operating.

If this value is 0xffff, the device is not associated. The default value is 0xffff.

Definition at line 128 of file mac.c.

Referenced by sicslowmac_resetRequest().

uint16_t macSrcPANId

The 16-bit identifier of the PAN on which the device is operating.

If this value is 0xffff, the device is not associated. The default value is 0xffff.

Definition at line 128 of file mac.c.

Referenced by sicslowmac_resetRequest().

The RF channel to use for all following transmissions and receptions (see 6.1.2).

Allowable values are 0-26

Definition at line 91 of file mac.c.

The RF channel to use for all following transmissions and receptions (see 6.1.2).

Allowable values are 0-26

Definition at line 91 of file mac.c.


Generated on Mon Apr 11 14:23:54 2011 for Contiki 2.5 by  doxygen 1.6.1