com.buglabs.bug.module.bugbee.pub
Interface IBUGBeeControl

All Known Implementing Classes:
BUGBeeModletControl

public interface IBUGBeeControl

Interface for controlling and configuring a BUGbee module.


Field Summary
static short AF_DATA_CNF
          This command is issued by the ZigBee device to return the results from a AF_SEND_DATA_REQUEST command.
static short ALL_ROUTERS_AND_COORD_ADDRESS
           
static byte BINDING_ALLOWED_INDEFINITELY_TIMEOUT
           
static byte BINDING_DISALLOWED_TIMEOUT
           
static byte CREATE_BINDING_REQUEST
           
static int DEV_COORD_STARTING
           
static int DEV_END_DEVICE
           
static int DEV_END_DEVICE_UNAUTH
           
static int DEV_HOLD
           
static int DEV_INIT
           
static int DEV_NWK_DISC
           
static int DEV_NWK_JOINING
           
static int DEV_NWK_ORPHAN
           
static int DEV_NWK_REJOIN
           
static int DEV_ROUTER
           
static int DEV_ZB_COORD
           
static byte DONT_RESET
          This option lets the user program the startup option for the next reboot/reset , but does not reset the device at this time.
static byte HW_RESET
          Reset by toggling the reset pin; the recommended method.
static byte JOINING_OFF_TIMEOUT
           
static byte JOINING_ON_INDEFINITELY_TIMEOUT
           
static byte LOGICAL_TYPE_COORDINATOR
           
static byte LOGICAL_TYPE_END_DEVICE
           
static byte LOGICAL_TYPE_ROUTER
           
static int MAX_USER_DESC_LEN
           
static int MSG_DONTWAIT
           
static int MSG_PEEK
           
static int PRE_CFG_KEY_LEN
           
static byte REMOVE_BINDING_REQUEST
           
static byte START_OP_CLEAR_CONFIG
          If set, the device will start up with the manufacture default value.
static byte START_OP_CLEAR_STATE
          If set, the device will clear its previous network state.
static byte START_OP_CURRENT
          Start up with the existing configuration, including previous network state.
static byte SW_RESET
          Reset by issuing a reset command to the device.
static byte ZAPSDUPLICATEENTRY
           
static byte ZAPSFAIL
           
static byte ZAPSILLEGALREQUEST
           
static byte ZAPSINVALIDBINDING
           
static byte ZAPSNOACK
           
static byte ZAPSNOBOUNDDEVICE
           
static byte ZAPSNOTALLOWED
           
static byte ZAPSNOTAUTHENTICATED
           
static byte ZAPSNOTSUPPORTED
           
static byte ZAPSTABLEFULL
           
static byte ZAPSUNSUPPORTEDATTRIB
           
static short ZB_ALLOW_BIND
          This command puts the device into the Allow Binding Mode for a given period of time.
static short ZB_ALLOW_BIND_CONFIRM
          This command is issued by the ZigBee device when it responds to a bind request from a remote device.
static short ZB_APP_REGISTER_REQ
          This command enables the application processor to register its application with the ZigBee device.
static short ZB_BIND_CONFIRM
          This command is issued by the ZigBee device to return the results from a ZB_BIND_DEVICE command.
static short ZB_BIND_DEVICE
          This command is used to create or delete a ???binding??? to another device on the network.
static short ZB_FIND_DEVICE_CONFIRM
          This command is issued by the ZigBee device to return the results from a ZB_FIND_DEVICE_REQUEST command.
static short ZB_FIND_DEVICE_REQUEST
          This command is used to determine the short address for a device in the network.
static short ZB_GET_DEVICE_INFO
          This command retrieves a Device Information Property.
static short ZB_PERMIT_JOINING_REQ
          This command is used to control the joining permissions and thus allow or disallow new devices from joining the network.
static short ZB_RCV_DATA_IND
          This callback is called asynchronously by the ZigBee device when it has received a packet from a remote device.
static byte ZB_RESET_BY_EXT
           
static byte ZB_RESET_BY_POWER_UP
           
static byte ZB_RESET_BY_WATCHDOG
           
static short ZB_RESET_IND
          This command is generated by the ZigBee device automatically immediately after a reset.
static short ZB_SEND_DATA_CONFIRM
          This command is issued by the ZigBee device to return the results from a ZB_SEND_DATA_REQUEST command.
static short ZB_SEND_DATA_REQ
          This command initiates transmission of data to another device in the network.
static short ZB_START_CONFIRM
          This command is issued by the ZigBee device to return the results from a ZB_START_REQUEST command.
static short ZB_START_REQUEST
          This command starts the ZigBee stack in the ZigBee device.
static byte ZBUFFERFULL
           
static short ZDO_END_DEVICE_ANNCE_IND
          This command will cause the ZigBee device to issue an ???End device announce??? broadcast packet to the network.
static short ZDO_MGMT_LQI_RSP
          This control message is in response to the ZDO Management LQI Request.
static byte ZDOINVALIDENDPOINT
           
static byte ZDOINVALIDREQUESTTYPE
           
static byte ZDONOBINDENTRY
           
static byte ZDONOMATCH
           
static byte ZDOTABLEFULL
           
static byte ZDOTIMEOUT
           
static byte ZDOUNSUPPORTED
           
static byte ZFAILURE
           
static byte ZINVALIDPARAMETER
           
static byte ZMACBEACONLOSS
           
static byte ZMACCHANNELACCESSFAILURE
           
static byte ZMACDENIED
           
static byte ZMACDISABLETRXFAILURE
           
static byte ZMACFAILEDSECURITYCHEC
           
static byte ZMACFRAMETOOLONG
           
static byte ZMACINVALIDGTS
           
static byte ZMACINVALIDHANDLE
           
static byte ZMACINVALIDPARAMETER
           
static byte ZMACMEMERROR
           
static byte ZMACNOACK
           
static byte ZMACNOBEACON
           
static byte ZMACNODATA
           
static byte ZMACNOSHORTADDR
           
static byte ZMACOUTOFCAP
           
