- dirtpan.c (open_tun): if a command is given, set the environment
variable ITF to the interface name and system(3) the command
- dirtpan.c (usage, main): accept an interface configuration command as
the 4th command-line argument
Note that we still waste at least one perfectly good frame. However,
instead of implementing some fancy arbitration, it's better if we
just make the whole thing bidirectional in the future.
The IEEE 802.15.4 kernel stack doesn't implement ACKs yet and prints
a warning if we request them. Since dirtpan has its own ACKs, we
just disable IEEE 802.15.4 ACKs for now.
- dirtpan.c (debug_ip): only dump local packets if debug > 1
- dirtpan.c (debug_dirt): dump packet content only if debug > 1
- dirtpan.c (debug_dirt): made packet content dump more readable
- dirtpan.c (debug_dirt): added terse debug output for debug == 1
- dirtpan.c (usage): doubling -d now has a meaning
- usbwait.c (need_removal, wait_for_usb): if need_removal is set, wait
for the device to be removed before trying to find it
- usbwait.c (usage, main): new option -r to set need_removal
- usbwait/usbwait.c: update the USB device tree until the specified
device is detected
- usbwait/Makefile: build usbwait (host only)
- Makefile (DIRS, BEN_DIRS, upload): separated subdirectories with tools
that can run on the Ben from those that can't
- Makefile (DIRS): added usbwait/
- usbopen.c (open_usb): determine vendor and product objective outside
the loop
- usbopen.c (open_usb): check vendor and product only if non-zero
- usbopen.c (bad_id, parse_usb_id): vendor and product can now be
omitted
- tools/include/usbopen.h (usb_rescan), tools/lib/usbopen.c (initialized,
initialize, usb_rescan): usb_rescan forces a re-initialization of
libusb and a new scan of the USB device tree
- include/atrf.h (atrf_driver_spec), lib/atrf.c (atrf_driver_spec):
new function to retrieve the local or remote/final driver spec
- lib/atrf.c (struct atrf_dsc, atrf_open, atrf_close): record the local
driver spec
- lib/driver.h (struct atrf_driver): new driver function "driver_spec"
to retrieve the driver spec
- lib/atnet.c (struct atnet_dsc, atnet_open, atnet_close): maintain a
cache for the driver spec
- lib/atnet.c (atnet_driver_spec, atnet_driver): added support for the
"driver_spec" function
- atrf-proxy/PROTOCOL, atrf-proxy/atrf-proxy.c (cmd_zero): added command
SPEC to retrieve the (final) driver spec
- atrf-id/atrf-id.c (usage, main): added option -s to retrieve the
driver spec. One -s retrieves the local spec, -s -s the remote/final.
- Makefile (DIRS): added atrf-xmit
- atrf-xmit/Makefile, atrf-xmit/atrf-xmit.c: new utility atrf-xmit to
rapidly send packets from one device to another and analyze the outcome
- gui.c (disc, indicate): moved drawing of disc to separate function
- gui.c (triangle, up, down): draw an up/down triangle
- gui.c (indicate): use up/down triangle for over/under
- atrf-path.c (do_sweeps): return a pass/fail/undecided value
- gui.h (gui), gui.c (gui): return a pass/fail/undecided value
- gui.c (gui): return pass/fail when P or F is pressed; exit
unconditionally if Q is pressed
- atrf-path.c (main): according to the decision of "gui" or "do_sweeps",
print "#PASS", "#FAIL", or nothing
- gui.c (avg2y, segment): moved mapping from measurement to y position
to separate function, to allow for sharing
- gui.c (LIMIT_RGBA, draw_limit, gui): draw the limits
- sweep.h (MIN_DIFF, MAX_DIFF, struct sweep): added min/max profile
- sweep.h (do_sweep), atrf-path.c (do_half_sweep, do_sweep): compare
result against limits and return pass/fail decision
- sweep.h (N_CHAN), atrf-path.c (do_half_sweep, do_sweeps), gui.c
(N_CHAN): declare number of channels in one central place instead of
scattering it all around the program
- atrf-path.c (do_read_profile, read_profile, usage, main): new option -P
to read a min/max profile
- gui.c (indicate, main): moved indicator to separate function and
improved blink logic
- gui.c (OVER_RGBA, UNDER_RGBA, indicate, main): change color to indicate
pass/fail
atrf-path -T +0.5 -g ... 10 10 time:
before: 0.32-0.33 s
after: 0.27-0.29 s (88%)
- atrf-path.c (sample): force cw test setup if never done before
- atrf-path.c (do_half_sweep): only request cw test setup if sweeping
both offsets
atrf-path -T +0.5 -g ... 10 10 time:
before (both offsets) 0.65 s
after (one offset) 0.32-0.33 s (50%)
- atrf-path.c (usage, main): new option -T to specify which offset to
sweep (default: sweep both)
- atrf-path.c (do_half_sweep): only sample points with the desired offset
- atrf-path.c (print_sweep): only prints points we've sweeped
- gui.c (segment, draw): inverted flag logic from "have_last" to "first"
- gui.c (draw): only plot points we've sweeped
- gui.c (gui): pass the offset selection to "draw"
atrf-path -g ... 10 10 time:
before 1.92 s
after 0.65 s (34%)
- atrf-path.c (do_sweep): separate -0.5 MHz and +0.5 MHz sweep
- atrf-path.c (sample, do_sweep): set up cw test mode only twice per
sweep (once for each offset), and simply resume in all other cases
atrf-path -g ... 10 10 time is now stable at 1.92 s
- atrf-path.c (sample): commented-out init sequence needed for AT86RF230
- atrf-path.c (sample, do_sweep): set TX channel only once per +/-0.5 MHz
pair
- atrf-path.c (sample, do_sweep): "sample" no longer needs the channel
argument
- atrf-path.c (sample, main): do TX init only once
- lib/cwtest.c (enter_test_mode_231, prepare_test_mode_231,
start_test_mode_231, cw_test_begin): broke enter_test_mode_231 into
a slow setup component and a fast start/resume component
- include/cwtest.h (cw_test_resume), lib/cwtest.c (cw_test_resume):
resume transmission in a previously set up test mode
atrf-path -g ... 10 10 time:
before 2.08 s
after 1.92-1.93 s (92-93%)
- atrf-path.c (set_channel, init_common): moved setting of the channel
to separate function, for better granularity
- atrf-path.c (init_common, init_tx, init_rx, sample, do_sweep): the
init_* functions no longer set the channel; use set_channel
- atrf-path.c (main): initialize the receiver only once
- atrf-path.c (usage, main): new option -g to invoke the GUI
- atrf-path.c (usage, main): in GUI mode, the number of sweeps is optional
(default: infinite)
- atrf-path.c (main), gui.h (gui), gui.c (gui): exit after the specified
number of sweeps
The transceiver reset takes quite a while. It seems that also going into
sleep mode has the effect of stopping cw test mode and it's much faster.
This has only been tried on the AT86RF231. For AT86RF230, we therefore
still use the reset.
Performance improvement:
Measurement: atrf-path sweep time in GUI mode, averaging over 10 samples.
Running on PC with remote ATBEN transceivers.
before 7.36-7.68 s
after 2.08 s (27-28% of previous time)
- gui.h, gui.c: plot sweep results with SDL_gfx
- Makefile: added target-specific variables for SDL and SDL_gfx
- atrf-path.c (main): invoke the GUI if the number of sweeps is zero
- sweep.h (struct sweep ), atrf-path.c (sample, do_sweeps, main): pass
sweep parameters via a struct
- sweep.h (do_sweep), atrf-path.c (do_sweep, do_sweeps): separated single
sweep and made it public
- sweep.h (struct sample), atrf-path.c (sample, print_sweep, do_sweeps):
made "sample" and do_sweep return the sample value/vector and moved
output from "sample" to print_sweep
- atrf-path.c (rssi_to_dBm, sample): moved RSSI value to dBm conversion to
separate function
- atrf-path.c (sample): corrected calculation of average
- atrf-path.c (sample): also output minimum and maximum value
- plot: new option -e to display extremal values
- plot: added comment to explain y range