Android MusicPlayer with integrated samba and UPnP-Renderer

Steffen, regarding your latest comments/questions to me and Rich:

>>>>  As far as I know, TwonkyBeams needs a Twonky Server  software somewhere in the home-network.

So you  " … do not have a Twonky server installed on my PC…" , well then TwonkyServer it is running on your NAS (a QNAS or something), right ? I have been to the twonky website … but without a separate NAS I have no place to install it. Or did you install twonkyServer software on your lan router ?

The only place in my system where there is a Twonky server is the one built-in to Twonky Beam, and I believe you would need to install a separate Twonky server in yout computer if you wanted one.  But, that is not really necessary as I have mentioned earlier.

>>>>  How do I play my local  music files (on a directly connected USB-HDD)  to the WD TV SMP with TwonkyBeam ?

Now just where is this HDD of yours?  Is it connected to your PC, WD, inside your PC, or elsewhere?

It depends upon where these drives are located.  Look, Twonky Beam does not see network drives (incl. drives on a SMP), per se, and it cannot play from them.  It does see servers, e.g. my Win 7 PC and my Pogoplug with drives.  Twonky Beam can play and beam music (and video and photos) from my PC and my Pogoplug drive because the drive on my PC is not attached via usb, it is the second drive inside my PC, and my iTunes music is on that drive, and TB can beam that music to the WD, Roku, and any other DLNA device.  The drives on the Pogoplug are attached via usb, but they are not seen as network drives to certain devices (but TB sees the Pogoplug w/drives as a server like it does the PC)  so music (and other media) on them can be beamed via TB, too. 

If you notice, that when you go to the “Home” icon of TB in the top right corner, you are in a folder called Servers, and you only see devices that can “serve” to the TB app…

There is no other way I know of, other than these, to have TB beam music from a drive to a DLNA device.

If the drive with your music is attached to the WD, it is easy enough to have the WD play that music without TB being in the picture.

I know I wrote quite a bit about TB in this thread, and suggest you re-read what I wrote to be sure you didn’t miss anything and you understand what I wrote.

It’s really looking like you cannot do exactly what you want to do – but you are closer than you were.

if I read everything correctly

the drive is directly connected to the WD

he wants to play the music on the drive using the WD as the player without turning the TV on and without using the WD remote

so the plan

cifs.ko and md4.ko allow him to mount the drive connected to the WD on his phone/tablet

then any DNLA control point, would be able to start playback using the WD or any other DNLA device on the network

the Hub might actually be able to do this with the built in twonky, but the smp does not have twonky built in, so no DNLA server for it to see, i.e. the DNLA control point can’t access the data

we will provide a way for twonky or other DNLA control point to access the data by mounting it on the phone

I expect performance will not be good, but should still be enough for music playback

Hi KAD79,

exactly - my setup of devices is very simple:

Just the WD TV live SMP and a directly connected USB-HDD to it.

Since your android build environment running again  :smiley: 

" …then do

adb pull /proc/config.gz

upload the file to some hoster, mediafire, rapidshare, etc …"

I have the file here …

http://www.mediafire.com/download/bmps8eb3s64mani/config.gz 

For confirmation I tell you the following

the device name : htc Desire X

device carrier: T-Mobile EU/Germany

and nation: Germany

kernal version: 3.4.0-g87fbd93

offical rom version or custom rom name and version: official build number 2.23.111.4 CL171164-release-keys

I really can not believe it …

with that litte 19KB file and your Android SDK you try to create CIFS.ko/md4.ko files ?:dizzy_face:

 … wow …

Don’t understand all of it, but you really hit the target (of whats missing in IOS and Android OS) 100 % !

If this gives my Android an access to SMP’s native Samba-share I’ll be  in heaven …

of coarse I just got to work, so 8 hrs before I’ll be home

but yeah, the small file is just a working kernel configuration

I’ve already got the build environment and toolchains all set up for my device

so now I will download source code from htcdev.com

put the htc source in place of the asus source code I used for my device

add the config file from your device

then build,

should be pretty fast for modules only

Steffen,

   exactly - my setup of devices is very simple:

Just the WD TV live SMP and a directly connected USB-HDD to it.

I had told you how to play your music from the WD without the TV being on.  Have you tried this yet?

KAD79,

I am a little blown away that you and I (who live a mile or so apart) are both conversing with Steffen who apparently is in Germany.  The world is so different than it was a few decades ago. 

I hope your “fix” for him works.

