XiaoAi Pro speaker keeps looping the same track instead of advancing to the next one

App version

Production

Issue description

When playing music via DLNA to my XiaoMi XiaoAi Speaker Pro (model LX06), the speaker does not advance to the next track in the playlist. Instead, it continuously loops the same single track over and over. Expected behavior: after the current track finishes, the player should move to the next track in the queue automatically.

Device type

Phone

Media provider

Navidrome

Steps to reproduce

1.Open Symfonium and create a playlist / select an album with multiple tracks.
2.Tap the cast button and choose the DLNA renderer – my XiaoMi XiaoAi Speaker Pro (LX06).
3.Start playing the first track.
4.Let the track finish naturally.
5.Observe: instead of moving to track 2, the same track (track 1) starts playing again. This repeats indefinitely.

Additional information

Speaker model: XiaoMi XiaoAi Speaker Pro (LX06)
Network: phone and speaker on same Wi-Fi (5GHz)
File formats tested: MP3, FLAC – both loop the same track.
Tried disabling “Gapless playback” in Settings → Advanced → UPnP/DLNA renderer settings – no change.
Symfonium version:14.1.0(127734)
Android version: Android 14
Phone model: OnePlus 8T
The issue does NOT occur with other DLNA renderers (e.g., Windows Media Player Legacy, In this case, playlist has displayed correctly on WMP) – only with XiaoAi Speaker Pro.

I searched existing issues first

on

I understand that logs are mandatory

on

Log upload name / description

Jerry-DLNA-XiaoAi-Pro-LX06-loop-same-track

Gapless is not disabled in this log and your problem is 100% the device not properly implementing that.

Thank you for your reply. I have some new findings here.

This weekend, I retested the behavior with Gapless mode turned off. It still repeats a single track instead of properly advancing to the next one.

I tried performing the same test using Windows Media Player, and I was pleasantly surprised to find that it worked correctly. After capturing network traffic, I obtained the communication between WMP / Symfonium and my Xiaoai speaker. With the assistance of AI analysis, I arrived at the following conclusions. Could you please take a moment to review whether the AI’s conclusions are valuable? Since the current page does not support uploading pcap files, I have not attached the capture file. If you are interested in this issue and would like to see the original packet capture, I’d like send it to you separately via email.

DLNA Single-Track Loop Issue Analysis Report

Issue Description

  • Windows Media Player: Correctly advances to the next track automatically
  • Symfonium: Always loops the same track repeatedly

This report analyzes network packet captures of both applications controlling a Xiaomi AI Speaker (DLNA renderer) to identify the root cause of the single-track loop behavior in Symfonium.

Packet Capture Details

Test Environment

  • Renderer: Xiaomi AI Speaker (192.168.1.108)
  • Symfonium Device: SkyFucker (192.168.1.200)
  • WMP Device: HASEE-PRO (192.168.1.110)
  • Capture Files:
    • symfonium.pcap - Symfonium playback session
    • wmp.pcapng - Windows Media Player playback session

Test Procedure

Both captures were performed with the following workflow:

  1. Multiple songs added to the playlist
  2. Start playing the first song
  3. Manually seek to near the end of the first song (approximately 00:03:38 out of 00:03:55 duration)
  4. Allow the song to play to completion
  5. Wait for automatic transition to the next track

Analysis of Symfonium Behavior

Timeline of Events (from symfonium.pcap)

Initial Playback Setup

22:15:24.424 - Stop
22:15:24.472 - SetAVTransportURI (First track: "River Flows In You")
                 URI: https://navidrome.domain.com:443/rest/stream.view?id=2fcfb184...
                 Duration: 00:03:55

User Seeks Near End of Track

22:15:35.133 - Seek (Target: 00:03:38)

Track Transition Attempt

22:15:59.479 - Stop (First track playback completed)
22:15:59.517 - SetAVTransportURI (Second track: "Party Train")
                 URI: https://navidrome.domain.com:443/rest/stream.view?id=03a1afe8...
                 Duration: 00:03:22
22:16:01.765 - Play

Critical Observation: There is a 2.29 second gap between the Stop command (22:15:59.479) and the Play command (22:16:01.765).

