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

179 Commits

Author SHA1 Message Date
Werner Almesberger
4924755a15 atrf-gpio: new utility to directly access GPIOs (for now atben-only)
- tools/atrf-gpio/: new utility to directly access GPIOs
- tools/Makefile (BEN_DIRS): added atrf-gpio
2011-06-04 09:50:27 -03:00
Werner Almesberger
565fadf258 tools/lib/atusb.c: added SRAM access to atusb driver
- tools/atrf-proxy/PROTOCOL: documented new commands GETRAM and SETRAM
  for SRAM access
- tools/atrf-proxy/atrf-proxy.c (cmd_two, cmd_more): added "setram"
  command
- tools/atrf-proxy/atrf-proxy.c (cmd_more): added "getram" command
- tools/lib/atnet.c (atnet_sram_write, atnet_sram_read): SRAM access
  functions
- tools/lub/atnet.c (atnet_driver): added new functions to driver
  operations
2011-06-03 14:35:21 -03:00
Werner Almesberger
4aff7af370 tools/lib/atusb.c: added SRAM access to atusb driver
- atusb.c (atusb_sram_write, atusb_sram_read): SRAM access functions
- atusb.c (atusb_driver): added new functions to driver operations
2011-06-03 14:26:47 -03:00
Werner Almesberger
6b447f805c tools/lib/atben.c: added SRAM access to atben driver
- atben.c (atben_sram_write, atben_sram_read): SRAM access functions
- atben.c (atben_driver): added new functions to driver operations
2011-06-03 14:24:00 -03:00
Werner Almesberger
472e18294c libatrf: added SRAM access functions
- tools/include/atrf.h (atrf_sram_write, atrf_sram_read),
  tools/lib/atrf.c: single-byte SRAM access front-end functions
- tools/lib/driver.h (struct atrf_driver): new driver functions
  sram_write and sram_read
2011-06-03 13:52:13 -03:00
Werner Almesberger
61e656e143 atrf-xtal: added atusb support (via ATUSB_TIMER)
- Makefile: removed limitation to Ben and added host build
- atusb.c: atusb-specific acquisition and calculations
- atrf-xtal.h (do_atusb): interface to atusb.c
- atrf-xtal.c (atben, atusb, main): added switch to board-specific driver
- atrf-xtal.c (usage, main): added support for atusb
2011-05-30 19:17:43 -03:00
Werner Almesberger
bdca20479b atrf-xtal: moved atben-specific code to atben.c
- atrf-xtal.c (cmp, eval, do_atben): moved to atben.c
- atrf-xtal.c (setup, sample, cleanup): removed wrappers
- atrf-xtal.c (usage): cast strlen result, for x86-64 compatibility
- atrf-xtal.h (atben_setup, atben_sample, atben_cleanup), atrf-xtal.c:
  device interface functions are now "static"
- atrf-xtal.h (do_atben): do_atben is now our new interface
2011-05-30 19:13:24 -03:00
Werner Almesberger
5a6aae57cb atrf-xtal.c (do_atben, main): moved board-specific code to separate function 2011-05-30 00:17:49 -03:00
Werner Almesberger
45746fdfa5 dropped f32xbase dependency on Makefile.common
This means that we only depend on f32xbase for atusb-sil (defunct) and
cntr (needs updating), but not for any of the project's main parts.

- makefiles/Makefile.basic: copied over from
  f32xbase/lib/Makefile.common
- makefiles/Makefile.basic (LDLIBS): removed inclusion of libusb
- tools/Makefile.common: use makefiles/Makefile.basic
- install/INSTALL-Ben, prod/doc/setup.hmac: removed f32xbase
  dependency
2011-05-29 06:03:11 -03:00
Werner Almesberger
0eec747510 atrf-path: added visual history of dumps
- gui.c (segment, draw, gui): make caller provide color, to ease sharing
- gui.c (dump, gui): moved call to print_sweep to separate function
- gui.c (DUMP_RGBA, dumps, n_dumps, dump, draw_dumps, gui): record all
  dumps and display them in the background
2011-05-28 12:21:56 -03:00
Werner Almesberger
b82472bb01 tools/atrf-path: added interactive dumping with D
- sweep.h (print_sweep), atrf-path.c (print_sweep): make global, for
  sharing with gui.c
- gui.c (gui): dump the sweep results to standard output if "D" is
  pressed
2011-05-28 12:03:23 -03:00
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