yeah, such a small world

we’ll know soon if this works

just got home

I’m download source code now :slight_smile:

Hi KAD79,

I feel so good that you are helping with your amazing modyfing talent here :smiley:

Please don’t hurry with it . Please take all the time you need .

The WD live and the music in our home-networks is really a wonderful hobby.

So I am happy if you find a comfortable time-slot for yourself.

“… of coarse I just got to work, so 8 hrs before I’ll be home …”

Since I have been searching the web and asking many people for about 6 weeks now some days more or less really don’t matter.

So where are you downloading the android kernel sources, are you pulling them from the htc website

http://www.htcdev.com/devcenter/downloads  ?

Hi Mike,

yes, it is really amazing we are in contact now :smiley:.

At the beginning of this year we had a large discussion in the German WD community about connecting the WD live with a suitable music app on an iPad.

At the end there were serveral solutions using ipads (with additional !) UPnP MediaServers and WD SMPs.

There was no solution for a direct access to WD’s windows-share (Samba, CIFS).  

"  … I  had told you how to play your music from the WD without the TV being on.  Have you tried this yet? … "

Yes, this is very fine .

I am using it since buying the WD. Switching on the TV, WD is always on (when plugged to power). Then navigating to a music-folder or playlist and playing the album or list.

After starting with the first seconds , I always switch off my TV. The optical SPDIF output signal (I am using) keeps working well to my DAC/stereo amp. Also “blind” skipping is no problem with the original remote.

But …

if we want to jump to a specific song it is not possible without turning the tv on again.

if changing to another album switching on and off tv again is needed

if a short browsing of the local music libary tv on is needed.

Since these are often a very short and small piece of information the tablet/smartphone should be able to handle it.

If there are ways to avoid even switching on the TV for listing to music it would be great.

Now also a hint from my side I found very useful:

The WD remote has numbers from 1-9. I always wondered why and how we could use them for music.

These buttons are perfect for “personal top-ten” playlists…

If we arrange a shortcut (by moving WD SMP to music, navigating on the playlist file, remote “options” and then pre-set music) we have a fine direct way of starting a these playlists.

Even without having to turn on the TV for it :wink:

so where are you downloading the android kernel sources, are you pulling them from the htc website

http://www.htcdev.com/devcenter/downloads  ?

yes, you’ll notice that if you  browse the downloads, you eventually find one that exactly matches the info you provided me

this is the official kernel source code for your device

in theory, if you have a build environment set up (just downloading a bunch of basic stuff for your OS)

you have source code

you have a toolchain, either from android ndk or other

you should be able to build the entire kernel and any modules needed

the file you provided is just a working kernel configuration

easier to start with one that is known to work, than to build the configuration from scratch

building the source was not successful last night, I haven’t given up

but I’m getting some odd compiling errors

I’ve already got some input from xda dev’s

we’ll see if I can resolve them in the next couple of days

Build is done

so I learned something new about compiling kernels

2 line fix

then build time was only approx 2 minutes

download this

http://www.mediafire.com/?o6m717hogz84wnu

unzip

to load from cmd line

insmod /path/to/cifs.ko

insmod /path/to/md4.ko

I also included nls_utf8.ko

this is needed for lanagages with special characters, so you might not need it

let me know if it works

then I’ll put up on xda dev, so others can enjoy as well

Hi KAD79,

really great - thanks very much you for work !

I had a sucessful download of http://www.mediafire.com/?o6m717hogz84wnu  and unziped.

Then copied the modules  (CIFS.KO, md4.ko, nls_utf8.ko) to my phone htc-phone on sd card.

After this I was a littlebit uncertain, well, so …

I opended a terminal ( = cmd ?) and changed to the folder where the modules are

then executed the insmod command.

Then I got the result “permissin denied”.

So I executed the comand SU first,

after this repeated the insmod command.

This time I got a

result

insmod: init_module_module ‘CIFS.ko’ failed (Exec format error)

Perhaps I am making a mistake somewhere with the cmd, I processed from androids terminal.

My htc is rooted.

What does the “Exec format error mean”, missing attributes somewhere ?

actually you’re not doing anything wrong :slight_smile:

so that bad news, is that error message, is difficult to tell what the real problem is

more details would be in the dmesg

it’s possible there’s errors in the source code

it’s possible that I need to try a different toolchain

it’s possible that only signed modules can be loaded, ie locked to manufacture authentication

it’s possible for magic number version error

