Radio Operation#

This module includes the platform abstraction for radio operations.

Functions#

otPlatRadioGetState(otInstance *aInstance)

Get current state of the radio.

otPlatRadioEnable(otInstance *aInstance)

Enable the radio.

otPlatRadioDisable(otInstance *aInstance)

Disable the radio.

bool
otPlatRadioIsEnabled(otInstance *aInstance)

Check whether radio is enabled or not.

otPlatRadioSleep(otInstance *aInstance)

Transition the radio from Receive to Sleep (turn off the radio).

otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)

Transition the radio from Sleep to Receive (turn on the radio).

otPlatRadioReceiveAt(otInstance *aInstance, uint8_t aChannel, uint32_t aStart, uint32_t aDuration)

Schedule a radio reception window at a specific time and duration.

void
otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError)

The radio driver calls this method to notify OpenThread of a received frame.

void
otPlatDiagRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError)

The radio driver calls this method to notify OpenThread diagnostics module of a received frame.

otPlatRadioGetTransmitBuffer(otInstance *aInstance)

Get the radio transmit frame buffer.

otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)

Begin the transmit sequence on the radio.

void
otPlatRadioTxStarted(otInstance *aInstance, otRadioFrame *aFrame)

The radio driver calls this method to notify OpenThread that the transmission has started.

void
otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)

The radio driver calls this function to notify OpenThread that the transmit operation has completed, providing both the transmitted frame and, if applicable, the received ack frame.

void
otPlatDiagRadioTransmitDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError)

The radio driver calls this method to notify OpenThread diagnostics module that the transmission has completed.

int8_t
otPlatRadioGetRssi(otInstance *aInstance)

Get the most recent RSSI measurement.

otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)

Begin the energy scan sequence on the radio.

void
otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyScanMaxRssi)

The radio driver calls this method to notify OpenThread that the energy scan is complete.

void
otPlatRadioBusLatencyChanged(otInstance *aInstance)

The radio driver calls this method to notify OpenThread that the spinel bus latency has been changed.

void
otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)

Enable/Disable source address match feature.

otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress)

Add a short address to the source address match table.

otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)

Add an extended address to the source address match table.

otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress)

Remove a short address from the source address match table.

otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)

Remove an extended address from the source address match table.

void

Clear all short addresses from the source address match table.

void
otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance)

Clear all the extended/long addresses from source address match table.

uint32_t
otPlatRadioGetSupportedChannelMask(otInstance *aInstance)

Get the radio supported channel mask that the device is allowed to be on.

uint32_t
otPlatRadioGetPreferredChannelMask(otInstance *aInstance)

Gets the radio preferred channel mask that the device prefers to form on.

otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled)

Enable the radio coex.

bool
otPlatRadioIsCoexEnabled(otInstance *aInstance)

Check whether radio coex is enabled or not.

otPlatRadioGetCoexMetrics(otInstance *aInstance, otRadioCoexMetrics *aCoexMetrics)

Get the radio coexistence metrics.

otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, otShortAddress aShortAddr, const otExtAddress *aExtAddr)

Enable or disable CSL receiver.

otPlatRadioResetCsl(otInstance *aInstance)

Reset CSL receiver in the platform.

void
otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTime)

Update CSL sample time in radio driver.

uint8_t
otPlatRadioGetCslAccuracy(otInstance *aInstance)

Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the local radio clock in units of PPM.

uint8_t
otPlatRadioGetCslUncertainty(otInstance *aInstance)

The fixed uncertainty (i.e.

otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aChannel, int8_t aMaxPower)

Set the max transmit power for a specific channel.

otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode)

Set the region code.

otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode)

Get the region code.

otPlatRadioConfigureEnhAckProbing(otInstance *aInstance, otLinkMetrics aLinkMetrics, otShortAddress aShortAddress, const otExtAddress *aExtAddress)

Enable/disable or update Enhanced-ACK Based Probing in radio for a specific Initiator.

otPlatRadioAddCalibratedPower(otInstance *aInstance, uint8_t aChannel, int16_t aActualPower, const uint8_t *aRawPowerSetting, uint16_t aRawPowerSettingLength)

Add a calibrated power of the specified channel to the power calibration table.

otPlatRadioClearCalibratedPowers(otInstance *aInstance)

Clear all calibrated powers from the power calibration table.

