1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-23 00:42:28 +02:00
Commit Graph

168 Commits

Author SHA1 Message Date
Werner Almesberger
ff6c8340c8 tools/atrf-xtal/: new option -b for relative result; -p for pass/fail
- atrf-xtal.c (eval): return the value instead of printing it
- atrf-xtal.c (usage, main): new option -b for reporting the deviation
  from a base count
- atrf-xtal.c (eval): new option -p to report an error for deviations
  outside the specified bound
2011-05-18 23:04:54 -03:00
Werner Almesberger
558017e34d tools/atrf-xmit/atrf-xmit.c (xfer_one, usage, main): new option -v (verbose) 2011-05-18 16:49:38 -03:00
Werner Almesberger
81a8e138c7 tools/dirtpan/dirtpan.c: new option -b to background/daemonize
- dirtpan.c (usage): added detailed description of the arguments
- dirtpan.c (usage, main): new option -b to daemonize after initialization
2011-05-18 14:07:05 -03:00
Werner Almesberger
1bfe86ac1b tools/atrf-proxy/atrf-proxy.c: new option -b to background/daemonize
- atrf-proxy.c (usage): added detailed description of the arguments
- atrf-proxy.c (usage, main): new option -b to daemonize after
  initialization
2011-05-18 13:53:01 -03:00
Werner Almesberger
43f179d6d8 tools/lib/: new helper function for daemonification
- include/daemon.h (daemonize), lib/daemon.c: shed all ties with the
  process' previous surroundings
- lib/Makefile (OBJS): added daemon.o
2011-05-18 13:34:26 -03:00
Werner Almesberger
b24a189189 tools/lib/atnet.c (atnet_set_clkm): corrected return code (1 means success here) 2011-05-18 00:20:00 -03:00
Werner Almesberger
7e2c576f7b tools/dirtpan/: rewritten for simultaneous reception and transmission
Note that the PHY is still half-duplex, but we don't need to insist
on the entire packet reception/transmission to finish before letting
the peer have its say.
2011-05-12 16:26:38 -03:00
Werner Almesberger
de72af351f tools/dirtpan/: if given an interface conf command, run it with tunX in $ITF
- 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
2011-05-11 16:46:29 -03:00
Werner Almesberger
e17881c91b tools/dirtpan/dirtpan.c (rx_pck): break tie if both sides are in s_tx
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.
2011-05-11 16:29:26 -03:00
Werner Almesberger
2c7d06f6f2 tools/dirtpan/dirtpan.c (rx_pck): immediately ack all data packets
We basically take care of the acking the 802.15.4 layer should do.
2011-05-11 16:25:10 -03:00
Werner Almesberger
354789da8d tools/dirtpan/dirtpan.c (timeout): fencepost error when normalizing tv_usec 2011-05-11 15:43:07 -03:00
Werner Almesberger
171500e414 tools/dirtpan/dirtpan.c (open_net): turn off WPAN_WANTACK
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.
2011-05-11 14:41:11 -03:00
Werner Almesberger
a1a508e749 tools/dirtpan/: introduced terse debug messages also for timeouts
- dirtpan.c (debug_event, ack_timeout, reass_timeout): renamed
  debug_event to debug_timeout
- dirtpan.c (debug_timeout): print a terse debug message if debug == 1
2011-05-11 14:30:54 -03:00
Werner Almesberger
29e56c77ac tools/dirtpan/: -d now generates terse output; -d -d dumps full content
- 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
2011-05-11 14:15:45 -03:00
Werner Almesberger
dbad7ae887 tools/dirtpan/: quick and dirty IPv4 over 802.15.4 tunnel (in progress) 2011-05-11 07:39:23 -03:00
Werner Almesberger
62a03bbf32 tools/usbwait/usbwait.c: new option -r to require removal before appearance
- 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
2011-05-11 05:21:45 -03:00
Werner Almesberger
7037858a3e tools/usbwait/: new tool to wait for a USB device to appear
- 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/
2011-05-11 03:47:55 -03:00
Werner Almesberger
55d220b400 tools/lib/usbopen.c: make vendor and/or product optional
- 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
2011-05-11 03:40:03 -03:00
Werner Almesberger
3deac4165e libatrf: new function usb_rescan to force next open_usb to scan tree again
- 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
2011-05-11 03:22:53 -03:00
Werner Almesberger
6fc212848a tools/lib/usbopen.h: moved to tools/include/, to allow for sharing 2011-05-11 03:20:36 -03:00
Werner Almesberger
27c1c7ba89 tools/Makefile.common (CFLAGS): added -g 2011-05-09 23:53:28 -03:00
Werner Almesberger
180603e6ba atrf-xtal/atben.c: added missing #include; corrected garbled comment 2011-05-09 21:09:38 -03:00
Werner Almesberger
89bcd3cfa8 tools/lib/atben.c (atben_open): corrected comment claiming the clock was 316 MHz 2011-04-25 23:52:08 -03:00
Werner Almesberger
d184d1d2f5 atrf-xtal/atben.c: mention that the AT86RF230 driver can also be disabled 2011-04-23 11:57:04 -03:00
Werner Almesberger
2961482cac tools: atrf-id option -s to retrieve driver spec, with necessary infrastructure
- 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.
2011-04-20 08:58:17 -03:00
Werner Almesberger
4fa909debc libatrf: renamed driver specification argument from "arg" to "spec"
- tools/include/atrf.h (atrf_open), tools/lib/atrf.c (select_driver,
  atrf_open): renamed "arg" argument to "spec"
