lriot 2.1.0.0
|
LoRaWAN driver for LR1110 modem. More...
#include <stdbool.h>
#include <stdint.h>
#include "modem/lr1110_modem_lorawan_types.h"
#include "lriot.h"
Go to the source code of this file.
Functions | |
err_t | lr1110_modem_get_event (lriot_t *ctx, lr1110_modem_event_fields_t *event_fields) |
This command can be used to retrieve pending events from the modem. Pending events are indicated by the EVENT line. The EVENT line will be de-asserted after all events have been retrieved and no further events are available. When no event is available this command returns with empty response payload. | |
err_t | lr1110_modem_get_version (lriot_t *ctx, lr1110_modem_version_t *version) |
This command returns the version of the bootloader and the version of the installed firmware plus the version of the implemented LoRaWAN standard (BCD, e.g. 0x0103 for LoRaWAN 1.0.3). | |
err_t | lr1110_modem_reset (lriot_t *ctx) |
This command performs a reset of the LR1110 modem. All transient state (including session information) will be lost and the modem needs to join the network again. | |
err_t | lr1110_modem_reset_charge (lriot_t *ctx) |
This command resets the accumulated charge counter to zero. | |
err_t | lr1110_modem_get_charge (lriot_t *ctx, uint32_t *charge) |
This command returns the total charge counter of the modem in mAh. This value includes the accumulated charge since the last reset of the modem or since the last invocation of the ResetCharge command. | |
err_t | lr1110_modem_get_tx_power_offset (lriot_t *ctx, int8_t *tx_power_offset) |
This command gets the board-specific correction offset for transmission power to be used (signed integer in dB). | |
err_t | lr1110_modem_set_tx_power_offset (lriot_t *ctx, int8_t tx_power_offset) |
This command sets the board-specific correction offset for transmission power to be used. The offset depends on the board design and antenna matching and is expressed in dB (signed integer). | |
err_t | lr1110_modem_test_mode_start (lriot_t *ctx) |
This command is used to implement test functionality for regulatory conformance, certification, and functional testing. With the exception of the TST_START command, test commands are only available if test mode is active. Test mode can only be activated if the modem has not yet received a command that results in a radio operation. Once test mode is active, all other modem commands are disabled. | |
err_t | lr1110_modem_test_nop (lriot_t *ctx) |
No operation. This command may be used to terminate an ongoing continuous TX operation. | |
err_t | lr1110_modem_test_tx_single (lriot_t *ctx, uint32_t frequency, int8_t tx_power, lr1110_modem_tst_mode_sf_t sf, lr1110_modem_tst_mode_bw_t bw, lr1110_modem_tst_mode_cr_t cr, uint8_t payload_length) |
Transmit a single packet. | |
err_t | lr1110_modem_test_tx_cont (lriot_t *ctx, uint32_t frequency, int8_t tx_power, lr1110_modem_tst_mode_sf_t sf, lr1110_modem_tst_mode_bw_t bw, lr1110_modem_tst_mode_cr_t cr, uint8_t payload_length) |
Continuously transmit packets as fast as possible. | |
err_t | lr1110_modem_test_tx_cw (lriot_t *ctx, uint32_t frequency, int8_t tx_power) |
Transmit a continuous wave. | |
err_t | lr1110_modem_test_rx_cont (lriot_t *ctx, uint32_t frequency, lr1110_modem_tst_mode_sf_t sf, lr1110_modem_tst_mode_bw_t bw, lr1110_modem_tst_mode_cr_t cr) |
Continuously receive packets. | |
err_t | lr1110_modem_test_read_packet_counter_rx_cont (lriot_t *ctx, uint32_t *rx_packet_counter) |
Read the packet counter received during continuously receive packets test. | |
err_t | lr1110_modem_test_rssi_subghz (lriot_t *ctx, uint32_t frequency, uint16_t time_ms, lr1110_modem_tst_mode_bw_t bw) |
Continuously receive packets on Sub-GHz radio path. | |
err_t | lr1110_modem_test_radio_rst (lriot_t *ctx) |
Reset the LR1110 radio. | |
err_t | lr1110_modem_test_exit (lriot_t *ctx) |
Exit test mode and reset LR1110 modem. | |
err_t | lr1110_modem_test_tx_single_preamble (lriot_t *ctx, uint32_t frequency, int8_t tx_power, lr1110_modem_tst_mode_sf_t sf, lr1110_modem_tst_mode_bw_t bw, lr1110_modem_tst_mode_cr_t cr, uint8_t payload_length, uint16_t preamble_length) |
Transmit a single packet with the number of preamble configurable. | |
err_t | lr1110_modem_test_read_rssi (lriot_t *ctx, int8_t *rssi) |
Read RSSI after a Sub Gig / 2.4 Ghz / GNSS test rssi command. | |
err_t | lr1110_modem_test_rssi_2g4 (lriot_t *ctx, uint8_t channel, uint16_t time_ms, lr1110_modem_tst_mode_bw_t bw) |
Continuously receive packets on 2.4GHz radio path. | |
err_t | lr1110_modem_test_rssi_gnss (lriot_t *ctx, lr1110_modem_tst_mode_constellation_t constellation_modulation, uint16_t time_ms, lr1110_modem_tst_mode_bw_t bw) |
Continuously receive packets on GNSS radio path. | |
err_t | lr1110_modem_get_gps_time (lriot_t *ctx, uint32_t *time) |
Query the current GPS time. The application layer clock synchronization protocol is used to link the device clock to GPS time. The returned time specifies the seconds since GPS epoch (00:00:00, Sunday 6th of January 1980). If the device is not yet synchronized to GPS time then the returned value is zero. This may happen if the server has not yet answered time sync requests. The accuracy of the synchronization is in the range of seconds and depends on latencies in the network infrastructure. | |
err_t | lr1110_modem_get_status (lriot_t *ctx, lr1110_modem_status_t *status) |
This command returns the modem status which may indicate one or more notification conditions. | |
err_t | lr1110_modem_set_alarm_timer (lriot_t *ctx, uint32_t seconds) |
This command sets an application alarm timer (in seconds). When the timer has expired an Alarm event is generated. If this command is applied again before the timer has expired, the timer will be started again with the new period. A value of 0 will cancel an possibly pending previous alarm timer. | |
err_t | lr1110_modem_get_pin (lriot_t *ctx, uint32_t *pin) |
This command returns the device registration PIN. | |
err_t | lr1110_modem_get_chip_eui (lriot_t *ctx, lr1110_modem_chip_eui_t chip_eui) |
This command returns the ChipEUI. The ChipEUI is also the default DeviceEUI. It is programmed during manufacturing and is immutable. | |
err_t | lr1110_modem_get_join_eui (lriot_t *ctx, lr1110_modem_join_eui_t join_eui) |
This command returns the join EUI. | |
err_t | lr1110_modem_set_join_eui (lriot_t *ctx, lr1110_modem_join_eui_t join_eui) |
This command sets the Join EUI. | |
err_t | lr1110_modem_get_dev_eui (lriot_t *ctx, lr1110_modem_dev_eui_t dev_eui) |
This command returns the DeviceEUI. | |
err_t | lr1110_modem_set_dev_eui (lriot_t *ctx, lr1110_modem_dev_eui_t dev_eui) |
This command sets the DeviceEUI. | |
err_t | lr1110_modem_set_app_key (lriot_t *ctx, lr1110_modem_app_key_t app_key) |
This command sets the LoRaWAN 1.0.3 application key. Note that a factory reset will erase this information. The device is required to rejoin the network. | |
err_t | lr1110_modem_get_class (lriot_t *ctx, lr1110_modem_classes_t *modem_class) |
This command gets the LoRaWAN device class. | |
err_t | lr1110_modem_set_class (lriot_t *ctx, lr1110_modem_classes_t modem_class) |
This command sets the LoRaWAN device class. Currently only class A and class C are supported. If the command is successful, a change from class A to class C is effective after a completed TX transaction. The network server should also be informed about the class change, typically on a separate channel for LoRaWAN 1.0.3. For a change from class C to class A, the RX remains enabled until the next TX transaction. | |
err_t | lr1110_modem_get_region (lriot_t *ctx, lr1110_modem_regions_t *region) |
This command returns the regulatory region. | |
err_t | lr1110_modem_set_region (lriot_t *ctx, lr1110_modem_regions_t region) |
This command sets the regulatory region. Additionally this command resets the ADR profile to Network Server Controlled. If different ADR profile is desired, the profile needs to be set again. | |
err_t | lr1110_modem_list_regions (lriot_t *ctx, uint8_t *region_codes, uint8_t *region_codes_size) |
This command returns the regulatory regions supported by the LR1110 modem. | |
err_t | lr1110_modem_get_adr_profile (lriot_t *ctx, lr1110_modem_adr_profiles_t *adr_profile) |
This command returns the ADR profile type. | |
err_t | lr1110_modem_set_adr_profile (lriot_t *ctx, lr1110_modem_adr_profiles_t adr_profile, uint8_t *adr_custom_list) |
This command sets the ADR profile and parameters. | |
err_t | lr1110_modem_get_dm_port (lriot_t *ctx, uint8_t *port) |
This command gets the device management port. | |
err_t | lr1110_modem_set_dm_port (lriot_t *ctx, uint8_t port) |
This command sets the device management port. Port 0 and ports from 224 and 255 must not be used since they are reserved for future standardized application extensions. | |
err_t | lr1110_modem_get_dm_info_interval (lriot_t *ctx, uint8_t *format, uint8_t *interval) |
This command returns the device management reporting interval. The interval is specified in seconds, minutes, hours or days. | |
err_t | lr1110_modem_set_dm_info_interval (lriot_t *ctx, lr1110_modem_reporting_interval_format_t format, uint8_t interval) |
This command sets the device management reporting interval. The interval is specified in seconds, minutes, hours or days. | |
err_t | lr1110_modem_get_dm_info_field (lriot_t *ctx, lr1110_modem_dm_info_fields_t *dm_info_fields) |
This command lists the info fields to be included in the periodic DM status messages. | |
err_t | lr1110_modem_set_dm_info_field (lriot_t *ctx, lr1110_modem_dm_info_fields_t *dm_info_fields) |
This command sets the default info fields to be included in the periodic DM status messages. The set is specified as list of field codes as defined in Uplink Message Format. Duplicate and invalid fields will be rejected An empty set is valid and will effectively disable the DM status message. | |
err_t | lr1110_modem_send_dm_status (lriot_t *ctx, lr1110_modem_dm_info_fields_t *dm_info_fields) |
This command sends the specified set of information fields in one or more DM status messages immediately. The set is specified as list of field codes as defined in Uplink Message Format. Duplicate and invalid fields will be rejected (see note in Periodic Status Reporting). | |
err_t | lr1110_modem_set_app_status (lriot_t *ctx, uint8_t *app_status) |
This commands sets application-specific status information to be reported to the DM service. This information is an application-defined, arbitrary 8-byte data blob. Once set, it is included in the appstatus info field sent as part of the periodic status reports to the DM service. On the cloud side, this information can then be retrieved from the service. | |
err_t | lr1110_modem_join (lriot_t *ctx) |
This command starts joining the network. During the join procedure no further transmissions can occur. When the network has been successfully joined, a Joined event is generated. If the device is already joined to a network, or is in the process of joining, this command has no effect. | |
err_t | lr1110_modem_leave_network (lriot_t *ctx) |
This command leaves the network if already joined, or cancels an ongoing join process. After leaving the network, no further transmissions can occur. | |
err_t | lr1110_modem_suspend (lriot_t *ctx, lr1110_modem_suspend_t suspend) |
This command temporarily suspends or resumes the modem’s radio operations. It can be used to prevent extra power consumption by the modem in case the application MCU temporarily needs more power itself and wants to prevent exceeding limits. | |
err_t | lr1110_modem_get_next_tx_max_payload (lriot_t *ctx, uint8_t *tx_max_payload) |
This command returns the maximum application payload size possible according to the LoRaWAN regional parameters for the next transmission using the current data rate, while assuming no FOpts are present and that a device is not behind a repeater. | |
err_t | lr1110_modem_request_tx (lriot_t *ctx, uint8_t port, lr1110_modem_uplink_type_t uplink_type, uint8_t *data_buf, uint8_t length) |
This command requests sending the given data on the specified port as an unconfirmed (0x00) or confirmed (0x01) frame. The request will be queued and the frame will be sent as soon as the current bandwidth usage of the regulatory region permits. A TxDone event is generated when the frame either has been sent, or if it couldn’t be sent because the specified data exceeded the maximum possible payload size. | |
err_t | lr1110_modem_emergency_tx (lriot_t *ctx, uint8_t port, lr1110_modem_uplink_type_t uplink_type, uint8_t *data_buf, uint8_t length) |
This command sends the given data on the specified port as an unconfirmed (0x00) or confirmed (0x01) frame immediately. It has higher priority than all other services and does not take duty cycle or payload size restrictions into account. | |
err_t | lr1110_modem_upload_init (lriot_t *ctx, uint8_t port, lr1110_modem_encryption_mode_t encryption_mode, uint16_t size, uint16_t interval) |
This command prepares a fragmented file upload. It specifies the port for the subsequent upload, optional encryption mode, file size, and average frame transmission interval (in seconds). | |
err_t | lr1110_modem_upload_data (lriot_t *ctx, uint8_t *data_buf, uint8_t length) |
This command can be used to repeatedly set file data to be uploaded. The file data needs to be split into parts of maximum 255 bytes each and the submitted parts will be appended to an internal buffer. In total exactly as many bytes as specified by the UploadInit command have to be provided. The buffer allocated for file uploads is 8K bytes. | |
err_t | lr1110_modem_upload_start (lriot_t *ctx, uint32_t crc) |
After all data bytes indicated to UploadInit have been provided using UploadData this command can be issued to actually start the transmission stream. | |
err_t | lr1110_modem_stream_init (lriot_t *ctx, uint8_t port, lr1110_modem_encryption_mode_t encryption_mode) |
This command initializes redundant data streaming on a specific port. The StreamInit command can only be issued before the stream has been started using the SendStreamData command. | |
err_t | lr1110_modem_send_stream_data (lriot_t *ctx, uint8_t port, uint8_t *record, uint8_t length) |
This command adds a new data record to the buffer of the data streaming encoder for the given port. Whenever the buffer contains data records, the modem autonomously retrieves data from the buffer, optionally encrypts it, adds redundancy, and sends uplinks containing the redundant stream. | |
err_t | lr1110_modem_stream_status (lriot_t *ctx, uint8_t port, lr1110_modem_stream_status_t *stream_status) |
This command queries the status of the data streaming buffer on the specified port. It returns two unsigned 16 bit integer values indicating the number of bytes pending for transmission and the number of bytes still free in the buffer. | |
err_t | lr1110_modem_set_gps_time (lriot_t *ctx, uint32_t gps_time) |
This commands sends the GPS time to LR1110 Modem, The time format is 4 bytes, big endian. It encodes the number of seconds from the 6-Jan 1980 00:00:00. | |
err_t | lr1110_modem_derive_keys (lriot_t *ctx) |
Use the previously set of JoinEUI/DevEUI to derive the app keys used in the Semtech join server. | |
err_t | lr1110_modem_set_rf_output (lriot_t *ctx, lr1110_modem_radio_pa_selection_t output) |
Configure rf output configuration. | |
err_t | lr1110_modem_set_alc_sync_port (lriot_t *ctx, uint8_t port) |
Set the port for application layer clock synchronization. | |
err_t | lr1110_modem_get_alc_sync_port (lriot_t *ctx, uint8_t *port) |
Get the port for application layer clock synchronization. | |
err_t | lr1110_modem_set_alc_sync_mode (lriot_t *ctx, lr1110_modem_alc_sync_mode_t mode) |
Set the mode for application layer clock synchronization service. | |
err_t | lr1110_modem_get_alc_sync_mode (lriot_t *ctx, lr1110_modem_alc_sync_mode_t *mode) |
Get the mode for application layer clock synchronization service. | |
err_t | lr1110_modem_set_connection_timeout (lriot_t *ctx, uint16_t nb_uplink_mobile_static, uint16_t nb_uplink_reset) |
Set the number of uplink without ack from network before Modem changes it's ADR or resets. | |
err_t | lr1110_modem_get_connection_timeout (lriot_t *ctx, uint16_t *nb_uplink_mobile_static, uint16_t *nb_uplink_reset) |
Get the number of uplink without ack from network before Modem changes it's ADR or resets. | |
err_t | lr1110_modem_get_connection_timeout_status (lriot_t *ctx, uint16_t *nb_uplink_mobile_static, uint16_t *nb_uplink_reset) |
Get the status of the number of uplink without ack from network before Modem changes it's ADR or resets. | |
err_t | lr1110_modem_get_lorawan_state (lriot_t *ctx, lr1110_modem_lorawan_state_t *lorawan_state) |
Returns the LoRaWAN state Idle or Not Idle. | |
err_t | lr1110_modem_write_user_defined_charge_counter (lriot_t *ctx, uint16_t charge) |
Write a charge value to user defined charger counter. | |
err_t | lr1110_modem_read_user_defined_charge_counter (lriot_t *ctx, uint16_t *charge) |
Read a charge value to user defined charger counter. | |
err_t | lr1110_modem_select_charge_uplink (lriot_t *ctx, lr1110_modem_charge_type_t charge_type) |
Select which charge counter to send. | |
err_t | lr1110_modem_get_duty_cycle_status (lriot_t *ctx, int32_t *duty_cycle) |
Get Duty cycle status info. | |
err_t | lr1110_modem_activate_duty_cycle (lriot_t *ctx, lr1110_modem_duty_cycle_t duty_cycle) |
Activate/deactivate Duty cycle. | |
err_t | lr1110_modem_set_certification_mode (lriot_t *ctx, lr1110_modem_certification_mode_t enable) |
Activate/deactivate the certification mode. | |
err_t | lr1110_modem_get_certification_mode (lriot_t *ctx, lr1110_modem_certification_mode_t *enable) |
Get the certification mode. | |
err_t | lr1110_modem_get_available_data_rate (lriot_t *ctx, uint16_t *available_data_rate) |
Get the available data rate mask. One bit indicates one data rate. Bit n = 1 mean Data Rate n is available. | |
err_t | lr1110_modem_set_output_power_config (lriot_t *ctx, lr1110_modem_output_power_config_list_t output_power_config) |
This command sets 6 blocks (at most 6 dedicated power levels) of Tx output power configurations: expected power, configured power, PA, Tx parameters and PA ramp time. For the Tx power levels not defined in the 6 levels with this command, the modem always selects automatically the appropriate PA and Tx parameters configurations. | |
err_t | lr1110_modem_get_output_power_config (lriot_t *ctx, lr1110_modem_output_power_config_list_t output_power_config) |
This command gets 6 blocks of Tx output power configurations: expected power, configured power, PA, Tx parameters and PA ramp time. For the Tx power levels not defined in the 6 levels with this command, the modem always selects automatically the appropriate PA and Tx parameters configurations. | |
err_t | lr1110_modem_get_network_type (lriot_t *ctx, lr1110_modem_network_type_t *network_type) |
Get the LoRaWAN network type. | |
err_t | lr1110_modem_set_network_type (lriot_t *ctx, lr1110_modem_network_type_t network_type) |
Set the LoRaWAN network type. | |
err_t | lr1110_modem_activate_lbt (lriot_t *ctx, lr1110_modem_lbt_mode_t enable, int16_t threshold, uint32_t duration, uint32_t bandwidth) |
Activate the listen before talk. | |
err_t | lr1110_modem_set_nb_trans (lriot_t *ctx, uint8_t nb_trans) |
Set the LoRaWAN number of retransmission. | |
err_t | lr1110_modem_get_nb_trans (lriot_t *ctx, uint8_t *nb_trans) |
Get the LoRaWAN number of retransmission. | |
err_t | lr1110_modem_set_stream_redundancy_rate (lriot_t *ctx, uint8_t stream_redundancy_rate) |
Set the stream redundancy rate. | |
err_t | lr1110_modem_get_stream_redundancy_rate (lriot_t *ctx, uint8_t *stream_redundancy_rate) |
Get the stream redundancy rate. | |
err_t | lr1110_modem_set_crystal_error (lriot_t *ctx, uint32_t crystal_error) |
Set the Crystal error of the MCU to fine adjust the rx window for lorawan ( ex: set 30 for a crystal error = 0.3% ). | |
err_t | lr1110_modem_get_crystal_error (lriot_t *ctx, uint32_t *crystal_error) |
Get the Crystal error. | |
LoRaWAN driver for LR1110 modem.
Revised BSD License Copyright Semtech Corporation 2020. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
err_t lr1110_modem_activate_duty_cycle | ( | lriot_t * | ctx, |
lr1110_modem_duty_cycle_t | duty_cycle ) |
Activate/deactivate Duty cycle.
[in] | ctx | Chip implementation context |
[in] | duty_cycle | lr1110_modem_duty_cycle_t |
err_t lr1110_modem_activate_lbt | ( | lriot_t * | ctx, |
lr1110_modem_lbt_mode_t | enable, | ||
int16_t | threshold, | ||
uint32_t | duration, | ||
uint32_t | bandwidth ) |
Activate the listen before talk.
[in] | ctx | Chip implementation context |
[in] | enable | lr1110_modem_lbt_mode_t |
[in] | threshold | LBT treshold in dBm, default value is -80 dBm |
[in] | duration | LBT duration in ms, default value is 5 ms |
[in] | bandwidth | LBT bandwidth in Hz, default value is 200000 Hz |
err_t lr1110_modem_derive_keys | ( | lriot_t * | ctx | ) |
Use the previously set of JoinEUI/DevEUI to derive the app keys used in the Semtech join server.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_emergency_tx | ( | lriot_t * | ctx, |
uint8_t | port, | ||
lr1110_modem_uplink_type_t | uplink_type, | ||
uint8_t * | data_buf, | ||
uint8_t | length ) |
This command sends the given data on the specified port as an unconfirmed (0x00) or confirmed (0x01) frame immediately. It has higher priority than all other services and does not take duty cycle or payload size restrictions into account.
[in] | ctx | Chip implementation context |
[in] | port | LoRaWAN port |
[in] | uplink_type | Uplink type unconfirmed (0x00) or confirmed (0x01) lr1110_modem_uplink_type_t |
[in] | data_buf | Data buffer |
[in] | length | Data length |
err_t lr1110_modem_get_adr_profile | ( | lriot_t * | ctx, |
lr1110_modem_adr_profiles_t * | adr_profile ) |
This command returns the ADR profile type.
[in] | ctx | Chip implementation context |
[out] | adr_profile | ADR profile type lr1110_modem_adr_profiles_t |
err_t lr1110_modem_get_alc_sync_mode | ( | lriot_t * | ctx, |
lr1110_modem_alc_sync_mode_t * | mode ) |
Get the mode for application layer clock synchronization service.
[in] | ctx | Chip implementation context |
[out] | mode | application layer clock mode |
err_t lr1110_modem_get_alc_sync_port | ( | lriot_t * | ctx, |
uint8_t * | port ) |
Get the port for application layer clock synchronization.
[in] | ctx | Chip implementation context |
[out] | port | Port application |
err_t lr1110_modem_get_available_data_rate | ( | lriot_t * | ctx, |
uint16_t * | available_data_rate ) |
Get the available data rate mask. One bit indicates one data rate. Bit n = 1 mean Data Rate n is available.
[in] | ctx | Chip implementation context |
[out] | available_data_rate | Available data rate bit mask |
err_t lr1110_modem_get_certification_mode | ( | lriot_t * | ctx, |
lr1110_modem_certification_mode_t * | enable ) |
Get the certification mode.
[in] | ctx | Chip implementation context |
[out] | enable | lr1110_modem_certification_mode_t |
err_t lr1110_modem_get_charge | ( | lriot_t * | ctx, |
uint32_t * | charge ) |
This command returns the total charge counter of the modem in mAh. This value includes the accumulated charge since the last reset of the modem or since the last invocation of the ResetCharge command.
[in] | ctx | Chip implementation context |
[out] | charge | Charge counter in mAh |
err_t lr1110_modem_get_chip_eui | ( | lriot_t * | ctx, |
lr1110_modem_chip_eui_t | chip_eui ) |
This command returns the ChipEUI. The ChipEUI is also the default DeviceEUI. It is programmed during manufacturing and is immutable.
[in] | ctx | Chip implementation context |
[out] | chip_eui | Chip EUI buffer on 8 bytes |
err_t lr1110_modem_get_class | ( | lriot_t * | ctx, |
lr1110_modem_classes_t * | modem_class ) |
This command gets the LoRaWAN device class.
[in] | ctx | Chip implementation context |
[out] | modem_class | LoRaWAN device class lr1110_modem_classes_t |
err_t lr1110_modem_get_connection_timeout | ( | lriot_t * | ctx, |
uint16_t * | nb_uplink_mobile_static, | ||
uint16_t * | nb_uplink_reset ) |
Get the number of uplink without ack from network before Modem changes it's ADR or resets.
[in] | ctx | Chip implementation context |
[out] | nb_uplink_mobile_static | number of uplink without ack from network before by then the modem adr profile will switch from mobile to static |
[out] | nb_uplink_reset | number of uplink without ack from network before Modem resets |
err_t lr1110_modem_get_connection_timeout_status | ( | lriot_t * | ctx, |
uint16_t * | nb_uplink_mobile_static, | ||
uint16_t * | nb_uplink_reset ) |
Get the status of the number of uplink without ack from network before Modem changes it's ADR or resets.
[in] | ctx | Chip implementation context |
[out] | nb_uplink_mobile_static | number of uplink without ack from network before by then the modem adr profile will switch from mobile to static |
[out] | nb_uplink_reset | number of uplink without ack from network before Modem resets |
err_t lr1110_modem_get_crystal_error | ( | lriot_t * | ctx, |
uint32_t * | crystal_error ) |
Get the Crystal error.
[in] | ctx | Chip implementation context |
[out] | crystal_error | Crystal error |
err_t lr1110_modem_get_dev_eui | ( | lriot_t * | ctx, |
lr1110_modem_dev_eui_t | dev_eui ) |
This command returns the DeviceEUI.
[in] | ctx | Chip implementation context |
[out] | dev_eui | Device EUI buffer on 8 bytes |
err_t lr1110_modem_get_dm_info_field | ( | lriot_t * | ctx, |
lr1110_modem_dm_info_fields_t * | dm_info_fields ) |
This command lists the info fields to be included in the periodic DM status messages.
[in] | ctx | Chip implementation context |
[out] | dm_info_fields | list of tag bytes lr1110_modem_dm_info_fields_t |
err_t lr1110_modem_get_dm_info_interval | ( | lriot_t * | ctx, |
uint8_t * | format, | ||
uint8_t * | interval ) |
This command returns the device management reporting interval. The interval is specified in seconds, minutes, hours or days.
[in] | ctx | Chip implementation context |
[out] | format | reporting interval format lr1110_modem_reporting_interval_format_t |
[out] | interval | interval specified in seconds, minutes, hours or days |
err_t lr1110_modem_get_dm_port | ( | lriot_t * | ctx, |
uint8_t * | port ) |
This command gets the device management port.
[in] | ctx | Chip implementation context |
[out] | port | Device management port |
err_t lr1110_modem_get_duty_cycle_status | ( | lriot_t * | ctx, |
int32_t * | duty_cycle ) |
Get Duty cycle status info.
[in] | ctx | Chip implementation context |
[out] | duty_cycle | Time in milliseconds (see notes for explanations) |
err_t lr1110_modem_get_event | ( | lriot_t * | ctx, |
lr1110_modem_event_fields_t * | event_fields ) |
This command can be used to retrieve pending events from the modem. Pending events are indicated by the EVENT line. The EVENT line will be de-asserted after all events have been retrieved and no further events are available. When no event is available this command returns with empty response payload.
[in] | ctx | Chip implementation context |
[out] | event_fields |
err_t lr1110_modem_get_gps_time | ( | lriot_t * | ctx, |
uint32_t * | time ) |
Query the current GPS time. The application layer clock synchronization protocol is used to link the device clock to GPS time. The returned time specifies the seconds since GPS epoch (00:00:00, Sunday 6th of January 1980). If the device is not yet synchronized to GPS time then the returned value is zero. This may happen if the server has not yet answered time sync requests. The accuracy of the synchronization is in the range of seconds and depends on latencies in the network infrastructure.
[in] | ctx | Chip implementation context |
[out] | time | Time in seconds |
err_t lr1110_modem_get_join_eui | ( | lriot_t * | ctx, |
lr1110_modem_join_eui_t | join_eui ) |
This command returns the join EUI.
[in] | ctx | Chip implementation context |
[out] | join_eui | Join EUI buffer on 8 bytes |
err_t lr1110_modem_get_lorawan_state | ( | lriot_t * | ctx, |
lr1110_modem_lorawan_state_t * | lorawan_state ) |
Returns the LoRaWAN state Idle or Not Idle.
[in] | ctx | Chip implementation context |
[out] | lorawan_state | LoRaWAN state lr1110_modem_lorawan_state_t |
err_t lr1110_modem_get_nb_trans | ( | lriot_t * | ctx, |
uint8_t * | nb_trans ) |
Get the LoRaWAN number of retransmission.
[in] | ctx | Chip implementation context |
[out] | nb_trans | number of retransmission |
err_t lr1110_modem_get_network_type | ( | lriot_t * | ctx, |
lr1110_modem_network_type_t * | network_type ) |
Get the LoRaWAN network type.
[in] | ctx | Chip implementation context |
[out] | network_type | lr1110_modem_network_type_t |
err_t lr1110_modem_get_next_tx_max_payload | ( | lriot_t * | ctx, |
uint8_t * | tx_max_payload ) |
This command returns the maximum application payload size possible according to the LoRaWAN regional parameters for the next transmission using the current data rate, while assuming no FOpts are present and that a device is not behind a repeater.
[in] | ctx | Chip implementation context |
[out] | tx_max_payload | Maximum application payload size possible |
err_t lr1110_modem_get_output_power_config | ( | lriot_t * | ctx, |
lr1110_modem_output_power_config_list_t | output_power_config ) |
This command gets 6 blocks of Tx output power configurations: expected power, configured power, PA, Tx parameters and PA ramp time. For the Tx power levels not defined in the 6 levels with this command, the modem always selects automatically the appropriate PA and Tx parameters configurations.
[in] | ctx | Chip implementation context |
[out] | output_power_config | Tx output power configuration block list, |
err_t lr1110_modem_get_pin | ( | lriot_t * | ctx, |
uint32_t * | pin ) |
This command returns the device registration PIN.
[in] | ctx | Chip implementation context |
[out] | pin | Device registration PIN on 4 bytes |
err_t lr1110_modem_get_region | ( | lriot_t * | ctx, |
lr1110_modem_regions_t * | region ) |
This command returns the regulatory region.
[in] | ctx | Chip implementation context |
[out] | region | LoRaWAN regulatory region lr1110_modem_regions_t |
err_t lr1110_modem_get_status | ( | lriot_t * | ctx, |
lr1110_modem_status_t * | status ) |
This command returns the modem status which may indicate one or more notification conditions.
[in] | ctx | Chip implementation context |
[out] | status | LR1110 mode status but mask lr1110_modem_status_t |
err_t lr1110_modem_get_stream_redundancy_rate | ( | lriot_t * | ctx, |
uint8_t * | stream_redundancy_rate ) |
Get the stream redundancy rate.
[in] | ctx | Chip implementation context |
[out] | stream_redundancy_rate | Streaming redundancy rate |
err_t lr1110_modem_get_tx_power_offset | ( | lriot_t * | ctx, |
int8_t * | tx_power_offset ) |
This command gets the board-specific correction offset for transmission power to be used (signed integer in dB).
[in] | ctx | Chip implementation context |
[out] | tx_power_offset | Tx power offset correction in dBm |
err_t lr1110_modem_get_version | ( | lriot_t * | ctx, |
lr1110_modem_version_t * | version ) |
This command returns the version of the bootloader and the version of the installed firmware plus the version of the implemented LoRaWAN standard (BCD, e.g. 0x0103 for LoRaWAN 1.0.3).
[in] | ctx | Chip implementation context |
[out] | version | Version of the LR1110 modem |
err_t lr1110_modem_join | ( | lriot_t * | ctx | ) |
This command starts joining the network. During the join procedure no further transmissions can occur. When the network has been successfully joined, a Joined event is generated. If the device is already joined to a network, or is in the process of joining, this command has no effect.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_leave_network | ( | lriot_t * | ctx | ) |
This command leaves the network if already joined, or cancels an ongoing join process. After leaving the network, no further transmissions can occur.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_list_regions | ( | lriot_t * | ctx, |
uint8_t * | region_codes, | ||
uint8_t * | region_codes_size ) |
This command returns the regulatory regions supported by the LR1110 modem.
[in] | ctx | Chip implementation context |
[out] | region_codes | Regions supported by the LR1110 modem |
[out] | region_codes_size | size of the regions list |
err_t lr1110_modem_read_user_defined_charge_counter | ( | lriot_t * | ctx, |
uint16_t * | charge ) |
Read a charge value to user defined charger counter.
[in] | ctx | Chip implementation context |
[out] | charge | user defined charger counter |
err_t lr1110_modem_request_tx | ( | lriot_t * | ctx, |
uint8_t | port, | ||
lr1110_modem_uplink_type_t | uplink_type, | ||
uint8_t * | data_buf, | ||
uint8_t | length ) |
This command requests sending the given data on the specified port as an unconfirmed (0x00) or confirmed (0x01) frame. The request will be queued and the frame will be sent as soon as the current bandwidth usage of the regulatory region permits. A TxDone event is generated when the frame either has been sent, or if it couldn’t be sent because the specified data exceeded the maximum possible payload size.
[in] | ctx | Chip implementation context |
[in] | port | LoRaWAN port |
[in] | uplink_type | Uplink type unconfirmed (0x00) or confirmed (0x01) lr1110_modem_uplink_type_t |
[in] | data_buf | Data buffer |
[in] | length | Data length |
err_t lr1110_modem_reset | ( | lriot_t * | ctx | ) |
This command performs a reset of the LR1110 modem. All transient state (including session information) will be lost and the modem needs to join the network again.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_reset_charge | ( | lriot_t * | ctx | ) |
This command resets the accumulated charge counter to zero.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_select_charge_uplink | ( | lriot_t * | ctx, |
lr1110_modem_charge_type_t | charge_type ) |
Select which charge counter to send.
[in] | ctx | Chip implementation context |
[in] | charge_type | charge type lr1110_modem_charge_type_t |
err_t lr1110_modem_send_dm_status | ( | lriot_t * | ctx, |
lr1110_modem_dm_info_fields_t * | dm_info_fields ) |
This command sends the specified set of information fields in one or more DM status messages immediately. The set is specified as list of field codes as defined in Uplink Message Format. Duplicate and invalid fields will be rejected (see note in Periodic Status Reporting).
[in] | ctx | Chip implementation context |
[in] | dm_info_fields | list of tag bytes lr1110_modem_dm_info_fields_t |
err_t lr1110_modem_send_stream_data | ( | lriot_t * | ctx, |
uint8_t | port, | ||
uint8_t * | record, | ||
uint8_t | length ) |
This command adds a new data record to the buffer of the data streaming encoder for the given port. Whenever the buffer contains data records, the modem autonomously retrieves data from the buffer, optionally encrypts it, adds redundancy, and sends uplinks containing the redundant stream.
[in] | ctx | Chip implementation context |
[in] | port | Streaming port |
[in] | record | File data to be streamed |
[in] | length | Data length. The maximum length is 254 bytes. |
err_t lr1110_modem_set_adr_profile | ( | lriot_t * | ctx, |
lr1110_modem_adr_profiles_t | adr_profile, | ||
uint8_t * | adr_custom_list ) |
This command sets the ADR profile and parameters.
[in] | ctx | Chip implementation context |
[in] | adr_profile | ADR profile type lr1110_modem_adr_profiles_t |
[in] | adr_custom_list | custom ADR profile consisting of a list of 16 preferred data rates |
err_t lr1110_modem_set_alarm_timer | ( | lriot_t * | ctx, |
uint32_t | seconds ) |
This command sets an application alarm timer (in seconds). When the timer has expired an Alarm event is generated. If this command is applied again before the timer has expired, the timer will be started again with the new period. A value of 0 will cancel an possibly pending previous alarm timer.
[in] | ctx | Chip implementation context |
[in] | seconds | Seconds |
err_t lr1110_modem_set_alc_sync_mode | ( | lriot_t * | ctx, |
lr1110_modem_alc_sync_mode_t | mode ) |
Set the mode for application layer clock synchronization service.
[in] | ctx | Chip implementation context |
[in] | mode | application layer clock mode |
err_t lr1110_modem_set_alc_sync_port | ( | lriot_t * | ctx, |
uint8_t | port ) |
Set the port for application layer clock synchronization.
[in] | ctx | Chip implementation context |
[in] | port | Port application |
err_t lr1110_modem_set_app_key | ( | lriot_t * | ctx, |
lr1110_modem_app_key_t | app_key ) |
This command sets the LoRaWAN 1.0.3 application key. Note that a factory reset will erase this information. The device is required to rejoin the network.
[in] | ctx | Chip implementation context |
[in] | app_key | Application Key buffer on 16 bytes |
err_t lr1110_modem_set_app_status | ( | lriot_t * | ctx, |
uint8_t * | app_status ) |
This commands sets application-specific status information to be reported to the DM service. This information is an application-defined, arbitrary 8-byte data blob. Once set, it is included in the appstatus info field sent as part of the periodic status reports to the DM service. On the cloud side, this information can then be retrieved from the service.
[in] | ctx | Chip implementation context |
[in] | app_status | Application-specific status information |
err_t lr1110_modem_set_certification_mode | ( | lriot_t * | ctx, |
lr1110_modem_certification_mode_t | enable ) |
Activate/deactivate the certification mode.
[in] | ctx | Chip implementation context |
[in] | enable | lr1110_modem_certification_mode_t |
err_t lr1110_modem_set_class | ( | lriot_t * | ctx, |
lr1110_modem_classes_t | modem_class ) |
This command sets the LoRaWAN device class. Currently only class A and class C are supported. If the command is successful, a change from class A to class C is effective after a completed TX transaction. The network server should also be informed about the class change, typically on a separate channel for LoRaWAN 1.0.3. For a change from class C to class A, the RX remains enabled until the next TX transaction.
[in] | ctx | Chip implementation context |
[in] | modem_class | LoRaWAN device class lr1110_modem_classes_t |
err_t lr1110_modem_set_connection_timeout | ( | lriot_t * | ctx, |
uint16_t | nb_uplink_mobile_static, | ||
uint16_t | nb_uplink_reset ) |
Set the number of uplink without ack from network before Modem changes it's ADR or resets.
[in] | ctx | Chip implementation context |
[in] | nb_uplink_mobile_static | number of uplink without ack from network before by then the modem adr profile will switch from mobile to static |
[in] | nb_uplink_reset | number of uplink without ack from network before Modem resets |
err_t lr1110_modem_set_crystal_error | ( | lriot_t * | ctx, |
uint32_t | crystal_error ) |
Set the Crystal error of the MCU to fine adjust the rx window for lorawan ( ex: set 30 for a crystal error = 0.3% ).
[in] | ctx | Chip implementation context |
[out] | crystal_error | Crystal error |
err_t lr1110_modem_set_dev_eui | ( | lriot_t * | ctx, |
lr1110_modem_dev_eui_t | dev_eui ) |
This command sets the DeviceEUI.
[in] | ctx | Chip implementation context |
[in] | dev_eui | Device EUI buffer on 8 bytes |
err_t lr1110_modem_set_dm_info_field | ( | lriot_t * | ctx, |
lr1110_modem_dm_info_fields_t * | dm_info_fields ) |
This command sets the default info fields to be included in the periodic DM status messages. The set is specified as list of field codes as defined in Uplink Message Format. Duplicate and invalid fields will be rejected An empty set is valid and will effectively disable the DM status message.
[in] | ctx | Chip implementation context |
[in] | dm_info_fields | list of tag bytes lr1110_modem_dm_info_fields_t |
err_t lr1110_modem_set_dm_info_interval | ( | lriot_t * | ctx, |
lr1110_modem_reporting_interval_format_t | format, | ||
uint8_t | interval ) |
This command sets the device management reporting interval. The interval is specified in seconds, minutes, hours or days.
[in] | ctx | Chip implementation context |
[in] | format | reporting interval format lr1110_modem_reporting_interval_format_t |
[in] | interval | interval specified in seconds, minutes, hours or days |
err_t lr1110_modem_set_dm_port | ( | lriot_t * | ctx, |
uint8_t | port ) |
This command sets the device management port. Port 0 and ports from 224 and 255 must not be used since they are reserved for future standardized application extensions.
[in] | ctx | Chip implementation context |
[in] | port | Device management port |
err_t lr1110_modem_set_gps_time | ( | lriot_t * | ctx, |
uint32_t | gps_time ) |
This commands sends the GPS time to LR1110 Modem, The time format is 4 bytes, big endian. It encodes the number of seconds from the 6-Jan 1980 00:00:00.
[in] | ctx | Chip implementation context |
[in] | gps_time | GPS Time in seconds |
err_t lr1110_modem_set_join_eui | ( | lriot_t * | ctx, |
lr1110_modem_join_eui_t | join_eui ) |
This command sets the Join EUI.
[in] | ctx | Chip implementation context |
[in] | join_eui | Join EUI buffer on 8 bytes |
err_t lr1110_modem_set_nb_trans | ( | lriot_t * | ctx, |
uint8_t | nb_trans ) |
Set the LoRaWAN number of retransmission.
[in] | ctx | Chip implementation context |
[in] | nb_trans | number of retransmission, the values are allowed between 0 and 15 |
err_t lr1110_modem_set_network_type | ( | lriot_t * | ctx, |
lr1110_modem_network_type_t | network_type ) |
Set the LoRaWAN network type.
[in] | ctx | Chip implementation context |
[in] | network_type | lr1110_modem_network_type_t |
err_t lr1110_modem_set_output_power_config | ( | lriot_t * | ctx, |
lr1110_modem_output_power_config_list_t | output_power_config ) |
This command sets 6 blocks (at most 6 dedicated power levels) of Tx output power configurations: expected power, configured power, PA, Tx parameters and PA ramp time. For the Tx power levels not defined in the 6 levels with this command, the modem always selects automatically the appropriate PA and Tx parameters configurations.
[in] | ctx | Chip implementation context |
[in] | output_power_config | Tx output power configuration block list, |
err_t lr1110_modem_set_region | ( | lriot_t * | ctx, |
lr1110_modem_regions_t | region ) |
This command sets the regulatory region. Additionally this command resets the ADR profile to Network Server Controlled. If different ADR profile is desired, the profile needs to be set again.
[in] | ctx | Chip implementation context |
[in] | region | LoRaWAN regulatory region lr1110_modem_regions_t |
err_t lr1110_modem_set_rf_output | ( | lriot_t * | ctx, |
lr1110_modem_radio_pa_selection_t | output ) |
Configure rf output configuration.
[in] | ctx | Chip implementation context |
[in] | output | Rf output lr1110_modem_radio_pa_selection_t |
err_t lr1110_modem_set_stream_redundancy_rate | ( | lriot_t * | ctx, |
uint8_t | stream_redundancy_rate ) |
Set the stream redundancy rate.
[in] | ctx | Chip implementation context |
[in] | stream_redundancy_rate | Streaming redundancy rate, the values are allowed between 0 and 110% |
err_t lr1110_modem_set_tx_power_offset | ( | lriot_t * | ctx, |
int8_t | tx_power_offset ) |
This command sets the board-specific correction offset for transmission power to be used. The offset depends on the board design and antenna matching and is expressed in dB (signed integer).
[in] | ctx | Chip implementation context |
[in] | tx_power_offset | Tx power offset correction in dBm |
err_t lr1110_modem_stream_init | ( | lriot_t * | ctx, |
uint8_t | port, | ||
lr1110_modem_encryption_mode_t | encryption_mode ) |
This command initializes redundant data streaming on a specific port. The StreamInit command can only be issued before the stream has been started using the SendStreamData command.
[in] | ctx | Chip implementation context |
[in] | port | Streaming port |
[in] | encryption_mode | Encryption mode lr1110_modem_encryption_mode_t |
err_t lr1110_modem_stream_status | ( | lriot_t * | ctx, |
uint8_t | port, | ||
lr1110_modem_stream_status_t * | stream_status ) |
This command queries the status of the data streaming buffer on the specified port. It returns two unsigned 16 bit integer values indicating the number of bytes pending for transmission and the number of bytes still free in the buffer.
[in] | ctx | Chip implementation context |
[in] | port | Streaming port |
[in] | stream_status | Streaming status lr1110_modem_stream_status_t |
err_t lr1110_modem_suspend | ( | lriot_t * | ctx, |
lr1110_modem_suspend_t | suspend ) |
This command temporarily suspends or resumes the modem’s radio operations. It can be used to prevent extra power consumption by the modem in case the application MCU temporarily needs more power itself and wants to prevent exceeding limits.
[in] | ctx | Chip implementation context |
[in] | suspend | Operations are suspended with parameter value 0x01 and resumed with parameter value 0x00 lr1110_modem_suspend_t |
err_t lr1110_modem_test_exit | ( | lriot_t * | ctx | ) |
Exit test mode and reset LR1110 modem.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_test_mode_start | ( | lriot_t * | ctx | ) |
This command is used to implement test functionality for regulatory conformance, certification, and functional testing. With the exception of the TST_START command, test commands are only available if test mode is active. Test mode can only be activated if the modem has not yet received a command that results in a radio operation. Once test mode is active, all other modem commands are disabled.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_test_nop | ( | lriot_t * | ctx | ) |
No operation. This command may be used to terminate an ongoing continuous TX operation.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_test_radio_rst | ( | lriot_t * | ctx | ) |
Reset the LR1110 radio.
[in] | ctx | Chip implementation context |
err_t lr1110_modem_test_read_packet_counter_rx_cont | ( | lriot_t * | ctx, |
uint32_t * | rx_packet_counter ) |
Read the packet counter received during continuously receive packets test.
[in] | ctx | Chip implementation context |
[in] | rx_packet_counter | The counter of packet received during RX continuous packet test |
err_t lr1110_modem_test_read_rssi | ( | lriot_t * | ctx, |
int8_t * | rssi ) |
Read RSSI after a Sub Gig / 2.4 Ghz / GNSS test rssi command.
[in] | ctx | Chip implementation context |
[out] | rssi | RSSI in dBm |
err_t lr1110_modem_test_rssi_2g4 | ( | lriot_t * | ctx, |
uint8_t | channel, | ||
uint16_t | time_ms, | ||
lr1110_modem_tst_mode_bw_t | bw ) |
Continuously receive packets on 2.4GHz radio path.
[in] | ctx | Chip implementation context |
[in] | channel | Wi-Fi Channel from 1 to 14 |
[in] | time_ms | time in millisecond of the radio acquisition |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
err_t lr1110_modem_test_rssi_gnss | ( | lriot_t * | ctx, |
lr1110_modem_tst_mode_constellation_t | constellation_modulation, | ||
uint16_t | time_ms, | ||
lr1110_modem_tst_mode_bw_t | bw ) |
Continuously receive packets on GNSS radio path.
[in] | ctx | Chip implementation context |
[in] | constellation_modulation | constellation used lr1110_modem_tst_mode_constellation_t |
[in] | time_ms | time in millisecond of the radio acquisition |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
err_t lr1110_modem_test_rssi_subghz | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
uint16_t | time_ms, | ||
lr1110_modem_tst_mode_bw_t | bw ) |
Continuously receive packets on Sub-GHz radio path.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | time_ms | time in millisecond of the radio acquisition |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
err_t lr1110_modem_test_rx_cont | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
lr1110_modem_tst_mode_sf_t | sf, | ||
lr1110_modem_tst_mode_bw_t | bw, | ||
lr1110_modem_tst_mode_cr_t | cr ) |
Continuously receive packets.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | sf | spreading factor lr1110_modem_tst_mode_sf_t |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
[in] | cr | Coding Rate lr1110_modem_tst_mode_cr_t |
err_t lr1110_modem_test_tx_cont | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
int8_t | tx_power, | ||
lr1110_modem_tst_mode_sf_t | sf, | ||
lr1110_modem_tst_mode_bw_t | bw, | ||
lr1110_modem_tst_mode_cr_t | cr, | ||
uint8_t | payload_length ) |
Continuously transmit packets as fast as possible.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | tx_power | Tx power in dBm |
[in] | sf | spreading factor lr1110_modem_tst_mode_sf_t |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
[in] | cr | Coding Rate lr1110_modem_tst_mode_cr_t |
[in] | payload_length | Payload length |
err_t lr1110_modem_test_tx_cw | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
int8_t | tx_power ) |
Transmit a continuous wave.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | tx_power | Tx power in dBm |
err_t lr1110_modem_test_tx_single | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
int8_t | tx_power, | ||
lr1110_modem_tst_mode_sf_t | sf, | ||
lr1110_modem_tst_mode_bw_t | bw, | ||
lr1110_modem_tst_mode_cr_t | cr, | ||
uint8_t | payload_length ) |
Transmit a single packet.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | tx_power | Tx power in dBm |
[in] | sf | spreading factor lr1110_modem_tst_mode_sf_t |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
[in] | cr | Coding Rate lr1110_modem_tst_mode_cr_t |
[in] | payload_length | Payload length |
err_t lr1110_modem_test_tx_single_preamble | ( | lriot_t * | ctx, |
uint32_t | frequency, | ||
int8_t | tx_power, | ||
lr1110_modem_tst_mode_sf_t | sf, | ||
lr1110_modem_tst_mode_bw_t | bw, | ||
lr1110_modem_tst_mode_cr_t | cr, | ||
uint8_t | payload_length, | ||
uint16_t | preamble_length ) |
Transmit a single packet with the number of preamble configurable.
[in] | ctx | Chip implementation context |
[in] | frequency | Frequency in Hz |
[in] | tx_power | Tx power in dBm |
[in] | sf | spreading factor lr1110_modem_tst_mode_sf_t |
[in] | bw | bandwidth lr1110_modem_tst_mode_bw_t |
[in] | cr | Coding Rate lr1110_modem_tst_mode_cr_t |
[in] | payload_length | Payload length |
[in] | preamble_length | Preamble Length |
err_t lr1110_modem_upload_data | ( | lriot_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | length ) |
This command can be used to repeatedly set file data to be uploaded. The file data needs to be split into parts of maximum 255 bytes each and the submitted parts will be appended to an internal buffer. In total exactly as many bytes as specified by the UploadInit command have to be provided. The buffer allocated for file uploads is 8K bytes.
[in] | ctx | Chip implementation context |
[in] | data_buf | File data to be uploaded |
[in] | length | Data length |
err_t lr1110_modem_upload_init | ( | lriot_t * | ctx, |
uint8_t | port, | ||
lr1110_modem_encryption_mode_t | encryption_mode, | ||
uint16_t | size, | ||
uint16_t | interval ) |
This command prepares a fragmented file upload. It specifies the port for the subsequent upload, optional encryption mode, file size, and average frame transmission interval (in seconds).
[in] | ctx | Chip implementation context |
[in] | port | LoRaWAN port |
[in] | encryption_mode | Encryption mode lr1110_modem_encryption_mode_t |
[in] | size | Upload size |
[in] | interval | Transmission interval in seconds |
err_t lr1110_modem_upload_start | ( | lriot_t * | ctx, |
uint32_t | crc ) |
After all data bytes indicated to UploadInit have been provided using UploadData this command can be issued to actually start the transmission stream.
[in] | ctx | Chip implementation context |
[in] | crc | CRC parameter which must match the CRC of the supplied data |
err_t lr1110_modem_write_user_defined_charge_counter | ( | lriot_t * | ctx, |
uint16_t | charge ) |
Write a charge value to user defined charger counter.
[in] | ctx | Chip implementation context |
[in] | charge | user defined charger counter |