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

1022 Commits

Author SHA1 Message Date
Werner Almesberger
f535a80c56 tools/lib/atben.c: check if the 8:10 slot is available and fail if it isn't
- atben.c (MMC_PATH, AT86RF230_PATH, find_file, slot_in_use): check
  if the MMC or AT86RF230 kernel driver uses the 8:10 card slot and
  print a detailed error message if it is
- atben.c (atben_open): fail if the 8:10 card slot is busy
2011-07-05 07:47:56 -03:00
Werner Almesberger
17f7b66f7b install/INSTALL-Ben: switch linux-zigbee tools source from (old) tarball to git 2011-07-05 07:24:59 -03:00
Werner Almesberger
1615375dce tools/lib/atusb-common.c (atusb_open): give more detailed error message on EPERM 2011-07-05 00:17:20 -03:00
Werner Almesberger
e549ee4911 AUTHORS: werner@openmoko.org is now werner@almesberger.net 2011-07-04 22:53:28 -03:00
Werner Almesberger
298f0848c7 COPYING mentioned COPYING.GPLv2, COPYING.LGPLv21 which weren't included. Added them. 2011-07-04 22:51:17 -03:00
Werner Almesberger
f279907156 Merge branch 'master' of projects.qi-hardware.com:ben-wpan 2011-07-04 20:36:32 -03:00
Werner Almesberger
10f618ac60 tools/atrf-rssi/gui.c (gui): accept keyboard input both from stdin and SDL 2011-07-04 20:29:22 -03:00
Werner Almesberger
56f8b2d038 tools/: moved get_key from atrf-path/gui.c to libatrf, for sharing
The old "raw" function becomes get_key_init. Calling get_key_init is
only necessary if one wants to control the moment standard input is
switched to raw mode. If get_key is invoked without a prior call to
get_key_init, it will initialize automatically.

- atrf-path/gui.c (raw, main): renamed "raw" to get_key_init
- atrf-path/gui.c (old_term, restore_term, get_key_init, get_key):
  moved to include/getkey.h and lib/getkey.c
- lib/getkey.c (get_key_init, get_key): made calling get_key_init
  optional
- lib/Makefile (OBJS): added getkey.o
2011-07-04 20:29:22 -03:00
Werner Almesberger
6d1198cccd xxx 2011-07-04 20:29:22 -03:00
Werner Almesberger
71f095d8de tools/Makefile (BEN_DIRS): add dirtpan iff its lowpan tools dependency is met 2011-07-04 20:29:22 -03:00
Werner Almesberger
ae348fb5cc switch linux-zigbee tools source from (old) tarball to git repository
- install/INSTALL-PC: updated build process of lowpan-tools to
  use the git repository
- tools/dirtpan/Makefile (CFLAGS): added include path for lowpan
  tools from git
2011-07-04 20:29:22 -03:00
Werner Almesberger
848e5af33a Merge branch 'master' of projects.qi-hardware.com:ben-wpan 2011-07-04 14:46:55 -03:00
Werner Almesberger
0c77658006 install/ben-wpan-config-2.6.38: enabled CONFIG_PROC_PAGE_MONITOR
ubb-vga and possibly mplayer need /proc/self/pagemap
2011-07-04 14:31:50 -03:00
Werner Almesberger
c705bf0939 xxx 2011-07-01 12:55:28 -03:00
Werner Almesberger
e3066d7a21 tools/Makefile (BEN_DIRS): add dirtpan iff its lowpan tools dependency is met 2011-07-01 12:52:04 -03:00
Werner Almesberger
2d961523f2 switch linux-zigbee tools source from (old) tarball to git repository
- install/INSTALL-PC: updated build process of lowpan-tools to
  use the git repository
- tools/dirtpan/Makefile (CFLAGS): added include path for lowpan
  tools from git
