Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Car gateway
03-01-2016, 18:59 (This post was last modified: 04-01-2016 02:16 by Michel Lopez.)
Post: #1
Car gateway
Hello,

I am trying to replace the Audi MMI connect App (available for IOS https://itunes.apple.com/us/app/mmi-connect/id570608111 or Android https://play.google.com/store/apps/detai...udi.mmiapp ) with a generic Upnp/DLNA server running in a Raspberry Pi to stream some internet radios (and eventually some music, but this is not the problem) to the car. By the way this app do not need any account details or even the car to stream, as it can be used as is, with any other end point.

I do know that there are many apps able to do that for most of the phones, but using this type of integration does allow the list of radios to be available in the car menus and enable controlling them using the steering-wheels & dial commands and/or even the touch screen for some newer models. This type of Wi-Fi input seems to be available on many VAG models (Audi, Seat, Skoda, Volkswagen and some others). I do have looked to a lot of software like this one, but so far MinimServer, when installed with MinimStreamer, seems to be the closer (best?) option.

So far I have been able to almost test successfully (almost because I never found a way to get any artwork to show up with any radio streams, but that is a lower level problem) the radio stream with, for example, Windows media player on Windows, or some generic player on phones.

Creating a simple internet radio playlist seems to generate a stream URL that looks very close to what the Audi App is sending. For example, here is a stream Url generated by the Audi app “http://192.168.1.100:50415/webradio/favorite/2865?WMContentFeatures=DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000​000000000000000000000&WMHME=1&HMEExt=.mp3&WMDuration=625000000000&WMHMETitle=RQB1AHIAbwBwAGUAIAAxACAAWwA2ADQAIABrAGIAcABzAF0A”

Using the car Wi-Fi hotspot, MinimServer is properly found and enabled. I have been able to validate this by adding some music files to the internal SD card, and it does play on the car (with artwork Smile ). The problem is that for the radio playlists, the car player never finds a ‘valid’ entry and always complains that there is no content available. In fact if there is some music content, then all the content is found as expected and the music streams ok. But if I try to play any internet radio playlist entry, it will be tried once, then after failing (and going back to the music) the entry will be grayed out and will not be available anymore.

I have been trying all the options and tricks I could find on the manual, the Faq and even the forum but for now it looks like I don’t see any other options to move forward.

Would you have any idea where to look and what to do next?

Thanks a lot

-Michel


Attached File(s)
.log  Trace radio stream not working from car.log (Size: 182.13 KB / Downloads: 3)
.log  Trace working ok on PC.log (Size: 74.5 KB / Downloads: 3)
Visit this user's website Find all posts by this user
Quote this message in a reply
04-01-2016, 22:54
Post: #2
RE: Car gateway
This is a very interesting application for MinimServer/MinimStreamer and I would like to get it working if possible.

I am not quite clear on the details of the "normal" (with the Audi app) and "desired" (with MinimServer/MinimStreamer) setups for streaming internet radio to the car. Do both of these stream via UPnP to a UPnP renderer in the car? The URL that you posted (generated by the Audi app) looks like something that a UPnP renderer would consume. What device is at 192.168.1.100? I am probably missing some basic technical background information here.

In the failing case, the car renderer is closing the connection to MinimStreamer immediately after receiving the HTTP 200 OK response and the first part of the audio stream. This suggests that there is something present (or absent) in either the the HTTP 200 OK response or the audio stream that is causing the renderer to choke.

The URL from the Audi app contains a number of query parameters that look like proprietary Microsoft settings (WMContentFeatures, WMHME, HMEExt, WMDuration, WMHMETitle). These are not part of the UPnP or DLNA specifications and are not supported by MinimServer/MinimStreamer. A web search has not revealed any details of what these parameters mean. It seems likely that one or more of these parameters might be the "secret sauce" that enables the car renderer to work when using the Audi app but there could be some other reason for the difference.

How did you find the URL generated by the Audi app? Is there any means of looking at the HTTP messages that are exchanged in the case of successful streaming of radio stations via the Audi app?
Find all posts by this user
Quote this message in a reply
05-01-2016, 14:28 (This post was last modified: 05-01-2016 14:40 by Michel Lopez.)
Post: #3
RE: Car gateway
Hello Simon,

Thanks for your interest in this idea.

I have started to look into the best way to capture all traffic from the car Wi-Fi hotspot, but I will need some time to find a fully working solution, most probably next weekend.

To look to the details of the URL, I just used the property menu from the Windows Media player entry, while it is playing.

In the mean time, I looked further into the playlist entry property by using the tools from the Intel UPnP developer tools (http://opentools.homeip.net/dev-tools-for-upnp). The attached captures are from the AV Media Controller tool.

To do so I have looked into MinimServer data with a simple basic playlist (Europe 1.m3u):
#EXTM3U
#EXTINF:-1,[E1;mp3] Europe 1
http://mp3lg4.tdf-cdn.com/9240/lag_180945.mp3

(I did removed the * in front of E1, so that I could compare both type of streams)

I have then compared the results with the same radio included in the favorites folder, on the Audi MMI connect app.

As you can see from the differences, it looks like the details of the MinimServer playlist stream entries are both set to unknown, since they have a question mark (see 'MinimServer Europe 1 playlist folder') as opposed to the Audi capture in 'Audi MMI favorites folder details' where all the entries are properly set to music.

I think that this is a first level issue to look into, before looking into the other differences. Please do let me know how I can help.

Thanks.

-Michel

Attachment 1045 = Audi MMI favorites folder details
Attachment 1046 = Audi MMI Europe 1 media property
Attachment 1047 = Audi MMI Europe 1 media resource

Attachment 1048 = MinimServer Europe 1 playlist folder
Attachment 1049 = MinimServer [E1] Europe 1 media property
Attachment 1050 = MinimServer [E1] Europe 1 media resource
Attachment 1051 = MinimServer Europe 1 media property
Attachment 1052 = MinimServer Europe 1 media resource


Attached File(s) Thumbnail(s)
                               
Visit this user's website Find all posts by this user
Quote this message in a reply
06-01-2016, 12:05 (This post was last modified: 06-01-2016 12:06 by simoncn.)
Post: #4
RE: Car gateway
(05-01-2016 14:28)Michel Lopez Wrote:  To look to the details of the URL, I just used the property menu from the Windows Media player entry, while it is playing.

How is Windows Media Player involved in this?

I will study your latest post and its attachments. The part I am missing is a high-level overview of what the components are in the original car audio system (UPnP server/control point/renderer, Windows Media Player, ???) and which of these components you are trying to change in order to produce the MinimServer-based setup.
Find all posts by this user
Quote this message in a reply
06-01-2016, 13:13
Post: #5
RE: Car gateway
(05-01-2016 14:28)Michel Lopez Wrote:  As you can see from the differences, it looks like the details of the MinimServer playlist stream entries are both set to unknown, since they have a question mark (see 'MinimServer Europe 1 playlist folder') as opposed to the Audi capture in 'Audi MMI favorites folder details' where all the entries are properly set to music.

I think that this is a first level issue to look into, before looking into the other differences. Please do let me know how I can help.

MinimServer is setting the UPnP class for a radio stream to 'object.item.audioItem.audioBroadcast' as defined in the UPnP ContentDirectory specification. It seems that the Audi server is setting the UPnP class to 'object.item.audioItem.musicTrack'. This seems to be what is causing the AV Media Controller tool to report an unknown type (the ? symbol). However, it is not preventing this stream from playing for me in WMP 11 on my Windows 7 PC. Can you try playing the stream in WMP 11 on a Windows PC to confirm whether this is working for you?

It is possible to make MinimServer send the stream as a musicTrack instead of an audioBroadcast. You might like to try this on the car renderer. To do this, you can edit the '-1' duration in the playlist to some other value (for example, 120 for a 2-minute duration) and then do a MinimServer rescan.

It is possible that the car renderer (does this use WMP?) is behaving differently from WMP 11 on Windows. Any information you can provide about the car renderer would be helpful.

I copied the (working) MinimStreamer stream URL from WMP and this is what I have:

http://127.0.0.1:9790/minimstreamer/*/E1/$!stream.mp3?WMContentFeatures=DLNA.ORG_PN=MP3;DLNA.ORG_FLAGS=015000000000000000​00000000000000&WMHME=1&WMHMETitle=WwBFADEAXQAgAEUAdQByAG8AcABlACAAMQA=

This is similar to what you posted from the Audi app although there are a couple of differences which might or might not be significant.

This is not the same as the URL sent by MinimServer. It seems that WMP has processed the URL internally to add the extra query parameters that I listed in my earlier post.
Find all posts by this user
Quote this message in a reply
06-01-2016, 19:46 (This post was last modified: 06-01-2016 20:19 by Michel Lopez.)
Post: #6
RE: Car gateway
(06-01-2016 12:05)simoncn Wrote:  The part I am missing is a high-level overview of what the components are in the original car audio system (UPnP server/control point/renderer, Windows Media Player, ???) and which of these components you are trying to change in order to produce the MinimServer-based setup.

In fact I am using 2 different & disconnected environments. Sorry if this was not clear from my previous post.

On one side I am using some sort of regular setup based on MinimServer/MinimStreamer running on a Raspberry Pi setup with Raspbian Jessie, and some tools and players on a Windows PC, to evaluate, prototype & test all the settings and tools.

On the other side, and of course completely disconnected, there is the car setup.This type of car do have an on-board Wi-Fi hotspot, using a Sim card installed in the car (no external phone involved to create the networking environment). As usual for cars, this is some sort of closed box, as almost no settings are exposed. In this context the 'normal' use is just to get a device (Iphone or Android with or without a Sim card), to be connected to the car WiFi and run the Audi app. Then the car on screen system let you select a WiFi audio source (= an UPnP server) and will list the audio content of the Audi app. This could be the music stored locally in the device and of course the radio streams provided by the app (full list and favorites).

So what I am trying to do is really to use MinimServer/MinimStreamer, running on a Raspberry Pi connected to the WiFi connection from the car to 'replace' the Audi app that is in fact an UPnP server. This is of course to make the content available to the on-board player that is an UPnP control point/renderer.

(06-01-2016 13:13)simoncn Wrote:  MinimServer is setting the UPnP class for a radio stream to 'object.item.audioItem.audioBroadcast' as defined in the UPnP ContentDirectory specification. It seems that the Audi server is setting the UPnP class to 'object.item.audioItem.musicTrack'. This seems to be what is causing the AV Media Controller tool to report an unknown type (the ? symbol). However, it is not preventing this stream from playing for me in WMP 11 on my Windows 7 PC. Can you try playing the stream in WMP 11 on a Windows PC to confirm whether this is working for you?

It is possible to make MinimServer send the stream as a musicTrack instead of an audioBroadcast. You might like to try this on the car renderer. To do this, you can edit the '-1' duration in the playlist to some other value (for example, 120 for a 2-minute duration) and then do a MinimServer rescan.

This is one of the tweaks I tried very early in my tests, but in that case the MinimStreamer content is not exposed to the car player, even if it works ok with Windows Media Player. In my previous attempts (not this one), I sort of forced the radio playlist to become visible to the player by also including a regular mp3 file to the shared folder, but that seems to be strange anyway.

For example, I am using this playlist :
#EXTM3U
#EXTINF:300,[E1;mp3] Europe 1
http://mp3lg4.tdf-cdn.com/9240/lag_180945.mp3

In this case, the car player find as expected the UPnP server, but then just display that there is no content available. I tried storing the playlist at the root level and also in a sub folder, but did not see any difference.

Please find attached the MinimServer log in one file with logging set to debug and another with the logging set to trace, of my an attempt to access to the MinimServer/MinimStreamer content from the car player, configured with just the playlist mentioned in this post.

As previously said, I do have validated, in the car configuration, that this setup works with some regular music content stored in the Raspberry Pi.

Thanks,

-Michel


Attached File(s)
.log  Debug-log from Car to single playlist with duration set.log (Size: 38.29 KB / Downloads: 2)
.log  Trace-log from Car to single playlist with duration set.log (Size: 112.79 KB / Downloads: 2)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-01-2016, 23:15
Post: #7
RE: Car gateway
Thanks for the additional detail about the setups. It is very helpful.

These debug and trace logs are very strange. The order of browse requests is different in each log and some containers aren't being browsed by the car control point (different ones in each log). Also, the URLs returned from the server in the trace log don't match the entry in the playlist file (they don't have an 'mp3' stream type). The URL mismatch suggests that you might not have done a rescan before capturing the logs and the missing container browse operations suggest that the car control point might have been caching some old data from a previous run.

To be sure that the browse results are correct and consistent, please do the following:

1) Check that the playlist entry contains the 'mp3' stream type and a duration of 300
2) Do a MinimServer rescan
3) Enable MinimServer trace logging
4) Completely restart the car system to force the car control point to browse the library contents
5) Save the trace log, then zip it and attach it to a post

