rtl433
UNKNOWN
RTL-433 utility
|
Generic RF data receiver and decoder for ISM band devices using RTL-SDR and SoapySDR. More...
Go to the source code of this file.
Functions | |
char const * | version_string (void) |
struct r_cfg * | r_create_cfg (void) |
void | r_init_cfg (struct r_cfg *cfg) |
void | r_free_cfg (struct r_cfg *cfg) |
void | update_protocol (struct r_cfg *cfg, struct r_device *r_dev) |
void | register_protocol (struct r_cfg *cfg, struct r_device *r_dev, char *arg) |
void | free_protocol (struct r_device *r_dev) |
void | unregister_protocol (struct r_cfg *cfg, struct r_device *r_dev) |
void | register_all_protocols (struct r_cfg *cfg, unsigned disabled) |
void | update_protocols (struct r_cfg *cfg) |
void | calc_rssi_snr (struct r_cfg *cfg, struct pulse_data *pulse_data) |
char * | time_pos_str (struct r_cfg *cfg, unsigned samples_ago, char *buf) |
char const ** | well_known_output_fields (struct r_cfg *cfg) |
char const ** | determine_csv_fields (struct r_cfg *cfg, char const **well_known, int *num_fields) |
int | run_ook_demods (struct list *r_devs, struct pulse_data *pulse_data) |
int | run_fsk_demods (struct list *r_devs, struct pulse_data *fsk_pulse_data) |
void | event_occurred_handler (struct r_cfg *cfg, struct data *data) |
Pass the data structure to all output handlers. More... | |
void | data_acquired_handler (struct r_device *r_dev, struct data *data) |
Pass the data structure to all output handlers. More... | |
struct data * | create_report_data (struct r_cfg *cfg, int level) |
void | flush_report_data (struct r_cfg *cfg) |
void | add_json_output (struct r_cfg *cfg, char *param) |
void | add_csv_output (struct r_cfg *cfg, char *param) |
void | add_kv_output (struct r_cfg *cfg, char *param) |
void | add_mqtt_output (struct r_cfg *cfg, char *param) |
void | add_syslog_output (struct r_cfg *cfg, char *param) |
void | add_null_output (struct r_cfg *cfg, char *param) |
void | start_outputs (struct r_cfg *cfg, char const **well_known) |
void | add_dumper (struct r_cfg *cfg, char const *spec, int overwrite) |
void | add_infile (struct r_cfg *cfg, char *in_file) |
Generic RF data receiver and decoder for ISM band devices using RTL-SDR and SoapySDR.
Copyright (C) 2019 Christian W. Zuckschwerdt zany@ triq .net
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
void add_csv_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References data_output_csv_create(), fopen_output(), list_push(), and r_cfg::output_handler.
Referenced by parse_conf_option().
void add_dumper | ( | struct r_cfg * | cfg, |
char const * | spec, | ||
int | overwrite | ||
) |
void add_infile | ( | struct r_cfg * | cfg, |
char * | in_file | ||
) |
References r_cfg::in_files, and list_push().
Referenced by main(), and parse_conf_option().
void add_json_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References data_output_json_create(), fopen_output(), list_push(), and r_cfg::output_handler.
Referenced by parse_conf_option().
void add_kv_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References data_output_kv_create(), fopen_output(), list_push(), and r_cfg::output_handler.
Referenced by main(), and parse_conf_option().
void add_mqtt_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References data_output_mqtt_create(), r_cfg::dev_query, hostport_param(), list_push(), and r_cfg::output_handler.
Referenced by parse_conf_option().
void add_null_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References list_push(), and r_cfg::output_handler.
Referenced by parse_conf_option().
void add_syslog_output | ( | struct r_cfg * | cfg, |
char * | param | ||
) |
References data_output_syslog_create(), hostport_param(), list_push(), and r_cfg::output_handler.
Referenced by parse_conf_option().
void calc_rssi_snr | ( | struct r_cfg * | cfg, |
struct pulse_data * | pulse_data | ||
) |
References r_cfg::center_frequency, r_cfg::demod, pulse_data::freq1_hz, pulse_data::freq2_hz, pulse_data::fsk_f1_est, pulse_data::fsk_f2_est, pulse_data::noise_db, pulse_data::ook_high_estimate, pulse_data::ook_low_estimate, pulse_data::rssi_db, r_cfg::samp_rate, dm_state::sample_size, and pulse_data::snr_db.
Referenced by sdr_callback().
References data_append(), DATA_ARRAY, DATA_DATA, DATA_INT, data_make(), DATA_STRING, DECODE_ABORT_EARLY, DECODE_ABORT_LENGTH, r_device::decode_events, DECODE_FAIL_MIC, DECODE_FAIL_OTHER, DECODE_FAIL_SANITY, r_device::decode_fails, r_device::decode_messages, r_device::decode_ok, r_cfg::demod, list::elems, r_cfg::frames_count, r_cfg::frames_events, r_cfg::frames_fsk, list::len, list_ensure_size(), list_free_elems(), list_push(), r_device::name, r_device::protocol_num, and dm_state::r_devs.
Referenced by main(), and sdr_callback().
Pass the data structure to all output handlers.
Frees data afterwards.
References celsius2fahrenheit(), cfg, r_cfg::conversion_mode, CONVERT_CUSTOMARY, CONVERT_SI, data_append(), DATA_DOUBLE, DATA_FORMAT, data_free(), DATA_INT, data_output_print(), data_prepend(), DATA_STRING, r_cfg::demod, list::elems, fahrenheit2celsius(), file_basename(), pulse_data::freq1_hz, pulse_data::freq2_hz, pulse_data::fsk_f2_est, dm_state::fsk_pulse_data, hpa2inhg(), r_cfg::in_filename, inch2mm(), inhg2hpa(), kmph2mph(), kpa2psi(), list::len, mm2inch(), mph2kmph(), r_device::name, r_cfg::new_model_keys, data::next, pulse_data::noise_db, r_device::output_ctx, r_cfg::output_handler, r_cfg::output_tag, r_device::protocol_num, psi2kpa(), dm_state::pulse_data, r_cfg::report_description, r_cfg::report_meta, r_cfg::report_protocol, r_cfg::report_time, REPORT_TIME_OFF, pulse_data::rssi_db, pulse_data::snr_db, pulse_data::start_ago, str_endswith(), str_replace(), strdup(), and time_pos_str().
Referenced by register_protocol().
char const** determine_csv_fields | ( | struct r_cfg * | cfg, |
char const ** | well_known, | ||
int * | num_fields | ||
) |
References r_cfg::demod, r_device::disabled, list::elems, r_device::fields, list::len, list_ensure_size(), list_push_all(), r_device::name, r_device::protocol_num, and dm_state::r_devs.
Referenced by start_outputs().
Pass the data structure to all output handlers.
Frees data afterwards.
References data_free(), data_output_print(), data_prepend(), DATA_STRING, list::elems, list::len, r_cfg::output_handler, r_cfg::report_time, REPORT_TIME_OFF, and time_pos_str().
Referenced by main(), and sdr_callback().
void flush_report_data | ( | struct r_cfg * | cfg | ) |
References r_device::decode_events, r_device::decode_fails, r_device::decode_messages, r_device::decode_ok, r_cfg::demod, list::elems, r_cfg::frames_count, r_cfg::frames_events, r_cfg::frames_fsk, and dm_state::r_devs.
Referenced by main(), and sdr_callback().
void free_protocol | ( | struct r_device * | r_dev | ) |
References r_device::decode_ctx.
Referenced by parse_conf_option(), and unregister_protocol().
struct r_cfg* r_create_cfg | ( | void | ) |
References cfg, and r_init_cfg().
void r_free_cfg | ( | struct r_cfg * | cfg | ) |
References dm_state::am_analyze, am_analyze_free(), data_output_free(), r_cfg::demod, r_cfg::dev, dm_state::dumper, list::elems, file_info_t::file, r_cfg::in_files, list_free_elems(), r_cfg::output_handler, dm_state::pulse_detect, pulse_detect_free(), dm_state::r_devs, sdr_close(), and sdr_deactivate().
Referenced by main().
void r_init_cfg | ( | struct r_cfg * | cfg | ) |
References r_cfg::conversion_mode, CONVERT_NATIVE, r_cfg::demod, dm_state::dumper, r_cfg::in_files, dm_state::level_limit, list_ensure_size(), r_cfg::out_block_size, r_cfg::output_handler, dm_state::r_devs, and r_cfg::samp_rate.
Referenced by main(), and r_create_cfg().
void register_all_protocols | ( | struct r_cfg * | cfg, |
unsigned | disabled | ||
) |
References r_cfg::devices, r_device::disabled, r_cfg::num_r_devices, and register_protocol().
Referenced by main(), and parse_conf_option().
References cfg, r_device::create_fn, data_acquired_handler(), r_cfg::demod, list_push(), r_device::name, r_device::output_ctx, r_device::output_fn, r_device::protocol_num, dm_state::r_devs, update_protocol(), and r_cfg::verbosity.
Referenced by parse_conf_option(), and register_all_protocols().
int run_fsk_demods | ( | struct list * | r_devs, |
struct pulse_data * | fsk_pulse_data | ||
) |
References list::elems, FSK_PULSE_MANCHESTER_ZEROBIT, FSK_PULSE_PCM, FSK_PULSE_PWM, r_device::modulation, OOK_PULSE_DMC, OOK_PULSE_MANCHESTER_ZEROBIT, OOK_PULSE_PCM_RZ, OOK_PULSE_PIWM_DC, OOK_PULSE_PIWM_RAW, OOK_PULSE_PPM, OOK_PULSE_PWM, OOK_PULSE_PWM_OSV1, pulse_demod_manchester_zerobit(), pulse_demod_pcm(), and pulse_demod_pwm().
Referenced by main(), and sdr_callback().
int run_ook_demods | ( | struct list * | r_devs, |
struct pulse_data * | pulse_data | ||
) |
References list::elems, FSK_PULSE_MANCHESTER_ZEROBIT, FSK_PULSE_PCM, FSK_PULSE_PWM, r_device::modulation, OOK_PULSE_DMC, OOK_PULSE_MANCHESTER_ZEROBIT, OOK_PULSE_PCM_RZ, OOK_PULSE_PIWM_DC, OOK_PULSE_PIWM_RAW, OOK_PULSE_PPM, OOK_PULSE_PWM, OOK_PULSE_PWM_OSV1, pulse_demod_dmc(), pulse_demod_manchester_zerobit(), pulse_demod_osv1(), pulse_demod_pcm(), pulse_demod_piwm_dc(), pulse_demod_piwm_raw(), pulse_demod_ppm(), and pulse_demod_pwm().
Referenced by main(), and sdr_callback().
void start_outputs | ( | struct r_cfg * | cfg, |
char const ** | well_known | ||
) |
References data_output_start(), determine_csv_fields(), list::elems, list::len, output_fields, and r_cfg::output_handler.
Referenced by main().
char* time_pos_str | ( | struct r_cfg * | cfg, |
unsigned | samples_ago, | ||
char * | buf | ||
) |
References r_cfg::demod, format_time_str(), dm_state::now, r_cfg::report_time, r_cfg::report_time_hires, REPORT_TIME_ISO, REPORT_TIME_SAMPLES, REPORT_TIME_UNIX, r_cfg::samp_rate, dm_state::sample_file_pos, sample_pos_str(), timeval::tv_sec, timeval::tv_usec, and usecs_time_str().
Referenced by data_acquired_handler(), event_occurred_handler(), and sdr_callback().
References r_cfg::demod, list::elems, free_protocol(), list::len, list_remove(), r_device::name, and dm_state::r_devs.
Referenced by parse_conf_option().
References r_device::f_long_width, r_device::f_short_width, r_device::gap_limit, r_device::long_width, r_device::new_model_keys, r_cfg::new_model_keys, r_device::reset_limit, r_device::s_gap_limit, r_device::s_long_width, r_device::s_reset_limit, r_device::s_short_width, r_device::s_sync_width, r_device::s_tolerance, r_cfg::samp_rate, r_device::short_width, r_device::sync_width, r_device::tolerance, r_device::verbose, r_device::verbose_bits, r_cfg::verbose_bits, and r_cfg::verbosity.
Referenced by register_protocol(), and update_protocols().
void update_protocols | ( | struct r_cfg * | cfg | ) |
References r_cfg::demod, list::elems, dm_state::r_devs, r_cfg::samp_rate, and update_protocol().
Referenced by main().
char const* version_string | ( | void | ) |
Referenced by print_version().
char const** well_known_output_fields | ( | struct r_cfg * | cfg | ) |
References r_cfg::output_tag, r_cfg::report_description, r_cfg::report_meta, r_cfg::report_protocol, r_cfg::verbose_bits, and well_known_default.
Referenced by main().