Code Monkey home page Code Monkey logo

libraop's Introduction

RAOP player and library (AirPlay)

This is a RAOP (airplay) player and library for the v2 protocol (with synchro). It works for Windows, OSX, Linux x86 and ARM. There is a small player can can play raw pcm form any file or stdin (useful for use pipes with a decoder like lame, flac or ffmpeg)

The player is just and example how to use the library, but it has a few interesting options:

usage: ./build/raop_play <options> <server_ip> <filename ('-' for stdin)>
	[-ntp <file>] write current NTP in <file> and exit
	[-p <port number>]
	[-v <volume> (0-100)]
	[-l <latency> (frames]
	[-w <wait>]  (start after <wait> milliseconds)
	[-n <start>] (start at NTP <start> + <wait>)
	[-nf <start>] (start at NTP in <file> + <wait>)
	[-e] (encrypt)
	[-s <secret>] (valid secret for AppleTV)
	[-r] (do interactive pairing with AppleTV)
	[-d <debug level>] (0 = silent)
	[-i] (interactive commands: 'p'=pause, 'r'=(re)start, 's'=stop, 'q'=exit, ' '=block)

It's possible to send synchronous audio to multiple players by using the NTP options (optionally combined with the wait option). Either get the NTP of the master machine from any application and then fork multiple instances of raop_play with that NTP and the same audio file, or use the -ntp option to get NTP to be written to a file and re-use that file when calling the instances of raop_play

Building using CMake

# install build libreries 
apt-get install build-essential cmake  libssl-dev

# Fetch all dependencies
# git submodule update --init
git submodule update --force --recursive --init --remote

# Create build directory
mkdir build
cd build

# Build project
cmake ..
make

Note that this is a cross-compiler CMake file so it's better to run it and define HOST and PLATFORM options (see the build.sh) but it's not mandatory. To better understand how my cross-compilation works, see here

Building using Make

Makefiles are provided for OSX, Linux (x86 and ARM). Under Windows, there is a VS2022 project. You'll need some libraires:

You need pthread for Windows to recompile the player / use the library here: https://www.sourceware.org/pthreads-win32

Misc

It's largely inspired from https://github.com/chevil/raop2_play but limit the playback to pcm as it focuses on creating a library and optimizing AirPlay synchronization

Since iOS 10.2, pairing is required with AppleTV. Here is a description of the protocol https://htmlpreview.github.io/?https://github.com/philippe44/RAOP-Player/blob/master/doc/auth_protocol.html

libraop's People

Contributors

linusu avatar nadigo avatar philippe44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libraop's Issues

tools/log_util.c cannot find source file

Hi,

when i cmake the project, i get this error :

cmake ..
-- Configuring done
CMake Error at CMakeLists.txt:20 (add_executable):
  Cannot find source file:

    tools/log_util.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:20 (add_executable):
  No SOURCES given to target: raop_play


CMake Generate step failed.  Build files cannot be regenerated correctly.

BR's
Nebz

Airplay 2

Hello

I wanted to know if an update to Airplay 2 was planned?
thank you for your comeback

alac or pcm exact format

Hello,

I'm trying to send pcm or alac to this player but can't find the right format... it's too fast or just make a white noise

i tried :

  ffmpeg -y -i myfile.mp3 -vn -acodec alac -sample_fmt s16p "myfile.m4a";
  ffmpeg -y -i myfile.mp3 -vn -acodec pcm_s16le -f s16le "myfile.pcm";

could you help ? i'm trying to recode using ffmpeg (or avconv) what options do you choose ?

build config fails

 cmake ..
-- Configuring done
CMake Error at CMakeLists.txt:20 (add_executable):
  Cannot find source file:

    /home/vagrant/RAOP-Player/vendor/curve25519/source/curve25519_dh.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:20 (add_executable):
  No SOURCES given to target: raop_play


CMake Generate step failed.  Build files cannot be regenerated correctly.

error in documentation of SRP

In the explanation of SRP, in the pair-pin-setup step, the description of "proof" repeats
description of "pk" (probably a cut-and-paste error)

proof | <M1> | 20 | The SRP6 public key corresponding to (A = g ^ % N). Should be calculated by the SRP library
-- | -- | -- | --

`

Audio cuts out after ~3 minutes when streaming to HomePod

When streaming to a HomePod, the audio cuts out after about 3 minutes of playback. The raop_player binary keeps logging that the audio is being played, with one line printed every second; but the HomePod switches to "Not Playing".

When streaming to an AirPort Express, everything works as expected.

@philippe44 if you have any tips on how to debug/investigate this issue I would be happy to hear them! ❤️

pair-setup-pin failure

First of all, thank you for your work on the crypto authentication. I found your original perl demo over at https://htmlpreview.github.io/?https://github.com/philippe44/RAOP-Player/blob/master/doc/auth_protocol.html and almost got it working. My AppleTV brings up the pin code screen, but when I enter it, it says FAILED twice (first one being after the pair-setup-pin.

I tracked the code back to this repo, and saw that you had a pairing folder with the same perl code, but an independent lib folder. This one is not working for me at all yet, saying:
Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at lib/Crypt/SRP.pm line 10.

Perhaps it is because I am running Perl 5.26 and the lib folder only has static libraries up to 5.24?

Any help would be appreciated. I just need a working example for an open source Gnome Extension that I am working on.

curve25519 with OpenSSL

Hey 👋

So I don't know if this is of interest to you, but since I've already made the heavy lifting I figured it would be good to at least post it.

If you are interested in using OpenSSL for the curve25519 functions, I've put together an example app that does the same functions in both libraries.

#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <openssl/evp.h>

#include "curve25519/include/curve25519_dh.h"
#include "curve25519/include/ed25519_signature.h"

void print_hex(uint8_t *data, size_t length) {
  printf("  ");
  for (size_t i = 0; i < length; i++) printf("%02X", data[i]);
  printf("\n");
}

void openssl_CreateKeyPair() {
  int status;

  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };

  EVP_PKEY *key = EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, secret, 32);

  uint8_t private[64] = { 0 };
  size_t private_size = 32;

  status = EVP_PKEY_get_raw_private_key(key, private, &private_size);
  assert(status == 1);
  assert(private_size == 32);

  status = EVP_PKEY_get_raw_public_key(key, &private[32], &private_size);
  assert(status == 1);
  assert(private_size == 32);

  uint8_t public[32] = { 0 };
  size_t public_size = 32;
  status = EVP_PKEY_get_raw_public_key(key, public, &public_size);
  assert(status == 1);
  assert(public_size == 32);

  printf("OpenSSL CreateKeyPair:\n");
  print_hex(private, 64);
  print_hex(public, 32);
}

void curve25519_CreateKeyPair() {
  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };

  uint8_t private[64] = { 0 };
  uint8_t public[64] = { 0 };
  ed25519_CreateKeyPair(public, private, NULL, secret);

  printf("Curve25519 CreateKeyPair:\n");
  print_hex(private, 64);
  print_hex(public, 32);
}

void openssl_CalculatePublicKey() {
  int status;

  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };

  EVP_PKEY *key = EVP_PKEY_new_raw_private_key(EVP_PKEY_X25519, NULL, secret, 32);

  uint8_t public[32] = { 0 };
  size_t public_size = 32;
  status = EVP_PKEY_get_raw_public_key(key, public, &public_size);
  assert(status == 1);
  assert(public_size == 32);

  printf("OpenSSL CalculatePublicKey:\n");
  print_hex(public, 32);
}

void curve25519_CalculatePublicKey() {
  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };
  uint8_t public[32] = { 0 };

  curve25519_dh_CalculatePublicKey(public, secret);

  printf("Curve25519 CalculatePublicKey:\n");
  print_hex(public, 32);
}

void openssl_CreateSharedKey() {
  int status;

  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };
  uint8_t peer_public[32] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F };

  EVP_PKEY *key = EVP_PKEY_new_raw_private_key(EVP_PKEY_X25519, NULL, secret, 32);
  EVP_PKEY *peer_key = EVP_PKEY_new_raw_public_key(EVP_PKEY_X25519, NULL, peer_public, 32);

  EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(key, NULL);

  status = EVP_PKEY_derive_init(ctx);
  assert(status == 1);

  status = EVP_PKEY_derive_set_peer(ctx, peer_key);
  assert(status == 1);

  uint8_t result[32] = { 0 };
  size_t size = 32;
  status = EVP_PKEY_derive(ctx, result, &size);
  assert(status == 1);
  assert(size == 32);

  printf("OpenSSL CreateSharedKey:\n");
  print_hex(result, 32);
}

void curve25519_CreateSharedKey() {
  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };
  uint8_t peer_public[32] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F };

  uint8_t result[32] = { 0 };
  curve25519_dh_CreateSharedKey(result, peer_public, secret);

  printf("Curve25519 CreateSharedKey:\n");
  print_hex(result, 32);
}

void openssl_SignMessage() {
  int status;

  uint8_t secret[32] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F };
  uint8_t msg[32] = { 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F };

  EVP_MD_CTX *ctx = EVP_MD_CTX_new();
  assert(ctx != NULL);
  EVP_PKEY *pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, secret, 32);
  assert(pkey != NULL);

  status = EVP_DigestSignInit(ctx, NULL, NULL, NULL, pkey);
  assert(status == 1);

  uint8_t signature[64] = { 0 };
  size_t signature_length = 64;

  status = EVP_DigestSign(ctx, signature, &signature_length, msg, 32);
  assert(status == 1);
  assert(signature_length == 64);

  printf("OpenSSL SignMessage:\n");
  print_hex(signature, 64);
}

void curve25519_SignMessage() {
  uint8_t key[64] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x03, 0xA1, 0x07, 0xBF, 0xF3, 0xCE, 0x10, 0xBE, 0x1D, 0x70, 0xDD, 0x18, 0xE7, 0x4B, 0xC0, 0x99, 0x67, 0xE4, 0xD6, 0x30, 0x9B, 0xA5, 0x0D, 0x5F, 0x1D, 0xDC, 0x86, 0x64, 0x12, 0x55, 0x31, 0xB8 };
  uint8_t msg[32] = { 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F };

  uint8_t signature[64] = { 0 };
  ed25519_SignMessage(signature, key, NULL, msg, 32);

  printf("Curve25519 SignMessage:\n");
  print_hex(signature, 64);
}

int main() {
  printf("\n");
  curve25519_CreateKeyPair();
  openssl_CreateKeyPair();
  printf("\n");
  curve25519_CalculatePublicKey();
  openssl_CalculatePublicKey();
  printf("\n");
  curve25519_CreateSharedKey();
  openssl_CreateSharedKey();
  printf("\n");
  curve25519_SignMessage();
  openssl_SignMessage();
  printf("\n");
}

If you don't want this, just go ahead and close the issue ☺️

Missing ALACEncoder.h

The new alac changes appear to be missing files?

raop_play$ make -f Makefile.x86
cc -Wall -Wno-multichar -Wno-unused-but-set-variable -fPIC -ggdb -O2 -I. -I/usr/include/valgrind/memcheck -I/usr/include/valgrind -I/usr/include/memcheck -I/usr/include/include -I./tools -I../alac -I./src -I./src/inc -I. -I/usr/include/valgrind/memcheck -I/usr/include/valgrind -I/usr/include/memcheck -I/usr/include/include -I./tools -I../alac -I./src -I./src/inc ./src/alac_wrapper.cpp -c -o bin/x86/alac_wrapper.o
./src/alac_wrapper.cpp:25:25: fatal error: ALACEncoder.h: No such file or directory
compilation terminated.
make: *** [Makefile:41: bin/x86/alac_wrapper.o] Error 1

Get volume from airplay device

Hello again,

Do you know how could i get the current volume of the airplay device ? (To save it before playing my file and then set it back after playing my file)

Do you know how to set it without playing any file ?

Thank you

Fails to build

Building on Raspberian (Raspberry Pi4) I get the following error:

pi@raspberrypi:~/RAOP-Player $ ./build.sh
[  3%] Building C object CMakeFiles/raop_play.dir/src/raop_client.c.o
/home/pi/RAOP-Player/src/raop_client.c: In function ‘rsa_encrypt’:
/home/pi/RAOP-Player/src/raop_client.c:311:5: error: dereferencing pointer to incomplete type ‘RSA’ {aka ‘struct rsa_st’}
  rsa->n = BN_bin2bn(modules, size, NULL);
     ^~
make[2]: *** [CMakeFiles/raop_play.dir/build.make:76: CMakeFiles/raop_play.dir/src/raop_client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/raop_play.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

https://github.com/philippe44/RAOP-Player/blob/adc65259f859897a4cfac0c74936bcac01606409/src/raop_client.c#L311

I would welcome any tips on how I can resolve this.

examples?

Can you provide an example of how to use ROAP-Player for signal and multi-speaker setup?

Thanks

Compile failure - dereferencing pointer to incomplete type

Hi,

Trying to build this looks like:

root@a5063e18c487:~/RAOP-Player/build# cmake ..
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/RAOP-Player/build
root@a5063e18c487:~/RAOP-Player/build# make
Scanning dependencies of target raop_play
[  3%] Building C object CMakeFiles/raop_play.dir/tools/log_util.c.o
[  7%] Building C object CMakeFiles/raop_play.dir/src/raop_client.c.o
/root/RAOP-Player/src/raop_client.c: In function 'rsa_encrypt':
/root/RAOP-Player/src/raop_client.c:311:5: error: dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}'
  rsa->n = BN_bin2bn(modules, size, NULL);
     ^~
CMakeFiles/raop_play.dir/build.make:86: recipe for target 'CMakeFiles/raop_play.dir/src/raop_client.c.o' failed

aarch64 issue?

see the error on RPI 4 64 bit

uname -a 
Linux phono 5.10.63-v8+ #1488 SMP PREEMPT Thu Nov 18 16:16:16 GMT 2021 aarch64 GNU/Linux
pi@phono:~/RAOP-Player/build $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6) 


[ 3%] Building C object CMakeFiles/raop_play.dir/tools/log_util.c.o
In file included from /home/pi/RAOP-Player/tools/log_util.c:28:
/home/pi/RAOP-Player/tools/platform.h:130:15: error: conflicting types for ‘__u64’
130 | typedef u64_t __u64;
| ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
from /usr/include/aarch64-linux-gnu/asm/types.h:1,
from /usr/include/linux/types.h:5,
from /usr/include/aarch64-linux-gnu/asm/sigcontext.h:22,
from /usr/include/aarch64-linux-gnu/bits/sigcontext.h:30,
from /usr/include/signal.h:291,
from /home/pi/RAOP-Player/tools/platform.h:49,
from /home/pi/RAOP-Player/tools/log_util.c:28:
/usr/include/asm-generic/int-ll64.h:31:42: note: previous declaration of ‘__u64’ was here
31 | extension typedef unsigned long long __u64;
| ^~~~~
In file included from /home/pi/RAOP-Player/tools/log_util.c:28:
/home/pi/RAOP-Player/tools/platform.h:133:15: error: conflicting types for ‘__s64’
133 | typedef s64_t __s64;
| ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
from /usr/include/aarch64-linux-gnu/asm/types.h:1,
from /usr/include/linux/types.h:5,
from /usr/include/aarch64-linux-gnu/asm/sigcontext.h:22,
from /usr/include/aarch64-linux-gnu/bits/sigcontext.h:30,
from /usr/include/signal.h:291,
from /home/pi/RAOP-Player/tools/platform.h:49,
from /home/pi/RAOP-Player/tools/log_util.c:28:
/usr/include/asm-generic/int-ll64.h:30:44: note: previous declaration of ‘__s64’ was here
30 | extension typedef signed long long __s64;
| ^~~~~
make[2]: *** [CMakeFiles/raop_play.dir/build.make:82: CMakeFiles/raop_play.dir/tools/log_util.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/raop_play.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

OpenSUSE make: Nothing to be done for 'all'.

make: Nothing to be done for 'all'

I receive this error when running make inside the project directory. Stackoverflow suggests that it could be an issue with spaces vs. tabs

License

Could you provide a license file for your project ? Without a license nobody can legally fork your project.

Edit: Nevermind didn't look at the top of each file.

Would you like an update to your SRP document (for server details)

I finally got server SRP working on the UxPlay AirPlay server (see https://github.com/FDH2/UxPlay/tree/pair-pin2 )

Your SRP doc is very useful, but is missing some details crucial to the server (as opposed to client) implementation that I discovered.

UxPlay already had a full server implementation of "10.2 RTSP session authentication", so only the SRP needed to be added to provide pair-pin-setup (it already did pair-setup without pin, which we recently switched off, as someone discovered that things worked fine without pairing, which eliminated a 5sec connection delay).

The 10.1 SRP step 3 (AES CRM 128 encrypted epk exchange has a crucial server detail that I discovered luckily (I dont believe there is a previous open source server implementation of apple SRP) which is a second iv[15]++ nonce after decrypting the client epk, before encrypting the server epk in the server response.

libraop client does not check the server epk, but true Apple clients do, and reject the server unless the iv was updated again before encrypting the server epk.

If you are interested, I could do a PR to update your doc with server details. Do you have a .md version that produces the html ,or would you accept hand-edited HTML?

  • one issue I don't understand is what happens after the pairing is finalized to switch to fully-encrypted communication?
    UxPlay decrypts audio and video streams, but I thought full AirPlay2 encrypted all communications after pairing? Perhaps this is only with HomeKit authentication?

Question about Music Assistant

Hi there. I hope you don't mind my raising this -- it relates to this discussion. I'm trying to test the issue raised, but I'd really rather not have to install and configure Home Assistant and the Music Assistant. Is it possible that the code "based on slimproto nd" is the same as is in your libraop project, which would be much easier to use...
All the best, Mike.

Contribution

Actually this is not an issue, but should rather be a pull request. Before I put in the work to open a pull request, I wanted to know if the changes are appreciated and how many pull requests I should open. I implemented the following features in my fork of RAOP-Player (they might still need a little bit of cleanup / testing):

  1. Python bindings
  2. Support for password protected Airplay targets
  3. Support for requesting and adding a new pin to an Apple TV

To implement 3. I had to break the currently existing API. I split the raopcl_connect in two functions. The first one is still called raopcl_connect, the second one is named raopcl_pair. raopcl_connect calls rtspcl_connect, while raopcl_pair will send the SETUP, ANNOUNCE etc. stuff. To request a new pin from an Apple TV, the following steps need to be performed:

  1. Call raopcl_connect
  2. Call raopcl_request_pin
  3. Call raopcl_pair with the Apple TV pin
  4. Airplay will start

You can get the newly created secret using raopcl_secret. The next time you can just use this secret with the existing -s flag. I reimplemented the raop_player script in python with the additional new features and removed the raop_player.c file, since I wanted to test the python bindings and did not want to implement every change twice.

Question about pair-pin-start protocolc

Hi

I hope you dont mind me asking for any advice.

I am a maintainer of the AirPlay (mirror and Audio-streaming) server UxPlay http://github.com/FDH2/UxPlay which
acts like an AppleTV. Its codebase is C and derives from ShairPlay/AirPlayServer/RpiPlay.

UxPlay handles legacy pairing, but this is now off by default and the Features bit for this and password is turned off. With these features enabled the client initiates pair-pin-start etc. and when clients are managed with MDM they may request pair-pin-start even if the server does not require a password.So I am considering adding it, but it has never been in the ancestral codebase of ShairPlay from which our implementation derives.

  • Am I right that your codebase is only implementing it for the client but not the server?

  • will I find enough information in you codebase to handle the (C implementation ) of pair-setup-pin on the server before pair verify?

Grateful for any suggestions.

Uxplay with the features bit (27) for "supports legacy pairing" turned on currently just does:

pair_setup
pair_verify 1
pair_verify 2
fp_setup

etc

I suppose that pair-pin-setup replaces pair-setup ?

@fduncanh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.