Results 1 to 6 of 6

Thread: X10 MouseRemote problem with Serial plugin version 3.0.19

  1. #1
    Join Date
    Mar 2005
    Posts
    6

    Default X10 MouseRemote problem with Serial plugin version 3.0.19

    This message is mostly directed to Mark F, but I'm assuming others might be interested, so I'm posting it here:

    Ok, Mark, I have an interesting problem for you, for which I've got a temporary work-around (so no hurry to reply). Here's my setup:

    X10 MouseRemote (JR20A and JR21A)
    Windows XP SP2
    Girder 3.2.9 (installed in C:\Applications\Drivers\Hardware\GirderFree)
    WinLUAEx plugin 1.0.11 (installed and active)
    Serial plugin 3.0.19 (installed and active)
    MouseRemote.ini chosen with default settings, but set to COM1
    Serial Mouse device in device manager disabled

    I also happen to have the USB-UIRT and associated plugin, but that should be irrelevant.


    Here's the solution (to keep you interested in the problem):

    - in the Enable Event LUA script, I had to add a line to the end:
    MouseRemote.CompleteInitilization()
    - (I also commented out the two lines formerly at the end that Create()ed and Arm()ed the TimerObject.)


    So the original problem was that I had the MouseRemote working great with the maX10 software (so I knew things could talk and work). I turned off maX10, installed Girder and associated plugins (listed above), and could never get the MouseRemote to respond. In fact, the light on the receiver never even blinked (even after waiting 15-30 seconds for the receiver to initialize). Additionally, if I hit F9 (to Disable or Enable input devices in Girder), Girder would usually just hang, requiring using Task Manager to kill it.

    After much searching to verify that I had the right software, hardware, and settings, I could not find the solution (as listed above) to my problem. For reference, here's some other forum info about the X10 MouseRemote that I perused:

    http://www.promixis.com/phpBB2/viewtopic.php?t=8916
    http://www.promixis.com/phpBB2/viewtopic.php?t=1982
    http://www.promixis.com/phpBB2/viewtopic.php?t=348
    http://www.promixis.com/phpBB2/viewtopic.php?t=1811
    http://www.promixis.com/phpBB2/viewtopic.php?t=916

    Anyway, what tipped me off was your help for someone else that involved your (very convenient!) Hardware Event Logger. Being a programmer, I was able to decipher what was happening after using your logger. Essentially, it appears that the 1/2-second timer you set never got triggered, thus never re-enabling the MouseRemote (using MouseRemote.CompleteInitilization() which calls SERIAL_SetHandshaking(MouseRemote.DeviceName,3)).

    Here's the Girder startup logging trace:

    00:09:53.296 Monday, March 07, 2005 EVENT: Dev: 18 GirderEnable
    00:09:53.296 Monday, March 07, 2005 EVENT: Dev: 18 GirderOpen
    00:09:53.265 Monday, March 07, 2005 LUA: return main
    00:09:53.265 Monday, March 07, 2005 LUA: --> return C Arm field
    00:09:53.265 Monday, March 07, 2005 LUA: --> call C Arm field
    00:09:53.265 Monday, March 07, 2005 LUA: --> return C Create field
    00:09:53.265 Monday, March 07, 2005 LUA: --> call C Create field
    00:09:53.265 Monday, March 07, 2005 LUA: --> return C SERIAL_SetHandshaking global
    00:09:53.265 Monday, March 07, 2005 LUA: --> call C SERIAL_SetHandshaking global
    00:09:53.265 Monday, March 07, 2005 LUA: --> return C TIMER_CreateObject global
    00:09:53.265 Monday, March 07, 2005 LUA: --> call C TIMER_CreateObject global
    00:09:53.265 Monday, March 07, 2005 PRINT: MouseRemote initialization starting
    00:09:53.265 Monday, March 07, 2005 LUA: call main


    So (forgive my lengthy dissertation--I'm gloating a bit for having figured this out...), my questions to you are:

    - Why did my computer/setup never trigger (or even properly create?) the timer and related function call? (Is it related to XP or SP2, or my older version of Girder? Has the calling convention for TimerObject.Create() changed?)
    - Is it OK to skip the 1/2-second timeout, and do what I've done? (Essentially, is it OK to go from SERIAL_SetHandshaking(MouseRemote.DeviceName,0) to MouseRemote.CompleteInitilization() with no delay?) My MouseRemote seems to work fine now (only used it for a few hours with this now-working setting)...
    - Is there a simpler way (than the timer) that I can pause a 1/2-second, if its necessary/recommended?
    - Do you have any guesses/assumptions about why Girder would freeze during the disable/enable? (I'd like to make sure it doesn't happen in the future.)


    Thanks so much for your work on the various Girder plugins, and especially for your active forum support!


    -cfirecracker

  2. #2
    Join Date
    Feb 2001
    Location
    Plano, TX, USA
    Posts
    3,055

    Default

    Short answer - I messed up. Thanks for finding this.

    Solution - Change the timer creation line at the end of the enable script to look like this
    Code:
    -- create the timer that will go off in 1/2 second
    MouseRemote.TimerObject.Create("","MouseRemote.CompleteInitilization()","",0) --> remove the extra ,0 
    MouseRemote.TimerObject.Arm(500)
    Long answer (as I assume you would like a real answer) - I started to add a feature to the Logger and WinLUAEx plugins which would allow them to make the execution of LUA code "silent". IE. It wouldn't show up in the Logger window. The logistics of this interface became more than I cared to worry about and I removed the code. Unfortunately, this is a remnant of testing early prototypes of that code. I updated most of the Serial plugin examples to utilize this new feature which required one more parameter being passed to the TimerObject.Create() routine (in this case, an extra 0). For some of the device files, this being one of them, I forgot to remove this extra parameter last time I released a set of files.

    I need to update the Serial plugin release to fix this. ops:
    Mark F

  3. #3
    Join Date
    Mar 2005
    Posts
    6

    Default thanks

    Thanks for the quick reply! Your change works great. (Oh, and thanks to everyone at Promixis for contuing on a great product!)

    -cfirecracker

  4. #4
    Join Date
    Mar 2005
    Posts
    6

    Default the problem is still in sourceforge download

    Mark,

    This problem is still in the MouseRemote.ini from the latest download (3.0.20) of the Serial plugin from SourceForge!

    Here's two other messages about the same issue (I think):

    http://www.promixis.com/phpBB2/viewtopic.php?p=127425
    http://www.promixis.com/phpBB2/viewtopic.php?p=127426

    So, the solution (as you mention above) is to change something from the line in the startup lua script for the MouseRemote. I think you mention to remove an extra 0, but I think it worked (in 3.0.20) to remove the extra "", parameter. So I changed line 205 of the 'Enable Event' script from

    MouseRemote.TimerObject.Create("","MouseRemote.Com pleteInitilization()","",0)

    to

    MouseRemote.TimerObject.Create("","MouseRemote.Com pleteInitilization()",0,0)

    Anyway, attached is the .ini file that works for me (girder 3.2.9, serial plugin 3.0.20, winluaex 1.0.12). Others, be sure to let Mark know if this fixes your problem, so he can be sure to include the new .ini file in the distribution. (To see the file, you have to be logged into the forum.)

    [Removed attachment since it was equivalent to the serial plugin version of MouseRemote.ini--see the next reply in this post.]

  5. #5
    Join Date
    Mar 2005
    Posts
    6

    Default oops, serial plugin 3.0.20 is just fine

    OK, so I was wrong!

    My above 8/30 post isn't accurate. (Sorry for the confusion Mark, and thanks for having fixed the 3.0.20 version of the serial plugin.) As it turns out, the problem is not in the serial plugin's MouseRemote.ini. The line I said I changed is equivalent either way it's shown in the post. In other words, version 3.0.20 of the serial plugin works fine.

    The problem I'm having is related to (I think) the Load Regs Girder command (this is with Girder version 3.2.9). If I use Load Regs (to load register values from a file), Girder seems to initialize all of LUA, thus making the serial plugin lose its details (including the MouseRemote variable). So since I did a Load Regs at Girder startup, the MouseRemote.ini enable event would fail since the MouseRemote variable was nil.

    So if I want to use the MouseRemote, I can't use Load Regs (at least with this version of Girder)... I'll probably just write or find a simple LUA script that reads a text file and puts the proper values into the registers that I need, thus avoiding the Load Regs command.

  6. #6
    Join Date
    Aug 2003
    Location
    Vermilion, OH
    Posts
    128

    Default

    No I'm having a problem. But's it's wierd...

    I have the mouse remote on a USB to serial converter cable so I can plug it into USB.

    I have two of these converters and both from the same MFG but one is a little older.

    One of them works fine and girder receives events.

    On the other USB to serial converter the LED on the Mouse Remote receiver blinks so it has been enabled but Girder shows nothing.. Nadda nothing. So why blink on receiver (indicating that Girder initalized it) but then not receive anything.???

    I switch back to the older version of the USB to Serial cable and it works.???

    Both Use the same driver so why does the new version not work...???
    Carl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •