Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Socket listening
This thread has 3 replies. Displaying all posts.
Post 1 made on Saturday June 9, 2018 at 10:52
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I have set up a socket in "Listen" mode to listen for a command from Alexa via an Raspberry Pi. It works when the pronto first starts so the code seems to be correct. After a while the pronto will no longer make a connection and accept data when it is sent. Does anyone have experience with a socket in listen mode?
Post 2 made on Tuesday June 12, 2018 at 18:07
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Barry,

I seem to recall a socket limit of 64 on the Pronto. This value can be adjusted via ProntoScript. See TCPSocket.setSocketLimt(). Default is 32 and can go up to a max of 64 sockets.

By chance, are you not closing a socket + setting variable where you assigned the accepted socket to null?

That would be the only thing I can think of.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Saturday June 16, 2018 at 21:31
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Thanks for the reply Lyndel. I thought sleep might be the issue but since the Pronto is in a dock and getting constant power it should never sleep.

I only close and set to null the socket that is passed to the 'onConnect' function after I have read the message and processed it. I never close and set to null the socket I am listening on as I assume that would hang around forever.

I have even tried to re-establish the socket I am listening on after every message, but in that process I first check if the socket exists and if it does I do not re-establish it.

Perhaps I should destroy the socket I am listening on after every message and re-establish it

Last edited by Barry Gordon on June 16, 2018 21:39.
Post 4 made on Saturday June 16, 2018 at 22:50
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
In theory, you should not have to destroy the listening socket as the 'accept' clones a 2nd socket. It is, however, worth a try. What is the behavior your see from logging? Do you simply stop receiving the onConnected callbacks? Are you getting any other error messages such as in an onIOError callback?
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse