PDA

View Full Version : PIR-1 unreliable



supersparkle
September 28th, 2011, 10:42 AM
I recently ordered a PIR-1 and have been trying to use it with Girder.

The device is very unreliable. It often does not send an IR code at all, though the Girder log does not indicate any error. It may work a few times, but then stop working, after which I have to re-plug it.

When it works:
- PIR appears in the log with its serial number (message says something like "PIR arrived")
- I attempt to send an IR code, from the IR profile editor or elsewhere
- Log has an "IR sent" message

When it doesn't work:
- Previous IR codes may have been successfully sent. Just a few - less than ten.
Or, the device was plugged in, and the "PIR arrived" message lacks a serial number
- Attempting to send a code from IR profile editor or elsewhere generates the same log messages as before, but no "IR sent" message

How to make it work again:
- Unplug it. Plug it back.
- If the "PIR arrived" message shows a serial, try sending a code. If not, try re-plugging again.


I experience the same behavior from the 'example' program in the PIR-1 SDK. The PIR-1 lib produces "PIR-1 arrived" callbacks with an empty serial# string and no "IR sent" callback when the device has died. When the device is still working, it shows the serial and an IR sent message.

Ron
September 28th, 2011, 10:56 AM
I've not seen this happen before. It sounds like the PIR-1 is loosing the USB connection. When the PIR-1 goes away can you check your windows device manager to see if the device is listed still? Did you get a notification in Girder that the device went away?

supersparkle
September 28th, 2011, 11:04 AM
I get a PIR removed event when I disconnect the device (before reconnecting it). When the device stops working after a few sends, there are no messages indicating device removal.

Ron
September 28th, 2011, 11:48 AM
Can you make sure you have the latest PIR-1 driver (http://www.promixis.com/pir-1_doc.php) ( or alternatively use Girder 5.1 (http://www.promixis.com/forums/showthread.php?21144-Girder-5.1-Alpha) )

supersparkle
September 28th, 2011, 02:20 PM
I installed the latest PIR-1 driver when first troubleshooting. The issue is the same between Girder 5 with the latest driver, and the latest PIR-1 SDK.

Ron
September 28th, 2011, 02:27 PM
Can you tell me what you do when it stops working? Either attach the GML of copy the CCF codes.

supersparkle
September 28th, 2011, 07:42 PM
I just discovered that it may be a single code causing the stoppage:

0000 006f 0020 0000 0061 0021 0011 0011 000f 0011 0010 0021 0011 0020 0031 0021 0010 0011 0010 0010 0012 000f 0011 0010 0010 0011 0010 0012 000f 0011 0010 0011 0010 0010 0013 000e 0021 0010 0011 0012 000f 0010 0010 0011 0011 0010 0012 000f 0010 0011 0010 0021 0021 0021 0010 0010 0011 0010 0011 0010 0021 0021 0021 0021 0010 0010 0021 0021

with repeat count 2. The device appears to stop responding after a single attempt to send this code. I hadn't noticed this correlation before. I'll let you know if I see it fail in other cases.

Fortunately, this means I may be able to get on with my project. The poison code was one of a few candidates for a particular function, and it turns out the others seem to work. The issue possibly seemed random before because I was still trying all of the candidates.

Ron
September 29th, 2011, 09:52 AM
That's great. Thank you so much for finding that. I will investigate why the unit chokes on this code right away.

Ron
September 29th, 2011, 12:14 PM
Alright found the bug. You can prevent it from happening by switching hex code 3 with hex code 4 for now. This is only needed if the 4th hex code is 0000.

Broken:

0000 006f 0020 0000 0061 0021 0011 0011 000f 0011 0010 0021 0011 0020 0031 0021 0010 0011 0010 0010 0012 000f 0011 0010 0010 0011 0010 0012 000f 0011 0010 0011 0010 0010 0013 000e 0021 0010 0011 0012 000f 0010 0010 0011 0011 0010 0012 000f 0010 0011 0010 0021 0021 0021 0010 0010 0011 0010 0011 0010 0021 0021 0021 0021 0010 0010 0021 0021Working:

0000 006f 0000 0020 0061 0021 0011 0011 000f 0011 0010 0021 0011 0020 0031 0021 0010 0011 0010 0010 0012 000f 0011 0010 0010 0011 0010 0012 000f 0011 0010 0011 0010 0010 0013 000e 0021 0010 0011 0012 000f 0010 0010 0011 0011 0010 0012 000f 0010 0011 0010 0021 0021 0021 0010 0010 0011 0010 0011 0010 0021 0021 0021 0021 0010 0010 0021 0021Notice how the number twenty moves over one position.

supersparkle
September 30th, 2011, 11:58 PM
Thanks Ron