Developer World
Spresense SDK Library v3.3.0-375c679
lte_ioctl.h
1/****************************************************************************
2 * include/nuttx/wireless/lte/lte_ioctl.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
20
21#ifndef __INCLUDE_NUTTX_WIRELESS_LTE_LTE_IOCTL_H
22#define __INCLUDE_NUTTX_WIRELESS_LTE_LTE_IOCTL_H
23
24/****************************************************************************
25 * Included Files
26 ****************************************************************************/
27
28#include <stdint.h>
29#include <stdbool.h>
30#include <sys/types.h>
31#include <nuttx/fs/ioctl.h>
32#include <nuttx/net/sms.h>
33#include <nuttx/wireless/wireless.h>
34
35/****************************************************************************
36 * Pre-processor Definitions
37 ****************************************************************************/
38
39/* LTE network device IOCTL commands. */
40
41/* SIOCLTECMD
42 * Description: Perform LTE command
43 */
44
45#define SIOCLTECMD _LTEIOC(0)
46
47/* SIOCSMSENSTREP
48 * Description: Enable or disable the function to confirm whether or not
49 * the SMS has been delivered to the destination device.
50 */
51
52#define SIOCSMSENSTREP _LTEIOC(1)
53
54/* SIOCSMSGREFID
55 * Description: Obtain the ID associated with the submitted SMS.
56 * If the submitted SMS is a concatenated SMS, multiple IDs
57 * will be obtained;
58 * otherwise, a single ID will be obtained.
59 */
60
61#define SIOCSMSGREFID _LTEIOC(2)
62
63/* SIOCSMSSSCA
64 * Description: Set the service center address of the destination.
65 */
66
67#define SIOCSMSSSCA _LTEIOC(3)
68
69/* for cmdid */
70
71#define _CMDOPT_LSB (28)
72#define _CMDOPT_MASK (0xf << (_CMDOPT_LSB))
73#define _CMDGRP_LSB (24)
74#define _CMDGRP_MASK (0xf << (_CMDGRP_LSB))
75#define _CMDGRP_SHIFT(nr) ((nr) << (_CMDGRP_LSB))
76#define _CMDGRP_NORMAL(nr) (_CMDGRP_SHIFT(0) | (nr))
77#define _CMDGRP_EVENT(nr) (_CMDGRP_SHIFT(1) | (nr))
78#define _CMDGRP_NOMDM(nr) (_CMDGRP_SHIFT(2) | (nr))
79#define _CMDGRP_POWER(nr) (_CMDGRP_SHIFT(3) | (nr))
80#define _CMDGRP_FWUPDATE(nr) (_CMDGRP_SHIFT(4) | (nr))
81#define _CMDGRP_EXTEND(nr) (_CMDGRP_SHIFT(5) | (nr))
82#define _CMDGRP_LWM2M(nr) (_CMDGRP_SHIFT(6) | (nr))
83#define LTE_CMDOPT_ASYNC_BIT (0x1 << (_CMDOPT_LSB))
84#define LTE_IS_ASYNC_CMD(cid) ((cid) & LTE_CMDOPT_ASYNC_BIT)
85#define LTE_PURE_CMDID(cid) ((cid) & ~LTE_CMDOPT_ASYNC_BIT)
86#define LTE_ISCMDGRP_NORMAL(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_NORMAL(0))
87#define LTE_ISCMDGRP_EVENT(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_EVENT(0))
88#define LTE_ISCMDGRP_NOMDM(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_NOMDM(0))
89#define LTE_ISCMDGRP_POWER(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_POWER(0))
90#define LTE_ISCMDGRP_FWUPDATE(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_FWUPDATE(0))
91#define LTE_ISCMDGRP_EXTEND(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_EXTEND(0))
92#define LTE_ISCMDGRP_LWM2M(cmd) ((cmd & _CMDGRP_MASK) == _CMDGRP_LWM2M(0))
93
94#define LTE_CMDID_POWERON _CMDGRP_POWER(0x00)
95#define LTE_CMDID_POWEROFF _CMDGRP_POWER(0x01)
96#define LTE_CMDID_FIN _CMDGRP_POWER(0x02)
97#define LTE_CMDID_SETEVTCTX _CMDGRP_NOMDM(0x03)
98#define LTE_CMDID_SETRESTART _CMDGRP_NOMDM(0x04)
99#define LTE_CMDID_GETERRINFO _CMDGRP_NOMDM(0x05)
100#define LTE_CMDID_GETVER _CMDGRP_NORMAL(0x06)
101#define LTE_CMDID_RADIOON _CMDGRP_NORMAL(0x07)
102#define LTE_CMDID_RADIOOFF _CMDGRP_NORMAL(0x08)
103#define LTE_CMDID_ACTPDN _CMDGRP_NORMAL(0x09)
104#define LTE_CMDID_ACTPDNCAN _CMDGRP_NORMAL(0x0a)
105#define LTE_CMDID_DEACTPDN _CMDGRP_NORMAL(0x0b)
106#define LTE_CMDID_GETNETINFO _CMDGRP_NORMAL(0x0c)
107#define LTE_CMDID_IMSCAP _CMDGRP_NORMAL(0x0d)
108#define LTE_CMDID_GETPHONE _CMDGRP_NORMAL(0x0e)
109#define LTE_CMDID_GETIMSI _CMDGRP_NORMAL(0x0f)
110#define LTE_CMDID_GETIMEI _CMDGRP_NORMAL(0x10)
111#define LTE_CMDID_GETPINSET _CMDGRP_NORMAL(0x11)
112#define LTE_CMDID_PINENABLE _CMDGRP_NORMAL(0x12)
113#define LTE_CMDID_CHANGEPIN _CMDGRP_NORMAL(0x13)
114#define LTE_CMDID_ENTERPIN _CMDGRP_NORMAL(0x14)
115#define LTE_CMDID_GETLTIME _CMDGRP_NORMAL(0x15)
116#define LTE_CMDID_GETOPER _CMDGRP_NORMAL(0x16)
117#define LTE_CMDID_GETEDRX _CMDGRP_NORMAL(0x17)
118#define LTE_CMDID_SETEDRX _CMDGRP_NORMAL(0x18)
119#define LTE_CMDID_GETPSM _CMDGRP_NORMAL(0x19)
120#define LTE_CMDID_SETPSM _CMDGRP_NORMAL(0x1a)
121#define LTE_CMDID_GETCE _CMDGRP_NORMAL(0x1b)
122#define LTE_CMDID_SETCE _CMDGRP_NORMAL(0x1c)
123#define LTE_CMDID_GETSIMINFO _CMDGRP_NORMAL(0x1d)
124#define LTE_CMDID_GETCEDRX _CMDGRP_NORMAL(0x1e)
125#define LTE_CMDID_GETCPSM _CMDGRP_NORMAL(0x1f)
126#define LTE_CMDID_GETQUAL _CMDGRP_NORMAL(0x20)
127#define LTE_CMDID_GETCELL _CMDGRP_NORMAL(0x21)
128#define LTE_CMDID_GETRAT _CMDGRP_NORMAL(0x22)
129#define LTE_CMDID_SETRAT _CMDGRP_NORMAL(0x23)
130#define LTE_CMDID_GETRATINFO _CMDGRP_NORMAL(0x24)
131#define LTE_CMDID_REPNETINFO _CMDGRP_EVENT(0x25)
132#define LTE_CMDID_REPSIMSTAT _CMDGRP_EVENT(0x26)
133#define LTE_CMDID_REPLTIME _CMDGRP_EVENT(0x27)
134#define LTE_CMDID_REPQUAL _CMDGRP_EVENT(0x28)
135#define LTE_CMDID_REPCELL _CMDGRP_EVENT(0x29)
136#define LTE_CMDID_SAVEAPN _CMDGRP_NOMDM(0x2a)
137#define LTE_CMDID_GETAPN _CMDGRP_NOMDM(0x2b)
138#define LTE_CMDID_TAKEWLOCK _CMDGRP_POWER(0x2c)
139#define LTE_CMDID_GIVEWLOCK _CMDGRP_POWER(0x2d)
140#define LTE_CMDID_SENDATCMD _CMDGRP_NORMAL(0x2e)
141#define LTE_CMDID_INJECTIMAGE _CMDGRP_FWUPDATE(0x2f)
142#define LTE_CMDID_GETIMAGELEN _CMDGRP_FWUPDATE(0x30)
143#define LTE_CMDID_EXEUPDATE _CMDGRP_FWUPDATE(0x31)
144#define LTE_CMDID_GETUPDATERES _CMDGRP_NORMAL(0x32)
145#define LTE_CMDID_FACTORY_RESET _CMDGRP_EXTEND(0x33)
146#define LTE_CMDID_SAVE_LOG _CMDGRP_NORMAL(0x34)
147#define LTE_CMDID_GET_LOGLIST _CMDGRP_NORMAL(0x35)
148#define LTE_CMDID_LOGOPEN _CMDGRP_NORMAL(0x36)
149#define LTE_CMDID_LOGCLOSE _CMDGRP_NORMAL(0x37)
150#define LTE_CMDID_LOGREAD _CMDGRP_NORMAL(0x38)
151#define LTE_CMDID_LOGLSEEK _CMDGRP_NORMAL(0x39)
152#define LTE_CMDID_LOGREMOVE _CMDGRP_NORMAL(0x3a)
153#define LTE_CMDID_STOPAPI _CMDGRP_NORMAL(0x3b)
154#define LTE_CMDID_SUSPEND _CMDGRP_NORMAL(0x3c)
155#define LTE_CMDID_RESUME _CMDGRP_NORMAL(0x3d)
156#define LTE_CMDID_RETRYDISABLE _CMDGRP_POWER(0x3e)
157#define LTE_CMDID_GET_POWER_STAT _CMDGRP_POWER(0x3f)
158#define LTE_CMDID_SETCTXCB _CMDGRP_NOMDM(0x40)
159#define LTE_CMDID_COUNTWLOCK _CMDGRP_POWER(0x41)
160#define LTE_CMDID_REPEVT_DUMMY _CMDGRP_EVENT(0x42)
161#define LTE_CMDID_RESTARTAPI _CMDGRP_NORMAL(0x43)
162
163#define LTE_CMDID_ACCEPT _CMDGRP_NORMAL(0x50)
164#define LTE_CMDID_BIND _CMDGRP_NORMAL(0x51)
165#define LTE_CMDID_CLOSE _CMDGRP_NORMAL(0x52)
166#define LTE_CMDID_CONNECT _CMDGRP_NORMAL(0x53)
167#define LTE_CMDID_FCNTL _CMDGRP_NORMAL(0x54)
168#define LTE_CMDID_GETADDRINFO _CMDGRP_NORMAL(0x55)
169#define LTE_CMDID_GETHOSTBYNAME _CMDGRP_NORMAL(0x56)
170#define LTE_CMDID_GETHOSTBYNAMER _CMDGRP_NORMAL(0x57)
171#define LTE_CMDID_GETSOCKNAME _CMDGRP_NORMAL(0x58)
172#define LTE_CMDID_GETSOCKOPT _CMDGRP_NORMAL(0x59)
173#define LTE_CMDID_LISTEN _CMDGRP_NORMAL(0x5a)
174#define LTE_CMDID_RECV _CMDGRP_NORMAL(0x5b)
175#define LTE_CMDID_RECVFROM _CMDGRP_NORMAL(0x5c)
176#define LTE_CMDID_SELECT _CMDGRP_NORMAL(0x5d)
177#define LTE_CMDID_SEND _CMDGRP_NORMAL(0x5e)
178#define LTE_CMDID_SENDTO _CMDGRP_NORMAL(0x5f)
179#define LTE_CMDID_SHUTDOWN _CMDGRP_NORMAL(0x60)
180#define LTE_CMDID_SOCKET _CMDGRP_NORMAL(0x61)
181#define LTE_CMDID_SETSOCKOPT _CMDGRP_NORMAL(0x62)
182
183#define LTE_CMDID_SMS_INIT _CMDGRP_NORMAL(0x65)
184#define LTE_CMDID_SMS_FIN _CMDGRP_NORMAL(0x66)
185#define LTE_CMDID_SMS_SEND _CMDGRP_NORMAL(0x67)
186#define LTE_CMDID_SMS_DELETE _CMDGRP_NORMAL(0x68)
187#define LTE_CMDID_SMS_REPORT_RECV _CMDGRP_EVENT(0x69)
188
189#define LTE_CMDID_TLS_SSL_INIT _CMDGRP_NORMAL(0x80)
190#define LTE_CMDID_TLS_SSL_FREE _CMDGRP_NORMAL(0x81)
191#define LTE_CMDID_TLS_SSL_SETUP _CMDGRP_NORMAL(0x82)
192#define LTE_CMDID_TLS_SSL_HOSTNAME _CMDGRP_NORMAL(0x83)
193#define LTE_CMDID_TLS_SSL_BIO _CMDGRP_NORMAL(0x84)
194#define LTE_CMDID_TLS_SSL_HANDSHAKE _CMDGRP_NORMAL(0x85)
195#define LTE_CMDID_TLS_SSL_WRITE _CMDGRP_NORMAL(0x86)
196#define LTE_CMDID_TLS_SSL_READ _CMDGRP_NORMAL(0x87)
197#define LTE_CMDID_TLS_SSL_CLOSE_NOTIFY _CMDGRP_NORMAL(0x88)
198#define LTE_CMDID_TLS_SSL_VERSION _CMDGRP_NORMAL(0x89)
199#define LTE_CMDID_TLS_SSL_CIPHERSUITE _CMDGRP_NORMAL(0x8a)
200#define LTE_CMDID_TLS_SSL_CIPHERSUITE_ID _CMDGRP_NORMAL(0x8b)
201#define LTE_CMDID_TLS_SSL_RECORD_EXPANSION _CMDGRP_NORMAL(0x8c)
202#define LTE_CMDID_TLS_SSL_VERIFY_RESULT _CMDGRP_NORMAL(0x8d)
203#define LTE_CMDID_TLS_SSL_TIMER_CB _CMDGRP_NORMAL(0x8e)
204#define LTE_CMDID_TLS_SSL_PEER_CERT _CMDGRP_NORMAL(0x8f)
205#define LTE_CMDID_TLS_SSL_BYTES_AVAIL _CMDGRP_NORMAL(0x90)
206#define LTE_CMDID_TLS_CONFIG_INIT _CMDGRP_NORMAL(0x91)
207#define LTE_CMDID_TLS_CONFIG_FREE _CMDGRP_NORMAL(0x92)
208#define LTE_CMDID_TLS_CONFIG_DEFAULTS _CMDGRP_NORMAL(0x93)
209#define LTE_CMDID_TLS_CONFIG_AUTHMODE _CMDGRP_NORMAL(0x94)
210#define LTE_CMDID_TLS_CONFIG_RNG _CMDGRP_NORMAL(0x95)
211#define LTE_CMDID_TLS_CONFIG_CA_CHAIN _CMDGRP_NORMAL(0x96)
212#define LTE_CMDID_TLS_CONFIG_OWN_CERT _CMDGRP_NORMAL(0x97)
213#define LTE_CMDID_TLS_CONFIG_READ_TIMEOUT _CMDGRP_NORMAL(0x98)
214#define LTE_CMDID_TLS_CONFIG_VERIFY _CMDGRP_EVENT(0x99)
215#define LTE_CMDID_TLS_CONFIG_VERIFY_CALLBACK _CMDGRP_NORMAL(0x9a)
216#define LTE_CMDID_TLS_CONFIG_ALPN_PROTOCOLS _CMDGRP_NORMAL(0x9b)
217#define LTE_CMDID_TLS_CONFIG_CIPHERSUITES _CMDGRP_NORMAL(0x9c)
218#define LTE_CMDID_TLS_SESSION_INIT _CMDGRP_NORMAL(0x9d)
219#define LTE_CMDID_TLS_SESSION_FREE _CMDGRP_NORMAL(0x9e)
220#define LTE_CMDID_TLS_SESSION_GET _CMDGRP_NORMAL(0x9f)
221#define LTE_CMDID_TLS_SESSION_SET _CMDGRP_NORMAL(0xa0)
222#define LTE_CMDID_TLS_SESSION_RESET _CMDGRP_NORMAL(0xa1)
223#define LTE_CMDID_TLS_X509_CRT_INIT _CMDGRP_NORMAL(0xa2)
224#define LTE_CMDID_TLS_X509_CRT_FREE _CMDGRP_NORMAL(0xa3)
225#define LTE_CMDID_TLS_X509_CRT_PARSE_FILE _CMDGRP_NORMAL(0xa4)
226#define LTE_CMDID_TLS_X509_CRT_PARSE_DER _CMDGRP_NORMAL(0xa5)
227#define LTE_CMDID_TLS_X509_CRT_PARSE _CMDGRP_NORMAL(0xa6)
228#define LTE_CMDID_TLS_X509_CRT_INFO _CMDGRP_NORMAL(0xa7)
229#define LTE_CMDID_TLS_X509_CRT_VERIFY_INFO _CMDGRP_NORMAL(0xa8)
230#define LTE_CMDID_TLS_PK_INIT _CMDGRP_NORMAL(0xa9)
231#define LTE_CMDID_TLS_PK_FREE _CMDGRP_NORMAL(0xaa)
232#define LTE_CMDID_TLS_PK_PARSE_KEYFILE _CMDGRP_NORMAL(0xab)
233#define LTE_CMDID_TLS_PK_PARSE_KEY _CMDGRP_NORMAL(0xac)
234#define LTE_CMDID_TLS_PK_CHECK_PAIR _CMDGRP_NORMAL(0xad)
235#define LTE_CMDID_TLS_PK_SETUP _CMDGRP_NORMAL(0xae)
236#define LTE_CMDID_TLS_PK_INFO_FROM_TYPE _CMDGRP_NORMAL(0xaf)
237#define LTE_CMDID_TLS_PK_WRITE_KEY_PEM _CMDGRP_NORMAL(0xb0)
238#define LTE_CMDID_TLS_PK_WRITE_KEY_DER _CMDGRP_NORMAL(0xb1)
239#define LTE_CMDID_TLS_PK_RSA _CMDGRP_NORMAL(0xb2)
240#define LTE_CMDID_TLS_CTR_DRBG_INIT _CMDGRP_NORMAL(0xb3)
241#define LTE_CMDID_TLS_CTR_DRBG_FREE _CMDGRP_NORMAL(0xb4)
242#define LTE_CMDID_TLS_CTR_DRBG_SEED _CMDGRP_NORMAL(0xb5)
243#define LTE_CMDID_TLS_ENTROPY_INIT _CMDGRP_NORMAL(0xb6)
244#define LTE_CMDID_TLS_ENTROPY_FREE _CMDGRP_NORMAL(0xb7)
245#define LTE_CMDID_TLS_CIPHER_INIT _CMDGRP_NORMAL(0xb8)
246#define LTE_CMDID_TLS_CIPHER_FREE _CMDGRP_NORMAL(0xb9)
247#define LTE_CMDID_TLS_CIPHER_INFO_FROM_STRING _CMDGRP_NORMAL(0xba)
248#define LTE_CMDID_TLS_CIPHER_SETUP _CMDGRP_NORMAL(0xbb)
249#define LTE_CMDID_TLS_CIPHER_SETKEY _CMDGRP_NORMAL(0xbc)
250#define LTE_CMDID_TLS_CIPHER_SET_IV _CMDGRP_NORMAL(0xbd)
251#define LTE_CMDID_TLS_CIPHER_UPDATE _CMDGRP_NORMAL(0xbe)
252#define LTE_CMDID_TLS_MD_INFO_FROM_TYPE _CMDGRP_NORMAL(0xbf)
253#define LTE_CMDID_TLS_MD_GET_SIZE _CMDGRP_NORMAL(0xc0)
254#define LTE_CMDID_TLS_MD _CMDGRP_NORMAL(0xc1)
255#define LTE_CMDID_TLS_MD_DIGEST _CMDGRP_NORMAL(0xc2)
256#define LTE_CMDID_TLS_BASE64_ENCODE _CMDGRP_NORMAL(0xc3)
257#define LTE_CMDID_TLS_SHA1 _CMDGRP_NORMAL(0xc4)
258#define LTE_CMDID_TLS_SSL_EXPORT_SRTP_KEYS _CMDGRP_NORMAL(0xc5)
259#define LTE_CMDID_TLS_SSL_USE_SRTP _CMDGRP_NORMAL(0xc6)
260#define LTE_CMDID_TLS_SSL_SRTP_PROFILE _CMDGRP_NORMAL(0xc7)
261#define LTE_CMDID_TLS_SSL_TURN _CMDGRP_NORMAL(0xc8)
262#define LTE_CMDID_TLS_MPI_INIT _CMDGRP_NORMAL(0xc9)
263#define LTE_CMDID_TLS_MPI_FREE _CMDGRP_NORMAL(0xca)
264#define LTE_CMDID_TLS_MPI_READ_STRING _CMDGRP_NORMAL(0xcb)
265#define LTE_CMDID_TLS_MPI_WRITE_STRING _CMDGRP_NORMAL(0xcc)
266#define LTE_CMDID_TLS_X509_CSR_INIT _CMDGRP_NORMAL(0xcd)
267#define LTE_CMDID_TLS_X509_CSR_FREE _CMDGRP_NORMAL(0xce)
268#define LTE_CMDID_TLS_X509_CSR_PARSE_FILE _CMDGRP_NORMAL(0xcf)
269#define LTE_CMDID_TLS_X509_CSR_PARSE_DER _CMDGRP_NORMAL(0xd0)
270#define LTE_CMDID_TLS_X509_CSR_PARSE _CMDGRP_NORMAL(0xd1)
271#define LTE_CMDID_TLS_X509_DN_GETS_CRT _CMDGRP_NORMAL(0xd2)
272#define LTE_CMDID_TLS_X509_DN_GETS_CSR _CMDGRP_NORMAL(0xd3)
273#define LTE_CMDID_TLS_X509WRITE_CRT_INIT _CMDGRP_NORMAL(0xd4)
274#define LTE_CMDID_TLS_X509WRITE_CRT_FREE _CMDGRP_NORMAL(0xd5)
275#define LTE_CMDID_TLS_X509WRITE_CRT_DER _CMDGRP_NORMAL(0xd6)
276#define LTE_CMDID_TLS_X509WRITE_CRT_PEM _CMDGRP_NORMAL(0xd7)
277#define LTE_CMDID_TLS_X509WRITE_CRT_SUBJECT_KEY _CMDGRP_NORMAL(0xd8)
278#define LTE_CMDID_TLS_X509WRITE_CRT_ISSUER_KEY _CMDGRP_NORMAL(0xd9)
279#define LTE_CMDID_TLS_X509WRITE_CRT_SUBJECT_NAME _CMDGRP_NORMAL(0xda)
280#define LTE_CMDID_TLS_X509WRITE_CRT_ISSUER_NAME _CMDGRP_NORMAL(0xdb)
281#define LTE_CMDID_TLS_X509WRITE_CRT_VERSION _CMDGRP_NORMAL(0xdc)
282#define LTE_CMDID_TLS_X509WRITE_CRT_MD_ALG _CMDGRP_NORMAL(0xdd)
283#define LTE_CMDID_TLS_X509WRITE_CRT_SERIAL _CMDGRP_NORMAL(0xde)
284#define LTE_CMDID_TLS_X509WRITE_CRT_VALIDITY _CMDGRP_NORMAL(0xdf)
285#define LTE_CMDID_TLS_X509WRITE_CRT_CONSTRAINTS _CMDGRP_NORMAL(0xe0)
286#define LTE_CMDID_TLS_X509WRITE_CRT_SUBJECT_ID _CMDGRP_NORMAL(0xe1)
287#define LTE_CMDID_TLS_X509WRITE_CRT_AUTHORITY_ID _CMDGRP_NORMAL(0xe2)
288#define LTE_CMDID_TLS_X509WRITE_CRT_KEY_USAGE _CMDGRP_NORMAL(0xe3)
289#define LTE_CMDID_TLS_X509WRITE_CRT_NS_CERT_TYPE _CMDGRP_NORMAL(0xe4)
290#define LTE_CMDID_TLS_RSA_INIT _CMDGRP_NORMAL(0xe5)
291#define LTE_CMDID_TLS_RSA_FREE _CMDGRP_NORMAL(0xe6)
292#define LTE_CMDID_TLS_RSA_GEN_KEY _CMDGRP_NORMAL(0xe7)
293
294/* for LwM2M stub */
295
296#define LTE_CMDID_LWM2M_URC_DUMMY _CMDGRP_EVENT(0x0101)
297#define LTE_CMDID_LWM2M_READ_EVT _CMDGRP_EVENT(0x0102)
298#define LTE_CMDID_LWM2M_WRITE_EVT _CMDGRP_EVENT(0x0103)
299#define LTE_CMDID_LWM2M_EXEC_EVT _CMDGRP_EVENT(0x0104)
300#define LTE_CMDID_LWM2M_OVSTART_EVT _CMDGRP_EVENT(0x0105)
301#define LTE_CMDID_LWM2M_OVSTOP_EVT _CMDGRP_EVENT(0x0106)
302#define LTE_CMDID_LWM2M_SERVEROP_EVT _CMDGRP_EVENT(0x0107)
303#define LTE_CMDID_LWM2M_FWUP_EVT _CMDGRP_EVENT(0x0108)
304
305#define LTE_CMDID_LWM2M_GETEP _CMDGRP_LWM2M(0x0109)
306#define LTE_CMDID_LWM2M_SETEP _CMDGRP_LWM2M(0x010A)
307#define LTE_CMDID_LWM2M_GETSRVNUM _CMDGRP_LWM2M(0x010B)
308#define LTE_CMDID_LWM2M_GETSRVINFO _CMDGRP_LWM2M(0x010C)
309#define LTE_CMDID_LWM2M_SETSRVINFO _CMDGRP_LWM2M(0x010D)
310#define LTE_CMDID_LWM2M_GETACTIVEOBJNUM _CMDGRP_LWM2M(0x010E)
311#define LTE_CMDID_LWM2M_GETACTIVEOBJ _CMDGRP_LWM2M(0x010F)
312#define LTE_CMDID_LWM2M_SETACTIVEOBJ _CMDGRP_LWM2M(0x0110)
313#define LTE_CMDID_LWM2M_APPLY_SETTING _CMDGRP_LWM2M(0x0111)
314#define LTE_CMDID_LWM2M_GETOBJRESNUM _CMDGRP_LWM2M(0x0112)
315#define LTE_CMDID_LWM2M_GETOBJRESOURCE _CMDGRP_LWM2M(0x0113)
316#define LTE_CMDID_LWM2M_SETOBJRESOURCE _CMDGRP_LWM2M(0x0114)
317
318#define LTE_CMDID_LWM2M_CONNECT _CMDGRP_LWM2M(0x0115)
319#define LTE_CMDID_LWM2M_READRESP _CMDGRP_LWM2M(0x0116)
320#define LTE_CMDID_LWM2M_WRITERESP _CMDGRP_LWM2M(0x0117)
321#define LTE_CMDID_LWM2M_OBSERVERESP _CMDGRP_LWM2M(0x0118)
322#define LTE_CMDID_LWM2M_EXECRESP _CMDGRP_LWM2M(0x0119)
323#define LTE_CMDID_LWM2M_OBSERVEUPDATE _CMDGRP_LWM2M(0x011A)
324
325#define LTE_CMDID_LWM2M_CHANGERAT _CMDGRP_LWM2M(0x011B)
326#define LTE_CMDID_LWM2M_GETRAT _CMDGRP_LWM2M(0x011C)
327
328#define LTE_CMDID_LWM2M_GETQMODE _CMDGRP_LWM2M(0x011D)
329#define LTE_CMDID_LWM2M_SETQMODE _CMDGRP_LWM2M(0x011E)
330
331#define IS_LWM2M_EVENT(cid) (\
332 ((cid) == LTE_CMDID_LWM2M_READ_EVT) || \
333 ((cid) == LTE_CMDID_LWM2M_WRITE_EVT) || \
334 ((cid) == LTE_CMDID_LWM2M_EXEC_EVT) || \
335 ((cid) == LTE_CMDID_LWM2M_OVSTART_EVT) || \
336 ((cid) == LTE_CMDID_LWM2M_OVSTOP_EVT) || \
337 ((cid) == LTE_CMDID_LWM2M_SERVEROP_EVT) || \
338 ((cid) == LTE_CMDID_LWM2M_FWUP_EVT) )
339
340#define IS_LTE_REPORT_EVENT(cid) (\
341 ((cid) == LTE_CMDID_REPNETINFO) || \
342 ((cid) == LTE_CMDID_REPSIMSTAT) || \
343 ((cid) == LTE_CMDID_REPLTIME) || \
344 ((cid) == LTE_CMDID_REPQUAL) || \
345 ((cid) == LTE_CMDID_REPCELL) )
346
347/****************************************************************************
348 * Public Types
349 ****************************************************************************/
350
351typedef void (*lte_evthndl_t)(uint64_t evtbitmap);
352
353/* for SIOCLTECMD IOCTL command */
354
356{
357 uint32_t cmdid; /* Command ID */
358 FAR void **inparam; /* Pointer to input parameter */
359 size_t inparamlen; /* Length of input parameter */
360 FAR void **outparam; /* Pointer to output parameter */
361 size_t outparamlen; /* Length of output parameter */
362 FAR void *cb; /* Pointer to callback function */
363};
364
366{
367 FAR const char *mqname;
368};
369
371{
372 lte_evthndl_t handle;
373};
374
375/* for IOCTL related SMS */
376
378{
379 union
380 {
381 /* Using for SIOCSMSENSTREP command */
382
383 bool enable;
384
385 /* Using for SIOCSMSGREFID command */
386
387 struct sms_refids_s refid;
388
389 /* Using for SIOCSMSSSCA command */
390
391 struct sms_sc_addr_s scaddr;
392 } smsru;
393};
394
395#endif /* __INCLUDE_NUTTX_WIRELESS_LTE_LTE_IOCTL_H */
Definition: lte_ioctl.h:366
Definition: lte_ioctl.h:371
Definition: lte_ioctl.h:356
Definition: lte_ioctl.h:378