Many thanks!
Find all posts by this user
Quote this message in a reply
07-01-2016, 07:40 (This post was last modified: 07-01-2016 07:43 by Michel Lopez.)
Post: #8
RE: Car gateway
Thanks for looking into this.

I have tried to do as closest possible what you asked for. That said completely restarting the car system is not simple as it also take down the wireless network since it is part of the same 'device'.

Please find attached a zip file containing 3 full trace and the playlist I used for those tests.

#1 = Capture trace log with only the playlist, at the root of the shared folder
#2 = Capture trace log with only the playlist, in a sub-folder of the shared folder
#3 = Capture trace log with the playlist & a music file, in a sub-folder of the shared folder
(In #3 you will see 2 attempts as I forced a reboot of the multimedia system, after the detection of the server again with no 'valid' content)

After performing a full reboot of the car multimedia system, all those attempts have always resulted in the UPnP server being perfectly detected, but never able to find any 'visible'/valid content.

Please let me know what you think of those trace and what would you like the next step to be.


Attached File(s)
.zip  Trace.zip (Size: 46.58 KB / Downloads: 1)
.m3u  test.m3u (Size: 80 bytes / Downloads: 3)
Visit this user's website Find all posts by this user
Quote this message in a reply
07-01-2016, 08:41
Post: #9
RE: Car gateway
(07-01-2016 07:40)Michel Lopez Wrote:  Thanks for looking into this.

I have tried to do as closest possible what you asked for. That said completely restarting the car system is not simple as it also take down the wireless network since it is part of the same 'device'.

Please find attached a zip file containing 3 full trace and the playlist I used for those tests.

#1 = Capture trace log with only the playlist, at the root of the shared folder
#2 = Capture trace log with only the playlist, in a sub-folder of the shared folder
#3 = Capture trace log with the playlist & a music file, in a sub-folder of the shared folder
(In #3 you will see 2 attempts as I forced a reboot of the multimedia system, after the detection of the server again with no 'valid' content)

After performing a full reboot of the car multimedia system, all those attempts have always resulted in the UPnP server being perfectly detected, but never able to find any 'visible'/valid content.

Please let me know what you think of those trace and what would you like the next step to be.

Thanks for all your work on this!

I have looked at these logs and your latest test.m3u file. The logs are all as expected. A few points from this:

1) In test 3, the control point has found the .mp3 file. Is this file showing up as available music content in the control point?

2) The test.m3u file doesn't have the mp3 stream type. I think this stream type is very likely to be needed to make discovery work. Please change the test.m3u file to the following and repeat any of these tests (after doing a rescan):

