What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

UPnP Media Server not being "seen" from AX86U Pro - Ideas?

SR-71

Regular Contributor
Hi, looking for some troubleshooting ideas here on the ASUS DLNA/UPnP media server feature in case I've missed something. Up to recently, it was working fairly well for a free NAS alternative.

I've had the ASUS UPnP media server enabled on my ASUS routers for years, and could previously stream movies and shows to mobile apps at home. But not lately.

SMB works just fine across devices, it's just the UPnP server that's not being seen/detected. It happens when my two USB drives are attached simultaneously. Some player apps don't offer SMB logins but instead support DLNA/UPnP, which is where I'm stumped. I've had these same two drives connected for years that worked with DLNA/UPnP in our player apps with both attached. The drives check out fine.

Objective:

Tying to get it so family members can stream to their devices without having to login. DLNA/UPnP is supposed to just present the server and folders for browsing and playing what you want. I'm perplexed by this change in behavior.

Setup:
  • Two USB hard drives plugged into a powered USB 3.0 hub, which in turn is plugged into the AX86U's USB 3.0 port with USB 3.0 enabled in router.
  • This works just fine with the hub, as SMB logins to each drive/path work across many devices with both drives plugged in simultaneously. (SMB enabled in adjoining tab in router admin)
  • UPnP Media Server is enabled in AX86U's admin. Exact path to media files on each drive added in the manual media server path table below it (Audio, Image, and Video are all "checked" for each).
  • RT-AX86U Pro running latest stock firmware, meshed with AX3000 V1 also running its latest stock firmware. This issue arose while on a slightly earlier firmware version on each from last year. Updating firmware didn't change anything here, nor did factory resetting the AX86U Pro and restoring the config file.
Examples of the problem:

Have a new Roku Express 4K+ streaming box. It's built-in Media Player can only see and play files from the AX86U Pro when only ONE of the two hard drives is plugged into the router. Doesn't seem to matter which one, as long as it's only one drive connected at a time. If both drives are attached, then the Roku says the media server hasn't been started up so it doesn't work at all. At first I thought this was a limitation in the Roku app (saw something very similar with our older Roku Express+ box on a different TV -- but at least that one actually "saw" the UPnP server and could play files on the first drive attached while both drives were connected).

BUT now VLC on my Android phone can't see the ASUS UPnP server either. I know it used to work, because I saved it as a "favorite" in VLC for Android in its network screen. But now that saved link doesn't work over UPnP either and VLC removed it.

Not sure what's changed, other than I meshed the AX3000 last year when I added the AX86U Pro as the main router. Also just tried Nova Player on Android, which exhibited mostly the same behavior as VLC -- only worked for "seeing" the ASUS UPnP media server when only one drive is attached.

