# Raw Link

This module includes functions that control the raw link-layer configuration.

## Summary

| ### Typedefs ||
|---|---|
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga9035076495f66b66d5147ea6ae83aa80)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)` | typedef `void(*` Pointer on receipt of a IEEE 802.15.4 frame. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gac3ea9fd14e987b944d223a6dbf6fecfd)(otInstance *aInstance)` | typedef `void(*` Pointer is called when the radio availability schedule is updated. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga95c0792516103645b46cfc300f3b5ad1)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)` | typedef `void(*` Pointer on receipt of a IEEE 802.15.4 frame. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga779020ae0bbe30931857849c1827d376)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)` | typedef `void(*` Pointer on receipt of a IEEE 802.15.4 frame. |

| ### Functions ||
|---|---|
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga7baebf98f16820718cb803c9f512f174(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint8_t aScanChannel, uint16_t aScanDuration, https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga9035076495f66b66d5147ea6ae83aa80 aCallback)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Begins the energy scan sequence on the radio. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga05a209223a3a4fc59ab63b4d28342b6b(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/group/radio-types#group__radio-types_1ga42eb2a20cdbfe1cf16f8f662ee223504` Get the radio capabilities. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga3260e41f99ac69ae5094cb975cf66c6d(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `bool` Gets the status of promiscuous mode. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga0b8ecd3d69aae1cab69074ff07bddb7a(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/struct/ot-radio-availability *aAvailability)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Gets the current radio availability schedule. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gaa23684a1636be29ea14d4c0dc80d96ff(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `uint64_t` Get current platform time (64bits width) of the radio chip. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gae3dccd7f37b75759b93eec0ea96ef9a3(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `int8_t` Get the most recent RSSI measurement. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga57a3cd337cd7e56dae8958d3e3c8a917(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/struct/ot-radio-frame *` The radio transitions from Transmit to Receive. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gafadb200699d29ac2cfc0c1ed6ce73f79(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `bool` Indicates whether or not the raw link-layer is enabled. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga0dfbb8b1ebf0df35183f85233663a1fc(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Transitioning the radio from Sleep to Receive. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gabafa55f6423faf22382e9cc7f1e83c8e(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/group/radio-types#group__radio-types_1ga9199b7f0fe13ebcd0da2e3af71f04c40 aShortAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Set the alternate short address. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga57aa7975cb5976673803f7c038a2c660(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint32_t aMacFrameCounter)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the current MAC frame counter value. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga6410e09c828fa896d99c71b3f8193666(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint32_t aMacFrameCounter)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Sets the current MAC frame counter value only if the new value is larger than the current one. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga41431d49ad9a28e867ba559b375a2273(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint8_t aKeyIdMode, uint8_t aKeyIndex, const https://openthread.io/reference/struct/ot-mac-key *aPrevKey, const https://openthread.io/reference/struct/ot-mac-key *aCurrKey, const https://openthread.io/reference/struct/ot-mac-key *aNextKey)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Update MAC keys and key index. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gaa8ca1f5a609444c4118e7b4573428e2c(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, bool aEnable)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Enables or disables promiscuous mode. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gac75182c920b2d0a195c3ce1710ebac98(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gac3ea9fd14e987b944d223a6dbf6fecfd aCallback)` | `void` Sets the callback to be notified when the radio availability schedule is updated. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga9b4d383728f496a0d130703aaad79fe6(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga95c0792516103645b46cfc300f3b5ad1 aCallback)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Enables/disables the raw link-layer. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga71bbd65d56be925a7bb09f6fdb895cbc(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint16_t aShortAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Set the Short Address for address filtering. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gab47b2abf81c83a7e64fc44ab44d3b74d(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Transition the radio from Receive to Sleep. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gad30a60fe893b6f4090ab7d84486d7364(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-ext-address *aExtAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Adding extended address to the source match table. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gaf4732f078b55c0730e5dc3a6eda775ae(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint16_t aShortAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Adding short address to the source match table. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga0bafd3966d9febddd5968c1fe54d6b69(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Removing all the extended addresses from the source match table. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga40c3c234ee1cd60ea135ff7fd7717e68(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, const https://openthread.io/reference/struct/ot-ext-address *aExtAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Removing extended address to the source match table of the radio. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gaa3b46366dc08e292df6d28fb8d51fa67(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Removing all the short addresses from the source match table. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga70f84ddad9488c2d0612abef3959d28c(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, uint16_t aShortAddress)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Removing short address to the source match table. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga586cc7fd3a61b5221d02d510e56d8b3f(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, bool aEnable)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Enable/Disable source match for frame pending. |
| `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gac570fb0d97e8c97c1b6d16f60204a8d6(https://openthread.io/reference/group/api-instance#group__api-instance_1ga25440551213fb5b40869725378584960 *aInstance, https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga779020ae0bbe30931857849c1827d376 aCallback)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Begins the transmit sequence on the radio. |

## Typedefs

### otLinkRawEnergyScanDone

```
void(* otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
```
Pointer on receipt of a IEEE 802.15.4 frame.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aEnergyScanMaxRssi` The maximum RSSI encountered on the scanned channel.

### otLinkRawRadioAvailabilityUpdated

```
void(* otLinkRawRadioAvailabilityUpdated)(otInstance *aInstance)
```
Pointer is called when the radio availability schedule is updated.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance.

### otLinkRawReceiveDone

```
void(* otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
```
Pointer on receipt of a IEEE 802.15.4 frame.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aFrame` A pointer to the received frame or NULL if the receive operation was aborted. `[in] aError` OT_ERROR_NONE when successfully received a frame. OT_ERROR_ABORT when reception was aborted and a frame was not received.

### otLinkRawTransmitDone

```
void(* otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
```
Pointer on receipt of a IEEE 802.15.4 frame.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aFrame` A pointer to the frame that was transmitted. `[in] aAckFrame` A pointer to the ACK frame. `[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 when the transmission could not take place due to activity on the channel. OT_ERROR_ABORT when transmission was aborted for other reasons.

## Functions

### otLinkRawEnergyScan

```
otError otLinkRawEnergyScan(
  otInstance *aInstance,
  uint8_t aScanChannel,
  uint16_t aScanDuration,
  otLinkRawEnergyScanDone aCallback
)
```
Begins the energy scan sequence on the radio.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aScanChannel` The channel to perform the energy scan on. `[in] aScanDuration` The duration, in milliseconds, for the channel to be scanned. `[in] aCallback` A pointer to a function called on completion of a scanned channel. Return Values `OT_ERROR_NONE` Successfully started scanning the channel. `OT_ERROR_BUSY` The radio is performing energy scanning. `OT_ERROR_NOT_IMPLEMENTED` The radio doesn't support energy scanning. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawGetCaps

```
otRadioCaps otLinkRawGetCaps(
  otInstance *aInstance
)
```
Get the radio capabilities.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. **Returns** The radio capability bit vector. The stack enables or disables some functions based on this value.

### otLinkRawGetPromiscuous

```
bool otLinkRawGetPromiscuous(
  otInstance *aInstance
)
```
Gets the status of promiscuous mode.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `true` Promiscuous mode is enabled. `false` Promiscuous mode is disabled.

### otLinkRawGetRadioAvailability

```
otError otLinkRawGetRadioAvailability(
  otInstance *aInstance,
  otRadioAvailability *aAvailability
)
```
Gets the current radio availability schedule.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[out] aAvailability` A pointer to an `https://openthread.io/reference/struct/ot-radio-availability` structure to populate. Return Values `OT_ERROR_NONE` Successfully retrieved the radio availability schedule. `OT_ERROR_NOT_IMPLEMENTED` The radio platform does not support reporting radio availability.

### otLinkRawGetRadioTime

```
uint64_t otLinkRawGetRadioTime(
  otInstance *aInstance
)
```
Get current platform time (64bits width) of the radio chip.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. **Returns** The current radio time in microseconds.

### otLinkRawGetRssi

```
int8_t otLinkRawGetRssi(
  otInstance *aInstance
)
```
Get the most recent RSSI measurement.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. **Returns** The RSSI in dBm when it is valid. 127 when RSSI is invalid.

### otLinkRawGetTransmitBuffer

```
otRadioFrame * otLinkRawGetTransmitBuffer(
  otInstance *aInstance
)
```
The radio transitions from Transmit to Receive.

Returns a pointer to the transmit buffer.

The caller forms the IEEE 802.15.4 frame in this buffer then calls [otLinkRawTransmit()](https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1gac570fb0d97e8c97c1b6d16f60204a8d6) to request transmission.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. **Returns** A pointer to the transmit buffer or NULL if the raw link-layer isn't enabled.

### otLinkRawIsEnabled

```
bool otLinkRawIsEnabled(
  otInstance *aInstance
)
```
Indicates whether or not the raw link-layer is enabled.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `true` The raw link-layer is enabled. `false` The raw link-layer is disabled.

### otLinkRawReceive

```
otError otLinkRawReceive(
  otInstance *aInstance
)
```
Transitioning the radio from Sleep to Receive.

Turn on the radio.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `OT_ERROR_NONE` Successfully transitioned to Receive. `OT_ERROR_INVALID_STATE` The radio was disabled or transmitting.

### otLinkRawSetAlternateShortAddress

```
otError otLinkRawSetAlternateShortAddress(
  otInstance *aInstance,
  otShortAddress aShortAddress
)
```
Set the alternate short address.

This is an optional API. Support for this is indicated by including the capability `OT_RADIO_CAPS_ALT_SHORT_ADDR` in `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga05a209223a3a4fc59ab63b4d28342b6b`.

When supported, the radio will accept received frames destined to the specified alternate short address in addition to the short address provided in `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga71bbd65d56be925a7bb09f6fdb895cbc`.

The `aShortAddress` can be set to `OT_RADIO_INVALID_SHORT_ADDR` (0xfffe) to clear any previously set alternate short address.

<br />

Details Parameters `[in] aInstance` The OpenThread instance structure. `[in] aShortAddress` The alternate short address. `OT_RADIO_INVALID_SHORT_ADDR` to clear. Return Values `OT_ERROR_NONE` Successfully set the alternate short address. `OT_ERROR_INVALID_STATE` The raw link-layer is not enabled.

### otLinkRawSetMacFrameCounter

```
otError otLinkRawSetMacFrameCounter(
  otInstance *aInstance,
  uint32_t aMacFrameCounter
)
```
Sets the current MAC frame counter value.

Always sets the MAC counter to the new given value `aMacFrameCounter` independent of the current value.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aMacFrameCounter` The MAC frame counter value. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSetMacFrameCounterIfLarger

```
otError otLinkRawSetMacFrameCounterIfLarger(
  otInstance *aInstance,
  uint32_t aMacFrameCounter
)
```
Sets the current MAC frame counter value only if the new value is larger than the current one.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aMacFrameCounter` The MAC frame counter value. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSetMacKey

```
otError otLinkRawSetMacKey(
  otInstance *aInstance,
  uint8_t aKeyIdMode,
  uint8_t aKeyIndex,
  const otMacKey *aPrevKey,
  const otMacKey *aCurrKey,
  const otMacKey *aNextKey
)
```
Update MAC keys and key index.

The input `aKeyIdMode` parameter is ignored and is always treated as Key ID Mode 1. This API mirrors the `https://openthread.io/reference/group/radio-config#group__radio-config_1gaaa1b1d774ee14d68c57e38315fa5006f` platform API. See `https://openthread.io/reference/group/radio-config#group__radio-config_1gaaa1b1d774ee14d68c57e38315fa5006f` for more information on Key ID Mode.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aKeyIdMode` The key ID mode (ignored). `[in] aKeyIndex` The key index. `[in] aPrevKey` The previous MAC key. `[in] aCurrKey` The current MAC key. `[in] aNextKey` The next MAC key. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSetPromiscuous

```
otError otLinkRawSetPromiscuous(
  otInstance *aInstance,
  bool aEnable
)
```
Enables or disables promiscuous mode.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aEnable` A value to enable or disable promiscuous mode. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSetRadioAvailabilityUpdated

```
void otLinkRawSetRadioAvailabilityUpdated(
  otInstance *aInstance,
  otLinkRawRadioAvailabilityUpdated aCallback
)
```
Sets the callback to be notified when the radio availability schedule is updated.

The callback is invoked when the radio platform calls `https://openthread.io/reference/group/radio-operation#group__radio-operation_1gac1307666da574a4aa7fd93b129df8b9d`. The current schedule can then be retrieved by `https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga0b8ecd3d69aae1cab69074ff07bddb7a`.

The callback is independent of whether the raw link-layer is enabled. It is not cleared when the raw link-layer is disabled or when the radio stack is reset (see `https://openthread.io/reference/group/api-instance#group__api-instance_1ga4f8af5813a9d4cb03a966feae66a8233`).

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aCallback` A pointer to a function called when the radio availability is updated, or NULL to unregister.

### otLinkRawSetReceiveDone

```
otError otLinkRawSetReceiveDone(
  otInstance *aInstance,
  otLinkRawReceiveDone aCallback
)
```
Enables/disables the raw link-layer.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aCallback` A pointer to a function called on receipt of a IEEE 802.15.4 frame. NULL to disable the raw-link layer. Return Values `OT_ERROR_FAILED` The radio could not be enabled/disabled. `OT_ERROR_INVALID_STATE` If the OpenThread IPv6 interface is already enabled. `OT_ERROR_NONE` If the enable state was successfully set.

### otLinkRawSetShortAddress

```
otError otLinkRawSetShortAddress(
  otInstance *aInstance,
  uint16_t aShortAddress
)
```
Set the Short Address for address filtering.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aShortAddress` The IEEE 802.15.4 Short Address. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSleep

```
otError otLinkRawSleep(
  otInstance *aInstance
)
```
Transition the radio from Receive to Sleep.

Turn off the radio.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `OT_ERROR_NONE` Successfully transitioned to Sleep. `OT_ERROR_BUSY` The radio was transmitting `OT_ERROR_INVALID_STATE` The radio was disabled

### otLinkRawSrcMatchAddExtEntry

```
otError otLinkRawSrcMatchAddExtEntry(
  otInstance *aInstance,
  const otExtAddress *aExtAddress
)
```
Adding extended address to the source match table.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aExtAddress` The extended address to be added. Return Values `OT_ERROR_NONE` Successfully added extended address to the source match table. `OT_ERROR_NO_BUFS` No available entry in the source match table. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchAddShortEntry

```
otError otLinkRawSrcMatchAddShortEntry(
  otInstance *aInstance,
  uint16_t aShortAddress
)
```
Adding short address to the source match table.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aShortAddress` The short address to be added. Return Values `OT_ERROR_NONE` Successfully added short address to the source match table. `OT_ERROR_NO_BUFS` No available entry in the source match table. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchClearExtEntries

```
otError otLinkRawSrcMatchClearExtEntries(
  otInstance *aInstance
)
```
Removing all the extended addresses from the source match table.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchClearExtEntry

```
otError otLinkRawSrcMatchClearExtEntry(
  otInstance *aInstance,
  const otExtAddress *aExtAddress
)
```
Removing extended address to the source match table of the radio.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aExtAddress` The extended address to be removed. Return Values `OT_ERROR_NONE` Successfully removed the extended address from the source match table. `OT_ERROR_NO_ADDRESS` The extended address is not in source match table. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchClearShortEntries

```
otError otLinkRawSrcMatchClearShortEntries(
  otInstance *aInstance
)
```
Removing all the short addresses from the source match table.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchClearShortEntry

```
otError otLinkRawSrcMatchClearShortEntry(
  otInstance *aInstance,
  uint16_t aShortAddress
)
```
Removing short address to the source match table.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aShortAddress` The short address to be removed. Return Values `OT_ERROR_NONE` Successfully removed short address from the source match table. `OT_ERROR_NO_ADDRESS` The short address is not in source match table. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawSrcMatchEnable

```
otError otLinkRawSrcMatchEnable(
  otInstance *aInstance,
  bool aEnable
)
```
Enable/Disable source match for frame pending.

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aEnable` Enable/disable source match for frame pending. Return Values `OT_ERROR_NONE` If successful. `OT_ERROR_INVALID_STATE` If the raw link-layer isn't enabled.

### otLinkRawTransmit

```
otError otLinkRawTransmit(
  otInstance *aInstance,
  otLinkRawTransmitDone aCallback
)
```
Begins the transmit sequence on the radio.

The caller must form the IEEE 802.15.4 frame in the buffer provided by [otLinkRawGetTransmitBuffer()](https://openthread.io/reference/group/api-link-raw#group__api-link-raw_1ga57a3cd337cd7e56dae8958d3e3c8a917) before requesting transmission. The channel and transmit power are also included in the [otRadioFrame](https://openthread.io/reference/struct/ot-radio-frame) structure.

The transmit sequence consists of:

1. Transitioning the radio to Transmit from Receive.
2. Transmits the PSDU on the given channel and at the given transmit power.

<br />

<br />

Details Parameters `[in] aInstance` A pointer to an OpenThread instance. `[in] aCallback` A pointer to a function called on completion of the transmission. Return Values `OT_ERROR_NONE` Successfully transitioned to Transmit. `OT_ERROR_INVALID_STATE` The radio was not in the Receive state.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).