otPlatRadioSetChannelTargetPower(otInstance *aInstance, uint8_t aChannel, int16_t aTargetPower)

Set the target power for the given channel.

otPlatRadioGetRawPowerSetting(otInstance *aInstance, uint8_t aChannel, uint8_t *aRawPowerSetting, uint16_t *aRawPowerSettingLength)

Get the raw power setting for the given channel.

Function Documentation#

otPlatRadioGetState#

otRadioState otPlatRadioGetState (otInstance * aInstance)

Get current state of the radio.

Parameters
[in]aInstance

The OpenThread instance structure.

Is not required by OpenThread. It may be used for debugging and/or application-specific purposes.

Note

  • This function may be not implemented. It does not affect OpenThread.

Returns

  • Current state of the radio.


Definition at line 757 of file include/openthread/platform/radio.h

otPlatRadioEnable#

otError otPlatRadioEnable (otInstance * aInstance)

Enable the radio.

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 767 of file include/openthread/platform/radio.h

otPlatRadioDisable#

otError otPlatRadioDisable (otInstance * aInstance)

Disable the radio.

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 777 of file include/openthread/platform/radio.h

otPlatRadioIsEnabled#

bool otPlatRadioIsEnabled (otInstance * aInstance)

Check whether radio is enabled or not.

Parameters
[in]aInstance

The OpenThread instance structure.

Returns

  • TRUE if the radio is enabled, FALSE otherwise.


Definition at line 786 of file include/openthread/platform/radio.h

otPlatRadioSleep#

otError otPlatRadioSleep (otInstance * aInstance)

Transition the radio from Receive to Sleep (turn off the radio).

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 797 of file include/openthread/platform/radio.h

otPlatRadioReceive#

otError otPlatRadioReceive (otInstance * aInstance, uint8_t aChannel)

Transition the radio from Sleep to Receive (turn on the radio).

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aChannel

The channel to use for receiving.


Definition at line 808 of file include/openthread/platform/radio.h

otPlatRadioReceiveAt#

otError otPlatRadioReceiveAt (otInstance * aInstance, uint8_t aChannel, uint32_t aStart, uint32_t aDuration)

Schedule a radio reception window at a specific time and duration.

Parameters
[in]aInstance

The radio channel on which to receive.

[in]aChannel

The receive window start time relative to the local radio clock, see otPlatRadioGetNow. The radio receiver SHALL be on and ready to receive the first symbol of a frame's SHR at the window start time.

[in]aStart

The receive window duration, in microseconds, as measured by the local radio clock. The radio SHOULD be turned off (or switched to TX mode if an ACK frame needs to be sent) after that duration unless it is still actively receiving a frame. In the latter case the radio SHALL be kept in reception mode until frame reception has either succeeded or failed.

N/AaDuration

Definition at line 829 of file include/openthread/platform/radio.h

otPlatRadioReceiveDone#

void otPlatRadioReceiveDone (otInstance * aInstance, otRadioFrame * aFrame, otError aError)

The radio driver calls this method to notify OpenThread of a received frame.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aFrame

A pointer to the received frame or NULL if the receive operation failed.

[in]aError

OT_ERROR_NONE when successfully received a frame, OT_ERROR_ABORT when reception was aborted and a frame was not received, OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space.


Definition at line 840 of file include/openthread/platform/radio.h

otPlatDiagRadioReceiveDone#

void otPlatDiagRadioReceiveDone (otInstance * aInstance, otRadioFrame * aFrame, otError aError)

The radio driver calls this method to notify OpenThread diagnostics module of a received frame.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aFrame

A pointer to the received frame or NULL if the receive operation failed.

[in]aError

OT_ERROR_NONE when successfully received a frame, OT_ERROR_ABORT when reception was aborted and a frame was not received, OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space.

Is used when diagnostics is enabled.


Definition at line 853 of file include/openthread/platform/radio.h

otPlatRadioGetTransmitBuffer#

otRadioFrame * otPlatRadioGetTransmitBuffer (otInstance * aInstance)

Get the radio transmit frame buffer.

Parameters
[in]aInstance

The OpenThread instance structure.

OpenThread forms the IEEE 802.15.4 frame in this buffer then calls otPlatRadioTransmit() to request transmission.

Returns

  • A pointer to the transmit frame buffer.


Definition at line 864 of file include/openthread/platform/radio.h

