Digitradio 580: <Empty> audio folders

After upgrading my UPnP/DLNA server software Gerbera to the latest release v1.12.1, the kitchen radio showed all audio album folders as <Leer> ("Empty"). Other UPnP clients showed the the audio files just fine and could play them without problems.

Transcoding?

At first I thought it had something to do with transcoding (most of my audio files are ogg/vorbis, which need to be converted for the radio to play), but the radio showed folders with only mp3 files as empty, too.

Debug messages

I knew that the radio has a debug port, and I "only" needed to find out how to enable it. It turned out that the radio's netRemote.misc.fsDebug.component and netRemote.misc.fsDebug.traceLevel API endpoints are the key: component selects the part of the radio software whose debugging level shall be configured, and traceLevel then lets you query and set the debug level of the previously selected component.

After many tries and firmware crashes I finally knew that component 14 (UPnP browsing, "AVB") was the one I had been looking for and raising the log level from 2 to 5 gave me helpful log messages via telnet on port 514:

(Thread2): [     87.986738] AVB    (3): Browse for '34203', from 0, max 100 items, server 'f42aa029-7c99-47d2-b6ed-53b9e06cc3a7'
(Thread2): [     87.987678] AVB    (4): Using sort criteria '+upnp:originalTrackNumber'
(Thread2): [     87.988558] AVB    (4): Invoking AVB_REQTYPE_BROWSE request (b0b449e8 b0b449e8)
(Thread2): [     88.087921] AVB    (5): (MS_BrowseResponded) errorCode=0
(Thread2): [     88.099874] AVB    (4): Resource: Not found
(Thread2): [     88.101841] AVB    (4): 2: (0xa200) (68044)  2 Become 1(Single Version)
(Thread2): [     88.111814] AVB    (4): Resource: Not found
(Thread2): [     88.111982] AVB    (4): 2: (0xa200) (68054)  2 Become 1 (Orchestral Version)
(Thread2): [     88.119992] AVB    (4): Resource: Not found
(Thread2): [     88.120341] AVB    (4): 2: (0xa200) (68034)  One Of These Girls
(Thread2): [     88.127823] AVB    (4): Resource: Not found
(Thread2): [     88.127985] AVB    (4): 2: (0xa200) (68024)  Wannabe (Junior Vasquez Remix Edit)
(Thread2): [     88.129514] AVB    (3): Browse OK - 4 matches, 4 returned, 4 copied
(Thread2): [     88.129649] AVB    (3): TotalMatches = 4

The log messages told me that the radio actually got the list of songs in the album folders, but rejected them because Resource not found - although it did not request the URLs.

I documented my findings.

minidlna

For comparison I installed minidlna on my laptop; the radio could list and play all audio files without problems.

I captured DIDL-Lite XML responses with Wireshark from both minidlna and Gerbera, decoded and compared them with Meld - but I could not spot the problem :(

Comparing Gerbera and minidlna XML responses

Old version

Then I remembered that I had tagged the old Gerbera version in the git clone on my home server. I installed it, recorded the UPnP server responses with Wireshark's SSH remote capture feature and compared them to the new ones:

Wireshark showing UPnP XML requests and responses Old vs. new Gerbera responses

The only relevant difference were the audio file URLs: Old gerbera from 2022-02 had the server's IP address, the new version used the domain name.

- http://192.168.3.3:49152/content/media/object_id/736/res_id/0/ext/file.ogg
+ http://mediatomb.home.cweiske.de:49152/content/media/object_id/51123/res_id/0/group/default/ext/file.ogg

So I removed the <virtualURL> setting from Gerbera's configuration .. and the radio showed all files again.

In my bug report Karl Straussberger told me that other devices had similar problems, and that I should use externalURI instead of virtualURL.

The whole thing took 4 hours distributed over 2 days. API documentation was another hour..

Written by Christian Weiske.

Comments? Please send an e-mail.