Linn Forums

Current time: 2017-09-22, 23:35 Hello There, Guest! (LoginRegister)

Linn Forums / Linn Music Systems & Hi-fi Separates / Troubleshooting v / LPEC Not Switching Sources on KDSM

Post Reply 
LPEC Not Switching Sources on KDSM
2017-09-13, 14:45
Post: #11
RE: LPEC Not Switching Sources on KDSM
(2017-09-13 09:31)eamonnb Wrote:  
(2017-09-12 21:10)srobeck Wrote:  Eamonn,

Thanks for your reply, I continue to be mystified.

First, I found that in addition to Volume, Mute and Standby commands working as expected, the Playlist source also works with exactly the same syntax as below.

So then I set up a connection via Putty and got an ALIVE response right away. Then I tried:

ACTION Product/Ds 2 SetSourceBySystemName "HDMI1"\x0D\x0A

And got:

ERROR 111 "Device not found"

Then I tried to select "Playlist" and that worked fine. Then I tried several variations of selecting SourceIndexByName SourceBySystemName and all returned RESPONSE.

So it does seem that the "bug" with the first command my be an issue, but it also makes no sense that iRule can process Playlist, Volume, Mute and Standby just fine, but not the other source selections. Not sure what to try next. Any thoughts much appreciated.

Cheers,

Stephen

Hi Stephen

The error response is correct - your command is malformed.