Any ideas on why this is happening and how to fix it? (I'm not in a position to go full NAS and need two drives attached simultaneously.)
 
Last edited:
I would first look to see if your media files are being scanned and indexed correctly. In the minidlna.conf file (located in /etc), you should find a line "db_dir=". That will point to where miniDLNA is building its sql database (files.db). That file can be copied to another location and browsed with a sql browser like SQLite. The contents of that file is what Roku Media Player is using. Within that db, table "Details" should list all of your media files and table "Objects" defines the hierarchy structure. Whether the db is present and structured correctly should point to the next diagnostic step (playback issue or indexing issue).
 
If you find that it's an indexing issue, one of the problems that arises when media files are spread across multiple physical devices is that miniDLNA restarts every time a device is mounted, and the indexing process gets interrupted. This comes into play when the router is started or rebooted and the devices are mounted sequentially. I know you're using the stock firmware, but this article provides a bit of context of how this issue can be addressed using the Merlin firmware.
 
The first troubleshooting step, if not done already, should be to take the USB hub out of the mix and connect both drives to the RT-AX86U Pro's two USB ports. Also as a troubleshooting step, use the All Disks Shared option for the Media Server rather than Manual Media Server Path. Another troubleshooting step, if not done already, try other USB drives if possible to rule out a controller issue with the first two drives tested.

In a quick and dirty test, not having a problem seeing media on two USB drives when using the Media Server.

RT-AX86U Pro with 3.0.0.6.102_34336, no AiMesh.
Drive 1: PNY SSD drive in Orico USB 3.0 enclosure
Drive 2: Hitachi HDD in Orico USB 3.0 enclosure
Orico powered 7 port USB 3.0 hub

First test was with both drives connected to the router's two USB ports with manual media server paths configured for media server. Windows 11 VLC Playlist Universal Plug'n'Play can see and play video from both drives. A Roku Ultra's Media Player can see and play video from both drives.

Second test was removing both drives from router. Attach a Orico USB hub to the router's USB 3.0 port. Connect both USB drives to the USB hub. Manual media server paths configured. Both VLC's Plug'n'Play and Roku's Media Player can see and play video from both drives.
 
Last edited:
An additional test that can be run is to turn off and on the media server via the GUI without rebooting the router (be sure "rebuild database at start" set to "yes"). As both devices remain mounted through that step, that would either suggest or eliminate any sequential mounting effect on the indexing process.
 
Not sure what's changed, other than I meshed the AX3000 last year when I added the AX86U Pro as the main router.
Not sure if you indicated but are the devices having issues both connected to the AiMesh node rather than the main router? If yes, does the issue persist if you connect those devices to the main router rather than the AiMesh node?
 
I would first look to see if your media files are being scanned and indexed correctly. In the minidlna.conf file (located in /etc), you should find a line "db_dir=". That will point to where miniDLNA is building its sql database (files.db). That file can be copied to another location and browsed with a sql browser like SQLite. The contents of that file is what Roku Media Player is using. Within that db, table "Details" should list all of your media files and table "Objects" defines the hierarchy structure. Whether the db is present and structured correctly should point to the next diagnostic step (playback issue or indexing issue).
Thanks, but how do I look for that file on the router?

Also thanks for the article. I noticed that my AX86U Pro's RAM usage is consistently around 94%. Can't tell if its the % of memory that is just reserved for use vs. actually used. I think it's reserved, because disabling a bunch of services like AIProtection, Parental Controls, UPnP Media server, etc. doesn't free up the RAM. When I was running the AX3000 as the only router until last year on an older stock firmware version, disabling these same services immediately freed up some RAM.

Regardless, though, my media apps can see the AX86U UPnP media server when only one drive is mounted at a time, and can browse the video, audio, and image folders presented. For example, if I go into the web UI and dismount ("safely remove") one of the two drives, then the router's UPnP server magically appears in VLC player across my devices.

As soon as I unplug/replug in the other drive, then the UPnP server immediately disappears from these media player apps' network browsing screens and just leaves the SMB entry for the router.
 
Last edited:
The first troubleshooting step, if not done already, should be to take the USB hub out of the mix and connect both drives to the RT-AX86U Pro's two USB ports. Also as a troubleshooting step, use the All Disks Shared option for the Media Server rather than Manual Media Server Path. Another troubleshooting step, if not done already, try other USB drives if possible to rule out a controller issue with the first two drives tested.

In a quick and dirty test, not having a problem seeing media on two USB drives when using the Media Server.

RT-AX86U Pro with 3.0.0.6.102_34336, no AiMesh.
Drive 1: PNY SSD drive in Orico USB 3.0 enclosure
Drive 2: Hitachi HDD in Orico USB 3.0 enclosure
Orico powered 7 port USB 3.0 hub

First test was with both drives connected to the router's two USB ports with manual media server paths configured for media server. Windows 11 VLC Playlist Universal Plug'n'Play can see and play video from both drives. A Roku Ultra's Media Player can see and play video from both drives.

Second test was removing both drives from router. Attach a Orico USB hub to the router's USB 3.0 port. Connect both USB drives to the USB hub. Manual media server paths configured. Both VLC's Plug'n'Play and Roku's Media Player can see and play video from both drives.
Thanks. I had the same thought and removed the hub. Plugging both drives directly into the USB 2.0 and USB 3.0 ports resulted in the identical behavior as before:

The UPnP media server only appears in the endpoint mobile player apps when only one drive is connected at a time. I also previously plugged in both drives to my Windows laptop and scanned them for errors. Both came up completely error free and worked perfectly. They each work perfectly when each is the only drive connected to the router. They are both NTFS-formatted, as I prefer the write-journaling for data integrity.

So it's not the powered hub nor the drives causing this. It's something specific to the router.

In fact, in the router's UPnP media server config screen, I even removed access to the second drive under the manual path so only the first drive was listed for access. It worked when only that drive was connected. However, as soon as I connected the second drive, even though there was no access granted in that table for it, the UPnP server immediately disappeared (wasn't being broadcast/detected) by the endpoint media player apps.