static byte ZMACPANIDCONFLICT
           
static byte ZMACREALIGNMENT
           
static byte ZMACTRANSACTIONEXPIRED
           
static byte ZMACTRANSACTIONOVERFLOW
           
static byte ZMACTXACTIVE
           
static byte ZMACUNAVAILABLEKEY
           
static byte ZMACUNSUPPORTED
           
static byte ZMACUNSUPPORTEDATTRIBUTE
           
static byte ZMEMERROR
           
static byte ZNWKALREADYPRESENT
           
static byte ZNWKINVALIDPARAM
           
static byte ZNWKINVALIDREQUEST
           
static byte ZNWKLEAVEUNCONFIRMED
           
static byte ZNWKNOACK
           
static byte ZNWKNONETWORKS
           
static byte ZNWKNOROUTE
           
static byte ZNWKNOTPERMITTED
           
static byte ZNWKSTARTUPFAILURE
           
static byte ZNWKSYNCFAILURE
           
static byte ZNWKTABLEFULL
           
static byte ZNWKUNKNOWNDEVICE
           
static byte ZNWKUNSUPPORTEDATTRIBUTE
           
static byte ZSAPIINPROGRESS
           
static byte ZSAPINIT
           
static byte ZSAPITIMEOUT
           
static byte ZSECCCMFAIL
           
static byte ZSECMAXFRMCOUNT
           
static byte ZSECNOKEY
           
static byte ZSECOLDFRMCOUNT
           
static byte ZSUCCESS
           
