分类: 嵌入式
2015-09-02 16:33:54
翻译自802.15.4-2006 7.5.2.1.2和7.5.2.1.3,只能说写这个协议难道也是有字数要求么,这是凑字数行为啊!
这两个章节就第一段不一样,后面全是一样的。对了,active倒数第三段passive也没有。
7.5.2.1.2 Active channel scan
An active scan allows a device to locate
any coordinator transmitting beacon frames within its POS. This could be used
by a prospective PAN coordinator to select a PAN identifier prior to
starting a new PAN, or it could be used by a device prior to association.
主动扫描允许设备在POS范围之内定位任何协调器发送给的信标帧。这可以被一个准PAN协调器来选择PAN ID或者可以被设备用来关联。
During an
active scan, the MAC sublayer shall discard all frames received over the PHY
data service that are not beacon frames. If a beacon frame is received that
contains the address of the scanning device in its list of pending addresses,
the scanning device shall not attempt to extract the pending data.
在扫描期间,MAC子层将会丢弃除信标帧外来自物理层数据服务的所有帧。如果接收的信标帧待处理地址中包含扫描设备的地址,扫描设备不会尝试解压待处理数据.
Before commencing an active scan, the MAC
sublayer shall store the value of macPANId and then set it to 0xffff for the
duration of the scan. This enables the receive filter to accept all beacons
rather than just the beacons from its current PAN (see 7.5.6.2). On completion
of the scan, the MAC sublayer shall restore the value of macPANId to the value
stored before the scan began.
开始主动扫描之前,该MAC子层应该保存macPANId的值,然后在扫描期间将其设置为0xFFFF。这使得接收滤波器接收所有信标,而不是仅仅来自当前PAN的信标(见7.5.6.2)。在扫描完成后,MAC子层必须将macPANId恢复到扫描之前存储的值。
An active scan over a
specified set of logical channels is requested using the MLME-SCAN.request primitive
with the ScanType parameter set to indicate an active scan. For each logical
channel, the device shall first switch to the channel, by setting
phyCurrentChannel and phyCurrentPage accordingly, and send a beacon request
command (see 7.3.7). Upon successful transmission of the beacon request
command, the device shall enable its receiver for at most
[aBaseSuperframeDuration * (2n + 1)] symbols, where n is the value of the
ScanDuration parameter. During this time, the device shall reject all nonbeacon frames and record
the information contained in all unique beacons in a PAN descriptor structure
(see Table 55 in 7.1.5.1.1). If a beacon frame is received when macAutoRequest
is set to TRUE, the list of PAN descriptor structures shall be stored by the
MAC sublayer until the scan is complete; at this time, the list shall be sent
to the next higher layer in the PANDescriptorList parameter of the
MLME-SCAN.confirm primitive. A device shall be able to store between one and an
implementation-specified maximum number of PAN descriptors. A beacon frame
shall be assumed to be unique if it contains both a PAN identifier and a source
address that has not been seen before during the scan of the current channel.
If a beacon frame is received when macAutoRequest is set to FALSE, each
recorded PAN descriptor is sent to the next higher layer in a separate MLME-BEACON-NOTIFY.indication
primitive. A received beacon frame containing one or more octets of payload
shall also cause the PAN descriptor to be sent to the next higher layer via the
MLME-BEACONNOTIFY.indication primitive.
在特定的一系列逻辑信道上的主动扫描,需要使用MLME-SCAN.rquest原语并设置扫描类型参数。对于每一个逻辑信道,设备首先切换到该信道,设置phyCurrentChannel和phyCurrentPage,并发送信标请求命令。在成功传输信标请求命令后,该装置应使其接收器,用于接收至多[aBaseSuperframeDuration *(2N + 1)]的符号,其中n是ScanDuration参数的值。在此期间,该设备将拒绝所有非信标帧,并将所有唯一的信标帧信息记录在一个PAN描述符结构体里。 如果在macAutoRequest设置为TRUE时收到信标帧,PAN描述符结构的名单由MAC子层存储,直到扫描完成;此时,该列表应被发送到下一个更高层中的MLME-SCAN.confirm原语的PANDescriptorList参数。设备能够存储的PAN描述符数量在一到指定的最大值之间。信标帧应当被假定是唯一的,如果它包含PAN ID和一个在当前信道尚未扫描到的源地址。 如果当macAutoRequest设置为FALSE接收的信标帧中,每个记录的PAN描述符被发送到下一个更高的层,通过单独的MLME-BEACON-NOTIFY.indication原语。一个收到的信标帧,包含一个或多个字节的载荷,也将导致PAN描述符被MLME-BEACONNOTIFY.indication原语送到下一层。
If a protected beacon frame is received,
i.e., the Security Enabled subfield in the Frame Control field is set to one,
the device shall attempt to unsecure the beacon frame using the unsecuring
process described in 7.5.8.2.3.
如果接收到受加密的信标帧,比如,在帧控制字段中的安全性使能子字段设置为1,该设备将试图取消加密信标帧,通过使用在7.5.8.2.3中描述的取消加密过程。
The security-related elements of the PAN
descriptor corresponding to the beacon (see Table 55) shall be set to the
corresponding parameters returned by the unsecuring process. The
SecurityFailure element of the PAN descriptor shall be set to SUCCESS if the
status from the unsecuring process is SUCCESS and set to one of the other
status codes indicating an error in the security processing otherwise.
安全性相关的内容……
The information from the unsecured frame
shall be recorded in the PAN descriptor even if the status from the unsecuring
process indicated an error.
来自不加密的帧的信息应记录在PAN描述符,即使状态提示在取消加密过程中存在错误。
If a coordinator of a
beacon-enabled PAN receives the beacon request command, it shall ignore the command
and continue transmitting its periodic beacons as usual. If a coordinator of a
nonbeacon-enabled PAN receives this command, it shall transmit a single beacon
frame using unslotted CSMA-CA.
如果一个信标使能的PAN协调器接收信标请求命令,它应当忽略该命令,并继续发送定期信标帧。如果一个非信标使能的PAN协调器接收到该命令的,应当采用unslotted CSMA-CA发送一个信标帧。
If macAutoRequest is set to TRUE, the active scan on a particular
channel shall terminate when the number of beacons found equals the implementation-specified
limit or the channel has been scanned for the full time, as specified in
7.5.2.1.2. If macAutoRequest is set to FALSE, the active scan on a particular
channel shall terminate when the channel has been scanned for the full time. If
a channel was not scanned for the full time, it shall be considered to be
unscanned.
如果macAutoRequest被设置为TRUE时,特定信道的活动扫描应终止当发现的信标的数量等于执行指定的限制或信道已被扫描了整个时间,正如在7.5.2.1.2指定的那样。如果macAutoRequest设置为FALSE,在特定信道上的主动扫描应终止当该信道已经被扫描了整个时间。如果通道没有被整个事件的扫描,应当被认为是未扫描。
If macAutoRequest is set to
TRUE, the entire scan procedure shall terminate when the number of PAN descriptors
stored equals the implementation-specified maximum or every channel in the set
of available channels has been scanned. If macAutoRequest is set to FALSE, the
entire scan procedure shall only terminate when every channel in the set of
available channels has been scanned.
如果macAutoRequest被设置为TRUE,整个扫描过程应终止当存储的PAN描述符的数量等于实现指定的最大值或在每一组可用的信道的每一个信道已经被扫描。如果macAutoRequest被设置为FALSE,仅当在一组可用的信道中的每一个信道都已经扫描了,那么整个扫描过程才会终止。
7.5.2.1.3 Passive channel scan
A passive scan, like an active
scan, allows a device to locate any coordinator transmitting beacon frames within
its POS. The beacon request command, however, is not transmitted. This type of
scan could be used by a device prior to association.
被动扫描,就像主动扫描一样,允许设备在POS范围之内定位任何一个协调器发射的信标帧。但是,信标请求命令是不发送的。这种扫描可以被设备用来
During a passive scan, the MAC sublayer
shall discard all frames received over the PHY data service that are not beacon
frames. If a beacon frame is received that contains the address of the scanning
device in its list of pending addresses, the scanning device shall not attempt
to extract the pending data.
在扫描期间,MAC子层将会丢弃除信标帧外来自物理层数据服务的所有帧。如果接收的信标帧待处理地址中包含扫描设备的地址,扫描设备不会尝试解压待处理数据.
Before commencing a passive scan, the MAC
sublayer shall store the value of macPANId and then set it to 0xffff for the
duration of the scan. This enables the receive filter to accept all beacons
rather than just the beacons from its current PAN (see 7.5.6.2). On completion
of the scan, the MAC sublayer shall restore the value of macPANId to the value
stored before the scan began.
A passive scan over a specified set of
logical channels is requested using the MLME-SCAN.request rimitive with the
ScanType parameter set to indicate a passive scan. For each logical channel,
the device shall first switch to the channel, by setting phyCurrentChannel and
phyCurrentPage accordingly, and then nable its receiver for at most
[aBaseSuperframeDuration * (2n + 1)] symbols, where n is the value of the ScanDuration
parameter. During this time, the device shall reject all nonbeacon frames and
record the nformation contained in all unique beacons in a PAN descriptor
structure (see Table 55 in 7.1.5.1.1). If a beacon frame is received when
macAutoRequest is set to TRUE, the list of PAN descriptor structures shall restored
by the MAC sublayer until the scan is complete; at this time, the list shall be
sent to the next higher ayer in the PANDescriptorList parameter of the
MLME-SCAN.confirm primitive. A device shall be able to restore between one and
an implementation- specified maximum number of PAN descriptors. A beacon frame hall
be assumed to be unique if it contains both a PAN identifier and a source
address that has not been seen efore during the scan of the current channel. If
a beacon frame is received when macAutoRequest is set to ALSE, each recorded
PAN descriptor is sent to the next higher layer in a separate
MLME-BEACONNOTIFY.indication primitive. Once the scan is complete, the
MLME-SCAN.confirm shall be issued to the next higher layer with a null
PANDescriptorList. A received beacon frame containing one or more octets of payload
shall also cause the PAN descriptor to be sent to the next higher layer via the
MLME-BEACONNOTIFY.indication primitive.
If a protected beacon frame is received
(i.e., the Security Enabled subfield in the Frame Control field is set to one),
the device shall attempt to unsecure the beacon frame using the unsecuring
process described in 7.5.8.2.3.
The security-related elements of the PAN
descriptor corresponding to the beacon (see Table 55) shall be set to the
corresponding parameters returned by the unsecuring process. The
SecurityFailure element of the PAN descriptor shall be set to SUCCESS if the
status from the unsecuring process is SUCCESS and set to one of the other
status codes indicating an error in the security processing otherwise.
The information from the unsecured frame
shall be recorded in the PAN descriptor even if the status from the unsecuring
process indicated an error.
If macAutoRequest is set to TRUE, the
passive scan on a particular channel shall terminate when the number of beacons
found equals the implementation specified limit or the channel has been scanned
for the full time, as specified in 7.5.2.1.3. If macAutoRequest is set to
FALSE, the passive scan on a particular channel shall terminate when the channel
has been scanned for the full time. If a channel was not scanned for the full
time, it shall be considered to be unscanned.
If macAutoRequest is set to TRUE, the
entire scan procedure shall terminate when the number of PAN descriptors stored
equals the implementation-specified maximum or every channel in the set of
available channels has been scanned. If macAutoRequest is set to FALSE, the
entire scan procedure shall terminate only when every channel in the set of
available channels has been scanned.