Next, I'm going to try turning off the AX3000 so the AX86U Pro is not meshed. Not expecting that to make any difference, but can't hurt to try.
 
Last edited:
Not sure if you indicated but are the devices having issues both connected to the AiMesh node rather than the main router? If yes, does the issue persist if you connect those devices to the main router rather than the AiMesh node?
Both have been connected directly to the AX86U Pro since I got it last year, which is set up as the primary router.
 
An additional test that can be run is to turn off and on the media server via the GUI without rebooting the router (be sure "rebuild database at start" set to "yes"). As both devices remain mounted through that step, that would either suggest or eliminate any sequential mounting effect on the indexing process.
Did that several times already, and again on your suggestion -- unfortunately, nothing changed.

Also, in the stock firmware, there is no option to "rebuild database at start" in the web GUI. Is that a Merlin-specific feature/option?
 
Thanks. I had the same thought and removed the hub. Plugging both drives directly into the USB 2.0 and USB 3.0 ports resulted in the identical behavior as before:

The UPnP media server only appears in the endpoint mobile player apps when only one drive is connected at a time. I also previously plugged in both drives to my Windows laptop and scanned them for errors. Both came up completely error free and worked perfectly. They each work perfectly when each is the only drive connected to the router. They are both NTFS-formatted, as I prefer the write-journaling for data integrity.

So it's not the powered hub nor the drives causing this. It's something specific to the router.

Next, I'm going to try turning off the AX3000 so the AX86U Pro is not meshed. Not expecting that to make any difference, but can't hurt to try.
Nope, turning off the AX3000 and running the AX86U Pro as the only active router didn't change anything. Didn't expect it to, but at least eliminated it as a potential variable.
 
Check the router log, if you haven't done so already, to see if there is any indication of what may be causing the issue with the UPNP media server on the router. Or a problem with USB drive mounting. Perhaps there is a clue to the problem buried in the log.

If it is only one specific drive that consistently doesn't show up then test using a different drive. Swap around plugging in the drives as a test if you haven't done so already.

As a last resort. Remove all router attached USB drives. Perform a Factory Default Restore with Initialize all settings checked. Then reconfigure the router manually. Do not import a saved "router.cfg" configuration file. Doing so may reintroduce your issue. Do a basic manual router QiS configuration to get the router up and running without enabling any extra router features or options. Then attach the two USB drives. Then enable the media server option (if not enabled) and test.
 
Thanks, but how do I look for that file on the router?

Also thanks for the article. I noticed that my AX86U Pro's RAM usage is consistently around 94%. Can't tell if its the % of memory that is just reserved for use vs. actually used. I think it's reserved, because disabling a bunch of services like AIProtection, Parental Controls, UPnP Media server, etc. doesn't free up the RAM. When I was running the AX3000 as the only router until last year on an older stock firmware version, disabling these same services immediately freed up some RAM.

Regardless, though, my media apps can see the AX86U UPnP media server when only one drive is mounted at a time, and can browse the video, audio, and image folders presented. For example, if I go into the web UI and dismount ("safely remove") one of the two drives, then the router's UPnP server magically appears in VLC player across my devices.

As soon as I unplug/replug in the other drive, then the UPnP server immediately disappears from these media player apps' network browsing screens and just leaves the SMB entry for the router.
Google "ssh to asus router" for instructions on how to access router files. This video:
is a good reference also. Note that, once you log on, commands are Linux commands... forward slash vs. backslash, cp to copy, ls to list files, rm to delete a file, etc. You log in using the same userid and pw you use with the GUI.

Listed RAM usage likely includes cache memory that's filled, but available. Merlin fixed this display some time ago, but I'm not sure whether the stock fw has. Once you ssh in, you can run cat /proc/meminfo and it will display "available" memory.

I can't explain what you're seeing. I have 4 devices (though SSD as opposed to HDD, and all NTFS formatted) connected through a hub with media spread across 3 of them. It works flawlessly. I did have to address the issue described in the article I linked previously. Because it starts indexing every time a device is mounted, it leaves partially indexed databases on several of the devices. I solve that problem by programmatically looking to see if all devices are mounted, and if not, directing the database to a temporary location which I later delete. Merlin has the "hooks" to programmatically do that, I don't think the stock fw does.

As to whether the db is being regenerated each time, once you ssh in, you can run the command "top n 1" and it will show you the processes that are running. You should find minidlna on the list. If it's followed by a "-R", the database is being rebuilt each start.
 
