0% found this document useful (0 votes)
194 views

(How To) Installing Openwrt On Old Music Player - Airmusic M2 - NW11 - Soundmate - Installing and Using OpenWrt - OpenWrt Forum

Installation Guide to openwrt on music player

Uploaded by

wqfh4xymgg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
194 views

(How To) Installing Openwrt On Old Music Player - Airmusic M2 - NW11 - Soundmate - Installing and Using OpenWrt - OpenWrt Forum

Installation Guide to openwrt on music player

Uploaded by

wqfh4xymgg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

[How To] installing openwrt on old music player :

airmusic M2 / NW11 / soundmate

schmurtz May 2020

I restart a topic from the old forum about airmusic


players :
https://forum.archive.openwrt.org/viewtopic.php
?id=50512

These player were very interesting, based on the


first version of the linkplay modules, which were
"easily" modded thanks to the processor ar9331
which is the same on TP-Link TL-WR703N. These
player include dedicated sound chipset (wolfson)
and an digital optical output directly managed by
the ar9331. SebastianFM has done drivers for
these which are shared in this post.

The objective of this post is to share files and


knowledge about it.

These are old note, a little messy but I you look


carefully all you need to modify will be here.

This contains some technical details but pre-


compiled image for soundmate M2 is given at the
end of this post.
:
BACKUP
Before starting backup your device partitions :

You can use this tutorial :


https://wiki.openwrt.org/doc/howto/generic.back
up
And this one :
https://forum.openwrt.org/viewtopic.php?
pid=175111#p175111

For information the place to find the mac@ in uboot


:
https://forum.openwrt.org/viewtopic.php?
pid=187108#p187108

On airmusic "cat /proc/mtd" :

mtd0: 00020000 00001000 "u-boot"


mtd1: 00100000 00001000 "kernel"
mtd2: 006d0000 00001000 "rootfs"
mtd3: 0002c000 00001000 "rootfs_data"
mtd4: 00010000 00001000 "art"
mtd5: 007d0000 00001000 "firmware"

We backup it on usb key :

cat /dev/mtd0 > /tmp/mnt/USB-disk-


a1/openWRT/backup/u-boot
cat /dev/mtd1 > /tmp/mnt/USB-disk-
a1/openWRT/backup/kernel
cat /dev/mtd2 > /tmp/mnt/USB-disk-
a1/openWRT/backup/rootfs
cat /dev/mtd3 > /tmp/mnt/USB-disk-
a1/openWRT/backup/rootfs_data
cat /dev/mtd4 > /tmp/mnt/USB-disk-
a1/openWRT/backup/art
cat /dev/mtd5 > /tmp/mnt/USB-disk-
a1/openWRT/backup/firmware
:
schmurtz May 2020

COMPILATION
In the past I have use an VMware ubuntu 16.04
x64
You can take this image builder :
https://archive.openwrt.org/chaos_calmer/15.05.
1/ar71xx/generic/
or this one more recent but not compiled :
https://downloads.openwrt.org/snapshots/trunk/
ar71xx/generic/

Now some modifications :


Activate wifi on boot :
https://oldwiki.archive.openwrt.org/doc/howto/b
uild#custom_files ==> newer url
So we include a new subfolder on the root build
which will include lib/wifi/mac80211.sh and inside :
You need to remove 'option disabled 1' (from
lib/wifi/mac80211.sh)

To launch compilation you can run this command


line (inspired from this post) :

make image PROFILE=TLWR703 PACKAGES="-


ppp -ppp-mod-pppoe block-mount kmod-
usb-storage kmod-scsi-core kmod-
crypto-hash kmod-lib-crc16 kmod-fs-
ext4 liblua libuci-lua rpcd luci-lib-
ip libiwinfo libiwinfo-lua luci-theme-
bootstrap -luci-app-firewall lua luci-
proto-ppp libubus-lua luci-mod-admin-
full luci-lib-nixio luci-base luci-
proto-ipv6 uhttpd luci uhttpd-mod-ubus
kmod-usb-audio kmod-i2c-core kmod-
sound-soc-core alsa-lib alsa-utils
:
kmod-sound-core kmod-ac97 kmod-sound-
core kmod-input-core kmod-lib-lzo
kmod-regmap libncurses terminfo
libpthread librt " FILES="files" -j1
V=s

You could have a problem of firmware file size.


It doesn't work because the firmware of the
TLWR703 is normally 4MB while the firmware of the
M2 should be 8MB. To correct it :
Open :
target/linux/ar71xx/image/Makefile
or target/linux/ar71xx/image/tp-link.mk
on imagebuilder from trunk) ,
Then search for define Device/tl-wr703n-v1
and replace this line :
$(Device/tplink-4mlzma) by
$(Device/tplink-8mlzma)

Once you have successfuly compiled the firmware,


you should have something like : "openwrt-15.05.1-
ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin"
Copy it on USB key, then with telnet commands :

/tmp/mnt/USB-disk-a1/
cp openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin /tm
mtd -r write openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-facto

schmurtz May 2020

OK I flashed OpenWRT
successfuly
OK now we can install drivers from SebastianFM
They are some Prerequisite, first install these
packages:

opkg update
:
opkg install kmod-i2c-core
opkg install kmod-sound-soc-core
opkg install alsa-lib
opkg install alsa-utils

then push this kernel modules to device and load


them in order:

1. snd-soc-ar9331-audio.ko
2. ar9331-audio-dev.ko

old : 1rst version of the driver: (support only


optical output)
---- copy the 2 files .ko in /lib/modules# cd 4.1.20/
cd /lib/modules# cd 4.1.20/
wget http://alecsis.free.fr/sqeezeWRT/snd-soc-
ar9331-audio.ko
wget http://alecsis.free.fr/sqeezeWRT/ar9331-
audio-dev.ko

New version (support wolfson jack ouput) :


Message from SebastianFM :

Some time ago I just found a way how to use


i2c over gpio kernel driver which allows kernel
drivers to communicate with audio codec
connected to GPIO pins. This way I didn't need
to write my own codec driver but I could use
existing WM8904 codec kernel driver.
After few small changes in codec driver
everything works perfectly, including mixer,
volume control, equalizer (using alsamixer). I'm
using latest OpenWrt snapshop so I compiled
modules for kernel 4.4.14. I prepared source
code for release and I'll try to upload it to GitHub
soon.

Load modules in the following order:


snd-soc-ar9331-audio.ko
:
wm8904.ko
ar9331-audio-dev.ko

Thanks to SebastianFM for these files :


3.18.23.zip
4.4.14.zip

cd /lib/modules/4.1.20/
wget http://alecsis.free.fr/sqeezeWRT/V2/ar9331-audio-dev.ko
wget http://alecsis.free.fr/sqeezeWRT/V2/wm8904.ko
wget http://alecsis.free.fr/sqeezeWRT/V2/snd-soc-ar9331-audio.ko

insmod /lib/modules/4.1.20/snd-soc-ar9331-audio.ko
insmod /lib/modules/4.1.20/wm8904.ko
insmod /lib/modules/4.1.20/ar9331-audio-dev.ko

(respect load order)

list sound cards :

aplay -l
cat /proc/asound/cards

Now you can test

To autoload this modules at start, you can edit vi


/etc/rc.local
then add lines

insmod /lib/modules/4.1.20/snd-soc-ar9331-audio.ko
insmod /lib/modules/4.1.20/wm8904.ko
insmod /lib/modules/4.1.20/ar9331-audio-dev.ko

schmurtz May 2020

I don't want to compile my own


firmware !
:
I can understand
You can get my pre-compiled firmware and flash it
easily :
(please backup before and be careful) :

cd tmp/
wget http://alecsis.free.fr/sqeezeWRT/openwrt-ar71xx-generic-tl-wr703n-
mtd -r write ./openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin

This image require a lot of work, it's not perfect but


it include :

Squeezebox player (thanks to Squeezelite


and the awesome SqueezeWRT ) (should be
enought to do anything )
MPD player
DLNA player (thanks to UPMPDCLI)
airplay (thanks to shairport)

Other things :
Cantata is really awesome to control MPD player
Squeezebox server (LMS) allow to transform your
squeezelite player in a synchronized multiroom
player compatible with airplay, upnp, spotify connect
and many other awesome things

tmomas May 2020


Leader

schmurtz:

https://oldwiki.archive.openwrt.org/doc/howt
o/build#custom_files

New URL: https://openwrt.org/docs/guide-