otPlatRadioTransmit#

otError otPlatRadioTransmit (otInstance * aInstance, otRadioFrame * aFrame)

Begin the transmit sequence on the radio.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aFrame

A pointer to the frame to be transmitted.

The caller must form the IEEE 802.15.4 frame in the buffer provided by otPlatRadioGetTransmitBuffer() before requesting transmission. The channel and transmit power are also included in the otRadioFrame structure.

The transmit sequence consists of:

  1. Transitioning the radio to Transmit from one of the following states:

    • Receive if RX is on when the device is idle or OT_RADIO_CAPS_SLEEP_TO_TX is not supported

    • Sleep if RX is off when the device is idle and OT_RADIO_CAPS_SLEEP_TO_TX is supported.

  2. Transmits the psdu on the given channel and at the given transmit power.


Definition at line 884 of file include/openthread/platform/radio.h

otPlatRadioTxStarted#

void otPlatRadioTxStarted (otInstance * aInstance, otRadioFrame * aFrame)

The radio driver calls this method to notify OpenThread that the transmission has started.

Parameters
[in]aInstance

A pointer to the OpenThread instance structure.

[in]aFrame

A pointer to the frame that is being transmitted.

Note

  • This function should be called by the same thread that executes all of the other OpenThread code. It should not be called by ISR or any other task.


Definition at line 895 of file include/openthread/platform/radio.h

otPlatRadioTxDone#

void otPlatRadioTxDone (otInstance * aInstance, otRadioFrame * aFrame, otRadioFrame * aAckFrame, otError aError)

The radio driver calls this function to notify OpenThread that the transmit operation has completed, providing both the transmitted frame and, if applicable, the received ack frame.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aFrame

A pointer to the frame that was transmitted.

[in]aAckFrame

A pointer to the ACK frame, NULL if no ACK was received.

[in]aError

OT_ERROR_NONE when the frame was transmitted, OT_ERROR_NO_ACK when the frame was transmitted but no ACK was received, OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel, OT_ERROR_ABORT when transmission was aborted for other reasons.

When radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability, radio platform layer updates aFrame with the security frame counter and key index values maintained by the radio.


Definition at line 912 of file include/openthread/platform/radio.h

otPlatDiagRadioTransmitDone#

void otPlatDiagRadioTransmitDone (otInstance * aInstance, otRadioFrame * aFrame, otError aError)

The radio driver calls this method to notify OpenThread diagnostics module that the transmission has completed.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aFrame

A pointer to the frame that was transmitted.

[in]aError

OT_ERROR_NONE when the frame was transmitted, OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel, OT_ERROR_ABORT when transmission was aborted for other reasons.

Is used when diagnostics is enabled.


Definition at line 925 of file include/openthread/platform/radio.h

otPlatRadioGetRssi#

int8_t otPlatRadioGetRssi (otInstance * aInstance)

Get the most recent RSSI measurement.

Parameters
[in]aInstance

The OpenThread instance structure.

Returns

  • The RSSI in dBm when it is valid. 127 when RSSI is invalid.


Definition at line 934 of file include/openthread/platform/radio.h

otPlatRadioEnergyScan#

otError otPlatRadioEnergyScan (otInstance * aInstance, uint8_t aScanChannel, uint16_t aScanDuration)

Begin the energy scan sequence on the radio.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aScanChannel

The channel to perform the energy scan on.

[in]aScanDuration

The duration, in milliseconds, for the channel to be scanned.

Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability.


Definition at line 949 of file include/openthread/platform/radio.h

otPlatRadioEnergyScanDone#

void otPlatRadioEnergyScanDone (otInstance * aInstance, int8_t aEnergyScanMaxRssi)

The radio driver calls this method to notify OpenThread that the energy scan is complete.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aEnergyScanMaxRssi

The maximum RSSI encountered on the scanned channel.

Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability.


Definition at line 959 of file include/openthread/platform/radio.h

otPlatRadioBusLatencyChanged#

void otPlatRadioBusLatencyChanged (otInstance * aInstance)

The radio driver calls this method to notify OpenThread that the spinel bus latency has been changed.

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 966 of file include/openthread/platform/radio.h

otPlatRadioEnableSrcMatch#

void otPlatRadioEnableSrcMatch (otInstance * aInstance, bool aEnable)

Enable/Disable source address match feature.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aEnable

