Jump to content

How to keep a client-server connection alive?


aht961

Recommended Posts

Posted

I have a server with Recording Service installed and running successfully. The server has two tuners which broadcast the live TV stream to the client via LAN. At the client side I have DVBViewer with 1 own dedicated tuner and two unicast devices which connect to the server when needed.

 

When I boot the client, it broadcasts a WOL magic packet in order to wake up the server, establishes a connection and runs the DVBViewer. However, since I use the local tuner (priority 1) of the client most of the time, client looses its connection with the server and server goes to stand-bye after 15 minutes (I don't want it to be running 24/7). Thereafter, the client cannot connect to the server any more if needed (hence the server is in stand-bye) without sending a magic packet manually again.

 

In order to be able to reconnect, I use a script at the client side which sends a magic packet every two minutes to the server to keep-it-alive. However, this crashes the server after a while.

 

My question is: Is there any way/method implemented in the client DVBViewer which would help to keep its connection with the server alive even if it is using its local tuner (not the unicast device) or send a magic packet to the server every time when the user tries to use the unicast virtual device (by changing the channel for example)?

 

Any help will be much appreciated. Thanks.

Posted

About DVBViewer WOL action (maybe only a little step, but...) please take a look here and here

 

;)

Posted

Thank you very much for your quick reply and hint. I assume it wakes up the server only once during the start up but not repeatedly?

Probably it would be possible if a function could be added to the recording service server application that could allow the server to check if there are any clients "online" at LAN (perhaps the IPs of these clients could be added manually in the settings) and if there is any available client then prevents the host from going to sleep?

Posted
I assume it wakes up the server only once during the start up but not repeatedly?
I think so (honestly I haven't experimented yet); after all your config - where each client have a own "primary" receiver - is quite unusual...

 

Probably it would be possible if a function could be added ... and if there is any available client then prevents the host from going to sleep?
And what if no one client will call for the server? I can't imagine how the server PC can foresee that in any way...

 

The intention of my hint was instead to (at least) have a smarter way on that:

the client cannot connect to the server ... without sending a magic packet manually again.

A helping hand can perhaps be the DVBViewer WOL "action": it can be triggered via OSD, or via a linked remote button, or - much better - used in some clever script; these are the few word i found about it that however explain the core:

These functions are also accessible via actions (see actions.ini). This [OSD] menu is only available, if you configured the Recording Service connection properly.

Only take care that:

Important : The DVBViewer needs to have at least once contact with the service PC to get it's MAC address.

 

In that way, if you server PC was in StanBy (=not in hibernation), it will take a few seconds to have it up again with a simple remote key press (or some other trigger...)

 

B)

 

[...hope my English is understandable enough o:)]

Posted (edited)
after all your config - where each client have a own "primary" receiver - is quite unusual...

You are right. This was the only way to keep the young family members happy. Otherwise now and then (too often), server was down or crashed (= ms win) making it very inconvenient for the others to have the TV on. Now everybody happy since they don't need to go to the garage to boot the server, they manage by booting the client. All other tasks (eg. recording, uPnP) are centralised to the server.

 

much better - used in some clever script; these are the few word i found about it that however explain the core:

That is what I am doing. The intention is to run the client without keyboard/mouse. So everything is handled via remote. I use AutoIt script, which handles the application, WOL, hibernate/standbye isuues. Now after your hint, I gave up the dedicated WOL script instead I now send "8275" command when starting the DVBViewer client. The verys same script shows a splash screen which hides the DVBViewer until it is ready to stream.

 

[...hope my English is understandable enough o:)]

There is no problem with your English. This is not my mother tongue either. Thanks once again. I am now looking for a solution to keep-alive the client-server conncetion. Any suggestions from Lars or others?

Edited by aht961

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...