USB Support

jeromeof

Major Contributor
Joined
Oct 22, 2022
Messages
85
Location
Celbridge Ireland
So, I have been playing around USB support on the WiiM amp and I thought it might be useful to create a separate thread.

The WiiM team did update their FAQ page with lots of information over the weekend:

WiiM also told me that they have a few features planned for the near future for enhancing USB support:
  • Prompt user confirmation before automatically indexing files, accompanied by an estimated indexing time for better user expectation management.
  • A dedicated USB disk entry in the 'Browse' tab of the WiiM App, separate from the Home Media Sharing directory, for easier access and management
Both these will be excellent additions I think.

I do think there can be issue with older USB disk (with possible corrupt files causing the WiiM Amp to freeze ) - I am going to submit a ticket with details about that one once I can isolate the problem file.

But I tried a few extra things today which might be of interest:

Linux disk formats are supported. So I tried an ext4 formatted USB and it worked reasonable well - it's not really a surprise since the WiiM firmware would be linux based also.

The indexing process (which kicks in automatically when you put a usb into the drive) updates a folder called wiim_cache. Thankfully this cache seems to be incredible straightforward - so third party tools could easily be written to update it separately.
It consists of:
  • files.db
  • art_cache/
The files.db is a standard sqlite file which is great as that means anybody can read / write the cache and this is why I think it will allow other utilises to be written to recreate this wiim_cache folder structure so that the WiiM Amp itself does not need to do the work when you put the disk into the device.

For those nerdy folks that understand database formats this is the files.db - use the sqlite3 application and then the schema format is visible:

Code:
CREATE TABLE DETAILS (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT DEFAULT NULL, SIZE INTEGER, TIMESTAMP INTEGER, TITLE TEXT COLLATE NOCASE, DURATION TEXT, BITRATE INTEGER, SAMPLERATE INTEGER, CREATOR TEXT COLLATE NOCASE, ARTIST TEXT COLLATE NOCASE, ALBUM TEXT COLLATE NOCASE, GENRE TEXT COLLATE NOCASE, COMMENT TEXT, CHANNELS INTEGER, DISC INTEGER, TRACK INTEGER, DATE DATE, RESOLUTION TEXT, THUMBNAIL BOOL DEFAULT 0, ALBUM_ART INTEGER DEFAULT 0, ROTATION INTEGER, DLNA_PN TEXT, MIME TEXT);
CREATE TABLE ALBUM_ART (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT NOT NULL);
CREATE TABLE CAPTIONS (ID INTEGER PRIMARY KEY, PATH TEXT NOT NULL);
CREATE TABLE BOOKMARKS (ID INTEGER PRIMARY KEY, SEC INTEGER, WATCH_COUNT INTEGER);
CREATE TABLE PLAYLISTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL, PATH TEXT NOT NULL, ITEMS INTEGER DEFAULT 0, FOUND INTEGER DEFAULT 0, TIMESTAMP INTEGER DEFAULT 0);
CREATE TABLE SETTINGS (KEY TEXT NOT NULL, VALUE TEXT);

Looking into the SETTINGS table show nothing too interesting (yet):
Code:
sqlite> select * from SETTINGS;
UPDATE_ID|0
media_dir|/media/sda1

Other tables are self-explanatory e.g. the album_art table looks like this - this is just a snippet - so the and ID and a path :

Code:
411|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-01 Lay Lady Lay.jpg
412|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-02 Baby, Let Me Follow You Down.jpg
413|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-03 If Not for You.jpg
414|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-04 I'll Be Your Baby Tonight.jpg
415|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-05 I'll Keep It With Mine.jpg

I really like that there are BOOKMARKS and PLAYLISTS folders - this allows external application to easily manipulate what will be made available by the WiiM Amp.

I will update this with further details as I get them.
 
I'm just guessing here but it looks like they've implemented Ready Media (same as MiniDLNA) into the WiiM. You could manipulate the DB and the file structure externally. I've done it on a router with MiniDLNA: copy audio files to a USB disk, start the indexing process from my PC also running MiniDLNA and then plug the disk to my router. Indexing is faster on the PC.
 
