Ticket #15 (closed enhancement: fixed)

Opened 5 years ago

Last modified 15 months ago

wminput working as a listening daemon

Reported by: spiderworm Owned by: dsmith
Priority: minor Milestone: Version 0.6.00
Component: wminput Version: 0.5.02
Keywords: Cc:

Description

wminput needs a daemon mode, where it can just sit there and listen for connecting wii remotes, and when a wii remote disconnects, it begins listening again... or perhaps listens even while one is connected, so that multiple wii remotes can connect.

Attachments

daemon.patch (9.5 kB) - added by dsmith 5 years ago.

Change History

Changed 5 years ago by spiderworm

sorry, this is a feature request, not a defect.

Changed 5 years ago by dsmith

  • type changed from defect to enhancement

Changed 5 years ago by nickishappy

There have been a few scripts written that do this. Check them out on the ConfigScriptEtc page. Currently they only work with one wiimote, but I'm trying to get mine to work with more than one.

Changed 5 years ago by dsmith

  • status changed from new to assigned

Changed 5 years ago by xkill

  • version changed from 0.5.00 to 0.5.02
  • milestone set to Version 0.6.00

You can use the patches in ticket:38, the last main.c code support always listen when wiimote is in standby.

So later you can create /etc/init.d/wiimote

#!/bin/bash
#
# Script to start and stop wminput - (c) 2007 Pablo Catalina <xkill@ciberhell.ath.cx>
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
## BEGIN USER CONFIGURATION ##
#
# Set the always connect wait time 
        WAIT_TIME=30
# Set the config file
        CONF="ir_ptr"
# Set the mac of your wiimote
        WIIMOTE=00:19:1D:6E:77:83
## END USER CONFIGURATION ##


case "$1" in
   'start')
        /usr/local/bin/wminput -a $WAIT_TIME -w -c $CONF $WIIMOTE &
      ;;
   'stop')
        killall wminput
      ;;
   'restart')
        killall wminput
        sleep 1
        /usr/local/bin/wminput -a $WAIT_TIME -w -c $CONF $WIIMOTE &
      ;;
   *)
      echo "usage $0 start|stop|restart" 
      exit 1 ;;
esac

Changed 5 years ago by dsmith

Let's try to keep one version of a given file around - the init script is at wiki:ConfigScriptEtc:wiimote

Changed 5 years ago by dsmith

Changed 5 years ago by dsmith

Take a look at the attached patch. It still needs some work, and I need to go through and make sure there are no issues with reinitialization, but I think it takes care of the daemon/reconnection/etc. needs.

Changed 4 years ago by dsmith

Any feedback?

Changed 4 years ago by dsmith

  • status changed from assigned to closed
  • resolution set to fixed

this was committed some time ago. closed

Note: See TracTickets for help on using tickets.