Virtual DJ Studio Home | NGWave Home | Official Facebook Page | Unofficial VDJ Users Group

Author Topic: Busy as heck working on 7.0...  (Read 75379 times)

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #15 on: August 20, 2013, 02:28:14 PM »

I tried to look up the info to transfer the ESN from the one with the bad screen to this one before I sent it, but the info I found was little bit beyond me, so I figured I'd just send it that way.  Maybe you with you programming expertise can do it. My understanding is that if you know someone at one of the other CDMA prepaid companies you might be able to activate it as is.  I think  Metro, Cricket and Virgin mobile can activate it.

Quote
BTW, did you know that Motorola paid George Lucas for the right to use the word "Droid"?

yeah, Verizon even had an R2D2 version with Star Wars theme and even the back of the phone had an R2D2 graphic:

http://www.amazon.com/dp/B004H4XGH4/?tag=hydrawireless-20

The geek side of me, really liked it!  ;D
Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #16 on: August 20, 2013, 02:33:39 PM »
Well, it seems I was getting the same error with the Java app. Then I reset my router (which is built into my modem) and suddenly the Java app works, showing port mappings of other programs as well. This is nice, just to be able to see what's being mapped.

So VDJ's UPnP code is still throwing errors, but different ones. With a little work I should be able to get it working internally. I didn't realize my router needed to be reset - possibly from me playing with UPnP and VPNs so much, it just needed to start fresh.

Now that I know this, that will be the first recommendation for users if the UPnP isn't working (once I get it actually working) - Reset the Router. Even without passwords etc, I don't see why a bar owner wouldn't let you quickly power-cycle the router/modem...

So it's really, really coming along now. I'll have VDJ automatically determine if it's world-accessible via vdj.net or not, and generate the QR code accordingly. I think when it's shown on the screen as the main background, I'll put the URL that is encoded underneath it, so there's no confusion as to where it will take you.

I still like the "2 singers w/pic + QR" idea too... will work on that and post a screenshot tonight or tomorrow.

--

You posted while I was typing (Love that SMF warns you about that). Yeah, the transferring ESN or whatever is difficult, and not something I'm going to mess with right now. Last thing I need to do is brick this thing before my app is done ;) For now it's just a way to test the app, and watch South Park on Hulu Plus while I'm taking care of... let's just say my morning routine  ;D

PS - just remembered I have a good Netgear lying around (don't use it anymore since the new Comcast modem has built-in WiFi). I might try with that and see if I get different results and/or different error messages... will help in the troubleshooting of this UPnP nightmare...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #17 on: August 20, 2013, 02:41:28 PM »
Okay now my mind is totally on UPnP. One interesting thing is that my Linux box (DVR) uses UPnP so that, if I had, say, an Android device, I could watch my shows, schedule recordings, etc from literally anywhere in the world. Also uTorrent uses UPnP, and its mappings show in that Java app. So I know this is all very much possible, and in common use. The code to make it happen just isn't easy to come by.

So like the others, once I figure it out, I will keep that code to myself... software is a dirty business lol :) But I'm confident that within a day or two I'll have this working, and gone will be the days of logging into the router and forwarding ports.

I was thinking that *maybe* I can have VDJ listen both on port 80 (for local use) as well as some random high port (for vdj.net server). My thinking is that the DJ himself might want to use the app too, and it's a heck of a lot faster (plus no ads) when you are on the local network. It's no big deal to bind to and listen on two (or more) ports simultaneously.

Good pointer on that Java app Fabio - even though I won't use it as a "middle man" to set up the forwarding, it's proven to be a very useful tool in troubleshooting my own UPnP code.
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #18 on: August 20, 2013, 03:19:33 PM »
Quote
I still like the "2 singers w/pic + QR" idea too... will work on that and post a screenshot tonight or tomorrow
bottom

You can also do a 5  or 6 singer list (no pic) with QR.

Or what would be best is to generate it on the lower right corner (or left) of the screen as part of the bottom note...or maybe you can add a variable on the note so it can be placed anywhere (top or bottom).  This way it's always on the screen while people are singing, they don't have to wait until the end of the song.
Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #19 on: August 20, 2013, 04:01:08 PM »
I think if we put it in with the text, it would end up being too small... they'd have to get right up on the screen to get a good capture...

I always have my laptop hooked up to my living room LCD TV as a second monitor, so I can play around with this and try to find what works. I could possibly use the lowest-resolution format of QR code, which is only 21x21 pixels, and *should* be compatible with any device with a QR reader (they go as high as 141x141 pixels; think UPS package labels)... so that could be scaled to, say, double (to account for any re-sizing done by the monitor) making it only 42x42... I was settling on 25x25 as it has a bit more error-correction embedded in the code, making for less false-positives.

I'll play around with it after I figure out this UPnP thing. I'm finding myself having to reboot my router quite often - I hope it's only because I keep attempting to map a port and failing... once I get this working hopefully that won't be an issue.

Now that I think about it... if you are on a 16:9 TV, and you are set to maintain 4:3 aspect for  Karaoke... it could be on the unused "black bar" area of the screen... let me experiment a bit. I'll post a few screenshots and let you guys vote on what you think is best (or, make several options available).

As for the "text only" upcoming singers, with QR on the screen underneath - I like that idea as well... so many possibilities. I just don't want to have an entire options screen with a hundred ways to show the QR code, causing confusion to the DJ... so I think we'll find a couple or three "best" options, and let the DJ choose from those.
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #20 on: August 20, 2013, 06:07:37 PM »
After a couple more hours fighting with UPnP, I find out that it is actually implemented in an API in Windows XP and up, that is available to both C++ and VB6... it's just not well documented (the sample VB code provided is for ASP.NET, eg, web server apps... who the heck would run a web server on Windows???)

Anyway, I'm running into yet another problem with the fact that I am still using Visual Studio 6.0, circa 1998. Why? It's what I wrote VDJ with (a hybrid of Visual Basic and Visual C++, along with some good old 'C'). When they did away with VB6, they provided no migration of your code from VB6 to .NET, circa 2005. Because apparently any code that is 7 years old is no longer valid. So I've been stuck using the same, 1998 development environment unless I'm willing to completely rewrite my program - which is 15 years in the making. 15 years of working around various Windows quirks, coming up with ingenious hacks to make things work the way I need them to, and so on. 15 years of finding inventive ways to utilize new Windows features in an out-dated development environment.

I'm not about to try to rewrite it in a new language, and attempt to re-implement every little thing I've done, hoping for a bug-free and functional program...

So, my little setup works. I can't read the help files (Windows no longer supports WinHelp files as of, say, 2003) but it's all online somewhere. The compiler tools still work and most likely will for the foreseeable future. But any time I find sample code, it's always for VB.NET or C#, neither of which I have any intention of learning. The vast majority of my code is in plain-old C.

Notice, by the way, that on any other operating system, you can reliable compile and execute code written 30 years ago. They don't just go change the language every couple of years. If you had the source code to the Unix command 'ls', which has not changed in over 30 years, you could still compile it for a new platform. Microsoft has ADHD, and has to constantly change everything around, even at a low-level programmer's interface.

Luckily my environment still works well, but when it comes to implementing relatively new concepts such as UPnP, or IPv6 technology (not looking forward to having to do that), it becomes very much a hassle. Usually once I figure it out, it's done and I don't have to muck with it anymore. And I've done this time and time again, and will in the future... I just hate *this* part, where I'm stuck trying to figure out something new, and hitting all kinds of dead-ends. Once I figure it out, I comment my code very well so that if I ever do have to dig into that section again, I know what I was thinking at the time it was written. Some of my hacks look like they make no sense, unless you read the comment lines.

