Skip to content

Instantly share code, notes, and snippets.

pwt@raspberrypi-4:~/tmp/AirConnect-Build-Problem $ cpp -I /usr/include/valgrind sslsym.c
# 1 "sslsym.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "sslsym.c"
# 21 "sslsym.c"
# 1 "platform.h" 1
cc -Wall -fPIC -ggdb -O2 -I. -I../../shine/src/lib -I../../dmap-parser -I../../valgrind/memcheck -I../../valgrind/include -I../tools -I../common -I./src -I./src/inc -I../../libupnp/1.6.19/ixml/inc -I../../libupnp/1.6.19/upnp/inc -I../../libupnp/1.6.19/build/inc -I../../libupnp/1.6.19/threadutil/inc -I../../mdnssd -I../../jansson/src -I../../flac/include -I../../tinysvcmdns -D_FILE_OFFSET_BITS=64 -DPB_FIELD_16BIT -DHAVE_STDINT_H -DNDEBUG -D_GNU_SOURCE -D_USE_XML_ -fdata-sections -ffunction-sections -I. -I../../shine/src/lib -I../../dmap-parser -I../../valgrind/memcheck -I../../valgrind/include -I../tools -I../common -I./src -I./src/inc -I../../libupnp/1.6.19/ixml/inc -I../../libupnp/1.6.19/upnp/inc -I../../libupnp/1.6.19/build/inc -I../../libupnp/1.6.19/threadutil/inc -I../../mdnssd -I../../jansson/src -I../../flac/include -I../../tinysvcmdns ../tools/sslsym.c -c -o bin/arm/sslsym.o
../tools/sslsym.c:151:9: error: redefinition of ‘TLS_client_method’
SYMDECL(TLS_client_method, const SSL_METHOD*, 0);
@pwt
pwt / log.txt
Created December 7, 2020 13:42
SoCo Spotify Log File
2020-12-07 13:29:37,216 discovery.py:149 - discover() - Sending discovery packets on [<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>]
2020-12-07 13:29:37,296 discovery.py:195 - discover() - Received discovery response from ('192.168.0.37', 42931): "b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCATION: http://192.168.0.37:1400/xml/device_description.xml\r\nSERVER: Linux UPnP/1.0 Sonos/61.1-83170 (ZPS12)\r\nST: urn:schemas-upnp-org:device:ZonePlayer:1\r\nUSN: uuid:RINCON_949F3E72935401400::urn:schemas-upnp-org:device:ZonePlayer:1\r\nX-RINCON-HOUSEHOLD: Sonos_pDjMj6y9w2FaJIdXLsPB5q3dB2\r\nX-RINCON-BOOTSEQ: 68\r\nBOOTID.UPNP.ORG: 68\r\nX-RINCON-WIFIMODE: 0\r\nX-RINCON-VARIANT: 1\r\nHOUSEHOLD.SMARTSPEAKER.AUDIO: Sonos_pDjMj6y9w2FaJIdXLsPB5q3dB2.pznxwQwkCTuTBwEaQzXF\r\n\r\n'"
2020-12-07 13:29:37,297 core.py:298 - __init__() - Created SoCo instance for ip: 192.168.0.37
2020-12-07 13:29:37,297 services.py:223 - __getattr__() - Dispatchi
@pwt
pwt / gist:8220005113bda18a477de309e8088396
Created April 7, 2020 09:41
Apple Music airupnp log.
pwt@raspberrypi-3:~/airconnect-test $ ./airupnp-arm -x config.xml
[10:37:17.604134] main:1377 Starting airupnp version: v0.2.24.6 (Apr 6 2020 @ 19:42:33)
[10:37:17.657258] Start:1093 Binding to 192.168.0.250:49152
[10:37:18.036621] AddMRDevice:981 [0x974c8]: adding renderer (Study)
[10:37:18.047244] MasterHandler:649 [0x974c8]: subscribe success
[10:37:37.000217] UpdateThread:705 Presence checking
[10:37:37.125004] UpdateThread:758 [0x974c8] UPnP keep alive: Study+
[10:37:37.615649] UpdateThread:758 [0x974c8] UPnP keep alive: Study+
[10:37:43.224500] rtsp_thread:351 got RTSP connection 12
[10:37:57.000211] UpdateThread:705 Presence checking
# This is proof of concept code to experiment with adding music library shares to Sonos.
# Unlike other UPnP operations, adding shares is done over HTTPS, presumably to avoid transmitting
# the username and password for the share in clear text.
#
# Using Wireshark to observe the traffic between the a Sonos controller and player while adding a share,
# the HTTPS port used is 1443.
#
# The required UPnP action is assumed to be:
#
# ContentDirectory:CreateObject
@pwt
pwt / sonosdump_output.txt
Created October 21, 2019 08:38
Output of SoCo/dev_tools/sonosdump.py run against a Sonos 10.4 system
Querying Kitchen
===============================================================================
| AlarmClock |
===============================================================================
SetFormat
~~~~~~~~~
Input
DesiredTimeFormat: string
@pwt
pwt / airupnp.c
Last active February 28, 2019 21:48
Updated version of airupnp.c with '-n' option to exclude device numbers.
/*
* AirUPnP - AirPlay to uPNP gateway
*
* (c) Philippe 2015-2019, philippe_44@outlook.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@pwt
pwt / gist:5b566d734b278afcf9865c8b0c8e1f40
Created February 1, 2019 11:39
Build output from sonos-web
$ docker build -t deleteme .
Sending build context to Docker daemon 45.57kB
Step 1/6 : FROM resin/raspberrypi3-node
---> 92fd7f8af9f7
Step 2/6 : RUN npm install -g sonos-web-cli
---> Running in 11129cf11968
/usr/local/bin/sonos-web -> /usr/local/lib/node_modules/sonos-web-cli/index.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/sonos-web-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})