you can try busybox if you like, I don’t think busybox will fix this, but it’s easy to try

to use busybox, it must be installed, it’s on playstore,

once busybox is installed you can type

busybox insmod /path/to/cifs.ko

besides that you’d have to find the actuall error reason in dmesg

open a second terminal window on your phone

type

su

tail -f /var/log/dmesg

then go back to the other terminal

try to insmod /path/to/cifs.ko

then if you look at the other terminal, you should now see the actual kernel error message

depending on what it is, I might or might not be able to fix it

Hi Kad79,

now I downloaded busybox from the playstore market.

But installation on my htc desire X is not possible.

I tried both ways of installation (smart inst. and normal inst.).

The normal busybox installation directly puts me into a reboot,

the smart installation results with “not successful”.

For

type
su
tail -f /var/log/dmesg

It is not working now. In my cmd-terminal I get the result

 sh: tail not found

I guess it is because of missing cmds … no busybox installation there at the moment with extended commands.

Well, I try to flash a kernel with busybox on my htc to retrieve better information.

Hi Steffen,

The real problem here seems to be that your media is on the HD attached to the WDTV device. I tried to replicate your set up as follows:

  1. I copied three audio files to my WDTVLIVE (MP3/M4a/FLAC lossless)

  2. On my Nexus 7 I have Bubble UPNP with the renderer set to WDTVLIVE

  3. Using my Nexus 7 with ES FILE EXPLORER I browsed the LAN and mapped my HD attached to my WDTVLIVE.

  4. Using ES FILE EXPLORER as my file (media) browser I selected each file individually and told my NEXUS 7 to play it back using Bubble UPNP.

This worked fine for playing MP3s individually but it would not play the M4a or the FLAC file.

The only other player I know that does something near what you are after would be GOOD PLAYER. Give that a go.

Other than that I recommend keeping your files on a proper NAS Server. I use an Android stick computer (MK808) with an externally powered hard drive. It has my CD collection stored as lossless FLAC files. Using my NEXUS 7 with Bubble UPNP I can easily select the MK808 as the source and and playback the audio to my WDTVLIVE and various other devices I have, no problem.

On a related note - there is an Android app called SHORT BEAM which will let you render locally stored video and video on YouTube directly to your WDTVLIVE or other DLNA renderer. It’s not error free, but it’s a free app that works pretty well.

Hope this helps.

My issue is the other way around - I have my .ISO DVD images on my WDTVLIVE external HD and I want to be able to render them on my NEXUS 7. So far I’ve not had a lot of success. The closest I’ve come to playing anything has been with XBMC for Android and the GOOD PLAYER. Both are worth keeping an eye on I think :slight_smile:

@Missing Link

>>>   The real problem here seems to be that your media is on the HD attached to the WDTV device.

This is not a “problem”.  If there is a problem, it is because some devices cannot see network shared devices; only servers.The drives on the WD are shared; not servers.

>>>    My issue is the other way around - I have my .ISO DVD images on my WDTVLIVE external HD and I want to be able to render them on my NEXUS 7.

For those who don’t know this, an ISO files is not a “media file”  it is an image of a disk, be it a DVD or CD, or even an HD.  It can have any sort of data on it; not just media.  The reason the WD player can play a DVD ISO file is because it has some sort of built-in DVD player emulator that can read, extract and play the media data out of the ISO.  This takes more than average hardware and computing power in a device.  A little smart phone has none of this, and can only play simpler DLNA types of media files.  Tablets don’t have this capability either.

The only success I have had playing an ISO file on iPad is to have an intermediary program on the PC do the heavy lifting, and then send the output to an iPad.  For example, a program called VLC Streamer is a two-part app; one for iPad and one for PC.  I can stream ISO files to the Pad by using VLC Streamer Helper program on PC to send the ISO file data to VLC on the PC, then the output of VLC is sent on to the VLC Streamer app of iPad/Phone where it plays there.  This process is very CPU intensive on the PC, and not every file works well; especially those that are more complex.  But, it works well enough for a lot of ISO files to be a viable way to get the job done.

Hi KAD79,

since busybox wasn’t able to install from the Google play store I decided to flash a ROM with integrated busybox.

uff …,  I had some exciting hours while  flasing my first Android ROM on htc Desire X.

The ROM I installed is

http://forum.xda-developers.com/showthread.php?t=2330229

Now I have  busybox . 

But I don’t know if your compiled  modules are still possible for that Android version/kernel/build.