Just needed to rant for a minute. I figure, hey, they're my forums :)  In the end, I'll figure it out, and all the frustration will have been worth it. I just felt the need to Microsoft-bash and vent for a minute. Feeling better already :)

Gonna take a break and watch a little TV, refocus my eyes, and conquer this UPnP thing once and for all by the end of the night...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #21 on: August 20, 2013, 07:21:02 PM »
Lol....you gotta rant sometimes to feel better.

I don't know why MS does that kind crap...they even do that with their OSes...I remember if you had XP you couldn't upgrade to Vista....you had to start clean.  Granted Vista was a piece of crap compared to XP and 7....and also upgrading is sometimes not recommended...it's better to start clean.  I think they knew it would break everything, that's why they quickly started working on 7.

Quote
if you are on a 16:9 TV, and you are set to maintain 4:3 aspect for  Karaoke... it could be on the unused "black bar" area of the screen

I actually use the 16:9 setting and looks and works just fine....but I didn't know you could put stuff on the black bars on the sides...if that's the case why not use it for the QR code...also you can display on the other bar the next singer or anything else.

Justin, I'm sure you'll figure this uPnP thing out...it may take you some time though...




Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #22 on: August 20, 2013, 07:58:55 PM »
Well I'm getting very close now. Here's what I've done:

The example source code I found is very good, and their sample (a console (command-line) application) successfully opens a port.

To compile it, I had to install Visual Studio 2012, quite a bit newer than my 1998 setup. Luckily they work side-by-side w/o conflicts. So I'm trying to convert it to a .DLL file that I can just call from my program. I'm *very* close to a solution. **FINGERS CROSSED**

I remember when Vista came out, I paid $200 at Best Buy to get a copy of Vista Business (aka Professional). Even though the package said it was an "upgrade" version, that only meant that I had to provide my old XP key to the installer - it would not do an in-place upgrade. They changed so much that it just wasn't possible to retain all your settings (now we're back to the "visualization" issue, a very major change in Windows' inner workings).

In all, I hate to admit, these changes have solved a lot of "DLL Hell" problems... I haven't had to do an OS re-install since before XP. In the Win98 days this was a bi-monthly ritual... Put on a pot of coffee, pop a movie in the DVD player (or VCR), since the installation will complete in "30 minutes" (HAH!)... but now I couldn't imagine actually re-installing Windows because of a blue-screen issue or what not. I don't miss those days... so at least they got on the right path, even if it meant saying "screw you" to "legacy" users...

But back to the programming environment: It's sad, really, that VB6 was the last of the original Visual Basic programming languages, and IMO the best, and they suddenly dropped support for it in favor of this .NET crap, with no way to migrate or upgrade existing applications without a full rewrite. And since this was almost 10 years ago, I have invested another 10 years of coding time into my VB6 program. Digging the hole deeper. Things like multi-core processors, hyperthreading, and a ton of other new things have come out since then that I've had to create work-arounds for... and have done so successfully. Vista/7/8 changed the audio subsystem, and I worked around that. They also changed the display subsystem so much that I had to rewrite my display code to work. And still, I truck along, making a very modern application in an out-dated development environment.

And I like it that way :) I'm very old-school, but I embrace new technologies (QR codes, UPnP, web-apps, anti-aliased Karaoke display, multi-monitor/multi-sound card, etc etc).

