Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ongoing: Phantom/Dialog/Spark protocol deciphering and development
#4
Just to give a short update, you can play anything to Phantom by bypasing Spark (taking over ports 4040 and 80).
Following guide is for Windows, but Mac users can do same stuff (even easier) from bash shell. If interested, let know.

You will need netcat (ncat.exe) from NMAP distribution here: https://nmap.org/dist/nmap-7.01-setup.exe

Close Spark, then check that your port 80 is not in use (in cmd.exe run "netstat -an" and check top of the list for anything :80 with status LISTENING).
If you're running Skype, either quit it or go into Advanced settings -> Connection and prohobit it from using ports 80 and 443.

Choose a directory.
Create 4 text files in it: header.txt serve.bat port4040.bat port80.bat 
Copy some music file (FLAC or other type) into the directory and check it's filename.

In header.txt put the text (7 lines) between the ---'s:

----header.txt----
HTTP/1.1 200 OK
Accept-Ranges: bytes
Date: Wed, 23 Dec 2015 15:16:20 GMT
Content-Type: audio/*
Connection: close


---------------------

It's important to leave those 2 blank lines in the text file, as the real header would end with 2 CR+LFs.


In serve.bat put this text (the 3 lines betwee ---'s), changing "09 - Var.flac" to the actual name of the music track you put there:

----serve.bat----
@echo off
type header.txt
type "09 - Var.flac"
-------------------

(If you're wondering, the sample being used here is from album Kveikur by Sigur Ros)


In port80.bat put this one line of text: (or just type in command line)

----port80.bat----
ncat -v -l -k -p 80 -e "serve.bat"
---------------------

In port4040.bat put this one line of text: (or just type in command line)

----port4040.bat----
ncat -v -l -k -p 4040 -e "serve.bat"
------------------------

Now:
1. Close Spark
2. Run (double-click) port80.bat
3. Run (double-click) port4040.bat
4. Start Spark
5. Play any song in Spark.

The file you'll be playing is the file mentioned in serve.bat


The whole thing above is to create a small simple web server, but you can use your own webserver to server the files.
With a simple script, you can set it up to serve files from some directory one by one in alphabetical order, even going into subdirectories.
Or use it to test whether Phantom will understand various file formats, sampling frequencies and bitrates.
Reply


Messages In This Thread
RE: Ongoing: Phantom/Dialog/Spark protocol deciphering and development - by iliapas - 23-Dec-2015, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)