2011-07-01 12:18:34 -03:00
Werner Almesberger
d94ac9587d TODO: various updates 2011-06-30 16:02:08 -03:00
Werner Almesberger
673d29a29a tools/Makefile (BEN_DIRS): comment out dirtpan again, to avoid hdr dependency 2011-06-30 15:56:54 -03:00
Werner Almesberger
b3b037e18d TODO: update for switch to spi_atben 2011-06-26 07:24:18 -03:00
Werner Almesberger
0eff1587b5 install/ben-wpan-config-2.6.38: updated for spi_atben driver 2011-06-26 07:21:52 -03:00
Werner Almesberger
865d3bb264 TODO: updated 2011-06-26 07:13:22 -03:00
Werner Almesberger
8f949842db atusb/fw/: remove unused items when building the USB driver for the boot loader
- usb/atu2.c (NUM_EPS), board.h (NUM_EPS): moved definition to
  board.h
- board.h (NUM_EPS): use one EP for the boot loader, two for the
  application
- usb/atu2.c (ep_init): initialize EP 1 only in an application build
2011-06-26 06:59:13 -03:00
Werner Almesberger
6909fc232a atusb/fw/Makefile: introduce target-specific compliation variants
- Makefile (USB_OBJS): moved into OBJS and BOOT_OBJS
- Makefile (OBJS): atu2.o is now app-atu2.o
- Makefile (BOOT_OBJS): atu2.o is now boot-atu2.o
- Makefile (MKDEP, %.o): moved dependency generation to macro $(MKDEP)
- Makefile (app-%.o): build from usb/%.c
- Makefile (boot -%.o): build from usb/%.c and set -DBOOT_LOADER
2011-06-26 06:56:01 -03:00
Werner Almesberger
0194dc1a05 tools/dirtpan/: added statistics collection, SIGUSR1 to dump, SIGUSR2 to reset
- dirtpan.c (stats, send_frame, send_more, send_ack, rx_pck, tx_pck,
  ack_timeout, reass_timeout): gather extensive statistics
- dirtpan.c (handle_usr1, main): if running in the foreground, dump
  statistics on standard error on SIGUSR1
- dirtpan.c (handle_usr2, main): if running in the foreground, reset
  statistics to zero on SIGUSR2
2011-06-26 00:03:56 -03:00
Werner Almesberger
417d12ce05 tools/Makefile (BEN_DIRS): added "dirtpan", so it's now included by default 2011-06-26 00:03:07 -03:00
Werner Almesberger
5392401c0a tools/atrf-rssi/: added menu for regulation area selection
- gui.c (area_off, gui): don't show a regulation area by default
- letter.h, letter.c: drawing of limited character set
- Makefile (OBJS_host, OBJS_ben_jlime): added letter.o
- gui.c (print, area_selector, gui): show regulation area selector
2011-06-24 22:29:17 -03:00
Werner Almesberger
9af0f937de tools/atrf-rssi/: added WLAN channel display (US, EU, and JP)
- gui.c (wlan_area): the currently displayed regulation domain
- gui.c (wlan_channels): return the number of WLAN channels
- gui.c (show_wlan_channel): determine whether the specified channel
  should be used in the currently displayed regulation domain
- gui.c (label_wlan_channels): show WLAN channel numbers and their
  width
- gui.c (gui): switch regulation domain with E (Europe), J (Japan),
  and U (US)
- gui.c (gui): quit now only if Q is pressed instead of any key
- gui.c (gui): call label_wlan_channels to display the WLAN channels
2011-06-24 21:50:28 -03:00
Werner Almesberger
7c12bf02c1 tools/atrf-xmit/atrf-xmit.c: cleaned up timeouts and interrupt polling
- atrf-xmit.c (xfer_one): wait 10 ms for the packet to be sent (1 ms
  was clearly too short)
- atrf-xmit.c (xfer_one): use wait_for_interrupt instead of
  atrf_interrupt_wait, so that the retry logic can do its work
2011-06-23 13:21:25 -03:00
Werner Almesberger
d8363d853c tools/lib/misctxrx.c (wait_for_interrupt): enforce a minimum timeout of 10 ms
Seems that just one millisecond isn't enough to get a byte from
the USB device, even if the byte is already waiting in the endpoint
FIFO there.
2011-06-23 13:21:05 -03:00
Werner Almesberger
8a2d80a93c tools/lib/atusb-common.c: updated for new interrupt handling in firmware
- atusb-common.c (atusb_interrupt_wait): the atusb firmware no longer
  reads and accumulates IRQs for us. We now just wait for the
  notification, then read IRQ_STATUS. Let higher layers take care of
  retries and all that.
