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

698 Commits

Author SHA1 Message Date
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
b82db55f4a atusb/fw/Makefile: new target "update" to update the application via DFU
- Makefile (USB_ID, dfu): moved USB ID to variable, for sharing
- Makefile (.PHONY, update): new target to reset atusb and to DFU new
  firmware
2011-05-11 05:29:54 -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
85f60de9d5 atusb/fw: use the unique serial number of the ATmega8/16/32U2 for iSerialNumber
- usb/usb.h (USB_LANGID_ENGLISH_US): added USB LANGID for US-English
- board.h (board_sernum), board.c (board_sernum, hex, get_sernum,
  board_init): provide the board's serial number in "board_sernum"
  (UTF-encoded)
- sernum.h (sernum_get_descr), sernum.c (sernum_get_descr): return
  string descriptors for the serial number
- descr.c (device_descriptor), usb/dfu.c (device_descriptor):
  set iSerialNumber if serial number is available
- atusb.c (main), usb/dfu.c (my_descr): call sernum_get_descr for
  unknown descriptors
- Makefile (OBJS, BOOT_OBJS): added sernum.o
2011-05-10 17:23:08 -03:00
Werner Almesberger
fd91546c59 atusb/fw/Makefile (dfu): our functional descriptor is fine, no need for -t
What caused the error that looked like a problem with the functional
descriptor was in fact the boot loader resetting between the bus scan
and retrieval of the descriptor.
2011-05-10 11:53:32 -03:00
Werner Almesberger
ddd0022350 atusb/fw/boot.c (main): don't time out until there is an application
This prevents the boot loader from resetting all the time and makes
it easier to "catch" it with dfu-util.
2011-05-10 11:51:46 -03:00
Werner Almesberger
fc1a334bf6 atusb/fw/usb/dfu.c (dfu): lowered bwPollTimeout from 1 s to 100 ms and explained why 2011-05-10 08:32:12 -03:00
Werner Almesberger
27c1c7ba89 tools/Makefile.common (CFLAGS): added -g 2011-05-09 23:53:28 -03:00
Werner Almesberger
42dae8dde2 atusb/fw: implemented ATUSB_RESET
- board.c (board_init): disable the watchdog timer (tricky !)
- board.h (reset_cpu), board.c: enable the watchdog timer to cause a
  CPU reset
- ep0.c (my_setup): uncommented and updated ATUSB_RESET handler
2011-05-09 23:52:00 -03:00
Werner Almesberger
6179f31fc0 atusb/fw/README: boot loader flashing time was a bit too optimistic (15 -> 30 s) 2011-05-09 23:44:51 -03:00
Werner Almesberger
487011f9a7 BOOKSHELF (dfu): added DFU specification 2011-05-09 22:26:15 -03:00
Werner Almesberger
1f99435bba atusb/fw/README: updated for complete firmware upload process 2011-05-09 22:06:33 -03:00
Werner Almesberger
0db361d49d atusb/fw/Makefile (dfu): pass transfer size to hide DFU non-compliance
We currently don't provide the DFU Functional Descriptor, which modern
versions of dfu-util request to determine the transfer size. Luckily,
they don't do this if the transfer size is given on the command line.
2011-05-09 22:02:28 -03:00
Werner Almesberger
eeb3af6a03 atusb/fw: fixed USB bus reset handling by software
- usb/atu2.c (ep_init): moved before usb_poll
- usb/atu2.c (usb_poll): register bit was used as mask, not as shift
- usb/atu2.c (usb_poll): call ep_init on USB bus reset
- usb/atu2.c (usb_reset): don't make USB bus reset force a hardware reset
- Makefile (.PHONY, dfu): new target to upload the application with DFU
2011-05-09 21:13:41 -03:00
Werner Almesberger
c5992bc675 atusb/fw/Makefile (.PHONY): added development-only phony targets 2011-05-09 21:12:26 -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
fc26eb0549 prod/Common: get real driver spec with atrf-id instead of assuming "default" 2011-04-20 09:00:28 -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
cd59b8524b prod/: on-going development
- prod/Common: added section titles
- prod/Common (begin): new command to set up and check the test environment
- prof/atben: call "begin" to set up the test environment
- prod/Common (spectrum): added the profile
- prod/Makefile: convenience commands, for development
- prod/atben: run "identify" after checking the GPIOs
- prod/atusb: test script for ATUSB
2011-04-20 08:13:27 -03:00
Werner Almesberger
04db5e0418 prod/: some elements of a production test system (in progress) 2011-04-20 01:29:11 -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