WizPNP server for (possibly) most platforms.....

Advanced Discussions on Programing for & Modifying Beyonwiz Products.

Moderators: Gully, peteru

User avatar
tonymy01
Uber Wizard
Posts: 6373
Joined: Fri Jun 01, 2007 15:25
Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
Contact:

Post by tonymy01 » Sun Jun 21, 2009 15:54

Ok, I have done two quick fixes which makes this much more usable:
1. the nasty resource hogging when downloads are commenced but cancelled. I haven't delved into the full nuts and bolts of sockets yet, but essentially I have set it up now so that if it writes 0bytes to the socket, it bails the filesending rather than sending the whole file to that socket regardless (original mongoose code issue! What was happening was it was attempting to keep sending that file through to the socket, the culprit routine is send_opened_file_stream for those peeking into the source, I wacked a printf in there and was alarmed that despite the socket sending no bytes, it was attempting to keep sending all of the file to that socket)
2. Global variable added to not begin the SSDP polling/responses until the index has been built, so this will fix the issue of the Wiz getting an outdated/partially built index.txt file (and thus only showing some of your files).

Still to do:
deal with longer path names
deal with multiple roots
fine tune the window size (sends 1024 bytes at a time on my PC, sends 8192bytes at a time on the slug). Will have to quantify performance differences somehow...
deal with media files >2G in size.

Get v2 here:
http://tonyspage.abock.de/beyonwiz/wizmongoosev2.zip
(I included a SLUG binary this time too, given that the resourcing thing is much much better now).
Regards
Tony

User avatar
DaveR
Wizard
Posts: 2527
Joined: Tue May 29, 2007 01:24
Location: Sydney

Post by DaveR » Sun Jul 12, 2009 22:08

Very Nice!

Clever how it lists all folders with a tvwiz extension under 'recording' and lists everything else under 'contents'. Pity you didn't use the latest firmware's 'Recordings' and 'Contents' folder names/spelling.

I'm tempted to write a GUI for it so it runs in the background (as a service maybe?) and the GUI provides a means of starting and stopping the server, as well as automatically setting the PC's IP address and friendly name, and making it easier for users to edit the basic settings like changing the root folder.

Can we have aliases within the root folder that point to other folders that we want the wiz to see? Or would we need to run multiple servers? (at 3,780 K each)
I only indexed a small folder with about 2 dozen video files. How long does it take to index, say, a whole drive with 100s of MBs of files? (for example, a 1TB HDD?)

Hmm, can the wiz copy or move recordings to the server? EDIT Nope, it can't. Fails with a 'Not enough space' error (which usually means it's a permissions thing). Still, for those who can't get shared folders working this makes a very nice alternative for streaming content from the PC. And they can use WizFX (or WizZilla) for downloading recordings.
cheers
DaveR

IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa

prl
Wizard God
Posts: 32708
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Post by prl » Sun Jul 12, 2009 22:23

Dave? wrote:...
I only indexed a small folder with about 2 dozen video files. How long does it take to index, say, a whole drive with 100s of MBs of files? (for example, a 1TB HDD?)
...
The time to build the index depends on the number of recordings/media files, not on the amount of data.

getWizPnP builds an index in much the same way as I presume wizmongoose does, and it doesn't appear to be excesively slow.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
tonymy01
Uber Wizard
Posts: 6373
Joined: Fri Jun 01, 2007 15:25
Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
Contact:

Post by tonymy01 » Sun Jul 12, 2009 22:47

That's strange, I copied the Wiz index.txt format to the letter, presumably having two Wizes will have the same symptoms of the recordings/contents directory spelling.

There is some issues with making Wizmongoose a final release though Dave.
1. >4G files need to be virtualised into the same structure as the Wiz makes them when on its HDD (at the moment things aren't quite right for large files).
2. AVI files don't play, the Wiz asks for bytes range0-0 which essentially says "just the first byte of the file" which the html mongoose part of WizPNP obliges with, but this can't be correct. There needs to be some further sniffing on the network about what goes on for playing AVI files off another Wiz so I can make the HTML server give the correct response (I tried just giving the last 262kbytes like the Wiz asks for some other file types, this didn't help, so I don't know what it is expecting when it asks for 0-0 range).
3. Can you copy files between wizes? Again, I don't have 2 wizes to test the real WizPNP behaviour, I just figured you couldn't copy between wizes.
4. I haven't put a regular indexing engine in, it merely indexes at the beginning before broadcasting the PNP stuff to announce it is up.

5. I was going to investigate multiple roots. It shouldn't be too difficult, but as mongoose doesn't as far as I can tell, it would mean a bit of rewriting of the mongoose stuff (and the config parser, which is something I usually dislike doing, it was hard enough to work out exactly how to put the WizFX mode option in there :-))

Regards
Tony

Post Reply

Return to “Software Developers”