Key Findings

1. Track Transition Method

Symfonium uses a “Stop → SetAVTransportURI → Play” sequence to switch tracks:

Stop current playback
  ↓ (\~38ms)
SetAVTransportURI (set next track URI)
  ↓ (\~2.25 seconds)
Play new track

2. Missing UPnP Standard Mechanism

Symfonium does NOT use the SetNextAVTransportURI action, which is the standard UPnP AVTransport method for seamless track transitions.

3. High Polling Frequency

  • Total AVTransport requests: 156
  • Pattern: Continuous polling with GetPositionInfo and GetTransportInfo every ~800ms
  • This suggests Symfonium relies on polling to detect playback state changes

Root Cause Analysis

The Problem

When a track finishes playing on the Xiaomi AI Speaker and Symfonium sends the transition commands, the following occurs:

  1. Stop command sent (22:15:59.479)
  • Xiaomi speaker stops playback
  • Speaker state changes to STOPPED
  • During this time, the speaker may reset or reload the current URI
  1. 2.29 second gap (22:15:59.479 to 22:16:01.765)
  • This is a critical window where the device behavior is undefined
  • The Xiaomi speaker may:
    • Return to the beginning of the current track
    • Re-load the previous URI
    • Enter a default “repeat one” mode
    • Wait for new commands
  1. SetAVTransportURI + Play commands sent (22:15:59.517 and 22:16:01.765)
  • May arrive too late
  • May be ignored if device already restarted the previous track
  • May fail if device entered an unexpected state during the gap

Why This Happens

The Xiaomi AI Speaker appears to have a default behavior of reloading/replaying the current URI when playback stops without a pre-set next track. This is a common implementation in many DLNA renderers to handle cases where no next track is defined.

UPnP AVTransport Specification Context

According to the UPnP AVTransport service specification, there are two playback control models:

Push Mode (What Symfonium uses)

  • Control point (Symfonium) manages the playlist
  • Control point must actively send new URIs after each track completes
  • Problem: Creates timing gaps and race conditions
  • Device behavior during the gap is implementation-dependent

Pull Mode (Recommended)

  • Control point uses SetNextAVTransportURI to preload the next track
  • Device automatically transitions to the next track when current one finishes
  • Advantage: No timing gaps, seamless transitions
  • Device maintains control of the transition timing

Proposed Solutions

Solution 1: Implement SetNextAVTransportURI (Recommended)

How it works:

When starting playback:
1. SetAVTransportURI (Track 1)
2. SetNextAVTransportURI (Track 2)  ← Critical addition
3. Play

When Track 1 finishes:
- Device automatically loads Track 2
- Device automatically starts playing Track 2
- No intervention needed from control point

When Track 2 starts:
- SetNextAVTransportURI (Track 3)
- Continue pattern for entire playlist

Benefits:

  • Seamless track transitions
  • No timing gaps
  • Compatible with DLNA specification
  • Works reliably across different renderer implementations

Solution 2: Event-Based Transition with Immediate Response

How it works:

  1. Subscribe to AVTransport events (UPnP eventing)
  2. Monitor LastChange events for TransportState = “STOPPED”
  3. Immediately send SetAVTransportURI + Play upon receiving the event
  4. Minimize the gap between stop and next track
    Benefits:
  • Faster response than polling
  • Reduces the gap window
  • More efficient than continuous polling

Solution 3: Predictive Pre-loading

How it works:

  1. Monitor GetPositionInfo for track position
  2. When position reaches ~95% of track duration
  3. Send SetAVTransportURI for the next track immediately
  4. Device will be ready to switch when current track ends
    Benefits:
  • Proactive rather than reactive
  • Reduces race conditions
  • Works even without SetNextAVTransportURI support

Comparative Analysis

Observed Behavior Patterns

Aspect Symfonium Windows Media Player
AVTransport Requests 156 requests (high polling) Appears to use eventing
Transition Method Stop → SetAVTransportURI → Play Unknown (incomplete capture)
Timing Gap ~2.29 seconds Unknown
Next Track Preload Not used Likely used
Event Subscription Not observed Yes (SUBSCRIBE to AVTransport/event)

