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

713 Commits

Author SHA1 Message Date
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
f5b1693a0c prod/doc/index.html: added section separators; expanded setup section 2011-05-18 14:04:59 -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
e86997e94d prod/doc/index.html: more fault analysis, mainly clock frequency 2011-05-18 07:23:11 -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
b9a30541ac prod/doc/flow.fig: draw feedback (information vs. physical items) dashed 2011-05-18 00:01:22 -03:00
Werner Almesberger
c2163a6954 prod/Common (expect, expect_re): allow multiple arguments (for options) 2011-05-17 22:07:24 -03:00
Werner Almesberger
32744af2ab prod/atusb: separated flashing from testing; added enumeration and ID test
- atusb (flash, dfu): removed (to be handled by separate script)
- atusb (enumerate): implemented enumeration test
- atusb: enabled "identify", since the local anomaly has been solved
2011-05-17 21:58:09 -03:00
Werner Almesberger
d0ab9d92c2 prod/doc: some initial test process documentation (still very incomplete) 2011-05-17 21:57:18 -03:00
Werner Almesberger
601d1bf173 install/: added build and usage instructions for dirtpan
- install/INSTALL-Ben: added build instructions for dirtpan
- install/USAGE: removed comment that doesn't work (it does)
- install/USAGE: added usage instructions for dirtpan
2011-05-12 17:07:01 -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
707af5f4da install/ben-wpan-config-2.6.38: disable noisy debugging and enable TUN
the kernel now has config options for IEEE 802.15.4 debugging. We turn
it all off and enjoy the peaceful silence.

Furthermore, turn on TUN (tunneling via user space).
2011-05-12 14:35:01 -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
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