LinuxMCE Forums

General => Developers => Topic started by: Armor Gnome on October 07, 2012, 11:41:01 am

Title: Redetection - GYR3103US & Sharp Aquos via RS232
Post by: Armor Gnome on October 07, 2012, 11:41:01 am
This is not a new topic and although I have not checked I am sure it has been bug reported previously. 

I am willing to do the work on these I just need a little help getting pointed in the right direction so that I understand what is causing the problem.  Once I know the cause (or methods to determine cause) I can experiment with fixes until I have something that works and is shareable.  These are two of my favorite LMCE devices and it's so frustrating of a problem I have them sitting in storage so I won't be tempted into plugging them in.

Both of these devices once connected to LMCE go into a re-detection loop where I am constantly prompted to reload the router.  I can deal with on occasion seeing the message in the top left corner while watching media about "finding" something that has long been there but not full screen messages that a reload is required every 5 minutes.  Yes literally every 5 minutes.

In the case of the remote I think it has to do with the detection properties which I believe is the responsibility of HAL and uses the device data different templates list for recognition.  In the event of my GYR3103US, it is detected and installed as a GC1005.  The remote works with this template, and the gyro functions are better than any other device I have tried.  I don't know if the media buttons work because as I said, it forces a reload router prompt before I can get a chance to press them.  What I think is going on is that after installing as a GC1005 (air-mouse?) it realizes that is has the wrong template, or suddenly detects it 'again' as a GYR3103 and attempts to correct the issue.  I could hardcode my detection .sh or change my PNP fields under device data but that would not help anyone else with this issue.  I may need to find the old Fiire Remote template or rebuild the "**Obsolete** GYR3103"  which is still available in devices.  Does any of this sound like a proper path to resolution?

The next device that has the exact same behavior in my setup is my Sharp Aquos 46" TV.  It is apparent to me that someone has done some updating to this template as I first got this TV a little over 4 years ago when I first tried 8.10.  At that time connecting the TV via RS232 resulted in Sara popping up and saying that she found a Sharp LCD.  When I went into the next step however my input was not listed.  Understanding LMCE now a lot better than I did then I realize that the template must have been created on a similar model but not my exact one.  Now 4 years later when I plug in the same TV to a 10.04 installation I do have all of my ports available during setup-wizard and the RS232 commands are able to control the TV.  However just like the remote above, the price for complete connectivity is once again disappointment as the TV 'redetects' itself every 5-10 minutes and instead of going to a reload prompt it takes me to the detection screen where I see " I found a new device "SHARP AQUOS LCD" I think it's in ____ shall I use it?"  This may actually be a serial port issue and I hate troubleshooting serial connections, if the port on my MB is failing, I could do a USB-to-RS232 version of the AQUOS template and add my specific model number?

Simple solutions I will try first before starting from scratch:
Add device data, do not prompt, use immediately, allowed to modify, required, do not use master device data
Add device data, configure without notification, required, do not use master device data

Drastic but should work for everyone with a similar issue:
Disable HAL/PnP engine command from terminal.  I know it kills the smart home idea of buying a device and having LMCE detect it the moment you walk through the door with it powered on, but for issues like this all I would need to do is toggle the HAL/PnP engine back on when I want to be in detect mode.
Title: Re: Redetection - GYR3103US & Sharp Aquos via RS232
Post by: tschak909 on October 08, 2012, 10:27:30 pm
Unfortunately, the serialD part of the HAL device needs some serious reworking, it seems that serial port semantics have changed in the kernels over the last few years, and some serial devices literally cause a redirect loop. USB to serial devices do not seem to have THIS problem, but some serial to USB converters DO have the problem where they basically fall off the face of the earth when they incorrectly go into power saving mode, and when they wake up again, the kernel sees it as a newly detected device.

To put it another way, the HAL device needs to be completely replaced with a device that talks exclusively to udev, but nobody has taken this on yet.

Title: Re: Redetection - GYR3103US & Sharp Aquos via RS232
Post by: Armor Gnome on October 10, 2012, 10:13:18 am
This sounds like something I could assist with by testing but is not something I am going to be able to lead or give development help on. 

Honestly I don't plan to pick extremely vital and complex layers of LMCE when I type up a problem and offer to help if I am able.  While this is surely a huge pat on the back to those who have worked hard to make so many things work OTB, it is terribly frustrating for someone who is still very green and wants to get his feet wet with a few template creations and perhaps some MAC detection changes based on what works for my devices in the master PnP database.

Noting your reference to possible problems with USB to Serial cables I may still attempt that route for the low cost and possible benefit of creating a working template for that specific TV model number for anyone wanting to use it with an additional connector.  I would label such a template *patch* to re-enforce that although possibly working, anyone who is able should at least look at the underlying problems with HAL and attempt to correct the issue at its base instead of continuing to use patched methods of connecting.

Now, to clarify:  Your response seemed to address only the TV as the detection problems (to me) seemed to only address serial connections.  Is the same issue going on with the RF to USB dongle that comes with my remote?  Was your response specific to the TV?  Of the two issues I posted about, if there is still hope that the problems with the remote are within my capabilities I would still like to try to fix something.
Title: Re: Redetection - GYR3103US & Sharp Aquos via RS232
Post by: l3mce on October 10, 2012, 10:17:31 am
In web admin/media director/advanced there is a checkbox toward the bottom which says "Dont Detect Serial Devices". Once clicked (and router reloaded), it won't bother you again.

I know that we need to rework it to prevent the problem from being... but that works for now.