- atusb-common.c (atusb_open): clear any pending interrupts
2011-06-23 13:14:39 -03:00
Werner Almesberger
23c592250e atusb/fw/board_app.c: do not read and accumulate IRQs; flash LED when EP1 busy
To indicate an interrupt, we just send a zero byte.
2011-06-23 13:03:34 -03:00
Werner Almesberger
27fc0a0e2c atusb/fw/: aggregate interrupts while waiting
- board_app.c (INT0_vect): always read IRQ_STATUS, even if an
  interrupt is already enqueued
- board_app.c (INT0_vect): if an interrupt is enqueued, accumulate
  the interrupts signaled since
- board_app.c (irqs_more): when a pending transfer completes, send
  interrupts accumulated since (if any)
2011-06-23 09:41:40 -03:00
Werner Almesberger
15db279ca2 TODO: updated with current tasks 2011-06-21 09:24:55 -03:00
Werner Almesberger
b0b04ed226 tools/atrf-gpio/atusb.c (restore_gpios): send ATUSB_GPIO_CLEANUP 2011-06-20 23:15:30 -03:00
Werner Almesberger
f7b9a18917 atusb/fw/: new request ATUSB_GPIO_CLEANUP to re-enable INT0
- board.h (gpio_cleanup), board_app.c (gpio_cleanup): restore INT0
  when done manipulating GPIOs
- board.c (gpio): updated comment explaining how to restore INT0
- include/atusb/ep0.h (enum atspi_requests), ep0.c
  (ATUSB_GPIO_CLEANUP): new request to return to normal operation
  after ATUSB_GPIO
2011-06-20 23:11:09 -03:00
Werner Almesberger
f8f2f890d9 tools/lib/atusb-common.c (atusb_interrupt_wait): don't try to pull more irqs
ausb_bulk_read may lose data when timing out. We therefore try to
minimize the number of times we time out. Reading until no more
interrupts arrive may have looked like a good idea, but it just
causes trouble for now.
2011-06-20 22:58:46 -03:00
Werner Almesberger
cb20c55231 tools/lib/misctxrx.c (wait_for_interrupt): don't fragment timeouts
usb_bulk_read may lose data when timing out. We therefore try to
minimize the number of times we time out.
2011-06-20 22:56:59 -03:00
Werner Almesberger
b2c7727c57 prod/atusb (led): show keys to press in reverse
Before, it read "... [P]ass ... [F]ail ...", and the closing
square brackets could be mistaked for lower-case ells.
2011-06-20 22:36:24 -03:00
Werner Almesberger
f4ca3aed63 tools/atrf-proxy/: make WAIT 0 wait forever
- PROTOCOL: corrected obsolete part of WAIT behaviour
- PROTOCOL: mention that WAIT 0 waits forever
- atrf-proxy.c (cmd_more): don't convert WAIT argument 0 to 1
2011-06-20 22:14:52 -03:00
Werner Almesberger
70715a15d9 tools/lib/atben.c (atben_interrupt_wait): don't time out if timeout_ms == 0 2011-06-20 22:11:29 -03:00
Werner Almesberger
10b6d88af9 libatrf: simplify use of atrf_interrupt_wait now this it is mandatory
- lib/atrf.c (atrf_interrupt_wait): interrupt_wait is no longer
  optional
- atrf-proxy/atrf-proxy.c (cmd_more): we no longer need to handle
  atrf_interrupt_wait being unsupported
- lib/atusb-common.c (atusb_interrupt_wait): clarify what we don't
  want to return -1 on error
2011-06-20 21:14:14 -03:00
Werner Almesberger
d0fb1a8992 tools/: the great removal of atrf_interrupt
- atrf-proxy/PROTOCOL, atrf-proxy/atrf-proxy.c (cmd_zero): removed the
  POLL command
- lib/atben.c (atben_driver): don't export atben_interrupt anymore (we
  still use it internally)