Enable/disable source address match feature.

The source address match feature controls how the radio layer decides the "frame pending" bit for acks sent in response to data request commands from children.

If disabled, the radio layer must set the "frame pending" on all acks to data request commands.

If enabled, the radio layer uses the source address match table to determine whether to set or clear the "frame pending" bit in an ack to a data request command.

The source address match table provides the list of children for which there is a pending frame. Either a short address or an extended/long address can be added to the source address match table.


Definition at line 985 of file include/openthread/platform/radio.h

otPlatRadioAddSrcMatchShortEntry#

otError otPlatRadioAddSrcMatchShortEntry (otInstance * aInstance, otShortAddress aShortAddress)

Add a short address to the source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aShortAddress

The short address to be added.


Definition at line 996 of file include/openthread/platform/radio.h

otPlatRadioAddSrcMatchExtEntry#

otError otPlatRadioAddSrcMatchExtEntry (otInstance * aInstance, const otExtAddress * aExtAddress)

Add an extended address to the source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aExtAddress

The extended address to be added stored in little-endian byte order.


Definition at line 1007 of file include/openthread/platform/radio.h

otPlatRadioClearSrcMatchShortEntry#

otError otPlatRadioClearSrcMatchShortEntry (otInstance * aInstance, otShortAddress aShortAddress)

Remove a short address from the source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aShortAddress

The short address to be removed.


Definition at line 1018 of file include/openthread/platform/radio.h

otPlatRadioClearSrcMatchExtEntry#

otError otPlatRadioClearSrcMatchExtEntry (otInstance * aInstance, const otExtAddress * aExtAddress)

Remove an extended address from the source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aExtAddress

The extended address to be removed stored in little-endian byte order.


Definition at line 1029 of file include/openthread/platform/radio.h

otPlatRadioClearSrcMatchShortEntries#

void otPlatRadioClearSrcMatchShortEntries (otInstance * aInstance)

Clear all short addresses from the source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 1036 of file include/openthread/platform/radio.h

otPlatRadioClearSrcMatchExtEntries#

void otPlatRadioClearSrcMatchExtEntries (otInstance * aInstance)

Clear all the extended/long addresses from source address match table.

Parameters
[in]aInstance

The OpenThread instance structure.


Definition at line 1043 of file include/openthread/platform/radio.h

otPlatRadioGetSupportedChannelMask#

uint32_t otPlatRadioGetSupportedChannelMask (otInstance * aInstance)

Get the radio supported channel mask that the device is allowed to be on.

Parameters
[in]aInstance

The OpenThread instance structure.

Returns

  • The radio supported channel mask.


Definition at line 1052 of file include/openthread/platform/radio.h

otPlatRadioGetPreferredChannelMask#

uint32_t otPlatRadioGetPreferredChannelMask (otInstance * aInstance)

Gets the radio preferred channel mask that the device prefers to form on.

Parameters
[in]aInstance

The OpenThread instance structure.

Returns

  • The radio preferred channel mask.


Definition at line 1061 of file include/openthread/platform/radio.h

otPlatRadioSetCoexEnabled#

otError otPlatRadioSetCoexEnabled (otInstance * aInstance, bool aEnabled)

Enable the radio coex.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aEnabled

TRUE to enable the radio coex, FALSE otherwise.

Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.


Definition at line 1074 of file include/openthread/platform/radio.h

otPlatRadioIsCoexEnabled#

bool otPlatRadioIsCoexEnabled (otInstance * aInstance)

Check whether radio coex is enabled or not.

Parameters
[in]aInstance

The OpenThread instance structure.

Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.

Returns

  • TRUE if the radio coex is enabled, FALSE otherwise.


Definition at line 1085 of file include/openthread/platform/radio.h

otPlatRadioGetCoexMetrics#

otError otPlatRadioGetCoexMetrics (otInstance * aInstance, otRadioCoexMetrics * aCoexMetrics)

Get the radio coexistence metrics.

Parameters
[in]aInstance

The OpenThread instance structure.

[out]aCoexMetrics

A pointer to the coexistence metrics structure.

Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.


Definition at line 1098 of file include/openthread/platform/radio.h

otPlatRadioEnableCsl#

otError otPlatRadioEnableCsl (otInstance * aInstance, uint32_t aCslPeriod, otShortAddress aShortAddr, const otExtAddress * aExtAddr)

