Author Topic: How to stop a respond to event (bluetooth)  (Read 8410 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to stop a respond to event (bluetooth)
« Reply #15 on: September 27, 2006, 08:31:35 pm »
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

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to stop a respond to event (bluetooth)
« Reply #16 on: September 28, 2006, 09:40:02 am »
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

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to stop a respond to event (bluetooth)
« Reply #17 on: September 28, 2006, 09:44:18 am »
One more thing.... in bash, a # before a line means that the line is commented :) Remove that before MessageSend ;)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to stop a respond to event (bluetooth)
« Reply #18 on: September 30, 2006, 06:27:41 pm »
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:

Code: [Select]

#!/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

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to stop a respond to event (bluetooth)
« Reply #19 on: October 02, 2006, 09:49:07 am »
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