News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

How to stop a respond to event (bluetooth)

Started by marteken, September 07, 2006, 07:14:39 AM

Previous topic - Next topic

archived

Chris or someone else, could someone please help me on my last question? I think Im close to the answer  :idea:

Thank you
Martin

archived

Hi,

Sorry for the delay, I was in the vacation :)
It's an easy way to debug. When "# /usr/pluto/bin/MessageSend dcerouter 0 40 1 317" is executed, you should see in /var/log/pluto/DCERouter.log a line of log like this: Received from 0 to 40 message type 1 id 317 with parameters: ...  

You can use putty for example and in linux console type:
tail -f /var/log/pluto/DCERouter.log, then fire the event and check the log.

You can also can run that messagesend manually to confirm it's ok.

Best regards,
Cristian Miron

archived

One more thing.... in bash, a # before a line means that the line is commented :) Remove that before MessageSend ;)

archived

Hi Chris thanks for replying!
Well I tested the messagesend manually and it works, but somehow nothing happens with the "phone detected" event.

I tryed to run the script manually (./HandleMODetected.sh) and nothing happens either.

A friend of mine told me that if I created the .sh file in windows I should convert it to a unix format unis "dos2unix". I found a conversion utility online and tryed that also. Heres my script just in case I have something wrong:


#!/bin/bash



FCodesSent=/tmp/pluto_codes_sent



## If the file doesn't exist

if [[ ! -f "$FCodesSent" ]]; then
touch $FCodesSent
# send message to receiver
/usr/pluto/bin/MessageSend dcerouter 0 38 1 317

fi


I really dont know what else to do  :?
If you think of something please let me know.

Thanks
Martin

archived

Hi,

You must be aware that the logic from HandleMODetected.sh is to prevent  sending your message to router on two consecutive "mo detected" events (it creates a dummy file for this).  You must manually delete /tmp/pluto_codes_sent or fire/run HandleMOLost.sh, which will also delete the file.

HTH,
Cristian Miron