|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Sage Server Discovery for iPhone Remote
I have written a remote control app for the iPhone, but I would like to add auto-discovery of Sage Servers. Can someone direct me to the way that the placeshifter client does this?
|
#2
|
||||
|
||||
All I know is it uses port 31100 for the detection system. I'd assume it uses a EDP broadcast. Odds are you'll have to use a packet analyzer to determine what is actually passed.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#3
|
|||
|
|||
Wireshark is useful for this - you can filter it for IP traffic to/from a specific IP to help to narrow down what you are looking for.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#4
|
|||
|
|||
Several years ago I started working on a Sage client for xbox media center.
I never finished it but I did keep my notes. Here is what I have on server discovery....you will notice that there are many many pieces I hadn't figured out yet. Hope this helps. Step 1 - Server Discovery The application is launched (but we do not click "connect" yet) and the client sends a broadcast packet to UDP port 31100 in an attempt to find any SageTV servers on the LAN. The initial UDP source port is random, so far the lowest I have seen is 1133 and the highest is 4429. The payload of this UDP packet is 32 bytes and the first four bytes are 0x53545601 but I have no idea what these numbers mean. The remainder of the payload is all zeros: 0x53545601 0x00000000000000000000000000000000000000000000000000000000 The server responds with a payload of 15 bytes where the first four bytes are 0x53545602 which is the same as client payload except for a 2 at the end instead of 1. The 5th byte is 0x01, not sure what this is used for. The next 8 bytes are the Locator-ID while the remaining 2 bytes are the port number for the server (0x797b is 31099): 0x53545602 0x01 0x3fd1d5d3a62b4c8f 0x797b This discovery process repeats itself every 10 seconds until we proceed to Step 2, the only delta is the UDP source port number which increments by one with each iteration. Wireshark capture: step_1.pcap Step 2 - Establish "Media" TCP connection to the server We click "connect" and establish two TCP sessions to port 31099. The TCP source port for the first session is random. The lowest source port I have seen is 1183, the highest is 4434. Once the session is established the client will send two packets to the server. The payload of the first packet is 7 bytes where the first byte is 0x01 and the remaining 6 bytes contain the MAC address of the client. The payload of the second packet is 1 byte and contains the value 0x01. The value 0x01 indicates to the server that this is the "media" socket. The server should then respond with a 1 byte payload containing 0x02. If the server responds with any other value then there has been an error and the session should be torn down. The rest can be found here: http://sagetvplaceshifter.wikidot.co...ial-connection Last edited by dwalton22; 01-29-2010 at 02:28 PM. |
#5
|
||||
|
||||
Was this app ever done? Would LOVE this!
__________________
Al Bsharah / Twitter Clients: Two STX-HD100 High-Def Extenders Media Server / NAS: Case: Thermaltake Armor CPU: AMD Opteron 1218 (2.6GHz Dual Core) Motherboard: ASUS MN2-LR Memory: 2GB Gfx Card: Headless Tuner: Hauppauge HD-PVR, Hauppauge PVR-350 (not in use) O/S: Windows 7 Sage: Latest RAID: On-Board Drives: 6 x 1.5TB SATA RAID-5, 2 x 80GB IDE RAID-1 (O/S) Storage: 7.5TB Total |
#6
|
|||
|
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iPhone/iPod Touch web remote interest? | maxpower | SageTV Customizations | 14 | 02-01-2010 10:23 PM |
Another possible iPhone Remote Control for Sage | ybrew | Hardware Support | 0 | 09-06-2009 01:50 PM |
Use of Hauppauge remote on sage server | EdPhotoguy | Hardware Support | 3 | 09-08-2008 06:07 PM |
Will you watch Sage recordings on your iPhone? | flavius | SageTV Mac Edition | 10 | 07-28-2007 05:24 AM |
Test for server discovery by Client | Opus4 | SageTV Beta Test Software | 8 | 07-27-2005 07:39 PM |