📜 ⬆️ ⬇️

What to do if the program suddenly stopped working

There is such a cool unpretentious program for the phone: Remote Volume Control. Makes one simple thing - lets you turn the volume on a computer (PC). Conveniently: I turned on the movie, fell into a hammock, and when the need arose, you turn up the volume.

Suddenly, on some wonderful day, the program just silently stopped working. There were no updates, the network settings did not change ... Somehow I was not used to the program suddenly broke and stopped working on their own.

In general, under the cut will tell the course of the investigation and what was the case.
')


Departing from the topic, generally speaking, there is a web interface and even a specialized client for vlc, which, including the volume, allows you to turn it, but it has two drawbacks: it will not work for other players or youtube and the second is slow ( because tcp).

Returning to the subject, Remote Volume Control is a very simple program; it allows you to rotate the system's master volume. To work, you still need to start a simple console server, it works instantly and still knows how to turn off the monitor. I don’t need to turn off the monitor at all, so turning off the power would help ... well, no, no, no, not that.

In general, suddenly, the program just quietly stopped working. I broke my head, what could be the matter. I deleted some recently installed programs, thought someone had taken her port or something ... that I just did not try. Toward the end, with the help of netcat, I began to study the protocol, in a desperate attempt to understand what could be wrong.

So this thing works via UDP, takes port 5555. Just sends a command and does not expect, it seems, no response. Which, on the one hand, is cool: it works very fast. On the other hand, the complete absence of feedback: it is not at all clear whether the message reached or not.

The protocol itself ... "protocol" is very loudly said, just when changing the volume from the phone comes "0.25" for example, straight text. That means 25% volume. And at the command "to extinguish the monitor" comes 1.00, and that's the whole protocol.

With the help of the same netcat, I tried to emulate the client, maybe the server part was “rotten” and something was wrong with it, wrote the same 0.25 ... no success, the server did not react at all (and during normal operation it shows what the volume sets) .

I put the sniffer, wrote something again in netcat and then bang, my monitor goes blank.

I think: "normal sniffer, killed me a system." It turned out that the monitor extinguished the server from the Remote Volume Control to me, and on command and wrote about it in the console.

“This is already interesting,” I thought. I look at what I last sent - "123". I’m writing “123” again, the monitor goes off correctly. It also goes out if you write "321", "12", any numbers, and if a letter is found, then no reaction. And if you write a legitimate command to turn off the monitor "1.00", that is also silence.

And here it hit me: the decimal point. Well and precisely, I write "1,00" - the monitor dies away. "0.25", writes that 25% of the volume.

I remembered that some time ago I was due to one program, no matter which one, although it was a brokerage client for alpha-bank, I was forced to change the regional settings to Russians.

I went to the regional settings, changed the decimal separator with a comma to a period and everything worked for me.

Source: https://habr.com/ru/post/183338/


All Articles