static byte ZUNSUPPORTEDMODE
           
 
Method Summary
 void allowBind(byte timeout)
          Puts the ZigBee device into the Allow Binding Mode for a given period of time.
 void bindDeviceRequest(byte bindingRequest, short commandId, IEEEAddress destination)
          Create or delete a ???binding??? to another device on the network.
 void configurePA(boolean powerAmpOn, byte powerLevel)
          Turn on and off the RF power amplifier capable of up to 100mW of output power.
 void findDeviceRequest(IEEEAddress device)
          Determine the short address for a device in the network.
 short getApsAckWaitDurationConfig()
           
 byte getApsFrameRetriesConfig()
           
 short getBindingTimeConfig()
           
 byte getBroadcastDeliveryTimeConfig()
           
 byte getBroadcastRetriesConfig()
           
 byte getChannel()
          Retrieve the channel the ZigBee PAN is operating on.
 int getChannelListConfig()
           
 IEEEAddress getExtendedPANID()
          Retrieve the extended PAN ID of the ZigBee PAN.
 IEEEAddress getIEEEAddress()
          Retrieve the ZigBee device's IEEE Address.
 byte getIndirectMessageTimeoutConfig()
           
 byte getLogicalTypeConfig()
           
 short getPANID()
          Retrieve the PAN ID of the ZigBee PAN.
 short getPANIDConfig()
           
 IEEEAddress getParentIEEEAddress()
          Retrieve the IEEE Address of the ZigBee device's parent.
 short getParentShortAddress()
          Retrieve the short address of the ZigBee device's parent.
 byte getPassiveAckTimeoutConfig()
           
 byte getPollFailureRetriesConfig()
           
 short getPollRateConfig()
           
 byte[] getPreCfgKeyConfig()
           
 boolean getPreCfgKeyEnableConfig()
           
 short getQueuePollRateConfig()
           
 short getResponsePollRateConfig()
           
 byte getRouteExpiryTimeConfig()
           
 boolean getSecurityModeConfig()
           
 short getShortAddress()
          Retrieve the ZigBee device's short address.
 byte getStartUpOptionConfig()
           
 int getState()
          Retrieve the ZigBee device's current state.
 java.lang.String getUserDescConfig()
           
 void permitJoining(short deviceId, byte timeout)
          Control the joining permission and allow or disallow new devices from joining the network.
 int read(byte[] buf, int len, int flags)
          read a control message response from the ZigBee device; this may be in response to a previously-issues command such as @see #findDeviceRequest(IEEEAddress)
 void registerAFRequest(byte appEndPoint, short appProfileId, short deviceId, byte deviceVersion, short[] inputCommands, short[] outputCommands)
          An Application Registration Request (AF Interface) Registers the profile ID as well as the list of commands that the device ???output??? or ???input??? to the ZigBee device.
 void registerAppRequest(byte appEndPoint, short appProfileId, short deviceId, byte deviceVersion, short[] appInClusterList, short[] appOutClusterList)
          An Application Registration Request (SAPI) Registers the profile ID as well as the list of commands that the device ???output??? or ???input??? to the ZigBee device.
 void reset(byte resetType)
          Resets the ZigBee device (not the entire BUGbee module).
 void sendZAccelCommand(short command, byte[] data)
          Send an arbitrary Z-Accel command directly to the device.
 void setApsAckWaitDurationConfig(short apsAckWaitDuration)
          The amount of time to wait for ACK packet before retransmission.
 void setApsFrameRetriesConfig(byte apsFrameRetries)
          Number of retransmissions of a data packet at the application layer.
 void setBindingTimeConfig(short bindingTime)
          The amount of time (in ms) a device will wait for a response to a binding request.
 void setBroadcastDeliveryTimeConfig(byte broadcastDeliveryTime)
          The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network.
 void setBroadcastRetriesConfig(byte broadcastRetries)
          Max number for broadcast packet retransmission.
 void setChannelListConfig(int channelList)
          Bit mask of the channels on which this network can operate.
 void setIndirectMessageTimeoutConfig(byte indirectMessageTimeout)
          The amount of time (in seconds) that a router or coordinator will buffer messages destined to their end-device child nodes.
 void setInterfaceState(boolean interfaceUp)
          Brings up the interface (if interfaceUp is true).
 void setLogicalTypeConfig(byte logicalType)
          Set the ZigBee logical type of the device.
 void setPANIDConfig(short PANID)
          This parameter identifies the ZigBee network.
 void setPassiveAckTimeoutConfig(byte passiveAckTimeout)
          Duration to wait (in 100ms) before retransmitting a broadcast packet Default is 5.
 void setPollFailureRetriesConfig(byte pollFailureRetries)
          The number of times to retry before invoking the rejoin mechanism.
 void setPollRateConfig(short pollRate)
          An End-device will wake up periodically with the non-zero duration to check for data with its parent device.
 void setPreCfgKeyConfig(byte[] preCfgKey)
          PreCfgKey is used for securing and un-securing packets in the network, if security is enabled for the network.
 void setPreCfgKeyEnableConfig(boolean preCfgKeyEnable)
          If security functionality is enabled, there are two options to distribute the security key to all devices in the network.
 void setQueuePollRateConfig(short pollRate)
          Duration to retry if the first poll fails.
 void setResponsePollRateConfig(short pollRate)
          Duration to poll for response after sending a data packet out.
 void setRouteExpiryTimeConfig(byte routeExpiryTime)
          The amount of time (in seconds) for which a route must be idle ( i.e.
 void setSecurityModeConfig(boolean securityMode)
          Enable or disable security mode.
 void setStartUpOptionConfig(byte option)
          Controls the device startup options.
 void setUserDescConfig(java.lang.String userDesc)
          An optional user-defined data (upto 16bytes ) that can be configured in the ZigBee device so that it can easily identified or described later.
 void startRequest()
          Starts the stack on the ZigBee device; blocks until confirmation is received from the device that the stack is running.
 

Field Detail

DONT_RESET

static final byte DONT_RESET
This option lets the user program the startup option for the next reboot/reset , but does not reset the device at this time.

See Also:
Constant Field Values

HW_RESET

static final byte HW_RESET
Reset by toggling the reset pin; the recommended method.

See Also:
Constant Field Values

SW_RESET

static final byte SW_RESET
Reset by issuing a reset command to the device. Reset is then acheived via an internal watchdog on the device.

See Also:
Constant Field Values

DEV_HOLD

static final int DEV_HOLD
See Also:
Constant Field Values

DEV_INIT

static final int DEV_INIT
See Also:
Constant Field Values

DEV_NWK_DISC

static final int DEV_NWK_DISC
See Also:
Constant Field Values

DEV_NWK_JOINING

static final int DEV_NWK_JOINING
See Also:
Constant Field Values

DEV_NWK_REJOIN

static final int DEV_NWK_REJOIN
See Also:
Constant Field Values

DEV_END_DEVICE_UNAUTH

static final int DEV_END_DEVICE_UNAUTH
See Also:
Constant Field Values

DEV_END_DEVICE

static final int DEV_END_DEVICE
See Also:
Constant Field Values

DEV_ROUTER

static final int DEV_ROUTER
See Also:
Constant Field Values

DEV_COORD_STARTING

static final int DEV_COORD_STARTING
See Also:
Constant Field Values

DEV_ZB_COORD

static final int DEV_ZB_COORD
See Also:
Constant Field Values

DEV_NWK_ORPHAN

static final int DEV_NWK_ORPHAN
See Also:
Constant Field Values

ALL_ROUTERS_AND_COORD_ADDRESS

static final short ALL_ROUTERS_AND_COORD_ADDRESS
See Also:
Constant Field Values

JOINING_OFF_TIMEOUT

static final byte JOINING_OFF_TIMEOUT
See Also:
Constant Field Values

JOINING_ON_INDEFINITELY_TIMEOUT

static final byte JOINING_ON_INDEFINITELY_TIMEOUT
See Also:
Constant Field Values

BINDING_DISALLOWED_TIMEOUT

static final byte BINDING_DISALLOWED_TIMEOUT
See Also:
Constant Field Values

BINDING_ALLOWED_INDEFINITELY_TIMEOUT

static final byte BINDING_ALLOWED_INDEFINITELY_TIMEOUT
See Also:
Constant Field Values

CREATE_BINDING_REQUEST

static final byte CREATE_BINDING_REQUEST
See Also:
Constant Field Values

REMOVE_BINDING_REQUEST

static final byte REMOVE_BINDING_REQUEST
See Also:
Constant Field Values

START_OP_CLEAR_STATE

static final byte START_OP_CLEAR_STATE
If set, the device will clear its previous network state. This is typically used during application development. If clear, the device will start up with the existing network state. The network state information is collected by the device after it joins a network and creates a binding at runtime. This information is restored, if START_OP_CLEAR_STATE = 0, so that if the device were to reset accidentally, it does not have to go through all the network joining and binding process again. If the application processor does not wish to continue operating in the previous ZigBee network, s/he sets this bit to one to clear the network state information.

See Also:
Constant Field Values

START_OP_CLEAR_CONFIG

static final byte START_OP_CLEAR_CONFIG
If set, the device will start up with the manufacture default value. This is used to erase the existing configuration and bring the device into a known state. If clear, the device will start up with the configuration that the user programs in.

See Also:
Constant Field Values

START_OP_CURRENT

static final byte START_OP_CURRENT
Start up with the existing configuration, including previous network state.

See Also:
Constant Field Values

LOGICAL_TYPE_COORDINATOR

static final byte LOGICAL_TYPE_COORDINATOR
See Also:
Constant Field Values

LOGICAL_TYPE_ROUTER

static final byte LOGICAL_TYPE_ROUTER
See Also:
Constant Field Values

LOGICAL_TYPE_END_DEVICE

static final byte LOGICAL_TYPE_END_DEVICE
See Also:
Constant Field Values

MAX_USER_DESC_LEN

static final int MAX_USER_DESC_LEN
See Also:
Constant Field Values

PRE_CFG_KEY_LEN

static final int PRE_CFG_KEY_LEN
See Also:
Constant Field Values

MSG_PEEK

static final int MSG_PEEK
See Also:
Constant Field Values

MSG_DONTWAIT

static final int MSG_DONTWAIT
See Also:
Constant Field Values

ZB_START_REQUEST

static final short ZB_START_REQUEST
This command starts the ZigBee stack in the ZigBee device. When the ZigBee stack starts, the device reads the programmed configuration parameters and operates accordingly. After the start request process completes, the device is ready to send, receive, and route network traffic.

See Also:
Constant Field Values

ZB_BIND_DEVICE

static final short ZB_BIND_DEVICE
This command is used to create or delete a ???binding??? to another device on the network. Once bound, an application can send messages to a device by referencing the commandId for the binding. This command can also be issued with a NULL destination address ( set to all zeros ). In that case, a binding will be established with another device that is in the Allow Bind mode.

See Also:
Constant Field Values

ZB_ALLOW_BIND

static final short ZB_ALLOW_BIND
This command puts the device into the Allow Binding Mode for a given period of time. This allows a peer device to establish a binding with this device ( in the Allow Binding Mode ) by issuing the zb_BindDevice with a destination address of NULL.

See Also:
Constant Field Values

ZB_SEND_DATA_REQ

static final short ZB_SEND_DATA_REQ
This command initiates transmission of data to another device in the network. This command can only be issued after the host processor has registered its application using the ZB_APP_REGISTER_REQ and the device has successfully created or joined a network.

See Also:
Constant Field Values

ZB_GET_DEVICE_INFO

static final short ZB_GET_DEVICE_INFO
This command retrieves a Device Information Property.

See Also:
Constant Field Values

ZB_FIND_DEVICE_REQUEST

static final short ZB_FIND_DEVICE_REQUEST
This command is used to determine the short address for a device in the network. The device initiating a call to zb_FindDeviceRequest and the device being discovered must both be a member of the same network. When the search is complete, a ZB_FIND_DEVICE_CONFIRM control message will be returned. Use findDeviceRequest(IEEEAddress) to do this.

See Also:
Constant Field Values

ZB_PERMIT_JOINING_REQ

static final short ZB_PERMIT_JOINING_REQ
This command is used to control the joining permissions and thus allow or disallow new devices from joining the network. Use permitJoining(short, byte) to do this.

See Also:
Constant Field Values

ZB_APP_REGISTER_REQ

static final short ZB_APP_REGISTER_REQ
This command enables the application processor to register its application with the ZigBee device. Use registerAppRequest(byte, short, short, byte, short[], short[]) to do this.

See Also:
Constant Field Values

ZB_RESET_IND

static final short ZB_RESET_IND
This command is generated by the ZigBee device automatically immediately after a reset.

See Also:
Constant Field Values

AF_DATA_CNF

static final short AF_DATA_CNF
This command is issued by the ZigBee device to return the results from a AF_SEND_DATA_REQUEST command.

See Also:
Constant Field Values

ZDO_MGMT_LQI_RSP

static final short ZDO_MGMT_LQI_RSP
This control message is in response to the ZDO Management LQI Request.

See Also:
Constant Field Values

ZDO_END_DEVICE_ANNCE_IND

static final short ZDO_END_DEVICE_ANNCE_IND
This command will cause the ZigBee device to issue an ???End device announce??? broadcast packet to the network. This is typically used by an end-device to announce itself to the network.

See Also:
Constant Field Values

ZB_START_CONFIRM

static final short ZB_START_CONFIRM
This command is issued by the ZigBee device to return the results from a ZB_START_REQUEST command.

See Also:
Constant Field Values

ZB_BIND_CONFIRM

static final short ZB_BIND_CONFIRM
This command is issued by the ZigBee device to return the results from a ZB_BIND_DEVICE command.

See Also:
Constant Field Values

ZB_ALLOW_BIND_CONFIRM

static final short ZB_ALLOW_BIND_CONFIRM
This command is issued by the ZigBee device when it responds to a bind request from a remote device.

See Also:
Constant Field Values

ZB_SEND_DATA_CONFIRM

static final short ZB_SEND_DATA_CONFIRM
This command is issued by the ZigBee device to return the results from a ZB_SEND_DATA_REQUEST command.

See Also:
Constant Field Values

ZB_FIND_DEVICE_CONFIRM

static final short ZB_FIND_DEVICE_CONFIRM
This command is issued by the ZigBee device to return the results from a ZB_FIND_DEVICE_REQUEST command.

See Also:
Constant Field Values

ZB_RCV_DATA_IND

static final short ZB_RCV_DATA_IND
This callback is called asynchronously by the ZigBee device when it has received a packet from a remote device. This will trigger data to be received by IBUGBeePacket.

See Also:
Constant Field Values

ZSUCCESS

static final byte ZSUCCESS
See Also:
Constant Field Values

ZFAILURE

static final byte ZFAILURE
See Also:
Constant Field Values

ZINVALIDPARAMETER

static final byte ZINVALIDPARAMETER
See Also:
Constant Field Values

ZMEMERROR

static final byte ZMEMERROR
See Also:
Constant Field Values

ZBUFFERFULL

static final byte ZBUFFERFULL
See Also:
Constant Field Values

ZUNSUPPORTEDMODE

static final byte ZUNSUPPORTEDMODE
See Also:
Constant Field Values

ZMACMEMERROR

static final byte ZMACMEMERROR
See Also:
Constant Field Values

ZSAPIINPROGRESS

static final byte ZSAPIINPROGRESS
See Also:
Constant Field Values

ZSAPITIMEOUT

static final byte ZSAPITIMEOUT
See Also:
Constant Field Values

ZSAPINIT

static final byte ZSAPINIT
See Also:
Constant Field Values

ZDOINVALIDREQUESTTYPE

static final byte ZDOINVALIDREQUESTTYPE
See Also:
Constant Field Values

ZDOINVALIDENDPOINT

static final byte ZDOINVALIDENDPOINT
See Also:
Constant Field Values

ZDOUNSUPPORTED

static final byte ZDOUNSUPPORTED
See Also:
Constant Field Values

ZDOTIMEOUT

static final byte ZDOTIMEOUT
See Also:
Constant Field Values

ZDONOMATCH

static final byte ZDONOMATCH
See Also:
Constant Field Values

ZDOTABLEFULL

static final byte ZDOTABLEFULL
See Also:
Constant Field Values

ZDONOBINDENTRY

static final byte ZDONOBINDENTRY
See Also:
Constant Field Values

ZSECNOKEY

static final byte ZSECNOKEY
See Also:
Constant Field Values

ZSECOLDFRMCOUNT

static final byte ZSECOLDFRMCOUNT
See Also:
Constant Field Values

ZSECMAXFRMCOUNT

static final byte ZSECMAXFRMCOUNT
See Also:
Constant Field Values

ZSECCCMFAIL

static final byte ZSECCCMFAIL
See Also:
Constant Field Values

ZAPSFAIL

static final byte ZAPSFAIL
See Also:
Constant Field Values

ZAPSTABLEFULL

static final byte ZAPSTABLEFULL
See Also:
Constant Field Values

ZAPSILLEGALREQUEST

static final byte ZAPSILLEGALREQUEST
See Also:
Constant Field Values

ZAPSINVALIDBINDING

static final byte ZAPSINVALIDBINDING
See Also:
Constant Field Values

ZAPSUNSUPPORTEDATTRIB

static final byte ZAPSUNSUPPORTEDATTRIB
See Also:
Constant Field Values

ZAPSNOTSUPPORTED

static final byte ZAPSNOTSUPPORTED
See Also:
Constant Field Values

ZAPSNOACK

static final byte ZAPSNOACK
See Also:
Constant Field Values

ZAPSDUPLICATEENTRY

static final byte ZAPSDUPLICATEENTRY
See Also:
Constant Field Values

ZAPSNOBOUNDDEVICE

static final byte ZAPSNOBOUNDDEVICE
See Also:
Constant Field Values

ZAPSNOTALLOWED

static final byte ZAPSNOTALLOWED
See Also:
Constant Field Values

ZAPSNOTAUTHENTICATED

static final byte ZAPSNOTAUTHENTICATED
See Also:
Constant Field Values

ZNWKINVALIDPARAM

static final byte ZNWKINVALIDPARAM
See Also:
Constant Field Values

ZNWKINVALIDREQUEST

static final byte ZNWKINVALIDREQUEST
See Also:
Constant Field Values

ZNWKNOTPERMITTED

static final byte ZNWKNOTPERMITTED
See Also:
Constant Field Values

ZNWKSTARTUPFAILURE

static final byte ZNWKSTARTUPFAILURE
See Also:
Constant Field Values

ZNWKALREADYPRESENT

static final byte ZNWKALREADYPRESENT
See Also:
Constant Field Values

ZNWKSYNCFAILURE

static final byte ZNWKSYNCFAILURE
See Also:
Constant Field Values

ZNWKTABLEFULL

static final byte ZNWKTABLEFULL
See Also:
Constant Field Values

ZNWKUNKNOWNDEVICE

static final byte ZNWKUNKNOWNDEVICE
See Also:
Constant Field Values

ZNWKUNSUPPORTEDATTRIBUTE

static final byte ZNWKUNSUPPORTEDATTRIBUTE
See Also:
Constant Field Values

ZNWKNONETWORKS

static final byte ZNWKNONETWORKS
See Also:
Constant Field Values

ZNWKLEAVEUNCONFIRMED

static final byte ZNWKLEAVEUNCONFIRMED
See Also:
Constant Field Values

ZNWKNOACK

static final byte ZNWKNOACK
See Also:
Constant Field Values

ZNWKNOROUTE

static final byte ZNWKNOROUTE
See Also:
Constant Field Values

ZMACBEACONLOSS

static final byte ZMACBEACONLOSS
See Also:
Constant Field Values

ZMACCHANNELACCESSFAILURE

static final byte ZMACCHANNELACCESSFAILURE
See Also:
Constant Field Values

ZMACDENIED

static final byte ZMACDENIED
See Also:
Constant Field Values

ZMACDISABLETRXFAILURE

static final byte ZMACDISABLETRXFAILURE
See Also:
Constant Field Values

ZMACFAILEDSECURITYCHEC

static final byte ZMACFAILEDSECURITYCHEC
See Also:
Constant Field Values

ZMACFRAMETOOLONG

static final byte ZMACFRAMETOOLONG
See Also:
Constant Field Values

ZMACINVALIDGTS

static final byte ZMACINVALIDGTS
See Also:
Constant Field Values

ZMACINVALIDHANDLE

static final byte ZMACINVALIDHANDLE
See Also:
Constant Field Values

ZMACINVALIDPARAMETER

static final byte ZMACINVALIDPARAMETER
See Also:
Constant Field Values

ZMACNOACK

static final byte ZMACNOACK
See Also:
Constant Field Values

ZMACNOBEACON

static final byte ZMACNOBEACON
See Also:
Constant Field Values

ZMACNODATA

static final byte ZMACNODATA
See Also:
Constant Field Values

ZMACNOSHORTADDR

static final byte ZMACNOSHORTADDR
See Also:
Constant Field Values

ZMACOUTOFCAP

static final byte ZMACOUTOFCAP
See Also:
Constant Field Values

ZMACPANIDCONFLICT

static final byte ZMACPANIDCONFLICT
See Also:
Constant Field Values

ZMACREALIGNMENT

static final byte ZMACREALIGNMENT
See Also:
Constant Field Values

ZMACTRANSACTIONEXPIRED

static final byte ZMACTRANSACTIONEXPIRED
See Also:
Constant Field Values

ZMACTRANSACTIONOVERFLOW

static final byte ZMACTRANSACTIONOVERFLOW
See Also:
Constant Field Values

ZMACTXACTIVE

static final byte ZMACTXACTIVE
See Also:
Constant Field Values

ZMACUNAVAILABLEKEY

static final byte ZMACUNAVAILABLEKEY
See Also:
Constant Field Values

ZMACUNSUPPORTEDATTRIBUTE

static final byte ZMACUNSUPPORTEDATTRIBUTE
See Also:
Constant Field Values

ZMACUNSUPPORTED

static final byte ZMACUNSUPPORTED
See Also:
Constant Field Values

ZB_RESET_BY_POWER_UP

static final byte ZB_RESET_BY_POWER_UP
See Also:
Constant Field Values

ZB_RESET_BY_EXT

static final byte ZB_RESET_BY_EXT
See Also:
Constant Field Values

ZB_RESET_BY_WATCHDOG

static final byte ZB_RESET_BY_WATCHDOG
See Also:
Constant Field Values
Method Detail

reset

void reset(byte resetType)
           throws java.io.IOException
Resets the ZigBee device (not the entire BUGbee module).

Parameters:
resetType - one of DONT_RESET, HW_RESET or SW_RESET
Throws:
java.io.IOException

getState

int getState()
             throws java.io.IOException
Retrieve the ZigBee device's current state.

Returns:
one of the DEV_ types above.
Throws:
java.io.IOException

getIEEEAddress

IEEEAddress getIEEEAddress()
                           throws java.io.IOException
Retrieve the ZigBee device's IEEE Address.

Returns:
the ZigBee device's IEEE Address
Throws:
java.io.IOException

getShortAddress

short getShortAddress()
                      throws java.io.IOException
Retrieve the ZigBee device's short address.

Returns:
device's short address
Throws:
java.io.IOException

getParentIEEEAddress

IEEEAddress getParentIEEEAddress()
                                 throws java.io.IOException
Retrieve the IEEE Address of the ZigBee device's parent.

Returns:
parent's IEEE Address
Throws:
java.io.IOException

getParentShortAddress

short getParentShortAddress()
                            throws java.io.IOException
Retrieve the short address of the ZigBee device's parent.

Returns:
parent's short address
Throws:
java.io.IOException

getPANID

short getPANID()
               throws java.io.IOException
Retrieve the PAN ID of the ZigBee PAN.

Returns:
the PAN's ID
Throws:
java.io.IOException

getExtendedPANID

IEEEAddress getExtendedPANID()
                             throws java.io.IOException
Retrieve the extended PAN ID of the ZigBee PAN.

Returns:
the PAN's extended ID
Throws:
java.io.IOException

getChannel

byte getChannel()
                throws java.io.IOException
Retrieve the channel the ZigBee PAN is operating on.

Returns:
the PAN's channel.
Throws:
java.io.IOException

setInterfaceState

void setInterfaceState(boolean interfaceUp)
                       throws java.io.IOException
Brings up the interface (if interfaceUp is true). This must be done before packets can be sent or received.

Parameters:
interfaceUp -
Throws:
java.io.IOException

registerAppRequest

void registerAppRequest(byte appEndPoint,
                        short appProfileId,
                        short deviceId,
                        byte deviceVersion,
                        short[] appInClusterList,
                        short[] appOutClusterList)
                        throws java.io.IOException
An Application Registration Request (SAPI) Registers the profile ID as well as the list of commands that the device ???output??? or ???input??? to the ZigBee device. This information is used by the ZigBee device when the binding feature is used to bind complementary devices in the network. The user must register the application with the ZigBee device after every device reset, if he/she wishes to use the simple API interface. The AppEndpoint and AppProfileID fields should be populated with the same values for all devices in the network. TODO: Implement a mechanism that lets applications register a callback along with their app registration, so that incoming data packets for that endpoint get sent automatically to the app. Without this there can only really be one since otherwise the apps would be fighting over the data coming into IBUGBeePacket.read(byte[], int, int).

Parameters:
appEndPoint - the end point of the device
appProfileId - the profile ID of the application
deviceId - the device description ID for this endpoint
deviceVersion - the device version number
appInClusterList - list of input cluster IDs (null or byte[0] if not N/A)
appOutClusterList - list of output cluster IDs (null or byte[0] if not N/A)
Throws:
java.io.IOException

registerAFRequest

void registerAFRequest(byte appEndPoint,
                       short appProfileId,
                       short deviceId,
                       byte deviceVersion,
                       short[] inputCommands,
                       short[] outputCommands)
                       throws java.io.IOException
An Application Registration Request (AF Interface) Registers the profile ID as well as the list of commands that the device ???output??? or ???input??? to the ZigBee device. This information is used by the ZigBee device when the binding feature is used to bind complementary devices in the network. The lists of input and output commands are only used by the ZigBee stack when performing binding. If the binding feature is not used, these may be ignored.

Parameters:
appEndPointspecifies - the endpoint of the device. This should be in the range of 1-240 and should be set to the same value for all devices in the network.
appProfileId - the profile id of the application. This should be set to the same value for all devices in the network.
deviceId - an application-specific identifier; it identifies the device type within the particular profile ID. This is not used by the ZigBee stack in any way other than to identify itself when requested.
deviceVersion - an application-specific identifier; it identifies the version of the device and is not used by the ZigBee stack in any way other than to identify itself when requested.
inputCommands - a list of identifiers of input commands that are processed by this application; set to null if N/A.
outputCommands - a list of identifiers of output commands that are generated by this application; set to null if N/A.
Throws:
java.io.IOException

startRequest

void startRequest()
                  throws java.io.IOException
Starts the stack on the ZigBee device; blocks until confirmation is received from the device that the stack is running.

Throws:
java.io.IOException

permitJoining

void permitJoining(short deviceId,
                   byte timeout)
                   throws java.io.IOException
Control the joining permission and allow or disallow new devices from joining the network. The device must be a coordinator or router to use this method.

Parameters:
deviceId - the address of the device for which the joining permission should be set. This is usually the local device address or the special broadcast address that denotes all routers and coordinator (ALL_ROUTERS_AND_COORD_ADDRESS). This way the joining permissions of a single device or the whole network can be controlled.
timeout - the timeout in seconds for which the joining permissions should be turned on; setting to JOINING_OFF_TIMEOUT will turn off joining permissions entirely; setting to JOINING_ON_INDEFINITELY_TIMEOUT will turn on joining permissions indefinitely. Note that CC2480 docs incorrectly say indefinitely value is 65, but it is not.
Throws:
java.io.IOException

allowBind

void allowBind(byte timeout)
               throws java.io.IOException
Puts the ZigBee device into the Allow Binding Mode for a given period of time. This allows a peer device to establish a binding with this device.

Parameters:
timeout - the timeout period in seconds; setting to BINDING_DISALLOWED_TIMEOUT will disable binding entirely; setting to BINDING_ALLOWED_INDEFINITELY_TIMEOUT will enable binding indefinitely.
Throws:
java.io.IOException

bindDeviceRequest

void bindDeviceRequest(byte bindingRequest,
                       short commandId,
                       IEEEAddress destination)
                       throws java.io.IOException
Create or delete a ???binding??? to another device on the network. Once bound, an application can send messages to a device by referencing the commandId for the binding. The command can also be issued with NULL destination address (set to all zeros) to establish with another device that is in the Allow Bind mode.

Parameters:
bindingRequest - CREATE_BINDING_REQUEST or REMOVE_BINDING_REQUEST
commandId - binding identifier
destination - the IEEE address of the device to bind to. Set to NULL if the destination address is unknown and it will bind to the destination device that is set to Allow Bind Mode
Throws:
java.io.IOException

findDeviceRequest

void findDeviceRequest(IEEEAddress device)
                       throws java.io.IOException
Determine the short address for a device in the network. The device being discovered must both be a member of the same network. When the search is completed, the driver sends a Find Device Confirm message indication back through the control channel; @see #read(byte[], int, int)

Parameters:
device -
Throws:
java.io.IOException

configurePA

void configurePA(boolean powerAmpOn,
                 byte powerLevel)
                 throws java.io.IOException
Turn on and off the RF power amplifier capable of up to 100mW of output power. If you turn on the PA be careful not to have ZigBee devices too close to one another. See http://en.wikipedia.org/wiki/DBm Power level Output Power Output Power Power Amp Off 100mW Power Amp 0 0 dBm (1mW) 20 dBm (100mW) 1-2 -1 dBm 19 dBm (79mW) 3 -3 dBm 18.5 dBm (71mW) 4 -4 dBm 5-7 -5 dBm 18 dBm (63mw) 8-10 -8 dBm 11-14 -11 dBm 15-18 -15 dBm 11 dBm (13mW) 19-24 -19 dBm 25 -25 dBm (3uW) 1.5 dBm (1.4mW)

Parameters:
powerAmpOn - if true enable the PA, if false disable it
powerLevel - the power level; see the table above.
Throws:
java.io.IOException

sendZAccelCommand

void sendZAccelCommand(short command,
                       byte[] data)
                       throws java.io.IOException
Send an arbitrary Z-Accel command directly to the device. Consult the Z-Accel 2.4 GHz ZigBee processor specification for the commands. (http://www.ti.com/lit/pdf/swra175). This method is only applicable to BUGbee modules containing the TI CC2430/2480 or similar.

Parameters:
command -
data -
Throws:
java.io.IOException

setStartUpOptionConfig

void setStartUpOptionConfig(byte option)
                            throws java.io.IOException
Controls the device startup options. Default is START_OP_CURRENT.

Throws:
java.io.IOException

getStartUpOptionConfig

byte getStartUpOptionConfig()
                            throws java.io.IOException
Throws:
java.io.IOException

setLogicalTypeConfig

void setLogicalTypeConfig(byte logicalType)
                          throws java.io.IOException
Set the ZigBee logical type of the device. Default is COORDINATOR.

Throws:
java.io.IOException

getLogicalTypeConfig

byte getLogicalTypeConfig()
                          throws java.io.IOException
Throws:
java.io.IOException

setPollRateConfig

void setPollRateConfig(short pollRate)
                       throws java.io.IOException
An End-device will wake up periodically with the non-zero duration to check for data with its parent device. Range 1-0xFFFF, in ms unit. If the value is zero, the device will not automatically wake up to poll for data. It needs an external trigger or an internal event (software timer even) to wake up the device. Default is 2000.

Throws:
java.io.IOException

getPollRateConfig

short getPollRateConfig()
                        throws java.io.IOException
Throws:
java.io.IOException

setQueuePollRateConfig

void setQueuePollRateConfig(short pollRate)
                            throws java.io.IOException
Duration to retry if the first poll fails. Default is 100.

Throws:
java.io.IOException

getQueuePollRateConfig

short getQueuePollRateConfig()
                             throws java.io.IOException
Throws:
java.io.IOException

setResponsePollRateConfig

void setResponsePollRateConfig(short pollRate)
                               throws java.io.IOException
Duration to poll for response after sending a data packet out. Default is 100.

Throws:
java.io.IOException

getResponsePollRateConfig

short getResponsePollRateConfig()
                                throws java.io.IOException
Throws:
java.io.IOException

setPollFailureRetriesConfig

void setPollFailureRetriesConfig(byte pollFailureRetries)
                                 throws java.io.IOException
The number of times to retry before invoking the rejoin mechanism. Default is 2.

Throws:
java.io.IOException

getPollFailureRetriesConfig

byte getPollFailureRetriesConfig()
                                 throws java.io.IOException
Throws:
java.io.IOException

setIndirectMessageTimeoutConfig

void setIndirectMessageTimeoutConfig(byte indirectMessageTimeout)
                                     throws java.io.IOException
The amount of time (in seconds) that a router or coordinator will buffer messages destined to their end-device child nodes. Recommend that this is at least greater than the poll rate. Default is 7.

Throws:
java.io.IOException

getIndirectMessageTimeoutConfig

byte getIndirectMessageTimeoutConfig()
                                     throws java.io.IOException
Throws:
java.io.IOException

setApsFrameRetriesConfig

void setApsFrameRetriesConfig(byte apsFrameRetries)
                              throws java.io.IOException
Number of retransmissions of a data packet at the application layer. Default is 3.

Throws:
java.io.IOException

getApsFrameRetriesConfig

byte getApsFrameRetriesConfig()
                              throws java.io.IOException
Throws:
java.io.IOException

setApsAckWaitDurationConfig

void setApsAckWaitDurationConfig(short apsAckWaitDuration)
                                 throws java.io.IOException
The amount of time to wait for ACK packet before retransmission. Default is 3000.

Throws:
java.io.IOException

getApsAckWaitDurationConfig

short getApsAckWaitDurationConfig()
                                  throws java.io.IOException
Throws:
java.io.IOException

setBindingTimeConfig

void setBindingTimeConfig(short bindingTime)
                          throws java.io.IOException
The amount of time (in ms) a device will wait for a response to a binding request. Default is 8000.

Throws:
java.io.IOException

getBindingTimeConfig

short getBindingTimeConfig()
                           throws java.io.IOException
Throws:
java.io.IOException

setUserDescConfig

void setUserDescConfig(java.lang.String userDesc)
                       throws java.io.IOException
An optional user-defined data (upto 16bytes ) that can be configured in the ZigBee device so that it can easily identified or described later. The first byte is the length of the user descriptor data and must not be greater than MAX_USER_DESC_LEN.

Throws:
java.io.IOException

getUserDescConfig

java.lang.String getUserDescConfig()
                                   throws java.io.IOException
Throws:
java.io.IOException

setPANIDConfig

void setPANIDConfig(short PANID)
                    throws java.io.IOException
This parameter identifies the ZigBee network. This should be set to a value between 0 and 0x3FFF. Networks that exist in the same vicinity must have different values for this parameter. It can be set to a special value of 0xFFFF to indicate ???don???t care???. Default is 0xFFFF.

Throws:
java.io.IOException

getPANIDConfig

short getPANIDConfig()
                     throws java.io.IOException
Throws:
java.io.IOException

setChannelListConfig

void setChannelListConfig(int channelList)
                          throws java.io.IOException
Bit mask of the channels on which this network can operate. Default is 0x00000800.

Throws:
java.io.IOException

getChannelListConfig

int getChannelListConfig()
                         throws java.io.IOException
Throws:
java.io.IOException

setPreCfgKeyConfig

void setPreCfgKeyConfig(byte[] preCfgKey)
                        throws java.io.IOException
PreCfgKey is used for securing and un-securing packets in the network, if security is enabled for the network. Length is PRE_CFG_KEY_LEN.

Throws:
java.io.IOException

getPreCfgKeyConfig

byte[] getPreCfgKeyConfig()
                          throws java.io.IOException
Throws:
java.io.IOException

setPreCfgKeyEnableConfig

void setPreCfgKeyEnableConfig(boolean preCfgKeyEnable)
                              throws java.io.IOException
If security functionality is enabled, there are two options to distribute the security key to all devices in the network. If this parameter is true, the same security key is assumed to be pre-configured in all devices in the network. If it is set to false, then the key only needs to be configured on the coordinator device. In this case, the key is distributed to each device upon joining by the coordinator. This key distribution will happen in the ???clear??? on the last hop of the packet transmission and this constitutes a brief ???period of vulnerability??? during which a malicious device can capture the key. Hence it is not recommended unless it can be ensured that there are no malicious devices in the vicinity at the time of network formation.

Parameters:
preCfgKeyEnable -
Throws:
java.io.IOException

getPreCfgKeyEnableConfig

boolean getPreCfgKeyEnableConfig()
                                 throws java.io.IOException
Throws:
java.io.IOException

setSecurityModeConfig

void setSecurityModeConfig(boolean securityMode)
                           throws java.io.IOException
Enable or disable security mode. Default is disabled.

Throws:
java.io.IOException

getSecurityModeConfig

boolean getSecurityModeConfig()
                              throws java.io.IOException
Throws:
java.io.IOException

setBroadcastRetriesConfig

void setBroadcastRetriesConfig(byte broadcastRetries)
                               throws java.io.IOException
Max number for broadcast packet retransmission. Default is 2.

Throws:
java.io.IOException

getBroadcastRetriesConfig

byte getBroadcastRetriesConfig()
                               throws java.io.IOException
Throws:
java.io.IOException

setPassiveAckTimeoutConfig

void setPassiveAckTimeoutConfig(byte passiveAckTimeout)
                                throws java.io.IOException
Duration to wait (in 100ms) before retransmitting a broadcast packet Default is 5.

Throws:
java.io.IOException

getPassiveAckTimeoutConfig

byte getPassiveAckTimeoutConfig()
                                throws java.io.IOException
Throws:
java.io.IOException

setBroadcastDeliveryTimeConfig

void setBroadcastDeliveryTimeConfig(byte broadcastDeliveryTime)
                                    throws java.io.IOException
The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network. This includes time for all retransmissions. This parameter must be set with caution. It must be set to a value of at least (ZCD_NV_BCAST_RETRIES + 1) * (ZCD_NV_PASSIVE_ACK_TIMEOUT). To be safe, the actual value should be higher than the above minimum by about 500ms or more. Default is 30.

Throws:
java.io.IOException

getBroadcastDeliveryTimeConfig

byte getBroadcastDeliveryTimeConfig()
                                    throws java.io.IOException
Throws:
java.io.IOException

setRouteExpiryTimeConfig

void setRouteExpiryTimeConfig(byte routeExpiryTime)
                              throws java.io.IOException
The amount of time (in seconds) for which a route must be idle ( i.e. no packets are transmitted on that route ) before that routing entry is marked as expired. An expired entry may be deleted if the table is full and the space is needed for another new routing entry. This can be set to a special value of 0 to turn off route- expiry. In this case, route entries are not expired.

Parameters:
routeExpiryTime -
Throws:
java.io.IOException

getRouteExpiryTimeConfig

byte getRouteExpiryTimeConfig()
                              throws java.io.IOException
Throws:
java.io.IOException

read

int read(byte[] buf,
         int len,
         int flags)
         throws java.io.IOException
read a control message response from the ZigBee device; this may be in response to a previously-issues command such as @see #findDeviceRequest(IEEEAddress)

Parameters:
buf - the buffer into which the data should be read
len - the maximum number of bytes of data to read
flags - MSG_PEEK or MSG_DONTWAIT
Returns:
Throws:
java.io.IOException