I noticed that my AX86U Pro's RAM usage is consistently around 94%. Can't tell if its the % of memory that is just reserved for use vs. actually used.
The high RAM usage is common when you have SMB enabled and are copying files to/from the USB drive. There are a number of past discussions about that particular issue in the subforums here. For example:
One can temporally lower the RAM by clearing the cache. Some have created a CRON job to clear the cache periodically, see this link for an example. To clear the cache using SSH, issue one of the following commands.
Code:
sync; echo 1 > /proc/sys/vm/drop_caches
or
sync && echo 3 > /proc/sys/vm/drop_caches
or
free && sync && echo 3 > /proc/sys/vm/drop_caches && free
 
Just brainstorming....things that I would do to further diagnose:
- is your media server visible to Windows (explorer network page) as a media device?
- if you activate your Windows Media Server on your PC, do your Roku clients see it?
- is the miniDLNA process running on your router ("top n 1" command when logged in via ssh)?
- can you display the miniDLNA status page at http://[your router ip]:8200 and does it display the expected number of media files?
- does the minidlna log show anything unusual (log location defined in the "log_dir=" line of the minidlna.conf file)?
- browse the sql database...are the expected media files listed there?
- can you receive one of your media files via the browser? (http://[your router ip]:8200/MediaItems/[number].[mp4|mkv], where [number] is from field "ID" in table "DETAILS")
- consider manually removing any duplicate files.db files found in .minidlna subdirectories of each device
- is there any mounting error? (linux command "df" when logged in via ssh) Is there any mount point with a "(1)" on the end of it?
- is there any possibility of overlapping volume or subdirectory names that is causing the scan to fail or overlay another device's info?
- is there anything unusual in the minidlna.conf file? consider posting it after removing any identifying info.
- consider creating a new subdirectory with only one media file on each device and indexing only those
- consider adjusting the "notify" interval down from the default 10-15 minutes. I use 45 seconds, but I'm not sure how to do that with the stock fw. Would need others' experience. This is the "-t" option on the minidlna command line. This is the frequency that your media server announces its presence to your network devices. Too long of a notify interval could result in Roku dropping the server from it's list of network devices.
 
Last edited:
Thanks for all the help and suggestions. I'm curious about one thing:

In the stock firmware, is there a way to simply blow away the minidlna database for both drives and force it to rebuild it from scratch?

The comments above are making me want to try Merlin, but unfortunately I don't have the bandwidth currently to start over from scratch.
 
In the stock firmware, is there a way to simply blow away the minidlna database for both drives and force it to rebuild it from scratch?
IIRC it tries to put the database directory in the root of the USB drive in a directory called .minidlna. Try plugging your drive(s) into a PC and seeing if you can find that directory, then delete it. Alternatively you could SSH into the router and check the path with:

Code:
nvram get dms_dbdir
 
I got the DLNA server working again! Thank you all for your help and great suggestions.

Looks like the culprit was corrupted or otherwise problematic .minidlna files on the external HD. I suspected this was likely a factor from the suggestions above — which is why I needed to know how to remove them and have them rebuilt without redoing my entire router setup.

Posting this to give back and help others:

Solution:

SSH’ed into the router, ran the commands suggested above to:
  • Verify path to the .minidlna files on external drive (found both drives had their own .minidlna folder later)
  • Verify DLNA server indeed had the “-R” parameter at end (rebuilds at restart)
Then:
  • “Safely remove” both drives from router
  • Connect each drive to laptop and run CHKDSK /F on both (the router has a similar feature, but I needed to see the actual CHKDSK output firsthand in case of any errors).
  • Discovered corrupted thumb.jpg files in a .minidlna subfolder on the second HD and repaired (this drive was without any errors previously when I first posted the problem)
  • Renamed .minidlna folders on both drives to something else — so they would be rebuilt (now can delete the old folders)
  • Connected 1st HD back to router and let it index to completion
  • Connected 2nd HD back to router and let it index to completion
Now the DLNA media server and all content on both drives is available and playable across my network with both drives attached simultaneously. Roku Media player app sees them, as does other mobile app media players across my devices.

Of course, no guarantee they won’t get corrupted again — particularly as my router is set to reboot daily, so it should rebuild daily. Not ideal, but for now all seems good and I now know how to fix it.

Having those specific Linux commands and how to SSH into the router was very helpful indeed, thanks.

Long term, when I actually have time, I want to check out Merlin for better control over it.

Again, many thanks! Family is happy to have it back. :cool:
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top