Note: The WMP capture file (wmp.pcapng) did not contain the complete playback session (only SSDP discovery and event subscription), so direct comparison of track transition behavior was not possible. However, WMP’s successful auto-advance behavior suggests it likely uses SetNextAVTransportURI or a more optimized transition method.

Technical Details from Packet Capture

Frame-by-Frame Analysis (symfonium.pcap)

First Track Playback:

Frame 1344:  22:15:24.424 - Stop
Frame 1444:  22:15:24.472 - SetAVTransportURI (River Flows In You)
Frame 2550:  22:15:35.133 - Seek to 00:03:38

Track Transition:

Frame 5605:  22:15:59.479 - Stop (Track 1 finished)
Frame 5652:  22:15:59.517 - SetAVTransportURI (Party Train)
Frame 6518:  22:16:01.765 - Play

Polling Pattern:

  • Frames 1189-6635: Continuous GetPositionInfo/GetTransportInfo polling
  • Average interval: ~800ms between polls
  • Total polling requests: 156

Xiaomi Speaker Response

From frame 1365, we can see the speaker sends a NOTIFY event indicating:

<TransportState val="STOPPED"/>
<CurrentTransportActions val="Next,Previous,Seek,Play"/>

This confirms the speaker supports the Next action, suggesting it expects tracks to be pre-loaded.

Recommendations for Symfonium Development

Short-term Fix

Implement SetNextAVTransportURI when starting playback of each track:

// Pseudocode
void playTrack(Track current, Track next) {
    avTransport.SetAVTransportURI(0, current.uri, current.metadata);
    if (next != null) {
        avTransport.SetNextAVTransportURI(0, next.uri, next.metadata);
    }
    avTransport.Play(0, "1");
}

Medium-term Enhancement

  1. Subscribe to AVTransport events instead of polling
  2. Implement proper event handling for playback state changes
  3. Use SetNextAVTransportURI proactively when track position > 90%

Long-term Architecture

  1. Abstract DLNA control patterns into a state machine
  2. Support multiple transition strategies (adaptive to renderer capabilities)
  3. Query renderer capabilities via GetDeviceCapabilities to choose optimal method

Testing Recommendations

To validate the fix:

  1. Capture new packet traces with the fix applied
  2. Verify SetNextAVTransportURI appears in the capture
  3. Measure transition timing - should be seamless (< 100ms gap)
  4. Test with multiple renderers to ensure compatibility
  5. Verify playlist advancement works reliably for 5+ consecutive tracks

Conclusion

The single-track loop issue in Symfonium is caused by the absence of SetNextAVTransportURI usage during track transitions. The current “Stop → SetAVTransportURI → Play” approach creates a timing gap where the Xiaomi AI Speaker (and potentially other DLNA renderers) defaults to reloading the current track.

Implementing SetNextAVTransportURI will resolve this issue and provide seamless track transitions that are both more reliable and compliant with UPnP/DLNA standards.

Supporting Files

  • symfonium.pcap - Complete packet capture of Symfonium DLNA session
  • wmp.pcapng - Partial packet capture of WMP DLNA session (discovery and eventing only)

Don’t post random IA stuff :slight_smile: if you disable gapless then you prevent the app from using that call so no it’s obviously not the solution :slight_smile:

Provide proper logs without gapless as asked, the pcap are useless as the AI told you they do not contain the important part.

Okay, I have reproduced the issue with gapless mode disabled. Here is my log file:Jerry-XiaoAi-Speaker-Gapless-Disabled

I noticed another phenomenon: when I click pause, it pauses the currently playing track and then resumes normal playback of the next track. Here’s the log reproducing this process: Jerry-XiaoAi-Speaker-Play-Next-Track-When-Paused

The logs confirm the device misbehave. Without gapless the device automatically restart the track there’s no stop nothing it just decide to loop.

Same when paused the device changes to stopped and so trigger the next play as expected you can workaround that one with the renderer option stop casting on external change.

Enable back the gapless option in the renderer settings and provide new full logs for that case when enabling logs before connecting to the device.

I tried enable ‘stop casting on external change’ and ‘gapless’, the issue that keeps looping same track still can be reproduced, but the pause issue is disappeared.