So... I've had my break, I'm going to allow a couple more hours tonight to figure this out (my girlfriend is getting frustrated with me spending so much time on the computer, though she does understand it's our bread 'n' butter). If I can make a simple UPnP DLL that I can call, and just say "Open this port on this IP", that would be absolutely perfect. And I'm pretty sure it can and will be done very soon...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #23 on: August 20, 2013, 08:05:33 PM »
Couple minor points... first, the reason I prefer a .DLL is that I can call it from the same process. If I call up a console application silently in the background, you will get TWO pop-ups of the Windows Firewall the first time you run it, one asking if "upnp.exe" is allowed access, and a second for "vdj.exe". That solution is just not acceptable. Plus, I need to *close* that connection if you change ports, otherwise you end up with my situation, where the router just gets confused.

Second point I forgot to mention - VS2012 is available for free from Microsoft, which is the only reason I installed it. My Visual Studio '98 setup cost me $600 back in 1998, they didn't have anything available free. It seems like Microsoft is taking the hint from the Unix/Linux/Mac community, where all development tools should be free (remember the famous speech where Steve Ballmer said "Developers, Developers, Developers!")... I mean come on, the Mac comes with all development tools preinstalled. By developing applications, you promote the platform. So Microsoft finally offers their "express" tools for free (which are quite all-inclusive actually)...

I may at some point migrate my C/C++ code to the 2012 studio, as I'm starting to like the environment... but my VB stays the same until I decide to rewrite it in C++ one day...

Okay, break time is over... off to conquer UPnP once and for all!
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #24 on: August 20, 2013, 11:38:48 PM »
It's 1:30 AM my time, and I'm gonna stop for the day... but here's what I've got so far: there IS a very simple 3 lines of code for VB6 to initiate UPnP to set up a port forward. My router has UPnP enabled. When I enable the server in VDJ, the Java app shows "Virtual DJ Studio" as having port 8080 forwarded to my laptop's IP (and I've tried many different ports, restarted the router and my laptop many times).

Yet - I can't connect to it from outside the local network. The mapping is in place, I even tried completely disabling the firewall... nothing. I know I am doing everything right, but damned if I can connect to my laptop via a UPnP mapped port. I'm using the same external and internal port...

So I think this is one of those occasions where I need to close the laptop, watch a little TV and get some sleep, before the laptop (or router) somehow gets thrown out the door... lol

Fresh eyes are always a good way to resolve a problem when you're just too close to it. I'm sure I'll see something and say to myself "DUH!" when I find it. Again I know it works and I know it's common practice, at least for a couple applications, so it's there. I'm so close... the port shows open and forwarded... but something is making this not work. I'm sure I'll figure it out...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #25 on: August 21, 2013, 12:00:14 AM »
Damn, I think I've got it!  I need to look into what ports are *allowed* to be forwarded. If I try to forward port 8080, 45654, 44101, etc, it never works. But if I just go back to good old port 80 -- which is only forwarded via UPnP (I deleted the manual port forward in the router) -- it works!

I think, by George, I've got it :)  I may be a bit delirious from lack of sleep but I think it's finally fixed. It does NOT work on ports other than 80 (maybe it's my router), and I've tried from many sources.

So right now, if you go to http://vdj.net/dj/jman/ it goes to my laptop, with no manual port forwarding at all. Just UPnP.

Told you I'd get it figured out by the end of the night (for you guys on Pacific time, it's still tonight for like 3 minutes :) )

Now I can sleep. When I try to go to bed with a major problem still in my head, I dream code and can't sleep... so problem solved!!!

I will research if there are specific ports allowed on UPnP, but for now I know that port 80 (default HTTP port) works, and lets it work on both the server *and* the local IP... win-win!

PS - I've rebooted the router, my laptop, and removed ALL VDJ entries from the firewall to be sure. First time launching VDJ after that it asked if VDJ was allowed, etc blah normal Windows crap. Click allow, and voila, everything just works. If it works with my crappy (but super-fast) Comcast router, it should work on any setup with UPnP enabled. Most modern routers/access points will have this enabled by default, so I think we're golden...
« Last Edit: August 21, 2013, 12:06:27 AM by Justin »
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #26 on: August 21, 2013, 12:39:22 AM »
Just did a lot more testing (restarted the router, confirmed that port 80 is no longer manually forwarded, rebooted laptop, accessed via the Android, etc). I think this is the answer I've been looking for.

So from some Googling, it seems that most modern routers do in fact enable this by default. This is why file sharing/torrent applications work out of the box. So I don't think we even need much of a tutorial on how to enable this feature; it was designed to replace the need for manual port forwarding, for gaming, P2P filesharing apps, etc. Unless the bar owner has a really old router, no configuration changes should ever be needed.