Spot the difference in these two lines (the first one works, the second one doesn't)

Code:
ACTION Ds/Product 2 SetSourceBySystemName "HDMI1"\x0D\x0A
ACTION Product/Ds 2 SetSourceBySystemName "HDMI1"\x0D\x0A


Eamonn

Yes, indeed, that was a typo I didn't notice. But all the commands I am sending in iRule are correct structure and some work (Playlist, Volume, Mute, Standby) but the SetSource ones don't. This is what I need to figure out. Thanks Eamonn.

KDSM Exakt - KDS2 Renew - MajikDS - SneakyDS - Klimax Kontrol (now for sale) - Komris with Exaktboxes - 8x Solo 500
Find all posts by this user
Quote this message in a reply
2017-09-13, 15:43 (This post was last modified: 2017-09-13 16:14 by Briain.)
Post: #12
RE: LPEC Not Switching Sources on KDSM
Hi

Just a quick thought...

Sorry, I don't know what iRule is, but maybe something interesting would be found if you captured the packets using Wireshark and thus found out what iRule is actually sending to the DS. If they are not as expected, you could then contact the iRule helpdesk and report the issue, or perhaps even modify your string to kluge iRule into sending what the DS expects*?

Just a thought on one way to progress things (as that is what I'd first try) but perhaps someone who knows more about iRule will know of an even simpler way to inspect what it is sending. Perhaps it has a way to enable logging of it's activities, or a trick to pipe the commands to a text file (for examples)?

Later edit: I just searched for iRule and I see that it is an iThings applet (and I'd doubt there's anything like Wireshark equivalent for iThings; I'd guess that Apple's sandboxing rules would not permit such a tool) so to Wireshark it, you'd have to connect the DS and a PC (there are Wireshark versions for Windows, Mac and Linux) to a hub. Or, if you have a managed switch which has a port mirroring feature (that is what I use for all such nefariousness) you could do it with that and thus look at the text content of the packets being sent to the DS.

Bri

* Puts me in mind of pre-distorting the modulating signal on an AM transmitter to cancel out the distortion caused by the actual modulation process; PyE used to do that in their AM base stations (like the ones that some of the UK police forces and ambulance brigades used a couple of decades ago) and I think the same trick was maybe also used with the video feed in the days of AM television transmitters (before we were inflicted with all this digital television stuff); sorry, I somewhat digress (more than slightly)! Big Grin Big Grin

KDS/1 (music) + ADSM (AV) -> KK/1 -> 350A + DSP time & phase aligned rear 345 sub
KDS Renew -> Lejonklou Kikkin -> 2250/D -> 212 (bedroom)
MDSI -> 104C (awaiting installation in my kitchen)
MDSI -> Shahinian Arc (installed at my mum's house)
Find all posts by this user
Quote this message in a reply
2017-09-14, 00:57
Post: #13
RE: LPEC Not Switching Sources on KDSM
(2017-09-13 15:43)Briain Wrote:  Hi

Just a quick thought...

Sorry, I don't know what iRule is, but maybe something interesting would be found if you captured the packets using Wireshark and thus found out what iRule is actually sending to the DS. If they are not as expected, you could then contact the iRule helpdesk and report the issue, or perhaps even modify your string to kluge iRule into sending what the DS expects*?

Just a thought on one way to progress things (as that is what I'd first try) but perhaps someone who knows more about iRule will know of an even simpler way to inspect what it is sending. Perhaps it has a way to enable logging of it's activities, or a trick to pipe the commands to a text file (for examples)?

Later edit: I just searched for iRule and I see that it is an iThings applet (and I'd doubt there's anything like Wireshark equivalent for iThings; I'd guess that Apple's sandboxing rules would not permit such a tool) so to Wireshark it, you'd have to connect the DS and a PC (there are Wireshark versions for Windows, Mac and Linux) to a hub. Or, if you have a managed switch which has a port mirroring feature (that is what I use for all such nefariousness) you could do it with that and thus look at the text content of the packets being sent to the DS.

Bri

* Puts me in mind of pre-distorting the modulating signal on an AM transmitter to cancel out the distortion caused by the actual modulation process; PyE used to do that in their AM base stations (like the ones that some of the UK police forces and ambulance brigades used a couple of decades ago) and I think the same trick was maybe also used with the video feed in the days of AM television transmitters (before we were inflicted with all this digital television stuff); sorry, I somewhat digress (more than slightly)! Big Grin Big Grin

Hi Bri,

Thanks for the thoughts. I'm not sure I understand how to organize port mirroring, etc., perhaps beyond my ken. But you did help me a few years ago to sort out Putty which is telling me my codes are good. Only trouble is, some of them are not making the DSM happy. I just sent a PM to a developer I found in an old thread, so we'll see what he has to say.

All best,

Stephen

KDSM Exakt - KDS2 Renew - MajikDS - SneakyDS - Klimax Kontrol (now for sale) - Komris with Exaktboxes - 8x Solo 500
Find all posts by this user
Quote this message in a reply
2017-09-14, 02:13
Post: #14
RE: LPEC Not Switching Sources on KDSM
I just tried a few other things to see if I could spot a pattern. So using a test panel in iRule, I programmed additional buttons for Radio and TOSLINK1 inputs on the KDSM. These work perfectly using the SetSourceBySystemName syntax. But none of the HDMI inputs work. Is it possible there is a bug in the software as it relates to these inputs?

KDSM Exakt - KDS2 Renew - MajikDS - SneakyDS - Klimax Kontrol (now for sale) - Komris with Exaktboxes - 8x Solo 500
Find all posts by this user
Quote this message in a reply
2017-09-14, 10:48
Post: #15
RE: LPEC Not Switching Sources on KDSM
(2017-09-14 00:57)srobeck Wrote:  ... Putty which is telling me my codes are good. Only trouble is, some of them are not making the DSM happy.

Hi srobeck

Are you saying the commands for selecting HDMI sources don't work when you send them via PuTTY?

All commands that I have tried have worked using PuTTY. If you have found any that don't work using PuTTY then I can try them if you post them here. If a command works via PuTTY but not via iRule, then it's a problem with iRule or how it's programmed.

Did you program the HDMI selection commnds in iRule yourself, or were they preprogrammed?

Eamonn

Majik DSM/1 - Akurate 2200 - Akurate 212, Sneaky Music DS - Komponent 104
Find all posts by this user
Quote this message in a reply
2017-09-14, 10:58 (This post was last modified: 2017-09-14 11:53 by Briain.)
Post: #16
RE: LPEC Not Switching Sources on KDSM
(2017-09-14 02:13)srobeck Wrote:  I just tried a few other things to see if I could spot a pattern. So using a test panel in iRule, I programmed additional buttons for Radio and TOSLINK1 inputs on the KDSM. These work perfectly using the SetSourceBySystemName syntax. But none of the HDMI inputs work. Is it possible there is a bug in the software as it relates to these inputs?

From what you are saying, it does rather sound like the iRule package is misinterpreting the lines containing 'HDMI'.

(2017-09-14 02:13)srobeck Wrote:  Thanks for the thoughts. I'm not sure I understand how to organize port mirroring, etc., perhaps beyond my ken. But you did help me a few years ago to sort out Putty which is telling me my codes are good. Only trouble is, some of them are not making the DSM happy. I just sent a PM to a developer I found in an old thread, so we'll see what he has to say.

Before affordable Ethernet switches appeared, we instead used network hubs. Anything sent from one connected device to another appeared on all the hub ports, so from a PC connected to the hub, you could see everything transiting the hub. By comparison, switches are actually quite intelligent in that they learn the MAC address of every connected device, then based upon the destination MAC address attached to each packet they steer the packets to the appropriate ports (so far less unnecessary 'clutter' to all of the attached devices).

Running Wireshark on the same machine on which you are testing something is not a problem as both the package under test and Wireshark are accessing the same network card in that machine. Running Wireshark on one machine and inspecting traffic between two other machines is not possible when using a switch, as the switch won't be echoing these packets to the port on which your Wireshark machine is connected (so you would still able to see a PuTTY command going out from your PC, but you wouldn't be able to see an iRule packet going from an iThing to the DS)

There are two ways around that and one is to instead plug the DS and PC into an olde worlde hub (and connect that hub to your existing switch), but hubs are now getting rather hard to find (a few years back, I raked one from a skip and keep it for that purpose) so the other is to use a managed switch which has a feature whereby you can set it echo traffic from one port to another. So, if your PC is on port 10 and your DS is on port 16, you'd have to configure the switch to let port 10 see everything that's being sent to / received from port 16 (and thus you'd see the iRule packet being sent to the DS).

Wireshark is something that - if you haven't seen it before - initially looks a little daunting, but it is a free download and thus something that can be played with at no cost (other than to your sanity) and in reality, it's actually very easy to drive it. A while back, I used it to find out why Songcast from a PC to a DS was being interrupted (turned out to be an undocumented switch feature that required new firmware to expose it, and thus to permit me to disable it, but that is another story) and it'll surprise you just how much chatter there is between your own PC and other things on the network.

If you did have a hub, you could run Wireshark and look at the packets with your DS's IP address, then some of these packets should show the actual commands being sent. Attached are pictures of me doing so (though this is using telnet commands as opposed to raw ones). I can see these (without a hub or switch configuration change) as I was running Wireshark and the terminal on the same (Linux) PC.

The PC is on 10.11.11.10 and the ADSM is on 10.11.11.30 and as you can see (bottom of screen) the first one shows me sending the HDMI1 command and the second shows me sending the Playlist version (and in both cases, you can also see the DS is also answering back in the lines below these ones).

Note that I can see other things announcing their network presence (22 is my NAS and 38 is a Sky+ box). These SSDP (discovery protocol) are broadcast type packets which are echoed to all of the switch ports (which is why I can see them). If you do look at Wireshark, you will be surprised at just how much other 'random' chatter is going on in the background (thus all the flashing lights on your switch, even when you aren't doing anything like surfing the www or sending an e-mail) so if nothing else, it's darned good fun having a look at what's going on, just for the sheer heck of it. Wink

PS The trick I used was to have Wireshark ready to go, then hit the the start capture icon just before I hit return to send the terminal command (then stop or pause it immediately after sending it); that saves a lot of scrolling!

Bri

NB If you do the Wireshark thing, your screen will show a lot of hex numbers to the left of that section showing the 'ACTION Ds/Product' information (and that is to be expected; I just masked the to make it clearer to see the wanted part). The main thing would be to look at one that does work (like Playlist) then the one that doesn't (the HDMI ones) to see if the latter are obviously malformed in some way (e.g. the HDMI1 part has been changed to HDMI, or something else like that).


Attached File(s) Thumbnail(s)
       

KDS/1 (music) + ADSM (AV) -> KK/1 -> 350A + DSP time & phase aligned rear 345 sub
KDS Renew -> Lejonklou Kikkin -> 2250/D -> 212 (bedroom)
MDSI -> 104C (awaiting installation in my kitchen)
MDSI -> Shahinian Arc (installed at my mum's house)
Find all posts by this user
Quote this message in a reply
2017-09-14, 16:59
Post: #17
RE: LPEC Not Switching Sources on KDSM
(2017-09-14 10:48)eamonnb Wrote:  
(2017-09-14 00:57)srobeck Wrote:  ... Putty which is telling me my codes are good. Only trouble is, some of them are not making the DSM happy.

Hi srobeck

Are you saying the commands for selecting HDMI sources don't work when you send them via PuTTY?

All commands that I have tried have worked using PuTTY. If you have found any that don't work using PuTTY then I can try them if you post them here. If a command works via PuTTY but not via iRule, then it's a problem with iRule or how it's programmed.

Did you program the HDMI selection commnds in iRule yourself, or were they preprogrammed?

Eamonn

Hi Eamonn,

All commands including HDMI sources seem to work with Putty.

I programmed all the commands myself and can click from one to the next and clearly see that the syntax for "HDMI1" is identical to "Playlist".

Like you I would be suspect of iRule but I've been using it for 10 years with IR, LPEC, RS232 and IP codes, and if ANY codes work with a device, they all do. That's why this seems so strange.

Thanks for your continued help, I will contact iRule and see if they recommend a way to capture sent commands as Bri has suggested.

SPR

KDSM Exakt - KDS2 Renew - MajikDS - SneakyDS - Klimax Kontrol (now for sale) - Komris with Exaktboxes - 8x Solo 500
Find all posts by this user
Quote this message in a reply
2017-09-14, 17:56
Post: #18
RE: LPEC Not Switching Sources on KDSM
(2017-09-14 16:59)srobeck Wrote:  Hi Eamonn,

All commands including HDMI sources seem to work with Putty.

I programmed all the commands myself and can click from one to the next and clearly see that the syntax for "HDMI1" is identical to "Playlist".

Like you I would be suspect of iRule but I've been using it for 10 years with IR, LPEC, RS232 and IP codes, and if ANY codes work with a device, they all do. That's why this seems so strange.

Thanks for your continued help, I will contact iRule and see if they recommend a way to capture sent commands as Bri has suggested.

SPR

Hi Stephen

I suspect there's a very subtle typo in your command for HDMI selection, probably the source name.

You could try renaming your HDMI1 source to something else say "BluRay" and use the set source command like this:

Code:
ACTION Ds/Product 2 SetSourceIndexByName "BluRay"\x0D\x0A

Eamonn

Majik DSM/1 - Akurate 2200 - Akurate 212, Sneaky Music DS - Komponent 104
Find all posts by this user
Quote this message in a reply
2017-09-14, 20:54
Post: #19
RE: LPEC Not Switching Sources on KDSM
(2017-09-14 17:56)eamonnb Wrote:  
(2017-09-14 16:59)srobeck Wrote:  Hi Eamonn,

All commands including HDMI sources seem to work with Putty.

I programmed all the commands myself and can click from one to the next and clearly see that the syntax for "HDMI1" is identical to "Playlist".

Like you I would be suspect of iRule but I've been using it for 10 years with IR, LPEC, RS232 and IP codes, and if ANY codes work with a device, they all do. That's why this seems so strange.

Thanks for your continued help, I will contact iRule and see if they recommend a way to capture sent commands as Bri has suggested.

SPR

Hi Stephen

I suspect there's a very subtle typo in your command for HDMI selection, probably the source name.

You could try renaming your HDMI1 source to something else say "BluRay" and use the set source command like this:

Code:
ACTION Ds/Product 2 SetSourceIndexByName "BluRay"\x0D\x0A

Eamonn

Hi Eamonn,

No, typos aren't the issue, all codes are correct. But I did have success by doing the following:

1. Used Putty to map the current SourceIndex numbers for all inputs.
2. Rewrote the codes for the three HDMI inputs (Index numbers 9, 10 and 11), updated iRule, and these all worked correctly, showing the Konfig names on the KDSM (Sat TV, etc).
3. Then, as an experiment, I rewrote the codes once more using SetSourceBySystemName (HDMI1, etc.), and now they work. I swear upon my children's children that the codes used previously that failed and those that now work are identical.

Of course this is all very mysterious to me (and perhaps to you), but it's as if the HDMI inputs needed to be "primed" somehow, but in any event all seems to be well. I will report any further anomalous behavior.

Cheers,

Stephen Robeck

KDSM Exakt - KDS2 Renew - MajikDS - SneakyDS - Klimax Kontrol (now for sale) - Komris with Exaktboxes - 8x Solo 500
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)