3
\$\begingroup\$

I have a generic question regarding wireless communication and what techniques can be used to detect if two transmitters send the message at the exact same time.

Since this is generic question and really don't know much about this field and really would like to know more, let's presume I'm using super simple techniques. Let's talk about On-Off keying modulation technique (I believe that carrier frequency does not matter, but let's say the 433 IMS band), and using some sort of preamble (like the one in the Arduinos 433 lib that sends 25 alternating 1s and 0s).

What would happen if two transmitters start sending their data at the same time? I presume there will be some constructive/destructive interference involved and the integrity of the data would be compromised. Is the only solution to have the message checksum as part of the message and then check the integrity and drop corrupt messages?

How is this handled in Wi-Fi/Cellular/LoRa/... ?

Thanks!

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Your question implies an answer that covers dozens of pages and may still not hit all targets. The trick is time division multiplexing or code division multiplexing. \$\endgroup\$
    – Andy aka
    Nov 8, 2021 at 10:06
  • \$\begingroup\$ In practice, either the transmitters will jam each other out as the result will become some mix of the two. Or alternatively the receiver ends up listening to the transmitter with highest signal strength, if that one "wins". But overall, you cannot send at the same frequency - which something like wide and noisy OOK is completely unsuitable for a narrow band like 433MHz. You need a narrow-band FSK technology that can be used on smaller channels, typically down to 25kHz. \$\endgroup\$
    – Lundin
    Nov 8, 2021 at 10:25
  • \$\begingroup\$ youtube.com/watch?v=UgQM0rVDIQE \$\endgroup\$ Nov 8, 2021 at 21:05
  • \$\begingroup\$ Can you transmit and receive at the same time? Perhaps when one node transmits, it can also listen on the same frequency - if it "hears" something during the time you're not transmitting (like during your 0 bit), then it can immediately stop and let the other node continue. Either the other node will do the same (it'll hear the first node), or it's message will be received correctly (assuming the two nodes were transmitting the same thing before one of them decided to stop). This isn't quite what you're asking for, but would allow the nodes themselves to possibly know. \$\endgroup\$
    – Steve
    Nov 8, 2021 at 22:04
  • \$\begingroup\$ They would then retry some random (short) period again. Hopefully the randomness would let the two nodes get their messages thorugh. \$\endgroup\$
    – Steve
    Nov 8, 2021 at 22:05

5 Answers 5

7
\$\begingroup\$

ACK and Retransmission is a common solution.

The sender waits for an ACK (acknowledge) from the receiver. If it can't get any ACK from the receiver (maybe for a limited time duration), it transmits the message again. In BLE for example, all lost packets (i.e. the packets that did not return any ACK from the receiver) will be retried infinitely until a link loss.

Of course, the transmitters of the lost packets will not be sending simultaneously forever. One of them eventually will send before the other during the retransmission.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ @AlbertoBarbosa The other half of this is designing some sensible backoff algorithm or time division or resource sharing so that competing stations get out of the way for long enough to make it work. I.e. rather than having some foolproof method of detecting collisions you just design a robust retrial algorithm so the message will (likely) get through in the end, and detect failure (with a method like this). \$\endgroup\$
    – 2e0byo
    Nov 8, 2021 at 18:08
  • 2
    \$\begingroup\$ One would also usually want to use a (pseudo)random delay that varies between transmitters, to ensure that when the two transmitters whose messages got jumbled together decide to retransmit, they (hopefully) won't do it at the exact same time again. And yes, as @2e0byo notes, some kind of adaptive backoff algorithm will be useful to ensure that, if there are too many transmitters present, they'll all gracefully increase their transmission intervals rather than trying to constantly shout over each other. \$\endgroup\$ Nov 9, 2021 at 0:11
5
\$\begingroup\$

Is the only solution to have the message checksum as part of the message and then check the integrity and drop corrupt messages?

It's pretty much standard that some form of robust error checking method is employed with radio data transmission. It's got nothing to do with two simultaneous transmitters either; a single transmitter/receiver and any form of in-band interference is going to cause potential corruption of your data so, error checking is not just nice, it's fundamental.

Let's talk about On-Off keying modulation technique (I believe that carrier frequency does not matter, but let's say the 433 IMS band), and using some sort of preamble (like the one in the Arduinos 433 lib that sends 25 alternating 1s and 0s).

In addition to error checking you should check the address bits contained in the message, the message length and message preamble integrity if you want your system to be as robust as possible.

\$\endgroup\$
5
\$\begingroup\$

Except for CDMA and for some other very complex modulations schemes used in smartphones, if two transmitters transmit a message m at the same frequency at the same time, the receiver is completely unable to reconstruct the original message m, unless one transmitter is far away and the other is close to the receiver.

\$\endgroup\$
2
\$\begingroup\$

You can make more or less complicated protocols for handling this situation. Each has a different set of advantages and problems. Regardless, all transmissions has to container checksums or similar. Protocols is the way we computer people tend to call the "rules" for interacting systems.

To me, they fall into two distinct categories: with a master or not.

In a system with a master, the master station may poll each slave station for information. The slaves send only when polled. Additionally the master will check at some interval if new stations has arrived.

Without a master, the protocol gets more complicated. Each unit has to have a bit, or a lot, more functionality.

One of the better solutions is kallade SOTDMA and is used in AIS communication of ship data. In this setup there is no master, all the units behave the same. For exact time division a GPS clock is used to synchronize the time slots (the ships have a GPS anyway, as the message contains position and course/speed). Each unit listens for a while to hear what, if any, time slots are currently in use and selects randomly one of the free ones. See for a short description: http://www.allaboutais.com/index.php/en/technical-info/transmission-types/105-ais-technicals/technical-lfundamentals/93-sotdma

Time division multiple access, short TDMA, is used in different ways when using a single frequency (as example SOTDMA above). One schema is known as STDMA (self organising time division multiple access, partly patented) is that you listen for a silence, and then send the message and wait for an ACK signal from the receiver. If you do not get an acknowledge signal in a short time, resend the message. In order for two stations to not "lock in sync", make the wait interval between retransmissions controlled by some random function. When receiving a message the receiver calculates the check sum while receiving, and if correct sends an ack directly. You can make several variations on this, but basically all units has to follow the same protocol for it to work.

\$\endgroup\$
1
\$\begingroup\$

As a side note...

This is a technique that is actually used in paging systems to improve coverage and the signal strength in the receiver. It is called multi-station simulcast, or more colloquially, simulcasting.

In a multi-station simulcast paging system, each base station transmits the same RF signal (FSK) simultaneously at the same frequency. The transmitters are synchronised to ensure proper bit timing (for instance, using GPS timing information). A paging receiver in the overlapping area will receive several RF signals transmitted from different base stations.

A receiver close to a transmitter, will have no problem receiving the paging messages from the closest transmitter. A receiver somewhere between two (or more) transmitters will receive the combined signal of the transmitters. Because the distance to each transmitter is roughly the same, the combined signal will be stronger and have the correct bit timing.

Paging baud rates are fairly low (512, 1200 or 2400 baud) so the bit timing is not very critical. Paging data (Pocsag) uses BCH encoding for message integrity.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.