ezmac software mac layer module to ezmac.pdf · 2012. 12. 4. · • transmit hopping is the task...
TRANSCRIPT
![Page 1: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/1.jpg)
Page 1CONFIDENTIAL
EZMac Software MAC LayerModule
CONFIDENTIAL Module: RF8 v1.0r
![Page 2: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/2.jpg)
Page 2CONFIDENTIAL
What is EZMac? (1)
• Physical layer:This layer conveys the bit stream – in this caseradio signal - through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier, including defining the physical aspects.Based on IA4420/21
• Data Link layer:At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronization. The data link layer is divided into two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer.
• The MAC sub layer controls how a node on the network gains access to the data and permission to transmit it.
• The LLC sub layer controls frame synchronization, flow control and error checking.
EZMac is realizing the two lowest layers of the OSI model
![Page 3: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/3.jpg)
Page 3CONFIDENTIAL
What is EZMac? (2)• In simple embedded communication applications in
most cases not all of the ISO layers are used• Usually only up to the transport layer is used• Sometimes even the network layer is not needed
Only the application layer sits above EZMac
• “EZ” because it is Easy to – Learn– Build into an existing application– Use
![Page 4: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/4.jpg)
Page 4CONFIDENTIAL
EZMac Benefits
• Software interface hides the RF layer• Dramatically reduces the development time• Half duplex packet transmission between RF nodes• Flexible addressing (direct, multicast, broadcast)• Frequency hopping• Multiple error detection• Real time packet filtering
![Page 5: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/5.jpg)
Page 5CONFIDENTIAL
Frequency Hopping (1)
• EZMac uses automatic hopping onlyduring receiving
• Transmit hopping is the task of theapplication layer
• While receiving, it scans all of theenabled channels in a circular manner.
• Uses the EZRadio DQD signal tocheck the channel
![Page 6: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/6.jpg)
Page 6CONFIDENTIAL
Frequency hopping (2)
AA AA AA 2D D4 d0 d1 d2 . . . dNAA AA AA AA
DQD:
IRQ:
Receiving data packetChecking DQD
Receiver activity:
Waiting for IRQ
Waiting for IRQ
timeout: F0 freq.
: F1 freq.
: F2 freq.
![Page 7: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/7.jpg)
Page 7CONFIDENTIAL
Hardware Requirements
• 5 I/O pins (including IRQ pin )• One 16 bit timer• Internal RC oscillator• Fosc >= datarate * 250
Memory PIC16F… parts PIC18F… parts
ROM 3368 words 5752 bytes
ROM, including unused segments 3607 words 5752 bytes
RAM, at main() level 111 bytes 121 bytes
RAM, worst case 142 bytes 152 bytes
µC IA4420
SDI
SDO
nSEL
SCK
VDDnFFSEL
nIRQ
R
![Page 8: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/8.jpg)
Page 8CONFIDENTIAL
Software Interface (1)• Implemented as a state machine • Precompiling options:
– Select frequency band (315 / 434 / 868 / 915MHZ)– Select data rate (9.6 / 19.2 / 38.4 / 57.6 / 115.2kbps)
• Running in the BACKGROUND in two interrupt routines( one timer ISR and one external ISR)
• Control and Status registers: 8-bit variablesTo set up:– Used frequencies, Addressing mode, Filters, Error detection
To read:– EZMac status– Received packet properties (eg.:sender. addr., data, error
counters etc.)
![Page 9: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/9.jpg)
Page 9CONFIDENTIAL
Software Interface (2)Commands: the following C functions: • char EZMac_Wake_up (void)• char EZMac_Sleep (void)• char EZMac_Transmit (void)• char EZMac_Receive (void)• char EZMac_Idle (void)• char EZMacReg_Write (MacRegs Name, char Value)• char EZMacReg_Read (MacRegs Name, char* Value)• char EZMacBuf_Write (char* buf)• char EZMacBuf_Read (char* buf)
![Page 10: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/10.jpg)
Page 10CONFIDENTIAL
Main States of EZMac• The Power Consumption of the
Physical Layer is alsocontrolled
• Supports sleep mode• Adjustable RF output power
(range)
EZMac
_Rec
eive(
)
EZM
ac_I
dle(
) or E
ZMac
Buf
_Rea
d(* b
uf)
If er
ror o
ccur
red
or p
acke
t inv
alid
EZM
ac_I
dle(
)
The
chan
nel i
s oc
cupi
edEZ
Mac
_Tra
nsm
it()
EZM
ac_I
dle(
)
EZMac_Transmit()
EZM
ac_I
dle(
) or p
acke
t sen
t
EZM
ac_I
dle(
)
EZM
ac_S
leep
()
YesNo
Yes
No
EZM
ac_W
ake_
Up(
)
14mA(@915MHz)
18-26mA(@915MHz)
3.5mA
<1uA
![Page 11: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/11.jpg)
Page 11CONFIDENTIAL
Addressing Modes• Two 8-bit address fields for sender and destination addresses in
normal addressing mode• The network topology should be defined in the application layer• In reduced addressing mode the address fields are half length• In network addressing mode there is one 8/16bit long address field
to address the destination network (broadcast message in a givennetwork)
• Plus 1 byte address field: Customer ID (CID)Issued by Integration, increasing the address space.Optional, but recommended to increase the reliability
![Page 12: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/12.jpg)
Page 12CONFIDENTIAL
Packet ConfigurationAA AA AA 2D D4 CID DID D0 D1 D2 . . . CRCDN
data (PL bytes)
PLSIDAA AA AA AA
RF header MAC header
Name Description Size (bytes)
AA AA AA Preamble min. 3 2D D4 Synchron pattern 2
CID* Customer ID 1
SID** Sender ID 1
DID** Destination ID 1
PL* Packet Length 1
D0..DN Data bytes 0...16
CRC Cyclic Redundancy Code 2
*: optional fields
**: In reduced address range these IDs can be implemented on a single byte
![Page 13: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/13.jpg)
Page 13CONFIDENTIAL
Reduced Packet Configuration
Fix Nr of databytesRF headerMAC
header
AA AA AA 2D D4 D0 D1 D2 . . . CRCDNIDAA AA
SI.3 SI.2 SI.1 SI.0 DI.3 DI.2 DI.1 DI.0MAC header:
SI: Sender ID (0…15)DI: Destination ID (0…15)
![Page 14: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/14.jpg)
Page 14CONFIDENTIAL
Real-Time Packet Filtering
SELF ADDRESSFILTER
BROADCASTFILTER
MULTICASTFILTER
AA AA AA 2D D4 CID DID D0 D1 D2 . . . CRCDNPLSID
CUSTOMER IDFILTER
SENDERFILTER
CRCFILTER
PACKET LENGTHFILTER
DFEN
MCFEN
BCFEN
PLFEN
SFEN
CFEN PREN
PACKETREADY
CID
SFLT,SMSK
SFID
MCA(MCM)
MCR.DNPL
PLMAX
A/nM
Received packet:
BOLD: EZmac control registerItalic: single bit of PFCR register
![Page 15: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/15.jpg)
Page 15CONFIDENTIAL
EZMac Plus
![Page 16: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/16.jpg)
Page 16CONFIDENTIAL
What is EZMac Plus?• EZMac with several new features:
– Automatic acknowledgement message sending– Packet forwarding capability– Improved Listen Before Talk function
• Additional header byte (Control byte)– Packet forwarding request– Acknowledgement request bit– 4 bit Packet ID
• Incompatible with the original EZMac (packetstructure)
![Page 17: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/17.jpg)
Page 17CONFIDENTIAL
Main States of EZMac Plus
New states of the EZMac Plus:
• Waiting for acknowledgement• Acknowledgement
transmission• Acknowledgemenet receiving
error• Listen Before Talk error• Packet forwarding
IAI_
EZM
ac_I
dle(
) or I
AI_
EZM
acPu
f_R
ead(
* buf
)
If er
ror o
ccur
red
or p
acke
t inv
alid
IAI_
EZM
ac_I
dle(
)
The
chan
nel is
occ
upie
dIA
I_EZ
Mac
_Tra
nsm
it()
IAI_
EZM
ac_I
dle(
)
IAI_
EZM
ac_I
dle (
) or A
ck re
ceiv
ed
IAI_
EZM
ac_I
dle(
)
IAI_
EZM
ac_S
leep
()
YesNo
Yes
No
IAI_
EZM
ac_W
ake_
Up(
)
Pack
et is
forw
arde
d
IAI_
EZM
ac_I
dle(
)
IAI_
EZM
ac_I
dle(
)
No
Ack
did
n’t r
ecei
ved
Pack
et s
ent
IAI_
EZM
ac_I
dle(
)
14mA(@915MHz)
18-26mA(@915MHz)
<1uA
18-26mA(@915MHz)
14mA(@915MHz)
![Page 18: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/18.jpg)
Page 18CONFIDENTIAL
Packet Configuration (new header byte)
2Cyclic Redundancy CodeCRC
0...16Data bytesD0..DN
1Packet LengthPL*
1Destination IDDID**
1Sender IDSID**
1Customer IDCID*
1Control byteCTRL
2Synchron pattern2D D4
min. 3PreambleAA AA AA
Size (bytes)DescriptionName
AA AA AA 2D D4 CTRL DID D0 D1 D2 . . . CRCDN
data (PL bytes)
PLSIDAA AA AA AA
RF header MAC header
*: optional fields**: In reduced address range these IDs can be implemented on a single byte
SID
![Page 19: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/19.jpg)
Page 19CONFIDENTIAL
Packet forwarding
• The node decreases the Radius field before forwarding the packet
• If the Radius is 0, the node doesn’t forward the packet• Every node stores the packet ID and the source address
of the received packets → it doesn’t forward the same packet again.
●
![Page 20: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/20.jpg)
Page 20CONFIDENTIAL
EZMac comparison 1.
NoneEZMac LiteEZMacCompatible with
● Note 1●●Listen before talk
●--Packet forwarding
●--Automatic acknowledgement
●●●Packet filtering
●●●ARSSI measurement
●●●Fix packet length
●●-Dynamic packet length
●●-Error detection – error counters
-●-Multicast addressing
-●-Network address mode
●●-Reduced address mode (each address filed is 4bit)
●●●Normal address mode (each address field is 8bit)
●●●Support all power states (sleep, idle, rx, tx)
EZMac PlusEZMacEZMac LiteEZMac features
Note1: it uses a modified Listen before talk, which provides better performance.
![Page 21: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/21.jpg)
Page 21CONFIDENTIAL
EZMac comparison 2.
4095 kword ROM162 byte RAM
3208 kword ROM141 byte RAM
-Code size (CCS-C PIC18 family)
-4337 byte ROM131 byte RAM
-Code size (CCS-C PIC16 family)
5982 kword ROM204 byte RAM
4555 kword ROM180 byte RAM
3218 kword ROM174 byte RAM
Code size (Hi-tech PICC18)
-4625 byte ROM156 byte RAM
3841 byte ROM150 byte RAM
Code size (Hi-tech PICC – PIC16 family)
Hi-tech PIC,CCS-C
Hi-tech PIC,CCS-C
Hi-tech PICSupported compilers
PIC18PIC16, PIC18PIC16, PIC18Supported processor families
EZMac PlusEZMacEZMac LiteEZMac features
![Page 22: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/22.jpg)
Page 22CONFIDENTIAL
EZMac NetworkDemo
![Page 23: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/23.jpg)
Page 23CONFIDENTIAL
Demonstration
• Virtual light control• It uses the standard EZMac • Units are configured into groups (subnets)• Commands: On, Off, Toggle• Control strategy:
– Direct control (single unit)– Group control (several unit)– System control (all the available units)
![Page 24: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/24.jpg)
Page 24CONFIDENTIAL
Communication Network
1.01.1
2.1
2.41.3Subnet#1
Subnet#2
Demo Units:
PacketMonitor
Noisegenerator
HT
RS232
• Units are using 3 frequencies
• Packet Monitor is scanning all the frequencies, reporting to the Terminal program
• Noise generator can block the frequencies
![Page 25: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/25.jpg)
Page 25CONFIDENTIAL
Packet Configuration
• Address bytes are split to Subnet and Unit fields:
SN1 SN0 U2 U1 U00 0
7 6 5 4 3 2 1 0
SN2
AA AA AA 2D D4 DID M# CD CRC
Payload(2 bytes)
SIDAA AA AA AA
• Fixed packet length, 2 data bytes:
• M# : message ID• CD : command ID
![Page 26: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/26.jpg)
Page 26CONFIDENTIAL
Demo Unit Operation• 3 buttons, 2x16 character LCD• Adjustable parameters:
• Destination address• Command selection• Button1: parameter select• Button2: parameter set• Button3: send packet
• 2line LCD:
4 . 2 > B C O F F _
[ ]3 . 0 T G LTransmit/config. line:
Receive/status line:
> B C
![Page 27: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/27.jpg)
Page 27CONFIDENTIAL
Demo Unit Operation II• Transmit line:
• Destination address and the Command can be set by buttons• Self Address (Subnet and Unit ID) is set by DIP switches• Unit ID ‘7’ is the group (multicast) address
[ ]3 . 0 O F FTransmit/config. line:
Dest. Command
Self address
Subnet Unit
> B C
RF power
M C
B C
. 1...
1 1
7 6
..
....
O N
T G L
![Page 28: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/28.jpg)
Page 28CONFIDENTIAL
Demo Unit Operation III• Receive line:
• Informs about the last received packet• Shows the status of the virtual LED• Indicates the strength of the received RF signal of each frequency
(ARSSI)
0 . 0 > O F F
M C
B C
O N
T G L
_
_
1 1
7 6
..
.... ..
. ... ..
.
Source
Dest. ARSSI
F1, F2, F3
CommandVirtualLED
S A
![Page 29: EZMac Software MAC Layer Module to EZMac.pdf · 2012. 12. 4. · • Transmit hopping is the task of the application layer • While receiving, ... – Automatic acknowledgement message](https://reader035.vdocuments.us/reader035/viewer/2022071510/612e7f8c1ecc51586942d9fa/html5/thumbnails/29.jpg)
Page 29CONFIDENTIAL
Monitoring• Uses any standard ASCII Terminal
• Continuously scans the frequencies for valid packets• Reports on packet receiving• Indicates the strength of the received RF signal of each frequency
(ARSSI)