2011-04-20 08:15:19 -03:00
Werner Almesberger
d7d2bd4704 tools/Makefile (upload): copy tools to /usr/bin instead of $HOME 2011-04-20 01:04:53 -03:00
Werner Almesberger
6eebf37bab tools/atrf-xtal/Makefile (clean, spotless): also clean up if target is the host 2011-04-20 01:02:43 -03:00
Werner Almesberger
a15ab43b1c tools/lib/atrf.c (select_driver): "default" selects the default driver 2011-04-19 23:37:44 -03:00
Werner Almesberger
c4167d8df4 atrf-xmit.c (usage): the "packets" argument is optional 2011-04-19 15:10:17 -03:00
Werner Almesberger
16b095ca08 atrf-txrx.c (receive_message, receive_pcap): also ignore IRQ_AMI
The "raw" patterns can accidently trigger an address match, particularly
in BER test mode.
2011-04-19 06:59:19 -03:00
Werner Almesberger
9ab94a53e2 tools: new utility atrf-xmit for fast transmission tests
- 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
2011-04-19 06:35:31 -03:00
Werner Almesberger
5e196552c5 atrf-txrx.c (main): option parsing in PER test mode segfaulted 2011-04-19 04:51:18 -03:00
Werner Almesberger
07a2e5c5cc atrf-path/gui.c: indicate status not only with color but also with shape
- 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
2011-04-13 21:32:02 -03:00
Werner Almesberger
66d641f624 atrf-path/genpathprof: profile generator
- genpathprof: generate a profile for atrf-path from measurements and/or
  user-provided limits
- profile.example: example profile
2011-04-13 21:13:26 -03:00
Werner Almesberger
87b76af2fa atrf-path.c (usage, main): use ... [[sweeps] samples] with and without GUI
This was just too confusing ...
2011-04-13 20:55:45 -03:00
Werner Almesberger
9e3d17460a atrf-path/gui.c (tstart, tstop): commented out benchmarking code 2011-04-13 20:40:26 -03:00
Werner Almesberger
c86ce307e2 atrf-path: added pass/fail indication (in the GUI, accept the result with P/F)
- 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
2011-04-13 20:24:50 -03:00
Werner Almesberger
fbc7aee55f atrf-path/gui.c (main): cycle counting was broken; fixed it 2011-04-13 19:34:00 -03:00
Werner Almesberger
f32f48ae26 atrf-path: visualize the limits in GUI mode
- 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
2011-04-13 19:08:23 -03:00
Werner Almesberger
a1fc867bf2 atrf-path: option -P to load a min/max profile; pass/fail indication in GUI
- 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
2011-04-13 18:40:39 -03:00
Werner Almesberger
a7d9dfd258 atrf-path.c: do cw test setup only once if sweeping a single offset
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
2011-04-13 14:17:01 -03:00
Werner Almesberger
e2a9c9d068 atrf-path: new option -T to sweep only one offset
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"
2011-04-13 14:01:12 -03:00
Werner Almesberger
598582c26a atrf-path.c (do_half_sweep, do_sweep): don't duplicate the loop - use a function 2011-04-13 13:47:41 -03:00
Werner Almesberger
d263ffcb8b atrf-path.c (usage): list common args only once, not in each synopsis 2011-04-13 13:38:07 -03:00
Werner Almesberger
2c1cb715e4 atrf-path: sweep offsets separately, so that the we can reuse the cw setup
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
2011-04-13 13:07:55 -03:00
Werner Almesberger
e3463ef8a0 atrf-path.c: moved tx init out of sample loop (breaks 230 support)
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
2011-04-13 12:53:46 -03:00
Werner Almesberger
16a48d6931 libatrf: cw test mode can now be resumed, with lower overhead (231 only)
- 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
2011-04-13 12:17:02 -03:00
Werner Almesberger
5f153ca4b8 atrf-path/atrf-path.c: initialize the receiver only once, not for each sweep
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
2011-04-13 11:55:04 -03:00
Werner Almesberger
436c9faed5 atrf-path: the GUI is now activated with -g; also changed arguments in GUI mode
- 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
2011-04-13 11:54:58 -03:00