or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

dashboards.mddevices.mdindex.mdlora.mdproperties.mdseries.mdthings.md

lora.mddocs/

0

# LoRa Connectivity

1

2

LoRa device management and frequency plan configuration for long-range IoT applications. Supports LoRaWAN device registration, management, and regional frequency plan selection.

3

4

## Core Imports

5

6

```python

7

from iot_api_client.api import (

8

LoraDevicesV1Api,

9

LoraFreqPlanV1Api,

10

NetworkCredentialsV1Api

11

)

12

from iot_api_client.models import (

13

CreateLoraDevicesV1Payload,

14

ArduinoLoradevicev1,

15

ArduinoLorafreqplanv1,

16

ArduinoLorafreqplansv1,

17

ArduinoCredentialsv1

18

)

19

```

20

21

## Capabilities

22

23

### LoRa Device Management

24

25

Create and manage LoRaWAN devices for long-range communication.

26

27

```python { .api }

28

class LoraDevicesV1Api:

29

def lora_devices_v1_create(self, create_lora_devices_v1_payload: CreateLoraDevicesV1Payload, x_organization: str = None) -> ArduinoLoradevicev1:

30

"""

31

Create a new LoRa device.

32

33

Args:

34

create_lora_devices_v1_payload: LoRa device creation payload

35

x_organization: Organization ID for organization-level access

36

37

Returns:

38

ArduinoLoradevicev1: Created LoRa device object

39

"""

40

41

def lora_devices_v1_list(self, x_organization: str = None) -> List[ArduinoLoradevicev1]:

42

"""

43

Returns the list of LoRa devices.

44

45

Args:

46

x_organization: Organization ID for organization-level access

47

48

Returns:

49

List[ArduinoLoradevicev1]: List of LoRa device objects

50

"""

51

52

def lora_devices_v1_show(self, id: str, x_organization: str = None) -> ArduinoLoradevicev1:

53

"""

54

Show LoRa device details.

55

56

Args:

57

id: LoRa device ID

58

x_organization: Organization ID for organization-level access

59

60

Returns:

61

ArduinoLoradevicev1: LoRa device object

62

"""

63

```

64

65

### Frequency Plan Management

66

67

Manage LoRaWAN frequency plans for different regions and regulatory requirements.

68

69

```python { .api }

70

class LoraFreqPlanV1Api:

71

def lora_freq_plan_v1_list(self) -> ArduinoLorafreqplansv1:

72

"""

73

List available LoRa frequency plans.

74

75

Returns:

76

ArduinoLorafreqplansv1: Available frequency plans

77

"""

78

```

79

80

### Network Credentials

81

82

Manage network credentials for LoRaWAN connectivity.

83

84

```python { .api }

85

class NetworkCredentialsV1Api:

86

def network_credentials_v1_show(self, connection: str, type: str = None) -> ArduinoCredentialsv1:

87

"""

88

Show network credentials for a specific connection.

89

90

Args:

91

connection: Connection identifier

92

type: Credential type filter

93

94

Returns:

95

ArduinoCredentialsv1: Network credentials

96

"""

97

```

98

99

## Usage Examples

100

101

### Creating a LoRa Device

102

103

```python

104

from iot_api_client.models import CreateLoraDevicesV1Payload

105

106

# Create a new LoRa device

107

lora_device_payload = CreateLoraDevicesV1Payload(

108

name="LoRa Sensor Node",

109

device_eui="1234567890ABCDEF",

110

app_eui="FEDCBA0987654321",

111

app_key="00112233445566778899AABBCCDDEEFF",

112

frequency_plan="EU_863_870",

113

serial="LORA001"

114

)

115

116

lora_device = lora_devices_api.lora_devices_v1_create(lora_device_payload)

117

print(f"Created LoRa device: {lora_device.name} (ID: {lora_device.id})")

118

```

119

120

### Listing LoRa Devices

121

122

```python

123

# Get all LoRa devices

124

lora_devices = lora_devices_api.lora_devices_v1_list()

125

126

for device in lora_devices:

127

print(f"Device: {device.name}")

128

print(f" EUI: {device.device_eui}")

129

print(f" Frequency Plan: {device.frequency_plan}")

130

print(f" Status: {device.last_seen_at}")

131

```

132

133

### Getting Available Frequency Plans

134

135

```python

136

# List available frequency plans

137

freq_plans = lora_freq_plan_api.lora_freq_plan_v1_list()

138

139

print("Available LoRa Frequency Plans:")

140

for plan in freq_plans.freq_plans:

141

print(f" {plan.id}: {plan.name}")

142

print(f" Region: {plan.region}")

143

print(f" Bands: {', '.join(plan.bands)}")

144

```

145

146

### Retrieving Network Credentials

147

148

```python

149

# Get network credentials for LoRa connection

150

credentials = network_credentials_api.network_credentials_v1_show(

151

connection="lora-connection-id"

152

)

153

154

print(f"Connection Type: {credentials.type}")

155

print(f"Endpoint: {credentials.endpoint}")

156

```

157

158

## Types

159

160

```python { .api }

161

class CreateLoraDevicesV1Payload:

162

app_eui: str

163

app_key: str

164

device_eui: str

165

frequency_plan: str

166

name: str

167

serial: str

168

169

class ArduinoLoradevicev1:

170

app_eui: str

171

app_key: str

172

connection_type: str

173

created_at: datetime

174

device_eui: str

175

frequency_plan: str

176

href: str

177

id: str

178

last_seen_at: datetime

179

name: str

180

organization_id: str

181

serial: str

182

type: str

183

user_id: str

184

185

class ArduinoLorafreqplansv1:

186

freq_plans: List[ArduinoLorafreqplanv1]

187

188

class ArduinoLorafreqplanv1:

189

bands: List[str]

190

id: str

191

name: str

192

region: str

193

194

class ArduinoCredentialsv1:

195

endpoint: str

196

secret: str

197

type: str

198

```

199

200

## Regional Frequency Plans

201

202

Common LoRaWAN frequency plans by region:

203

204

- **Europe**: `EU_863_870` - 863-870 MHz band

205

- **North America**: `US_902_928` - 902-928 MHz band

206

- **Asia Pacific**: `AS_923` - 923 MHz band

207

- **Australia**: `AU_915_928` - 915-928 MHz band

208

- **India**: `IN_865_867` - 865-867 MHz band

209

- **Korea**: `KR_920_923` - 920-923 MHz band

210

- **Russia**: `RU_864_870` - 864-870 MHz band

211

212

## LoRaWAN Device Classes

213

214

LoRaWAN supports three device classes:

215

216

- **Class A**: Bi-directional communication with scheduled receive windows

217

- **Class B**: Bi-directional with scheduled receive slots synchronized with gateway beacons

218

- **Class C**: Bi-directional with maximal receive slots (nearly continuous listening)

219

220

Most battery-powered IoT devices use Class A for optimal power consumption.