Maca
Transcript of Maca
![Page 1: Maca](https://reader036.fdocuments.us/reader036/viewer/2022081804/552883eb49795917048b493f/html5/thumbnails/1.jpg)
1MACA - A New Channel Access Method for Packet Radio
Phil Karn, KA9Q
ABSTRACT
na
The existing Carrier Sense Multiple Access (CSMA) method widely used imateur packet radio on shared simplex packet radio channels frequently suffers from
-lthe well-known "hidden terminal problem" and the less well known but related probem of the "exposed terminal." This paper proposes a new scheme, Multiple Access
cwith Collision Avoidance (MACA), that could greatly relieve these problems. MACAan also be easily extended to provide automatic transmitter power control. This could
increase the carrying capacity of a channel substantially.
n1. Introductio
In the classic hidden terminal situation,
astation Y can hear both stations X and Z, but Xnd Z cannot hear each other. X and Z are
otherefore unable to avoid colliding with eachther at Y. (See figure 1.)
In the exposed terminal case (figure 2), a.
Ewell-sited station X can hear far away station Y
ven though X is too far from Y to interferel
dwith its traffic to other nearby stations, X wilefer to it unnecessarily, thus wasting an oppor-
ttunity to reuse the channel locally. Sometimeshere can be so much traffic in the remote area
sithat the well-sited station seldom transmits. This a common problem with hilltop digipeaters.
sa
This paper suggests a new channel acceslgorithm for amateur packet radio use that can
eAminimize both problems. This method, Multipl
ccess with Collision Avoidance (MACA), was
Ainspired by the CSMA/CA method (used by the
pple Localtalk network for somewhat different
sreasons) and by the "prioritized ACK" schemeuggested by Eric Gustafson, N7CL, for AX.25.
aIt is not only an elegant solution to the hiddennd exposed terminal problems, but with the
tnecessary hardware support it can be extendedo do automatic per-packet transmitter power
"control. This could substantially increase thecarrying capacity" of a simplex packet radio
ahchannel used for local communications inhhhhhhhhhhhhhhhhh
MACA is an acronym, not a Spanish word.1
densely populated area, thus satisfying both ther
nFCC mandate to use "the minimum poweecessary to carry out the desired communica-
ations" (Part 97.313) and to "contribute to thedvancement of the radio art" (Part 97.1 (b)).
2. How CSMA/CA Works
CSMA/CA as used by Localtalk works as
afollows. When a station wants to send data tonother, it first sends a short Request To Send
rr(RTS) packet to the destination. The receiveesponds with a Clear to Send (CTS) packet.
qOn receipt of the CTS, the sender sends itsueued data packet(s). If the sender does not
Rreceive a CTS after a timeout, it resends its
TS and waits a little longer for a reply. This)
ithree-step process (not counting retransmissionss called a dialogue. Since a dialogue involves
-ftransmissions by both stations, I will avoid conusion by referring to the station that sends the
esRTS and data packets as the initiator, and thtation that sends the CTS as the responder.
af
The RTS packet tells a responder that datollows. This gives the responder a chance to
yeprepare, e.g., by allocating buffer space or bntering a "spin loop" on a programmed-I/O
kuinterface. This is the main reason Localtalses the CSMA/CA dialogue. The Zilog 8530
nbHDLC chip used in the Apple Macintosh cauffer the 3-byte Localtalk RTS packet in its
tnFIFO, but without a DMA path to memory ieeds the CPU to transfer data to memory as it
arrives. The CPU responds to the arrival of an
![Page 2: Maca](https://reader036.fdocuments.us/reader036/viewer/2022081804/552883eb49795917048b493f/html5/thumbnails/2.jpg)
tRTS packet by returning a CTS and entering a
- 2 -
ight read loop, waiting for the data to arrive. 2
n(A timeout prevents a system lockup if the dataever arrives.)
As is standard for CSMA schemes,
nCSMA/CA requires stations to stay off the chan-el when another transmission is already in pro-
togress. CSMA/CA also requires any station thaverhears an RTS or CTS packet directed else-
twhere to inhibit its transmitter for a specifiedime. This helps reduce the probability of a col-
.Tlision with a subsequent CTS or data packet
his is the CA or Collision Avoidance part ofr
pCSMA/CA. However, collisions are not a majoroblem on Localtalk; the network is physically
arsmall, carrier sensing is fairly rapid, the datate is relatively low, and (if the network is
.Pproperly built) there are no hidden terminals
lain CSMA would work well, but there was lit-
Rtle extra cost to the CA feature (given that the
TS/CTS dialogue was already needed for other
3
reasons) so it was included.
. Turning CSMA/CA into MACA
ns
Hidden and exposed terminals abound oimplex packet radio channels, and this makes
tothem very different from Localtalk and mosther types of local area networks. When hid-
taden terminals exist, lack of carrier doesn’lways mean it’s OK to transmit. Conversely,
rwhen exposed terminals exist, presence of car-ier doesn’t always mean that it’s bad to
tltransmit. In other words, the data carrier detecine from your modem is often useless. So I’ll
omake a radical proposal: let’s ignore DCD! Inther words, let’s get rid of the CS in
cCSMA/CA. (It’s too hard to build good DCDircuits anyway...)
Instead we’ll extend the CA part of what
kwe’ll call MA/CA (or just plain MACA). Theey to collision avoidance is the effect that RTS
ntand CTS packets have on the other stations ohe channel. When a station overhears an RTS
ntaddressed to another station, it inhibits its owransmitter long enough for the addressed station
nhto respond with a CTS. When a statiohhhhhhhhhhhhhhhhh
It would be nice if we could use this feature onp
2
acket radio with our programmed-I/O HDLC interfaces,
i(e.g., DRSI PCPA, Paccomm PC-100). Unfortunatelyf our RTS/CTS packets carry full source and destina-
Ftion call signs, they would not fit into the 3-byte 8530
IFOs. So high speed operation will still require eitherDMA or a dedicated I/O processor.
overhears a CTS addressed to another station, it
oinhibits its own transmitter long enough for thether station to send its data. The transmitter is
shinhibited for the proper time even if nothing ieard in response to an RTS or CTS packet.
Zc
Figure 3 shows an example. Stationannot hear X’s transmissions to Y, but it can
aChear Y’s CTS packets to X. If Z overhears
TS packet from Y to X, it will know not to
Xtransmit until after Y has received its data from
.
But how does Z know how long to wait
hafter overhearing Y’s CTS? That’s easy. Weave X, the initiator of the dialogue, include in
osits RTS packet the amount of data it plans tend, and we have Y, the responder, echo that
oinformation in its CTS packet. Now everyoneverhearing Y’s CTS knows just how long to
tmwait to avoid clobbering a data packet that i
ight not even hear.
As long as the link between each pair of
sstations in the network is reciprocal (i.e., all thetations have comparable transmitter powers and
preceiver noise levels), the receipt of a CTSacket by a station not party to a dialogue tells
iit that if it were to transmit, it would probablynterfere with the reception of data by the
siresponder (the sender of the CTS). MACA thunhibits transmission when ordinary CSMA
srwould permit it (and allow a collision), thuelieving the hidden terminal problem. (Colli-
tlsions are not totally avoided; more on this poinater.)
Conversely, if a station hears no responset
tto an overheard RTS, then it may assume thahe intended recipient of the RTS is either down
e4or out of range. An example is shown in figur. Station X is within range of Y, but not Z.
pWhen Y sends traffic to Z, X will hear Y’s RTSackets but not Z’s CTS responses. X may
fitherefore transmit on the channel without fear onterfering with Y’s data transmissions to Z
,Meven though it can hear them. In this case
ACA allows a transmission to proceed when,
tordinary CSMA would prevent it unnecessarilyhus relieving the exposed terminal problem.
a(Because modems have a capture effect, hearing
CTS doesn’t always mean that you’d cause at
ycollision if you transmit, so the problem isn’et completely solved. More on this point later.)
![Page 3: Maca](https://reader036.fdocuments.us/reader036/viewer/2022081804/552883eb49795917048b493f/html5/thumbnails/3.jpg)
4. Metaphors for MACA
- 3 -
MACA is not really a novel idea; itt
jmerely formalizes a procedure many people (noust radio amateurs) instinctively use in personal
sconversation. A typical cocktail party has manyimultaneous conversations. The average guest
hseldom waits for total silence in the room beforee speaks, but if someone asks him to pause
ewbecause he is trying to hear someone else, h
ill usually do so. The MACA RTS packet is
panalogous to Bob saying "Hey, Tom!" and CTSacket is analogous to Tom responding with
pt"Yeah, Bob?". This causes most people to stoalking if they are close to Tom (except, of
-pcourse, for Bob). The same thing (should) hapen in manual amateur radio operation when-
oever a station finishes a transmission with "gonly" (or "KN" on CW or RTTY).
so
The Prioritized ACK scheme also involveverheard packets that inhibit other stations for
-bspecified periods of time. In this case, the inhiiting packet is a data packet and the protected
ynstation is sending an acknowledgement that maot be audible at the inhibited stations. Full
(protection against collisions is not provideddata packets can still collide) but the perfor-
rmance improvement due to the lower ACK lossate is reported to be substantial.
na
More formally, MACA can also be sees a single-channel, time-multiplexed form of
BBusy Tone Multiple Access (BTMA). In
TMA, receivers transmit "busy tones" one
asecondary channels whenever their receivers arctive. This warns the other stations in range
rnthat they should not transmit even if they heaothing on the data channel. On the other hand,
tstations not hearing busy tones are free toransmit even if there is already a signal on the
adata channel. Indeed, stations need not pay anyttention at all to the data channel when decid-
.Aing to transmit; only the busy channel matters
s long as the propagation characteristics are
tidentical between the main and secondary (busyone) channels, BTMA is effective. Unfor-
-qtunately, the need to use widely separated freuencies to avoid self-interference tends to
.Bmake the link characteristics less symmetrical
TMA also obviously increases the hardware
ucomplexity and spectrum requirements of eachser station. On the other hand, because MACA
dduses the same channel for the "busy tone" anata, paths between pairs of stations are much
more likely to be symmetrical.
5. Collisions in MACA
Unlike BTMA, however, collisions.
Tbetween RTS packets can still occur in MACA
hese are minimized with a randomizedt
uexponential back-off strategy similar to thased in regular CSMA. Since there is no carrier
rsensing in MACA, each station simply adds aandom amount to the minimum interval each
nRstation is required to wait after overhearing a
TS or CTS packet. As in regular CSMA, this-
tstrategy minimizes the chance that several staions will all jump on the channel at the instant
lwit becomes free. The extra random interva
ould be an integral multiple of the "slot time",
Rand in MACA the slot time is the duration of an
TS packet. If two RTS packets collide
cnonetheless, each station waits a randomlyhosen interval and tries again, doubling the
.Eaverage interval on each successive attempt
ventually one of them will "win" (i.e., transmitt
tfirst) and the CTS from its responder will inhibihe "losing" station until the winning station can
complete its dialogue.
Even though collisions can occur betweene
oRTS packets, MACA still has the advantagver CSMA as long as the RTS packets are
slsignificantly smaller than the data packets. Aong as this is true, collisions between RTS
-spackets are much less "costly" than the colliions that would otherwise occur between data
sfpackets. The savings in collision time also payor the overhead of the RTS and CTS packets.
Ap
As mentioned earlier, the basic MACrotocol only reduces the chances of collisions
tinvolving data packets; it does not guaranteehat they will never occur. This is because a
-tCTS packet requires a certain minimum signalo-noise ratio at a station for it to be understood
lmand obeyed. Even if the station powers are wel
atched, a pair of stations might have just
ienough of a path between them to allow them tonterfere with each other’s reception of weak
tsignals, but not enough of a path to allow themo hear each other’s CTS packets. Although the
saseriousness of this problem is unknown, it doeppear that the power-controlled version of
6
MACA discussed later would greatly reduce it.
. Bypassing the MACA Dialogue
et
If the data packets are of comparable sizo the RTS packets, the overhead of the
scRTS/CTS dialogue may be excessive. In thiase, a station may choose to bypass the normal
![Page 4: Maca](https://reader036.fdocuments.us/reader036/viewer/2022081804/552883eb49795917048b493f/html5/thumbnails/4.jpg)
ddialogue by simply sending its data without the
- 4 -
ialogue. It must, of course, still defer to anyRTS or CTS packets it may overhear.
Of course, the bypass mechanism carriesr
swith it the risk of a collision. However, foome types of data packets this may be an
eaacceptable tradeoff. An example might be thcknowledgements in a sliding-window TCP
stransfer. TCP ACKs are cumulative, so the los3
of a single ACK causes no harm as long as
Tanother one gets through before the sending
CP fills its window.
l7. Automatic Power Contro
MACA lends itself well to automatice
ntransmitter power control. To support this weed some extra hardware: a D/A converter that
ccontrols transmitter power level, and an A/Donverter that gives received signal strengths.
By including calibrated "S-meter" readings in4
oaCTS packets, responders could help initiators tdjust their power levels accordingly.
ei
Each RTS/CTS exchange updates thnitiator’s estimate of the power needed to reach
s(a particular responder so that future packetincluding the data packet in the current dialo-
.Egue) can be sent with only the necessary power
ven RTS packets could be sent at reduceda
Cpower, since their main purpose is to elicit
TS from the responder. This reduces the pro-bability of collision between RTS packets.
By changing the MACA rule to "inhibit a
"transmitter when a CTS packet is overheard" totemporarily limit power output when a CTS
ecpacket is overheard," geographic reuse of thhannel can be significantly improved. For
sexample, if station X has recently sent traffic totation Y, it knows how much power is requiredhhhhhhhhhhhhhhhhhh
The use of sliding windows in TCP might seem toc
3
ontradict the advice I gave several years ago to always
hoperate in stop-and-wait mode (MAXFRAME 1) onalf duplex channels. However, that conclusion applied
-sonly to link level protocols; TCP is an end-to-end tranport protocol. Sliding windows are usually appropriate
tin a transport protocol even when the individual hops inhe network path are half duplex.
ob
4 Only one point in the S-meter scale really needs te calibrated. This is the signal level just high enough
-pto achieve an acceptable bit error rate. A more comletely calibrated scale makes it easier for the
tetransmitter to zero in on the correct power setting, buven a simple "too strong/too weak/OK" indication is
rlenough for a transmitter to determine the correct poweevel by Newtonian iteration.
to reach Y. If X overhears station Y respondingt
rwith a CTS to a third station Z, then X need noemain completely silent for the required inter-
,sval; it need only limit its transmitter power toay, 20 dB below the level needed to reach Y.
D
5
uring this time it would be free to transmit tod
pany station that it could reach with that reduceower level, because its signal at Y would be
toverridden by Z’s signal. (This is analogous tohe people at the cocktail party continuing their
cconversations in whispers instead of stoppingompletely when Tom tells Bob to go ahead.)
-l
The CTS packets, however, pose a probem. In addition to telling the initiator to send
liits data, the CTS must inhibit all potentianterferers from transmitting. It may therefore
tneed more power than that needed just to reachhe initiator to ensure that everyone "gets the
emmessage." (A CTS packet might therefore b
ore like Tom shouting "Hey, everyone, shut
tup! I’m trying to hear Bob speak!" at the cock-ail party mentioned earlier.)
eg
All this shouting potentially limits theographic channel reuse ability we’ve worked
nrso hard to get. But all is not lost. A statioesponding to an RTS with a CTS can always
aexpect data to follow. If it doesn’t arrive within
reasonable period, or if a retransmitted RTSd
oarrives instead, then either the CTS was steppen, or the CTS wasn’t heard widely enough to
bprevent the data transmission that follows fromeing stepped on. It should then respond to the
llnext RTS from the same station (which wilikely be a repeated attempt to send the same
rhdata) with a CTS at higher power. On the otheand, if a responder has had good luck in get-
tmting data in response to its CTS packets, i
ight try lowering the power it uses to transmit
cthem in order to help limit channel loading. Ofourse, it would never lower its CTS power
tbelow the level it knows is necessary to reachhe initiator.
In sum, MACA with power control
pautomatically determines the exact amount ofower required for each RTS and data transmis-
esion, and learns by experience (i.e., trial andrror) the power required for CTS transmissions.
eIt also appears to avoid the runaway powerscalation that can occur when power control is
hdone on a conventional CSMA channel whenhhhhhhhhhhhhhhhhh
This figure depends on the capture ratio of them
5
odems in use.
![Page 5: Maca](https://reader036.fdocuments.us/reader036/viewer/2022081804/552883eb49795917048b493f/html5/thumbnails/5.jpg)
tstations naively "turn up the wick" each time
- 5 -
hey fail to get through. About the only times
wpower escalation seems possible in MACA i
hen an initiator’s receiver fails so it is not able
mto hear CTS responses to its RTS packets no
atter how much power the responder uses.
aThis possibility should be handled by back-offsnd/or retry limits in the dialogue code.
8. Applications for MACA
If MACA proves effective, it may finally-
wmake single-frequency amateur packet radio net
orks practical. Although it would still be,
dpreferable for fixed backbones to use separateedicated channels or point-to-point links when-
-hever possible, the ability to create usable, adoc, single frequency networks could be very
rauseful in certain situations. These include useccess channels (such as 145.01 MHz in many
eoareas) and in temporary portable and mobilperations where it is often infeasible to coordi-
wnate a multi-frequency network in advance. This
ould be especially useful for emergency situa-t
ftions in remote areas without dedicated packeacilities.
An ideal emergency packet radio networkn
awould consist of identical stations operating o
common frequency (to maximize inter-.
Tchangeability) placed in arbitrary locations
hese stations would automatically discoverr
ctheir neighbors and build routing and poweontrol tables that maximize the total amount of
.Ttraffic that can be carried in the coverage area
o do this, routing algorithms would use a
mdifferent metric than usual. Instead of simply
inimizing the number of hops needed to reachd
ia given destination, the routing algorithm woulnstead minimize the total transmitter energy
edrequired by all the stations along a path to thestination. Because of the laws of RF propaga-
stion (doubling the range of a signal in freepace requires four times as much transmitter
mpower, and on the ground it may take much
ore), this approach would often increase the-
nnumber of hops required to reach a given destiation. However, overall network throughput
pwould increase because the lower transmitterower levels would permit more simultaneous
ntransmissions to occur in different parts of theetwork without interference. This would also
,aminimize the power consumed at the stationsnd this could be important when operating
hcfrom batteries. The direct, minimum-hop patould still be provided as an option for special
applications requiring minimum delay.
9. Conclusion and Open Questions
At the moment, MACA is just an idea.
tMuch simulation and experimental work needso be done to answer many questions about how
ftwell it will really work. Here are just some ohe questions that can be asked. How much of
sthe savings from avoided collisions in MACA ispent on RTS/CTS overhead given typical
Hmodem turnaround times and data packet sizes?
ow much better does power-controlled MACAw
aperform than the basic MACA scheme? Hobout a partial implementation of power control,
ee.g., one that relies on trial-and-error instead ofxplicit S-meter feedback? How do the various
rforms of MACA behave as modem captureatios change? How serious is the problem of
Ainterference from stations just below threshold?
nd how does MACA compare in overall spec-
atral efficiency with other improved multipleccess methods, such as conventional CSMA or
rCSMA/CD operation through full duplexepeaters? I invite anyone interested in pursuing
these topics to contact me.