I recaptured the log as you said, here is the log:Jerry-XiaoAi-Speaker-202606150917

The device refuses the gapless calls {faultcode=s:Client, faultstring=UPnPError, UPnPError/errorCode=401, UPnPError/errorDescription=Invalid Action}

Try to provide a complete full pcap from WMP and upload to https://upload.symfonium.app

And provide the content of the file http://192.168.1.108:9999/d1321164-816a-4f45-b7cb-708130f09e9d.xml

Please forgive my mistake regarding the WMP issue. The ability to switch tracks properly may have simply been due to my inadvertently using WMP’s Bluetooth audio output. After re-capturing network traffic, I found that there was actually no valid network communication involved. Moreover, once I turned off Bluetooth on my computer, that output option disappeared. Although WMP can discover UPnP devices, it cannot play from them—it shows an error saying “the device does not support the media.”

Regarding the file at http://192.168.1.108:9999/d1321164-816a-4f45-b7cb-708130f09e9d.xml that you requested to see, I’ve pasted it below.

<?xml version="1.0" encoding="utf-8"?>
<root
    xmlns="urn:schemas-upnp-org:device-1-0">
    <specVersion>
        <major>1</major>
        <minor>1</minor>
    </specVersion>
    <device>
        <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
        <friendlyName>小爱音箱-5924</friendlyName>
        <manufacturer>Mi, Inc.</manufacturer>
        <modelDescription>The Mi AI SoundBox</modelDescription>
        <modelName>S12</modelName>
        <modelNumber>S12</modelNumber>
        <qq:X_QPlay_SoftwareCapability
            xmlns:qq="http://www.tencent.com">QPlay:2
        </qq:X_QPlay_SoftwareCapability>
        <dlna:X_DLNADOC
            xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50
        </dlna:X_DLNADOC>
        <dlna:X_DLNACAP
            xmlns:dlna="urn:schemas-dlna-org:device-1-0">,
        </dlna:X_DLNACAP>
        <UDN>uuid:d1321164-816a-4f45-b7cb-708130f09e9d</UDN>
        <serviceList>
            <service>
                <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
                <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
                <SCPDURL>AVTransport1.xml</SCPDURL>
                <controlURL>/AVTransport/control</controlURL>
                <eventSubURL>/AVTransport/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
                <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
                <SCPDURL>ConnectionManager1.xml</SCPDURL>
                <controlURL>/ConnectionManager/control</controlURL>
                <eventSubURL>/ConnectionManager/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
                <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
                <SCPDURL>RenderingControl1.xml</SCPDURL>
                <controlURL>/RenderingControl/control</controlURL>
                <eventSubURL>/RenderingControl/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:xiaomi-com:service:Queue:1</serviceType>
                <serviceId>urn:xiaomi-com:serviceId:Queue</serviceId>
                <SCPDURL>Queue1.xml</SCPDURL>
                <controlURL>Queue1/control</controlURL>
                <eventSubURL>Queue1/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:xiaomi-com:service:Playlist:1</serviceType>
                <serviceId>urn:xiaomi-com:serviceId:Playlist</serviceId>
                <SCPDURL>Playlist1.xml</SCPDURL>
                <controlURL>Playlist1/control</controlURL>
                <eventSubURL>Playlist1/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>
                <serviceId>urn:tencent-com:serviceId:QPlay</serviceId>
                <SCPDURL>QPlay1.xml</SCPDURL>
                <controlURL>QPlay1/control</controlURL>
                <eventSubURL>QPlay1/event</eventSubURL>
            </service>
            <service>
                <serviceType>urn:xiaomi-com:service:Favorites:1</serviceType>
                <serviceId>urn:xiaomi-com:serviceId:Favorites</serviceId>
                <SCPDURL>Favorites1.xml</SCPDURL>
                <controlURL>Favorites1/control</controlURL>
                <eventSubURL>Favorites1/event</eventSubURL>
            </service>
        </serviceList>
    </device>
</root>

Ok so there’s no magic trick :wink: Check if the device have an app and see if there’s not a repeat mode engaged in it that causes this. This is outside of UPnP protocol there’s not much more I can do.