I don't think busybox will fix this, but it's easy to try (...) once busybox is installed you can type
busybox insmod /path/to/cifs.ko

 result is

insmod: can’t insert “cifs.ko” : invalid module format

So my tries for getting information with the dmesg command

tail -f /var/log/dmesg

 result 

tail: can’t open ‘var/log/dmesg’: no such file or directory 

tail: no files

I am not familiar with the dmesg command .

So perhaps it is “just” a wrong path or variable missing, or do you have another idea ?

Compiling working modules for a specific android seems to be quite a complex topic.

So I also asked the developer at XDA if he could add the modules directly in the ROM .

This would be fine for all WD Live SMP music fans with a htc DX.

Hi mike27oct, Hi missing Link,

" …

The real problem here seems to be that your media is on the HD attached to the WDTV device.

This is not a “problem”.  If there is a problem, it is because some devices cannot see network shared devices; only servers.The drives on the WD are shared; not servers …"

Or because of the different apps.

There are many music apps, but none really well working with (my yet) existing combination of decices.

Today I conneced the USB HDD recetly to my laptop, which is (only sometimes!) also in the home-network.

Started windows mediaplayer and built libary for sharing.

The htc desire X with the app BubbleUPnP directly “sees” this media server, can play from there to WD SMP.

No TV on or off. 

Fine - but only with a noisy laptop working. I need something for the living room and here WD SMP is perfectly silent :) 

About GoodPlayer

Available for iPad/iphone and not for androids. So I am not able to test it yet

Does the GoodPlayer have integrated samba-access and output to any UpnP-renderers like our SMP ?

Another hint

The app DicePlayer has a really fast and good integrated samba-access. *BUT’ it  can only play on the tablet or phone. Originally built for movies, but mp3 is also possible. Not interesting for me because of missing UpnP-output to WD live SMP. 

besides that you’d have to find the actuall error reason in dmesg

open a second terminal window on your phone

type

su

tail -f /var/log/dmesg

then go back to the other terminal

try to insmod /path/to/cifs.ko

yeah first time doing android stuff can be interesting

just remember, you have the following 3 components

  1. bootloader - usually only changes by flashing official firmwares

  2. kernel

  3. rom

and all 3 have to match

kernel and modules can be very simple or very complex

being on a different rom

modules, likely need to be rebuilt from a new config file

it’s not real clear if he’s doing any kernel work or not, he list a specific kernel, but doesn’t note any changes

which is unusual, if he’s done any kernel work

if he is, 3 check boxes and it would all work, built into the kernel, you wouldn’t even need to load them separately

dmesg is actually a log file, contains any kernel log messages, errors, etc …

Hi KAD79,

now he has done it … great … new compiled modules cifs.ko and md4.

The insmod works without problems yet :slight_smile:

But mounting with

mount -t cifs //192.168.x.x. /storage/sdcard0/cifs/media

 results with “mount: invalid argument”

Perhpas I am making a mistake here.
So also the mountManager isn’t processing sucessfully  .

The mount smb:// on my desire x with the app mountmanager results in “Failed to connect to server”
ESfileManager has no problem finding the samba-share (with no pw) … 

How do you mount a samba-share to get access to WD SMP ?

I would try cifsmanager from google play

well, thats what Ive used before, never tried mount manager

android has some very odd requirements for mounting things

took me quite a while I figured it out for nfs

but cifsmanager has always worked for me with cifs shares

but also your mount cmd should probably be

mount -t cifs //IPaddress/path/to/share/on/server /path/where/you/want/to/access/it/on/your/phone

or

mount -t cifs -o username=USERNAME,password=PASSWD //IPaddress/path/to/share/on/server /path/where/you/want/to/access/it/on/your/phone

also just a heads up

Id stear clear of android 4.2 if cifs mounting is important to you

google tried to implement user profiles, and in doing so made a nightmare of mounting anything on android 4.2

1 Like

 Also tried cifsManager with same (bad) results.

I like mountManger because it has some really useful and custom-izable options like

  • load modules at boot automatically

  • (option to) load the modules only if existing wireless connection

  • check loaded modules

  •  selection of target-samba-device and path-on-phone via menue

“… tried to implement user profiles, and in doing so made a nightmare of mounting anything on android 4.2 …”

Yes, I read about this, too. I wanted to get some good news like

"samba-sharing is in any future Android kernel ".

Instaed a user-authorization, oh dear. I will definitly keep on 4.1 then …