I'm just guessing here but it looks like they've implemented Ready Media (same as MiniDLNA) into the WiiM. You could manipulate the DB and the file structure externally. I've done it on a router with MiniDLNA: copy audio files to a USB disk, start the indexing process from my PC also running MiniDLNA and then plug the disk to my router. Indexing is faster on the PC.
Yes I imagine it is actually just the MiniDLNA package - but it might be another similar implementation. Only problem with using MiniDLNA on the PC is the files.db database contains paths to the files on the disk
i.e.
Code:
/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-01 Lay Lady Lay.jpg
so some manipulation would be needed. But, yes I was thinking that do the indexing on your own computer first would be a good idea for large libraries.
 
You can run this command with a conf file specific for the WiiM device:
Code:
minidlnad -d -r -v -f minidlna-wiim.conf
In the conf file, specify the directory WiiM is using: media_dir=/media/sda1
 
So, I have been playing around USB support on the WiiM amp and I thought it might be useful to create a separate thread.

The WiiM team did update their FAQ page with lots of information over the weekend:

WiiM also told me that they have a few features planned for the near future for enhancing USB support:
  • Prompt user confirmation before automatically indexing files, accompanied by an estimated indexing time for better user expectation management.
  • A dedicated USB disk entry in the 'Browse' tab of the WiiM App, separate from the Home Media Sharing directory, for easier access and management
Both these will be excellent additions I think.

I do think there can be issue with older USB disk (with possible corrupt files causing the WiiM Amp to freeze ) - I am going to submit a ticket with details about that one once I can isolate the problem file.

But I tried a few extra things today which might be of interest:

Linux disk formats are supported. So I tried an ext4 formatted USB and it worked reasonable well - it's not really a surprise since the WiiM firmware would be linux based also.

The indexing process (which kicks in automatically when you put a usb into the drive) updates a folder called wiim_cache. Thankfully this cache seems to be incredible straightforward - so third party tools could easily be written to update it separately.
It consists of:
  • files.db
  • art_cache/
The files.db is a standard sqlite file which is great as that means anybody can read / write the cache and this is why I think it will allow other utilises to be written to recreate this wiim_cache folder structure so that the WiiM Amp itself does not need to do the work when you put the disk into the device.

For those nerdy folks that understand database formats this is the files.db - use the sqlite3 application and then the schema format is visible:

Code:
CREATE TABLE DETAILS (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT DEFAULT NULL, SIZE INTEGER, TIMESTAMP INTEGER, TITLE TEXT COLLATE NOCASE, DURATION TEXT, BITRATE INTEGER, SAMPLERATE INTEGER, CREATOR TEXT COLLATE NOCASE, ARTIST TEXT COLLATE NOCASE, ALBUM TEXT COLLATE NOCASE, GENRE TEXT COLLATE NOCASE, COMMENT TEXT, CHANNELS INTEGER, DISC INTEGER, TRACK INTEGER, DATE DATE, RESOLUTION TEXT, THUMBNAIL BOOL DEFAULT 0, ALBUM_ART INTEGER DEFAULT 0, ROTATION INTEGER, DLNA_PN TEXT, MIME TEXT);
CREATE TABLE ALBUM_ART (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT NOT NULL);
CREATE TABLE CAPTIONS (ID INTEGER PRIMARY KEY, PATH TEXT NOT NULL);
CREATE TABLE BOOKMARKS (ID INTEGER PRIMARY KEY, SEC INTEGER, WATCH_COUNT INTEGER);
CREATE TABLE PLAYLISTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL, PATH TEXT NOT NULL, ITEMS INTEGER DEFAULT 0, FOUND INTEGER DEFAULT 0, TIMESTAMP INTEGER DEFAULT 0);
CREATE TABLE SETTINGS (KEY TEXT NOT NULL, VALUE TEXT);

Looking into the SETTINGS table show nothing too interesting (yet):
Code:
sqlite> select * from SETTINGS;
UPDATE_ID|0
media_dir|/media/sda1

Other tables are self-explanatory e.g. the album_art table looks like this - this is just a snippet - so the and ID and a path :

Code:
411|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-01 Lay Lady Lay.jpg
412|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-02 Baby, Let Me Follow You Down.jpg
413|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-03 If Not for You.jpg
414|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-04 I'll Be Your Baby Tonight.jpg
415|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-05 I'll Keep It With Mine.jpg

I really like that there are BOOKMARKS and PLAYLISTS folders - this allows external application to easily manipulate what will be made available by the WiiM Amp.

