Capitalize on your rich experience with embedded hardware and software development. At 50 I'm pretty sure you have a wealth of contacts from people in that field (people you consulted for, past work buddies, etc.) warm them up and make contact: you now have a client/referral list. Ask them how they're doing, take them out for coffee. Discuss what they're currently doing and what they need help with. Start with one tiny project.
Ask your wife for a little help, ask her for some contacts. Talk to others in your field, take them out for breakfast or lunch, offer to speak in an event, you can offer consulting or training workshops.
Go back to building a business, it's your best bet, and you've done it before. Outsource the bulk of your work into your other known contacts that can refer you to high-end consulting shops in the South-east asian or Indian region. Disclaimer: I'm from the Philippines. It's 2013, there's so much more tools for remote collaboration than it was a decade ago, you'll get a good english speaking/writing workforce for less than US salary rates.
Don't study unless you really really want to. 4+ years is a lot of time. You could have made another business up and running at that amount of time.
Don't shift specializations just because of current market trends. Who knows, hardware might boom in the next decade. Honestly, currently, the web itself and all mobile app stores are over-saturated with everyone trying to make a dent.
The point is, no one can predict what is going to happen in the next 10 years, just stick with what you know and what you can do to answer a need from your contacts. If a specific "solution" you're offering picks up traction, "productize" it and put a little more focus on that, but don't bank the entire consulting shop for a product unless it dwarfs your consulting revenue by 3x-5x. Consulting cultivates client relationships, and business is all about building professional relationships that would earn you more money.
I'm not 50, I'm only 26, the 50+ year old people I know end up in three ways:
- Teaching (writing books with their knowledge, offering workshops, teaching in universities, etc.)
- Retired
- Business
Again, I'm only 26. Take the input with a grain of salt.