Enable or disable CSL receiver.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aCslPeriod

CSL period, 0 for disabling CSL. CSL period is in unit of 10 symbols.

[in]aShortAddr

The short source address of CSL receiver's peer.

[in]aExtAddr

The extended source address of CSL receiver's peer.

Note

  • Platforms should use CSL peer addresses to include CSL IE when generating enhanced acks.


Definition at line 1114 of file include/openthread/platform/radio.h

otPlatRadioResetCsl#

otError otPlatRadioResetCsl (otInstance * aInstance)

Reset CSL receiver in the platform.

Parameters
[in]aInstance

The OpenThread instance structure.

Note

  • Defaults to otPlatRadioEnableCsl(aInstance,0, Mac::kShortAddrInvalid, nullptr);


Definition at line 1130 of file include/openthread/platform/radio.h

otPlatRadioUpdateCslSampleTime#

void otPlatRadioUpdateCslSampleTime (otInstance * aInstance, uint32_t aCslSampleTime)

Update CSL sample time in radio driver.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aCslSampleTime

The next sample time, in microseconds. It is the time when the first symbol of the MHR of the frame is expected.

Sample time is stored in radio driver as a copy to calculate phase when sending ACK with CSL IE. The CSL sample (window) of the CSL receiver extends before and after the sample time. The CSL sample time marks a timestamp in the CSL sample window when a frame should be received in "ideal conditions" if there would be no inaccuracy/clock-drift.


Definition at line 1146 of file include/openthread/platform/radio.h

otPlatRadioGetCslAccuracy#

uint8_t otPlatRadioGetCslAccuracy (otInstance * aInstance)

Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the local radio clock in units of PPM.

Parameters
[in]aInstance

A pointer to an OpenThread instance.

This is the clock used to schedule CSL operations.

Note

  • Implementations MAY estimate this value based on current operating conditions (e.g. temperature).

In case the implementation does not estimate the current value but returns a fixed value, this value MUST be the worst-case accuracy over all possible foreseen operating conditions (temperature, pressure, etc) of the implementation.

Returns

  • The current CSL rx/tx scheduling drift, in PPM.


Definition at line 1165 of file include/openthread/platform/radio.h

otPlatRadioGetCslUncertainty#

uint8_t otPlatRadioGetCslUncertainty (otInstance * aInstance)

The fixed uncertainty (i.e.

Parameters
[in]aInstance

A pointer to an OpenThread instance.

random jitter) of the arrival time of CSL transmissions received by this device in units of 10 microseconds.

This designates the worst case constant positive or negative deviation of the actual arrival time of a transmission from the transmission time calculated relative to the local radio clock independent of elapsed time. In addition to uncertainty accumulated over elapsed time, the CSL channel sample ("RX window") must be extended by twice this deviation such that an actual transmission is guaranteed to be detected by the local receiver in the presence of random arrival time jitter.

Returns

  • The CSL Uncertainty in units of 10 us.


Definition at line 1183 of file include/openthread/platform/radio.h

otPlatRadioSetChannelMaxTransmitPower#

otError otPlatRadioSetChannelMaxTransmitPower (otInstance * aInstance, uint8_t aChannel, int8_t aMaxPower)

Set the max transmit power for a specific channel.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aChannel

The radio channel.

[in]aMaxPower

The max power in dBm, passing OT_RADIO_RSSI_INVALID will disable this channel.


Definition at line 1197 of file include/openthread/platform/radio.h

otPlatRadioSetRegion#

otError otPlatRadioSetRegion (otInstance * aInstance, uint16_t aRegionCode)

Set the region code.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aRegionCode

The radio region code. The aRegionCode >> 8 is first ascii char and the aRegionCode & 0xff is the second ascii char.

The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.


Definition at line 1213 of file include/openthread/platform/radio.h

otPlatRadioGetRegion#

otError otPlatRadioGetRegion (otInstance * aInstance, uint16_t * aRegionCode)

Get the region code.

Parameters
[in]aInstance

The OpenThread instance structure.

[out]aRegionCode

The radio region.

The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.


Definition at line 1229 of file include/openthread/platform/radio.h

otPlatRadioConfigureEnhAckProbing#

otError otPlatRadioConfigureEnhAckProbing (otInstance * aInstance, otLinkMetrics aLinkMetrics, otShortAddress aShortAddress, const otExtAddress * aExtAddress)