I will update this with further details as I get them.
Thanks, yours is a more detailed breakdown of what I mentioned in my Amp experience thread. The storing of artwork for each track is a bit of overkill though, you’d imagine one per folder would be sufficient.
 
Does it have the same artist problems that MiniDLNA has? Namely it only indexes albumartist and it doesn't send all the track artists to the control point.
The Android WiiM app doesn't correctly handle track artist tags either so you might need to test this on something else.

It's a little disappointing that WiiM haven't improved the WiiM apps UPnP interface with the release of the Amp.
 
Thanks, yours is a more detailed breakdown of what I mentioned in my Amp experience thread. The storing of artwork for each track is a bit of overkill though, you’d imagine one per folder would be sufficient.
Yes I agree it's a waste of space (and processing to keep extracting images but they were embedded inside each file so I guess the process is to extract the album art from each individual file).
 
I imagine there are people looking in detail at the measurements so I thought I would look at a few other areas in a little more detail. I feel the 3 key new features with the WiiM amp are:
1. USB support
2. HDMI ARC
3. SubWoofer support

I am already very impressed with the HDMI ARC and the SubWoofer - they effectively work as well as I hoped. I did some measurements of the effect of HPF configuration yesterday and it works great, though I think proper measurements are needed to see how effective it is at reducing distortion at very loud volumes. And it actually great to have control over the subwoofer LPF inside the app - effectively makes an old subwoofer 'connected' (where before I would be manually setting the values on the back of the subwoofer).

I also have some linux tools to verify the HDMI ARC negotiation protocol but again its mostly working as expected so for me didn't need any diagnostics.
 
Does it have the same artist problems that MiniDLNA has? Namely it only indexes albumartist and it doesn't send all the track artists to the control point.
The Android WiiM app doesn't correctly handle track artist tags either so you might need to test this on something else.

It's a little disappointing that WiiM haven't improved the WiiM apps UPnP interface with the release of the Amp.
As I said in my thread, I’d imagine any non casual user would already have something like Minimserver already indexing their music collection.
 
I imagine there are people looking in detail at the measurements so I thought I would look at a few other areas in a little more detail. I feel the 3 key new features with the WiiM amp are:
1. USB support
2. HDMI ARC
3. SubWoofer support

I am already very impressed with the HDMI ARC and the SubWoofer - they effectively work as well as I hoped. I did some measurements of the effect of HPF configuration yesterday and it works great, though I think proper measurements are needed to see how effective it is at reducing distortion at very loud volumes. And it actually great to have control over the subwoofer LPF inside the app - effectively makes an old subwoofer 'connected' (where before I would be manually setting the values on the back of the subwoofer).

I also have some linux tools to verify the HDMI ARC negotiation protocol but again its mostly working as expected so for me didn't need any diagnostics.
Hi.
Thanks for your review.😊

When connecting a subwoofer to a WiiM amp, do I need to reduce the volume of the SW considerably?

I am now connecting the RCA output of the DAC connected to the WiiM pro to SW and the XLR output to the power amplifier. In this case, the output of the WiiM is so loud that it is not possible to increase the volume of the SW. Specifically, the WiiM output is set to 70%, and the SW is about 10% of the full volume.

I hope that in the future I will be able to adjust the volume of the SW in the WHA.
 
Hi.
Thanks for your review.😊

When connecting a subwoofer to a WiiM amp, do I need to reduce the volume of the SW considerably?

I am now connecting the RCA output of the DAC connected to the WiiM pro to SW and the XLR output to the power amplifier. In this case, the output of the WiiM is so loud that it is not possible to increase the volume of the SW. Specifically, the WiiM output is set to 70%, and the SW is about 10% of the full volume.

I hope that in the future I will be able to adjust the volume of the SW in the WHA.
I physical set my subwoofer to reasonable volume (louder than I needed eg. 50%) and the crossover on the SW suitable value e.g. 80Hz but then controlled the volume itself within the WiiM and then used the EQ with the SubWoofer configuration in the WiiM to fine tune the sound. Works very well as you can test / measure the output from your listening position without having to get up and change the SW each time.
 
As I said in my thread, I’d imagine any non casual user would already have something like Minimserver already indexing their music collection.
I'd imagine even a casual listener would like to know who sang the song! On compilation albums using the WHA with MiniDLNA 1.3.3 all the tracks are attributed to Various Artists, I hope at least they've addressed that.

