Command Line Interface
This section is fairly incomplete.
To talk to your RFQuack dongle, you have two options:
Let's see the pros and cons of each.
(and hardware serial console)
Install or have access to an MQTT broker (Mosquitto is just perfect for this):
- you don't need cables (hint: your RFQuack hardware can be battery powered)
- if you want to connect the RFQuack hardware to your computer, you get a free (hardware) serial console for monitoring on the USB port
- you need network connectivity (WiFi or cellular)
- there's latency
Connect the dongle via USB
- there's little latency
you don't need to rely on network stability
- your range is limited by the length of your USB cable (you don't say! 😮)
Command Line Interface¶
Now you can use RFQuack via the IPython-based shell.
Test the Shell¶
CLI via MQTT Transport¶
To use this, you'll have to build a firmware configured to use the MQTT transport. Please check the
USE_MQTT configuration variable in this manual.
CLI via Serial Transport¶
This is the default transport, unless
USE_MQTT is set in the
$ rfq tty -P /dev/ttyUSB0 2019-04-10 18:04:31 local RFQuack INFO Transport initialized 2019-04-10 18:04:31 local RFQuack INFO Transport initialized (QoS = 2): mid = 2 ... RFQuack(/dev/ttyUSB0, 115200,8,N,1)> q.radioA.set_modem_config(modulation="OOK", carrierFreq=434.437) result = 0 message = 2 changes applied and 0 failed. RFQuack(/dev/ttyUSB0, 115200,8,N,1)> q.radioA.rx() result = 0 message = ...
At this point you're good to go from here!
RFQuack(/dev/cu.usbserial-0001)> q.radioA.help() Help for 'radioA': > q.radioA.set_modem_config(rfquack_ModemConfig) Apply configuration to modem. > q.radioA.set_packet_len(rfquack_PacketLen) Set packet length configuration (fixed/variable). > q.radioA.set_register(rfquack_Register) Sets register on underlying modem. > q.radioA.get_register(rfquack_UintValue) Retrieve register value from underlying modem. > q.radioA.send_to_transport = ... Whatever to send received packets to transport > q.radioA.send(rfquack_Packet) Send a packet over the air > q.radioA.rx(rfquack_VoidValue) Puts modem in RX mode > q.radioA.tx(rfquack_VoidValue) Puts modem in TX mode > q.radioA.jam(rfquack_VoidValue) Starts jamming > q.radioA.idle(rfquack_VoidValue) Puts modem in IDLE mode Check src/rfquack.proto for type definitions