#EXTM3U
#EXTINF:300,[E1;mp3] Europe 1
http://mp3lg4.tdf-cdn.com/9240/lag_180945.mp3

3) There is no need to test the root folder and subfolder cases separately. The root folder case is simpler so I suggest you use this from now on.

4) If you put a single .mp3 file in the root folder and don't include a test.m3u playlist, is the .mp3 file being discovered?
Find all posts by this user
Quote this message in a reply
07-01-2016, 17:50 (This post was last modified: 07-01-2016 20:08 by Michel Lopez.)
Post: #10
RE: Car gateway
I restarted my testing with a basic configuration, storing 2 mp3 files and this updated playlist directly to the root folder of the shared folder. Then I manually forced a re-scan, and shut down the device, before moving to the garage to restart everything, in the car environment.

This time all the entries are properly detected and displayed. Since the car player does auto start playing, it always start playing one of the music file as soon the UPnP server is properly detected & enabled. I then have been able to navigate to the other entries and of course tried to get to the radio stream. The radio does not work and the entry become grayed out, and not available. Of course when the radio stream has failed, the player automatically goes back to playing music.

Just in case I also retried after setting some value to delayHLS, but with no change. Both trace files are attached.

Thanks.

-Michel


Attached File(s)
.zip  New Trace.zip (Size: 95.17 KB / Downloads: 2)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)