I thought they'd build on the work they started with the Windows app including scraping artist images e.t.c.
 
I physical set my subwoofer to reasonable volume (louder than I needed eg. 50%) and the crossover on the SW suitable value e.g. 80Hz but then controlled the volume itself within the WiiM and then used the EQ with the SubWoofer configuration in the WiiM to fine tune the sound. Works very well as you can test / measure the output from your listening position without having to get up and change the SW each time.
Thank you!
For me the WiiM amp seems very promising. 😄
 
I imagine there are people looking in detail at the measurements so I thought I would look at a few other areas in a little more detail. I feel the 3 key new features with the WiiM amp are:
1. USB support
2. HDMI ARC
3. SubWoofer support

I am already very impressed with the HDMI ARC and the SubWoofer - they effectively work as well as I hoped. I did some measurements of the effect of HPF configuration yesterday and it works great, though I think proper measurements are needed to see how effective it is at reducing distortion at very loud volumes. And it actually great to have control over the subwoofer LPF inside the app - effectively makes an old subwoofer 'connected' (where before I would be manually setting the values on the back of the subwoofer).

I also have some linux tools to verify the HDMI ARC negotiation protocol but again its mostly working as expected so for me didn't need any diagnostics.
Now that I have a Wiim Amp I am interested in knowing more about the 2 topics @jeromeof has raised. Specifically, re the USB input, I am wondering if there is a way to eliminate the duplicates of songs that are showing up in the USB stick index in Wiim App? Related to this is that there does not seem to be a way to clear a previous indexing by the Amp/App – I deleted the Wiim cache folder from the 128 GB (with about 100 GB of music) stick on a PC, then put it back in the Amp – but most of the previously indexed info instantly reappeared, suggesting to me the Amp/App retains a copy in addition to the cache folder on the usb stick. Any thots on this?

The other topic is the combination of a low pass and high pass filter into a single crossover setting - isn’t that like giving us a “bass” knob on an amp, instead of an equalizer? (Or maybe the analogy is like combining “bass” and “treble” into one knob?) REL says on their website re why they don’t incorporate HPF in their subs, (paraphrasing) “If you paid for good speakers, why cut off their low end?” So I guess I am wondering re Wiim’s bass management scheme, whether having a HPF you can’t control is any better than not having one at all? I realize I can turn the bass management off, but then that renders one of the Amp’s most intriguing selling factors moot.
 
The other topic is the combination of a low pass and high pass filter into a single crossover setting - isn’t that like giving us a “bass” knob on an amp, instead of an equalizer? (Or maybe the analogy is like combining “bass” and “treble” into one knob?) REL says on their website re why they don’t incorporate HPF in their subs, (paraphrasing) “If you paid for good speakers, why cut off their low end?” So I guess I am wondering re Wiim’s bass management scheme, whether having a HPF you can’t control is any better than not having one at all? I realize I can turn the bass management off, but then that renders one of the Amp’s most intriguing selling factors moot.
If you have really good speakers (That can reproduce the audible range flat without distortion.) and a good listening room, you probably don't need SW.

SW is also beneficial as a means of suppressing standing waves, in which case a high pass is required.

However, I don't think anyone would be angry if the ability to disable high passes was added in the future. 🙂
 
If you have really good speakers (That can reproduce the audible range flat without distortion.) and a good listening room, you probably don't need SW.
There are very few speakers (even good speakers) that can get down to 20Hz or lower.
 
So, I have been playing around USB support on the WiiM amp and I thought it might be useful to create a separate thread.

The WiiM team did update their FAQ page with lots of information over the weekend:

WiiM also told me that they have a few features planned for the near future for enhancing USB support:
  • Prompt user confirmation before automatically indexing files, accompanied by an estimated indexing time for better user expectation management.
  • A dedicated USB disk entry in the 'Browse' tab of the WiiM App, separate from the Home Media Sharing directory, for easier access and management
Both these will be excellent additions I think.

I do think there can be issue with older USB disk (with possible corrupt files causing the WiiM Amp to freeze ) - I am going to submit a ticket with details about that one once I can isolate the problem file.

But I tried a few extra things today which might be of interest:

Linux disk formats are supported. So I tried an ext4 formatted USB and it worked reasonable well - it's not really a surprise since the WiiM firmware would be linux based also.