- lib/atnet.c (atnet_interrupt, atnet_driver): removed atnet_interrupt
- lib/atusb-common.h (atusb_interrupt), lib/atusb-common.h
  (atusb_interrupt), lib/atusb-spi.c (atusb_spi_driver),
  lib/atusb.c (atusb_driver): removed atusb_interrupt
- lib/driver.h (struct atrf_driver): removed "interrupt"
- include/atrf.h (atrf_interrupt), lib/atrf.c (atrf_interrupt): removed
2011-06-20 21:10:41 -03:00
Werner Almesberger
12fef1b196 atusb/fw/: disable INT0 if manipulating GPIOs (tentative)
Since GPIO manipulations may cause stray INT0 activity, we turn off
INT0 handing on ATUSB_GPIO. The MCU must be reset to restore access
to INT0.

There are still issues to resolve with the GPIO test. It may turn
out that there's a less invasive solution than just turning off
INT0 completely.

- board_app.c (gpio): mask INT0 before manipulating GPIOs
- board_app.c (board_app_init): make it clearer that EIMSK is a bit
  mask
2011-06-20 20:50:22 -03:00
Werner Almesberger
76707d6b37 tools/lib/misctxrx.c (flush_interrupts): don't fall back to reading IRQ_STATUS
We now implement atrf_interrupt_wait in all drivers and don't need
the dubious fallback anymore.
2011-06-20 20:48:15 -03:00
Werner Almesberger
9952a20fda tools/lib/atben.c (atben_interrupt_wait): complain about stray interrupts
If INT_RF is high but IRQ_STATUS is clear, something strange is
happening. We complain but continue waiting.
2011-06-20 20:46:52 -03:00
Werner Almesberger
b7276d282a atrf-xmit/atrf-xmit.c: updated to no longer use atrf_interrupt
- atrf-xmit.c (xfer_one): use atrf_interrupt_wait instead of
  atrf_interrupt to pull the interrupt line
- atrf-xmit.c (xfer_one): removed delay-based wait to interrupt
- atrf-xmit.c (xfer_one): use atrf_interrupt_wait instead of reading
  REG_IRQ_STATUS directly
2011-06-20 20:41:30 -03:00
Werner Almesberger
b4a6e8ef46 tools/: major overhaul of wait_for_interrupt; uses atrf_interrupt_wait now
- include/misctxrx.h (wait_for_interrupt), lib/misctxrx.c
  (wait_for_interrupt): replaced sleep_us*timeout limiting mechanism
  with a single timeout value in milliseconds
- lib/misctxrx.c (wait_for_interrupt): use atrf_interrupt_wait instead
  of polling
- lib/misctxrx.c (wait_for_interrupt): cleaned up control flow
- lib/misctxrx.c (run, die, wait_for_interrupt): renamed variable "run"
  to more specific "sigint"
- atrf-txrx/atrf-txrx.c (ping_rx, ping): pass timeout in milliseconds,
  not deciseconds
- atrf-rssi/atrf-rssi.c (sweep), atrf-rssi/gui.c (sweep),
  atrf-txrx/atrf-txrx.c (init_txrx, receive_message, receive_pcap,
  receive, transmit, transmit_pattern, ping_tx, ping_rx),
  atrf-xmit/atrf-xmit.c (init_tx, init_rx, xfer_one),
  lib/cwtest.c (enter_test_mode_230, start_test_mode_231):
  updated use of wait_for_interrupt
2011-06-20 20:08:42 -03:00
Werner Almesberger
55354c7f91 tools/lib/atben.c: added support for interrupt_wait (polled)
- atben.c (atben_interrupt_wait): loop until either the timeout has
  been reached or an interrupt has occurred
- atben.c (atben_driver): added atben_interrupt_wait
2011-06-20 20:08:42 -03:00
Werner Almesberger
4d4cec6a67 tools/lib/timeout.h, tools/lib/timeout.c: added timeout/deadline functions 2011-06-20 19:11:51 -03:00
Werner Almesberger
106ef7ff7f tools/atrf-xmit/atrf-xmit.c: corrected title comment 2011-06-20 18:22:29 -03:00