Enable/disable or update Enhanced-ACK Based Probing in radio for a specific Initiator.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aLinkMetrics

This parameter specifies what metrics to query. Per spec 4.11.3.4.4.6, at most 2 metrics can be specified. The probing would be disabled if `aLinkMetrics` is bitwise 0.

[in]aShortAddress

The short address of the Probing Initiator.

[in]aExtAddress

The extended source address of the Probing Initiator. aExtAddr MUST NOT be NULL.

After Enhanced-ACK Based Probing is configured by a specific Probing Initiator, the Enhanced-ACK sent to that node should include Vendor-Specific IE containing Link Metrics data. This method informs the radio to start/stop to collect Link Metrics data and include Vendor-Specific IE that containing the data in Enhanced-ACK sent to that Probing Initiator.


Definition at line 1251 of file include/openthread/platform/radio.h

otPlatRadioAddCalibratedPower#

otError otPlatRadioAddCalibratedPower (otInstance * aInstance, uint8_t aChannel, int16_t aActualPower, const uint8_t * aRawPowerSetting, uint16_t aRawPowerSettingLength)

Add a calibrated power of the specified channel to the power calibration table.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aChannel

The radio channel.

[in]aActualPower

The actual power in 0.01dBm.

[in]aRawPowerSetting

A pointer to the raw power setting byte array.

[in]aRawPowerSettingLength

The length of the aRawPowerSetting.

Note

  • This API is an optional radio platform API. It's up to the platform layer to implement it.

The aActualPower is the actual measured output power when the parameters of the radio hardware modules are set to the aRawPowerSetting.

The raw power setting is an opaque byte array. OpenThread doesn't define the format of the raw power setting. Its format is radio hardware related and it should be defined by the developers in the platform radio driver. For example, if the radio hardware contains both the radio chip and the FEM chip, the raw power setting can be a combination of the radio power register and the FEM gain value.


Definition at line 1281 of file include/openthread/platform/radio.h

otPlatRadioClearCalibratedPowers#

otError otPlatRadioClearCalibratedPowers (otInstance * aInstance)

Clear all calibrated powers from the power calibration table.

Parameters
[in]aInstance

The OpenThread instance structure.

Note

  • This API is an optional radio platform API. It's up to the platform layer to implement it.


Definition at line 1297 of file include/openthread/platform/radio.h

otPlatRadioSetChannelTargetPower#

otError otPlatRadioSetChannelTargetPower (otInstance * aInstance, uint8_t aChannel, int16_t aTargetPower)

Set the target power for the given channel.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aChannel

The radio channel.

[in]aTargetPower

The target power in 0.01dBm.

Note

  • This API is an optional radio platform API. It's up to the platform layer to implement it. If this API is implemented, the function otPlatRadioSetTransmitPower() should be disabled.

The radio driver should set the actual output power to be less than or equal to the aTargetPower and as close as possible to the aTargetPower. If the aTargetPower is lower than the minimum output power supported by the platform, the output power should be set to the minimum output power supported by the platform. If the aTargetPower is higher than the maximum output power supported by the platform, the output power should be set to the maximum output power supported by the platform. If the aTargetPower is set to INT16_MAX, the corresponding channel is disabled.


Definition at line 1320 of file include/openthread/platform/radio.h

otPlatRadioGetRawPowerSetting#

otError otPlatRadioGetRawPowerSetting (otInstance * aInstance, uint8_t aChannel, uint8_t * aRawPowerSetting, uint16_t * aRawPowerSettingLength)

Get the raw power setting for the given channel.

Parameters
[in]aInstance

The OpenThread instance structure.

[in]aChannel

The radio channel.

[out]aRawPowerSetting

A pointer to the raw power setting byte array.

[inout]aRawPowerSettingLength

On input, a pointer to the size of aRawPowerSetting. On output, a pointer to the length of the raw power setting data.

Note

  • OpenThread src/core/utils implements a default implementation of the API otPlatRadioAddCalibratedPower(), otPlatRadioClearCalibratedPowers() and otPlatRadioSetChannelTargetPower(). This API is provided by the default implementation to get the raw power setting for the given channel. If the platform doesn't use the default implementation, it can ignore this API.

Platform radio layer should parse the raw power setting based on the radio layer defined format and set the parameters of each radio hardware module.


Definition at line 1344 of file include/openthread/platform/radio.h