So now, you can literally just "plug 'n' play", with the QR code displayed somewhere (we'll figure out exactly where) and it's just "snap" and they're making requests, searching your database, and sending notes to the DJ without bugging him/her. Makes the DJ look all kinds of high tech, and makes the customers feel important too... exactly what I was going for.

Maybe it's the lack of sleep (it's 2:35AM here) but dammit, this UPnP thing and the QR code thing were both just pipe dreams a couple of days ago, and now they are part of Virtual DJ Studio 7.0... After I do sleep, sometime tomorrow afternoon a few of you will get an email with a BETA version to test out and provide feedback on. The BETA will install along-side the current 6.x version as an independent program (in other words, it won't affect your 6.x install at all) so you can test it on your own terms and let me know what you think. I'm curious if the UPnP thing works for few, some, most, or all users...

Gonna close the lid on the laptop now, time to crash out for a few hours...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Fabio

  • Administrator
  • Hero Member
  • *****
  • Posts: 757
  • Karma: 11
    • View Profile
Re: Busy as heck working on 7.0...
« Reply #27 on: August 21, 2013, 12:58:48 AM »
Good going man...you did it.  Now you just have to lock down the details.  ;)

I had to step away from the computer too...my wife is like your girlfriend...while my bread and butter is my day job, the karaoke brings the jelly  ;D and she also knows that...

I tried the port mapper java app and at first it was not able to connect.  I had to go into my router and enable UPnP.  It was not enabled by default.  I do have  DD-WRT firmware installed on my router so maybe DD-WRT doesn't enable it by default.  We just gotta hope that most places have the default firmware.

Glad the 7.0 version will work along side 6.x version...looking forward to playing with it!
 

Fabio Q.
Shooting Star Karaoke

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #28 on: August 21, 2013, 01:12:03 AM »
Last time I tried DD-WRT I Bricked my Linksys WRTG router, with no chance of recovery. It boiled down to a minor version difference... which was why I was a little shy about rooting the DroidX. So I have never had the pleasure of actually using DD-WRT. There is not a version for my particular Netgear router (it shows as a Work In Progress).

But I do believe most routers have UPnP enabled by default now days. My Comcast router can go months without a restart, but when I start playing with this too much it requires a restart. I hope that's only because I'm doing a lot of Trial & Error (with emphasis on the Error part). Since my last post I did one last reboot, as I wanted to make sure it would work with my laptop having a different IP address, and sure enough, I think I've got it nailed. My server is able to connect to my VDJ regardless of its local IP or port, as UPnP is taking care of it.

Still makes me sick that it ended up being 3 lines of Visual Basic code to make it work -- all the groundwork was already there. Just poor documentation. Now that I found it and it works, I can move on to the next steps to making 7.0 a reality (updated/larger graphics/fonts, etc). I will release a BETA for you guys soon, with the web app, QR code generation, etc that has already been implemented and tested. I'd also be curious how well the UPnP stuff works in the "real world"...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/

Offline Justin

  • Site Administrator
  • Administrator
  • Hero Member
  • *****
  • Posts: 951
  • Karma: 11
    • View Profile
    • Virtual DJ Studio
Re: Busy as heck working on 7.0...
« Reply #29 on: August 21, 2013, 08:15:48 AM »
After a few hours of sleep, I've done a little research about this modem of mine, and it turns out I'm not crazy. The fact that it keeps losing UPnP portmappings is NOT something I am doing wrong, it's a common problem.

Apparently I can call Comcast and request that they disable the WiFi radio and put the modem in "bridge mode", so that I can just use my much better Netgear WNR1000. I need the modem to just be a modem and nothing more. Even the signal strength on the WiFi sucks, where my Netgear reaches clear down the street...
-- Justin Nelson, CEO
   Next Generation Software, Inc.
   http://www.vdj.net/