user/additional-
software/imagebuilder#files_variable
:
The old page is for archival purposes only and does
not receive updates any more.

You might want to update your postign accordingly.

JohnShallow Nov 2020

Hi Schmurtz,

I also got one of these devices some time ago.


Mine was a later version, with more RAM, Flash,
and RJ45 port, but still same firmware.

https://img.alicdn.com/imgextra/i1/712263107/T
B2cZkrbpXXXXXZXXXXXXXXXXXX_
!!712263107.jpg

I recently entered into it, to switch wireless off in


order to reduce a little bit radio pollution at home (I
have it wired) and realized it was OpenWRT. I
reviewed posts on it and seems quite interesting. It
has several programs violating GPL: audiorender,
newshair (shairport), nrender... or that i cant find
sources of.

Would it be possible to flash a recent OpenWRT


version to it, and get free programs that provide
music streaming capabilities (In fact I just need it as
a receiver for digital audio and put the stream to
SPDIF, dlna renderer, and perhaps digital radio
tuner)?
I mean, have you tried to upgrade to the current
OpenWRT release? compatibility problems with
programs migrated long ago?
Thank you
Cheers,
J

schmurtz Nov 2020


:
Hi John, I don't try anymore to update it. The main
reason is that SebastianFM who has compiled the
sound driver is the only one who own the source
code. May be there's another drivers since all this
time but not sure... So I stuck on this old version,
that's enought to play music in my toilets
If you discover some new things about this device,
keep me informed here please, I still curious to
know if I will do something with the other one that I
keep in his box since many years

louisstuff Apr 2021

Hello schmurtz, after install your prebuild openwrt


firmware, how to access the device? I cant find it
via wireless. My product is Veetop Airmusic with
8MB flash, 32MB ram

moole6 Jul 2021

Hello schmurts, do you plan to update your prebuilt


firmware with new version of shairport-sync as it
now supports AirPlay 2 with multiroom audio even
from iOS devices.
That would give new life to all NW11. Thanks!

moole6 Jul 2021

If you install schmurtz's firmware, be sure to have


serial console ready. The default Wi-Fi client
settings are

wireless.@wifi-iface[0].ssid='Freete'
wireless.@wifi-iface[0].bssid='68:7F:74:1B:C8:08'
wireless.@wifi-iface[0].encryption='psk2'
wireless.@wifi-iface[0].key='JalLqemb1!'

and no AP mode, so unless you setup AP with


:
these parameters, you won't connect to it anymore.
Other than that, the firmware works, LuCi is there,
after installing WM drivers the AirPlay works nicely.

Notes to myself

Link to the latest buildtools for TL-WR703N:


https://archive.openwrt.org/releases/17.01.7/targ
ets/ar71xx/generic/lede-imagebuilder-17.01.7-
ar71xx-generic.Linux-x86_64.tar.xz

Using the Image Builder

Using the Image Builder The Image Builder


(previously called the Image Generator) is a
pre-compiled environment suitable for
creating custom images without the need for
compiling them from source. It downloads
pre-compiled packages and integrates...

17.01.7 is using kernel 4.4.167, so it should work


with http://alecsis.free.fr/sqeezeWRT/4.4.14.zip
kernel modules
https://github.com/mikebrady/shairport-sync-
for-openwrt
https://github.com/mikebrady/shairport-sync-
for-openwrt/blob/2.1/Makefile
PKG_VERSION:=4.0-dev
It will be necessary to create a new nqptp package
for OpenWRT
https://github.com/mikebrady/nqptp as a
dependency of shairport-sync 4.0.

FirbyKirby Dec 2023

@moole6 , I'm curious if you were ever successful


:
in upgrading shairport to shairport-sync on these
devices? I haven't worked with OpenWRT before,
but I have this device and am considering trying to
follow the "guide" on this thread to try and achieve a
shairport-sync reciever.

New & Unread Topics


Packages not getting installed 2
Jun 3

OpenWRT security advisory missing Linux kernel 5


CVEs
Jul 4

Df and lsblk shows different disk size 2


Jun 22

Basic 802.11s batman mesh tutorial 0


Jun 5

I accidentally applied a bad firewall configuration 16


Jul 3

Want to read more? Browse other topics in or view latest topics.

Powered by Discourse
:

You might also like