Author Topic: LG LCD Template  (Read 61602 times)

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: LG LCD Template
« Reply #45 on: October 24, 2010, 10:12:35 pm »
huh,

Did you try my suggestion above? Manually setting the volume control in the init script #355.
.... try replacing cmd_313(volume_level) in #355 with a fixed number like this:
cmd_313(8)

This will simply set the volume to 8. This is not best practice but if it works it will help me diagnose the problem.
From my experience it seems that if the LG isn't initialized properly then it won't work.

Also, I've had problems with usb to rs232 adapters (using various null modem cables). I've now bought 5 or 6 adapters. Only one works. Others fail to detect the LG despite running through the pnp scripts.
Barney

huh

  • Guru
  • ****
  • Posts: 245
    • View Profile
Re: LG LCD Template
« Reply #46 on: October 25, 2010, 01:25:54 am »
B4rney- I don't know how to test the command one I put in a discrete volume level into the code.  Instead of putting it in the template, I tried over a command line to make sure that I had the correct serial port set in the admin pages.  This way I was also able to test discrete volume commands:  e.g. set to level 6.  These worked just fine.  So as you said, maybe something didn't get initialized correctly.

I really need to can my install and go again with a new snapshot.  Esev, pos, lol3sol and merkur2k (to name a few) have really been adding a lot of patches in the recent past.  Going to wait until those get burned in a new snapshot and reinstall.   I will get serious about trying to resolve this then as well.

Thanks-


etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #47 on: October 31, 2010, 12:57:53 am »
These questions correspond to posting: http://forum.linuxmce.org/index.php?topic=9729.msg74457#msg74457

I have an LG 55LH40 connected to a hybrid which I'm hoping to get working effectively with LinuxMCE.

1. Ensure that your LG TV has the same commands as device template 2126. Check your manual. As far as I can see (looking at recent LG manuals) most LGs share mostly the same RS232 commands.

My ignorance prevented me from effectively performing this request.  After much looking around the LinuxMCE wiki I guessed that I had to basically jump down to the 3rd, 4th, and 5th entries in the list to confirm the commands.  My manual and the commands are different as the 6th entry notes some of the necessary changes.