The indexing process (which kicks in automatically when you put a usb into the drive) updates a folder called wiim_cache. Thankfully this cache seems to be incredible straightforward - so third party tools could easily be written to update it separately.
It consists of:
  • files.db
  • art_cache/
The files.db is a standard sqlite file which is great as that means anybody can read / write the cache and this is why I think it will allow other utilises to be written to recreate this wiim_cache folder structure so that the WiiM Amp itself does not need to do the work when you put the disk into the device.

For those nerdy folks that understand database formats this is the files.db - use the sqlite3 application and then the schema format is visible:

Code:
CREATE TABLE DETAILS (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT DEFAULT NULL, SIZE INTEGER, TIMESTAMP INTEGER, TITLE TEXT COLLATE NOCASE, DURATION TEXT, BITRATE INTEGER, SAMPLERATE INTEGER, CREATOR TEXT COLLATE NOCASE, ARTIST TEXT COLLATE NOCASE, ALBUM TEXT COLLATE NOCASE, GENRE TEXT COLLATE NOCASE, COMMENT TEXT, CHANNELS INTEGER, DISC INTEGER, TRACK INTEGER, DATE DATE, RESOLUTION TEXT, THUMBNAIL BOOL DEFAULT 0, ALBUM_ART INTEGER DEFAULT 0, ROTATION INTEGER, DLNA_PN TEXT, MIME TEXT);
CREATE TABLE ALBUM_ART (ID INTEGER PRIMARY KEY AUTOINCREMENT, PATH TEXT NOT NULL);
CREATE TABLE CAPTIONS (ID INTEGER PRIMARY KEY, PATH TEXT NOT NULL);
CREATE TABLE BOOKMARKS (ID INTEGER PRIMARY KEY, SEC INTEGER, WATCH_COUNT INTEGER);
CREATE TABLE PLAYLISTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL, PATH TEXT NOT NULL, ITEMS INTEGER DEFAULT 0, FOUND INTEGER DEFAULT 0, TIMESTAMP INTEGER DEFAULT 0);
CREATE TABLE SETTINGS (KEY TEXT NOT NULL, VALUE TEXT);

Looking into the SETTINGS table show nothing too interesting (yet):
Code:
sqlite> select * from SETTINGS;
UPDATE_ID|0
media_dir|/media/sda1

Other tables are self-explanatory e.g. the album_art table looks like this - this is just a snippet - so the and ID and a path :

Code:
411|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-01 Lay Lady Lay.jpg
412|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-02 Baby, Let Me Follow You Down.jpg
413|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-03 If Not for You.jpg
414|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-04 I'll Be Your Baby Tonight.jpg
415|/media/sda1/wiim_cache/art_cache/media/sda1/Bob Dylan/Biograph/1-05 I'll Keep It With Mine.jpg

I really like that there are BOOKMARKS and PLAYLISTS folders - this allows external application to easily manipulate what will be made available by the WiiM Amp.

I will update this with further details as I get them.
Help. I have formatted my usb to NTSF. I plugged it into WiiM amp to get the CACHE file. I then download flac from Bandcamp onto the stick, not in the Cache but just onthe stick. I put back into a turned off Amp. Turned on. Went to output and it had USB along with ethernet. I couldn't stop ethernet. I clicked on USB...no file. I clicked on scan again. It did and after the input option of USB was gone. ??? What is the darn process. What am I doing wrong. Thanks
 
Help. I have formatted my usb to NTSF. I plugged it into WiiM amp to get the CACHE file. I then download flac from Bandcamp onto the stick, not in the Cache but just onthe stick. I put back into a turned off Amp. Turned on. Went to output and it had USB along with ethernet. I couldn't stop ethernet. I clicked on USB...no file. I clicked on scan again. It did and after the input option of USB was gone. ??? What is the darn process. What am I doing wrong. Thanks
The USB inout option now appears at the bottom of the page along with wifi, line in, optical etc - I missed that first time. Plus what appears under home music share as wiim amp:usb is the new layout, not the older upnp/DLNA menu entries.
 
By the way, I have a submitted a bug for the new USB scan process within the App. It works better in the recent App release but is still crashing ultimately for me after roughly scanning 60,000 tracks (out of 100,000). I know it's probably too ambitious to have so many tracks on a USB but I thought it would be good test.
 
Back
Top