Skip to main content

Module tx

Module tx 

Source
Expand description

Putting a packet on the air.

Transmitting is three things in order: the payload goes into a buffer belonging to one of the two chains, the chip is told how long to wait before it starts, and then a trigger is armed. Which trigger decides when: now, at a counter value, or on the pulse from a GPS.

The waiting is the part worth care. A gateway answers a device inside a receive window a second wide, and the chip does not begin radiating the instant it is triggered: it has a front end to settle, a filter to fill, and a modulator to start. So a timed send is programmed early by exactly those delays, and start_delay works out by how much. Get it wrong and nothing fails anywhere: the packet goes out, the device is no longer listening, and the join silently never completes.

Nothing here opens a bus. The buffer address, the delay, and the trigger word are values, so they can be checked against the reference implementation with no hardware present.

Structs§

Gain
One entry of the table that turns a wanted power into what the chain is set to.
Transmit
A packet to put on the air, and how.

Enums§

Chain
Which of the two transmit chains a packet goes out on.
FrontEnd
Which front end is wired to a chain, since each settles at its own pace.
Send
A step in sending a packet.
TransmitError
Why a packet cannot be described to the chain.
Trigger
When a packet goes out.
TxStatus
What the transmit chain is doing.

Constants§

CAD_RX_TX_TRANSMIT
What the modem mode takes to transmit.
CHIRP_LOWPASS_FAST
The chirp filtering a spreading factor below ten is sent with.
CHIRP_LOWPASS_SLOW
And what the slower ones are sent with.
DEFAULT_GAINS
The table the reference design carries for an SX1250 board on the European band.
IF_SOURCE_FSK
What it takes for frequency shift keying.
IF_SOURCE_LORA
What the sample source takes for LoRa.
MODULATION_FSK
What it takes for frequency shift keying.
MODULATION_LORA
What the modulation register takes for LoRa, which is also what it takes for an unmodulated carrier. Chain::if_source is what parts the two.
PRIVATE_PEAKS
The ones a private network uses, which is what the chain powers up holding.
PUBLIC_PEAKS
The sync symbol positions a public network transmits with.
START_DELAY_BASE
The delay the chip starts from, in its own ticks, before the parts below are taken off.
STATUS_FREE
The value the status register reads when a chain is idle.
TICKS_PER_US
How many ticks of the concentrator counter go by in a microsecond.
TX_BUFFER_A
Where the payload for the first chain is written.
TX_BUFFER_B
Where the payload for the second chain is written.

Functions§

bandwidth_value
Turns a bandwidth into the value the modulator takes.
frequency_value
Turns a carrier into the value the transmit chain is tuned with.
gain_for
Picks the entry to transmit a wanted power at.
settings
Everything a chain is told before a packet is loaded.
start_delay
How far ahead of its window a chain has to be started.
start_delay_bytes
Splits a start delay into the two bytes the chip takes.
steps
The order a packet is loaded and sent in.
trigger_bytes
Splits a trigger value into the four bytes the chip takes.
trigger_value
The counter value a timed send is programmed at.