32 #include <mraa/uart.h> 34 #include "rn2903_defs.h" 51 mraa_uart_context uart;
56 char resp_data[RN2903_MAX_BUFFER];
71 int cmd_resp2_wait_ms;
77 char hardware_eui[RN2903_MAX_HEX_EUI64 + 1];
80 uint16_t mac_status_word;
82 RN2903_MAC_STATUS_T mac_mac_status;
124 unsigned int wait_ms);
136 unsigned int wait_ms);
149 unsigned int millis);
384 const char *src,
int len);
424 RN2903_JOIN_TYPE_T type);
453 RN2903_MAC_MSG_TYPE_T type,
454 int port,
const char *payload);
470 const char *payload);
663 unsigned int baudrate);
679 RN2903_FLOW_CONTROL_T fc);
const char * rn2903_to_hex(const rn2903_context dev, const char *src, int len)
Definition: rn2903.c:421
upm_result_t rn2903_set_device_addr(const rn2903_context dev, const char *str)
Definition: rn2903.c:799
upm_result_t rn2903_set_application_eui(const rn2903_context dev, const char *str)
Definition: rn2903.c:735
const char * rn2903_get_response(const rn2903_context dev)
Definition: rn2903.c:407
const char * rn2903_from_hex(const rn2903_context dev, const char *src)
Definition: rn2903.c:459
upm_result_t rn2903_get_device_eui(const rn2903_context dev)
Definition: rn2903.c:725
upm_result_t rn2903_set_device_eui(const rn2903_context dev, const char *str)
Definition: rn2903.c:704
struct _rn2903_context * rn2903_context
rn2903_context rn2903_init_tty(const char *uart_tty, unsigned int baudrate)
Definition: rn2903.c:180
upm_result_t rn2903_mac_pause(const rn2903_context dev)
Definition: rn2903.c:885
upm_result_t rn2903_set_flow_control(const rn2903_context dev, RN2903_FLOW_CONTROL_T fc)
Definition: rn2903.c:669
upm_result_t rn2903_reset(const rn2903_context dev)
Definition: rn2903.c:562
void rn2903_set_debug(const rn2903_context dev, bool enable)
Definition: rn2903.c:269
int rn2903_write(const rn2903_context dev, const char *buffer, size_t len)
Definition: rn2903.c:223
upm_result_t rn2903_get_device_addr(const rn2903_context dev)
Definition: rn2903.c:821
int rn2903_read(const rn2903_context dev, char *buffer, size_t len)
Definition: rn2903.c:215
upm_result_t rn2903_get_application_eui(const rn2903_context dev)
Definition: rn2903.c:757
upm_result_t rn2903_get_application_key(const rn2903_context dev)
Definition: rn2903.c:789
rn2903_context rn2903_init(unsigned int uart, unsigned int baudrate)
Definition: rn2903.c:159
RN2903_RESPONSE_T rn2903_radio_rx(const rn2903_context dev, int window_size)
Definition: rn2903.c:1043
bool rn2903_find(const rn2903_context dev, const char *str)
Definition: rn2903.c:696
upm_result_t rn2903_mac_resume(const rn2903_context dev)
Definition: rn2903.c:895
void rn2903_drain(const rn2903_context dev)
Definition: rn2903.c:292
void rn2903_set_response_wait_time(const rn2903_context dev, unsigned int wait_ms)
Definition: rn2903.c:276
uint16_t rn2903_get_mac_status_word(const rn2903_context dev)
Definition: rn2903.c:548
upm_result_t rn2903_set_network_session_key(const rn2903_context dev, const char *str)
Definition: rn2903.c:831
RN2903_RESPONSE_T rn2903_command_with_arg(const rn2903_context dev, const char *cmd, const char *arg)
Definition: rn2903.c:390
void rn2903_close(rn2903_context dev)
Definition: rn2903.c:200
upm_result_t rn2903_mac_save(const rn2903_context dev)
Definition: rn2903.c:875
bool rn2903_autobaud(const rn2903_context dev, int retries)
Definition: rn2903.c:1103
RN2903_RESPONSE_T rn2903_waitfor_response(const rn2903_context dev, int wait_ms)
Definition: rn2903.c:312
RN2903_MAC_TX_STATUS_T rn2903_mac_tx(const rn2903_context dev, RN2903_MAC_MSG_TYPE_T type, int port, const char *payload)
Definition: rn2903.c:905
RN2903_MAC_STATUS_T rn2903_get_mac_status(const rn2903_context dev)
Definition: rn2903.c:555
size_t rn2903_get_response_len(const rn2903_context dev)
Definition: rn2903.c:414
bool rn2903_data_available(const rn2903_context dev, unsigned int millis)
Definition: rn2903.c:233
upm_result_t rn2903_mac_set_battery(const rn2903_context dev, int level)
Definition: rn2903.c:1080
upm_result_t rn2903_set_application_key(const rn2903_context dev, const char *str)
Definition: rn2903.c:767
RN2903_RESPONSE_T rn2903_radio_tx(const rn2903_context dev, const char *payload)
Definition: rn2903.c:1001
RN2903_JOIN_STATUS_T rn2903_join(const rn2903_context dev, RN2903_JOIN_TYPE_T type)
Definition: rn2903.c:588
upm_result_t rn2903_update_mac_status(const rn2903_context dev)
Definition: rn2903.c:507
const char * rn2903_get_hardware_eui(const rn2903_context dev)
Definition: rn2903.c:500
void rn2903_set_response2_wait_time(const rn2903_context dev, unsigned int wait_ms)
Definition: rn2903.c:284
upm_result_t rn2903_set_baudrate(const rn2903_context dev, unsigned int baudrate)
Definition: rn2903.c:243
const char * rn2903_get_radio_rx_payload(const rn2903_context dev)
Definition: rn2903.c:1151
RN2903_RESPONSE_T rn2903_command(const rn2903_context dev, const char *cmd)
Definition: rn2903.c:364
upm_result_t rn2903_set_application_session_key(const rn2903_context dev, const char *str)
Definition: rn2903.c:853