Why not just create a new device template based on the existing template rather than modifying the existing template? The LG 55LH40 has an additional HDMI port (#4). Should an entirely new device template be created? According to my manual, 18 TVs are controlled by the same commands.

2. Change the Plug and Play script  on your MD in /usr/pluto/pnp/20_LG_TV.sh to point to device template 2126. It should look like this.

Does the hybrid use the same script?  I updated the script and disconnected the serial connection and reconnected but the connection was not acted upon. I also tried using the TV portion of the Setup Wizard but it failed to detect the serial connection as well. I can send commands directly to the serial connection and I know it works because I can turn off the TV and then turn it back on again.

I will do everything necessary to get this to work because I bought this specific TV because of the RS232 interface.  I also want to ensure that the next time I decide to reinstall from scratch that minimal configuration will be necessary and can all be done from the Setup Wizard.

Thanks, Tom

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: LG LCD Template
« Reply #48 on: November 01, 2010, 12:06:44 am »
Hi Tom,

You are correct, the idea is to make new templates which will eventually be rolled into releases. At the moment I am just asking people to test the changes I have implemented in order to get it configured as a start point for new templates.

I have looked at your TV's manual and most of the commands are identical. Look at the section 'External Control through RS232' towards the end of the pdf.

Regarding your problem, when you plug in the TV via RS232 does it trigger the PnP scripts to run? It should! If not make sure you have a compatible Null Modem cable. I have had the most problems making the physical connections. I have 3 LG TVs. I can get 2 of them working using the same usb>rs232 plus a properly wired null modem cable. Sadly only one of my many usb>rs232 adapters actually works.  Don't ask me why, I ordered the same model from the same seller on ebay.

I'm happy to help you get your LG working. It is weird that you can send commands directly but yet it is not detected. There are many people with usb adapter problems (with advice from Thom to use PCI rs232 cards). Do you have several usb devices in your hybrid?

Reply here or PM me and I'll help as much as I can.
Barney

etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #49 on: November 01, 2010, 03:33:10 am »
I bought a RS232 to USB adapter (Cables Unlimted USB 2.0 to Serial DB9 Adapter) but it failed to work for me so I ordered up a Gigabyte motherboard COMM port Adapter and connected directly to the Null modem cable (StarTech.com Serial Null Modem Cable - DB-9 Female - DB-9 Female). I was then able to successfully send commands to the TV but LinuxMCE still failed to recognize the connection when I connected the TV to the computer. Could this be because I'm running a hybrid and not an MD?

I do have a number of USB devices on my system (USB-UIRT, remote, and wireless keyboard/mouse).

I'll do the rest of the configuration steps noted in your previous posting and see if I can get it set up manually for the time being.

- Tom

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: LG LCD Template
« Reply #50 on: November 01, 2010, 10:22:48 pm »
Hi Tom,

It's a strange coincidence but .... the only LG TV that won't work on my system is in fact attached to the core/hybrid like yours.

I've had my hybrid launch the pnp scripts when plugged into the TV with a straight through rs232 cable but it doesn't detect the TV (this is normal behaviour when not using a null modem cable). I guess I'll have to check my pinouts.

I have bought some null modem cables on ebay which specify the pin crossovers as follows:
pin 2 ...to... pin 3
pin 3 ...to... pin 2
pin 4 ...to... pin 6
pin 5 ...to... pin 5
pin 6 ...to... pin 4
pin 7 ...to... pin 8
pin 8 ...to... pin 7
These work where others fail (but still not on my hybrid). Hope this helps.

Barney
« Last Edit: November 02, 2010, 11:23:25 am by b4rney »

ladekribs

  • Veteran
  • ***
  • Posts: 86
    • View Profile
Re: LG LCD Template
« Reply #51 on: November 03, 2010, 08:39:40 am »
Hi Barney,

I did some more testing yesterday, after reinstalling core(twice) I carefully followed your steps,
 and then moved the core to the TV ,there all the relevant commands seems to work well,
I tested the init,volume up/down and mute and also power on when already on is faster, (that is good!)

next step will be to let the MD control the tv that is what failed for me last time.


BR Stefan

etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #52 on: November 03, 2010, 03:55:35 pm »
I confirmed that my null modem cable matched your pin-outs (which are consistent with those listed in the LG manual).

I also reattached the USB adapter and tried it and I was able to use it to communicate to the TV using TestSerialPort via ttyUSB1. It appears that I had been trying ttyUSB0 previously.

Unfortunately, neither approach triggers PNP capabilities.

Any idea what causes the 20_LG_TV.sh script to run or where it is ran from?

Thanks, Tom

ladekribs

  • Veteran
  • ***
  • Posts: 86
    • View Profile
Re: LG LCD Template
« Reply #53 on: November 03, 2010, 05:36:22 pm »
I made a quick test on the MD now, and the odd thing is that now the pnp engine asks if i connected a 20ls7d tv and ignores the 37LH30 script. and the device gets disabled.


b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: LG LCD Template
« Reply #54 on: November 04, 2010, 12:44:37 am »
@ladekribs
Did you edit the 20_LG_TV.sh on the MD to point to template 2126?

@Tom
Not sure about why pnp won't detect the TV. Is it possible to manually add the LG in web admin from the 37LH30 Template (2126)?
Here is a screenshot of my AV Equipment screen.

etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #55 on: November 04, 2010, 11:40:04 am »
[quote author=b4rney link=topic=9729.msg75297#msg75297 date=1288827877
Not sure about why pnp won't detect the TV. Is it possible to manually add the LG in web admin from the 37LH30 Template (2126)?
[/quote]

I tried that yesterday.  After I specified it from web admin some stuff popped up on the TV monitor to specify additional settings but after selecting the necessary settings LinuxMCE complained that the TV was not accessible or something like that and I was forced to press OK to acknowledge the message.

As seen below, the operating system is detecting the connection and disconnection of the cable. LinuxMCE seems to behave oblivious to the actions.

From /var/log/syslog
Code: [Select]
...
Nov  3 09:30:53 dcerouter kernel: [511263.568076] usb 2-1: new full speed USB device using ohci_hcd and address 4
Nov  3 09:30:53 dcerouter kernel: [511263.747610] usb 2-1: configuration #1 chosen from 1 choice
Nov  3 09:30:53 dcerouter kernel: [511263.749200] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
Nov  3 09:30:53 dcerouter kernel: [511263.749470] ftdi_sio: Detected FT232RL
Nov  3 09:30:53 dcerouter kernel: [511263.749924] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1
...
Nov  3 09:43:12 dcerouter kernel: [512002.105088] usb 2-1: USB disconnect, address 4
Nov  3 09:43:12 dcerouter kernel: [512002.108564] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
Nov  3 09:43:12 dcerouter kernel: [512002.108867] ftdi_sio 2-1:1.0: device disconnected
...
Nov  3 09:43:18 dcerouter kernel: [512008.260059] usb 2-1: new full speed USB device using ohci_hcd and address 5
Nov  3 09:43:18 dcerouter kernel: [512008.439420] usb 2-1: configuration #1 chosen from 1 choice
Nov  3 09:43:18 dcerouter kernel: [512008.441127] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
Nov  3 09:43:18 dcerouter kernel: [512008.441398] ftdi_sio: Detected FT232RL
Nov  3 09:43:18 dcerouter kernel: [512008.441854] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1
...

etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #56 on: November 04, 2010, 12:22:19 pm »
After further searching I found the following entry in /var/log/pluto/Spawn_cdc_4016.log: "Problem installing pluto-generic-serial-device (100)."

I attempted to perform the installation from the command line but it failed as well.

Code: [Select]
tap@dcerouter:/var/log$ sudo apt-get install pluto-generic-serial-device
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libtcltk-ruby1.8 tcl8.4 tk8.4
Suggested packages:
  tclreadline
The following NEW packages will be installed:
  libtcltk-ruby1.8 pluto-generic-serial-device tcl8.4 tk8.4
0 upgraded, 4 newly installed, 0 to remove and 17 not upgraded.
Need to get 2750kB/6882kB of archives.
After this operation, 24.6MB of additional disk space will be used.
Do you want to continue [Y/n]?
WARNING: The following packages cannot be authenticated!
  tcl8.4 tk8.4 libtcltk-ruby1.8 pluto-generic-serial-device
Authentication warning overridden.
Err http://us.archive.ubuntu.com intrepid/main tk8.4 8.4.19-1
  404 Not Found [IP: 91.189.92.172 80]
Err http://us.archive.ubuntu.com intrepid-updates/universe libtcltk-ruby1.8 1.8.7.72-1ubuntu0.2
  404 Not Found [IP: 91.189.92.172 80]
Err http://archive.ubuntu.com intrepid/main tk8.4 8.4.19-1
  404 Not Found [IP: 91.189.88.45 80]
Err http://security.ubuntu.com intrepid-security/universe libtcltk-ruby1.8 1.8.7.72-1ubuntu0.2
  404 Not Found [IP: 91.189.92.166 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/t/tk8.4/tk8.4_8.4.19-1_i386.deb  404 Not Found [IP: 91.189.88.45 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/r/ruby1.8/libtcltk-ruby1.8_1.8.7.72-1ubuntu0.2_i386.deb  404 Not Found [IP: 91.189.92.166 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
tap@dcerouter:/var/log$

Are the packages still available for the Intrepid release?

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: LG LCD Template
« Reply #57 on: November 04, 2010, 01:16:19 pm »
Hi Tom,

I only have pluto-generic-serial-dev on my system, version 2.0.0.44.10091623289.
Hope this helps.

Barney

ladekribs

  • Veteran
  • ***
  • Posts: 86
    • View Profile
Re: LG LCD Template
« Reply #58 on: November 05, 2010, 08:40:23 am »
@Barney
Oops no I did not change the 20_LG_TV.sh on the MD I expected it to come from the Core, but i guess I created the MD before changing the script.

etNHGfU8

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: LG LCD Template
« Reply #59 on: November 06, 2010, 10:15:26 pm »
Barney, now that I got pluto-generic-serial-device installed, I completed the steps in http://forum.linuxmce.org/index.php?topic=9729.msg74457#msg74457 and I'm now seeing an issue output in kern.log:

Code: [Select]
Nov  6 15:21:01 dcerouter kernel: [  303.532127] HDMI: detected monitor LG TV
Nov  6 15:21:01 dcerouter kernel: [  303.532131]        at connection type HDMI
Nov  6 15:21:01 dcerouter kernel: [  303.532154] ------------[ cut here ]------------
Nov  6 15:21:01 dcerouter kernel: [  303.532161] WARNING: at /build/buildd/linux-2.6.27/lib/vsprintf.c:600 vsnprintf+0x7ae/0x7b0()
Nov  6 15:21:01 dcerouter kernel: [  303.532167] Modules linked in: ztdummy zaptel crc_ccitt xt_TCPMSS ipt_MASQUERADE ipt_TTL iptable_mangle xt_tc\
pudp xt_mark xt_state iptable_nat bridge stp bnep sco rfcomm l2cap bluetooth nfsd auth_rpcgss exportfs ppdev autofs4 powernow_k8 cpufreq_ondemand \
cpufreq_powersave cpufreq_userspace cpufreq_conservative cpufreq_stats freq_table video output pci_slot sbs sbshc container battery nfs lockd nfs_\
acl sunrpc af_packet iptable_filter ip_tables x_tables ac nf_nat_irc nf_nat_ftp nf_nat nf_conntrack_irc nf_conntrack_ftp nf_conntrack_ipv4 nf_conn\
track sbp2 lp snd_hda_codec_nvhdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq snd_timer snd_seq_device snd joydev\
 ftdi_sio usbserial i2c_piix4 evdev pcspkr soundcore nvidia(P) parport_pc parport i2c_core snd_page_alloc button wmi ati_agp agpgart shpchp pci_ho\
tplug ipv6 ext3 jbd mbcache pata_acpi sr_mod cdrom sd_mod crc_t10dif usbhid hid pata_atiixp sg ohci1394 ata_generic r8169 ahci ieee1394 mii libata\
 scsi_m
Nov  6 15:21:01 dcerouter kernel: d ehci_hcd ohci_hcd dock usbcore sky2 raid10 raid456 async_xor async_memcpy async_tx xor raid1 raid0 multipath l\
inear md_mod thermal processor fan nbd fbcon tileblit font bitblit softcursor fuse
Nov  6 15:21:01 dcerouter kernel: [  303.532387] Pid: 4397, comm: hd-audio1 Tainted: P          2.6.27-17-generic #1
Nov  6 15:21:01 dcerouter kernel: [  303.532400]  [<c037e40b>] ? printk+0x1d/0x22
Nov  6 15:21:01 dcerouter kernel: [  303.532415]  [<c0131fd9>] warn_on_slowpath+0x59/0x90
Nov  6 15:21:01 dcerouter kernel: [  303.532427]  [<c037ffce>] ? account_scheduler_latency+0xe/0x220
Nov  6 15:21:01 dcerouter kernel: [  303.532437]  [<c0253f81>] ? number+0x291/0x2a0
Nov  6 15:21:01 dcerouter kernel: [  303.532451]  [<c0253f81>] ? number+0x291/0x2a0
Nov  6 15:21:01 dcerouter kernel: [  303.532460]  [<c011292e>] ? native_smp_send_reschedule+0x3e/0x60
Nov  6 15:21:01 dcerouter kernel: [  303.532476]  [<c012a300>] ? resched_task+0x60/0x70
Nov  6 15:21:01 dcerouter kernel: [  303.532485]  [<c012ae25>] ? check_preempt_wakeup+0x1a5/0x200
Nov  6 15:21:01 dcerouter kernel: [  303.532503]  [<c0254e2e>] vsnprintf+0x7ae/0x7b0
Nov  6 15:21:01 dcerouter kernel: [  303.532512]  [<c012b81b>] ? default_wake_function+0xb/0x10
Nov  6 15:21:01 dcerouter kernel: [  303.532522]  [<c0147720>] ? autoremove_wake_function+0x20/0x50
Nov  6 15:21:01 dcerouter kernel: [  303.532534]  [<c0121780>] ? __wake_up_common+0x40/0x70
Nov  6 15:21:01 dcerouter kernel: [  303.532546]  [<c0122aa0>] ? __wake_up+0x40/0x50
Nov  6 15:21:01 dcerouter kernel: [  303.532553]  [<c013271b>] ? wake_up_klogd+0x3b/0x40
Nov  6 15:21:01 dcerouter kernel: [  303.532560]  [<c01328e1>] ? release_console_sem+0x1c1/0x1d0
Nov  6 15:21:01 dcerouter kernel: [  303.532570]  [<c0254eba>] snprintf+0x1a/0x20
Nov  6 15:21:01 dcerouter kernel: [  303.532580]  [<f8c4a659>] snd_print_pcm_bits+0x69/0x70 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532613]  [<f8c53a70>] snd_hdmi_show_eld+0x120/0x150 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532644]  [<f8c4b729>] ? snd_hda_power_down+0x9/0x80 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532669]  [<f8c4c597>] ? codec_exec_verb+0x87/0xe0 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532693]  [<c01ad51e>] ? __slab_free+0xe/0xf0
Nov  6 15:21:01 dcerouter kernel: [  303.532710]  [<f8c53bb3>] ? snd_hdmi_get_eld+0xe3/0x2e0 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532734]  [<f8c53bb3>] ? snd_hdmi_get_eld+0xe3/0x2e0 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532759]  [<f8d1d6e2>] hdmi_unsol_event+0xd2/0x110 [snd_hda_codec_nvhdmi]
Nov  6 15:21:01 dcerouter kernel: [  303.532776]  [<f8c4a0a0>] ? process_unsol_events+0x0/0x70 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532800]  [<f8c4a0f3>] process_unsol_events+0x53/0x70 [snd_hda_codec]
Nov  6 15:21:01 dcerouter kernel: [  303.532819]  [<c0143885>] run_workqueue+0x95/0x160
Nov  6 15:21:01 dcerouter kernel: [  303.532828]  [<c0147856>] ? finish_wait+0x16/0x70
Nov  6 15:21:01 dcerouter kernel: [  303.532837]  [<c0143b28>] worker_thread+0x88/0xf0
Nov  6 15:21:01 dcerouter kernel: [  303.532847]  [<c0147700>] ? autoremove_wake_function+0x0/0x50
Nov  6 15:21:01 dcerouter kernel: [  303.532858]  [<c0143aa0>] ? worker_thread+0x0/0xf0
Nov  6 15:21:01 dcerouter kernel: [  303.532869]  [<c0147391>] kthread+0x41/0x80
Nov  6 15:21:01 dcerouter kernel: [  303.532880]  [<c0147350>] ? kthread+0x0/0x80
Nov  6 15:21:01 dcerouter kernel: [  303.532891]  [<c0105297>] kernel_thread_helper+0x7/0x10
Nov  6 15:21:01 dcerouter kernel: [  303.532903]  =======================
Nov  6 15:21:01 dcerouter kernel: [  303.532911] ---[ end trace c2cc802782e9d57d ]---
Nov  6 15:21:01 dcerouter kernel: [  303.532918] HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 88200, bits = 16

Any idea what's up?