PicoWAN SDK Documentation
|
Data Fields | |
message_status_t(* | message_compose )(uint8_t *encode_key, uint8_t *nwkskey, uint32_t netid, uint8_t type, uint32_t devaddr, uint8_t port, const uint8_t *payload, uint8_t payload_len, uint8_t *fopts, uint8_t fopts_len, uint16_t seqno, message_t *msg) |
compose a message according to some inputs More... | |
message_status_t(* | message_compose_join_OTA )(uint8_t type, uint8_t *dev_eui, uint8_t *app_eui, uint16_t *dev_nonce, uint8_t *app_key, message_t *msg) |
compose a special message for OTA More... | |
message_status_t(* | message_decode )(uint8_t *decode_key, uint8_t *nwkskey, uint8_t *buf, uint8_t buf_len, message_t *msg) |
decode a message according to format choosen More... | |
message_status_t(* | message_decode_join_OTA )(uint8_t *buf, uint8_t buf_len, uint8_t *app_key, uint8_t *appskey, uint8_t *nwkskey, uint16_t *dev_nonce, uint32_t *netid, uint32_t *devaddr, uint8_t *rx1_dr_offset, uint8_t *rx2_dr, uint8_t *rx_delay, uint8_t *cf_list) |
decode a message from OTA More... | |
message_status_t(* | message_authentication )(uint8_t *nwkskey, message_t *msg) |
compute message integrity check More... | |
uint16_t(* | message_max_payload_length )(void) |
Return maximun allowed bytes for user payload. More... | |
message_status_t(* | message_get_address )(uint8_t *buf, uint8_t buf_len, message_t *msg) |
Get the address of the frame. More... | |
message_status_t(* | message_get_header )(uint8_t *buf, uint8_t buf_len, message_t *msg) |
Get frame header. More... | |
message_status_t(* message_authentication) (uint8_t *nwkskey, message_t *msg) |
compute message integrity check
nwkskey | Pointer to the network session AES128 key array ( 16 bytes ) |
msg | A pointer to encoded message |
message_status_t(* message_compose) (uint8_t *encode_key, uint8_t *nwkskey, uint32_t netid, uint8_t type, uint32_t devaddr, uint8_t port, const uint8_t *payload, uint8_t payload_len, uint8_t *fopts, uint8_t fopts_len, uint16_t seqno, message_t *msg) |
compose a message according to some inputs
encode_key | Pointer to an AES128 key array ( 16 bytes ) |
nwkskey | Pointer to the network session AES128 key array ( 16 bytes ) |
netid | 24 bits network identifier ( provided by network operator ) |
type | message type as defined in message_common.h |
devaddr | 32 bits device address on the network (must be unique to the network) |
port | payload port (0 for mac specific message else must be > 0 for application data) |
payload | A pointer to the data to send |
payload_len | The length of the data to send |
seqno | frame counter |
msg | A pointer to composed message |
message_status_t(* message_compose_join_OTA) (uint8_t type, uint8_t *dev_eui, uint8_t *app_eui, uint16_t *dev_nonce, uint8_t *app_key, message_t *msg) |
compose a special message for OTA
type | message type |
dev_eui | pointer to the device EUI array (8 bytes) |
app_eui | pointer to the application EUI array (8 bytes) |
app_key | pointer to the application AES128 key array (16 bytes) |
message_status_t(* message_decode) (uint8_t *decode_key, uint8_t *nwkskey, uint8_t *buf, uint8_t buf_len, message_t *msg) |
decode a message according to format choosen
decode_key | Pointer to an AES128 key array ( 16 bytes ) |
nwkskey | Pointer to the network session AES128 key array ( 16 bytes ) |
buf | A pointer to the data to decode |
buf_len | The length of the data to decode |
msg | A pointer to decoded message |
message_status_t(* message_decode_join_OTA) (uint8_t *buf, uint8_t buf_len, uint8_t *app_key, uint8_t *appskey, uint8_t *nwkskey, uint16_t *dev_nonce, uint32_t *netid, uint32_t *devaddr, uint8_t *rx1_dr_offset, uint8_t *rx2_dr, uint8_t *rx_delay, uint8_t *cf_list) |
decode a message from OTA
buf | A pointer to the data to decode |
buf_len | The length of the data to decode |
app_key | pointer to the application AES128 key array (16 bytes) |
appskey | Pointer to the application session AES128 key array ( 16 bytes ) |
nwkskey | Pointer to the network session AES128 key array ( 16 bytes ) |
dev_nonce | ramdom nonce to create session keys |
netid | 24 bits network identifier ( provided by network operator ) |
devaddr | 32 bits device address on the network (must be unique to the network) |
rx1_dr_offset | datarate offset between uplink and downlink on first window |
rx2_dr | datarate on the second window |
rx_delay | delay to wait before starting the first windows |
cf_list | channels available |
message_status_t(* message_get_address) (uint8_t *buf, uint8_t buf_len, message_t *msg) |
Get the address of the frame.
buf | A pointer to the data to decode |
buf_len | The length of the data to decode |
msg | A pointer to save address message |
message_status_t(* message_get_header) (uint8_t *buf, uint8_t buf_len, message_t *msg) |
Get frame header.
buf | A pointer to the data to decode |
buf_len | The length of the data to decode |
msg | A pointer to save header message |
uint16_t(* message_max_payload_length) (void) |
Return maximun allowed bytes for user payload.