Setting up a Raspberry Pi for a work project that requires running an old DOS program

Recommended Posts

markjensen    94

I don't have any questions, I am just posting about a project I am starting to run an orphaned DOS program that could run in Windows up to XP, but work isn't providing the hardware/software needed any more, except one legacy laptop that needs to keep getting shipped out as-needed.

Our IT department has tried to get an Oracle VM to run virtual XP, and that worked briefly, but was terribly temperamental and even having the external USB/Ethernet adapter plugged or not plugged would cause the VM to fail. It also had other issues with reliability that other people in my department have run into when trying to get it working.

I have a Raspberry Pi B, and it has a serial port (required for this legacy program), but it defaults to spitting out kernel messages at boot and being a TTY for emergency login purposes.  This can be shut off and repurposed, and I am currently doing so.  I am starting with the "lite" edition of Raspbian Stretch, and doing things like setting up an SSH server to login from a PC over ethernet (for in the field troubleshooting, should there be problems), and VNC server for using when the Pi is running dosbox. Since dosbox seems to require running in a GUI window (I may be wrong on this, but at first look, it appears to), I am installing a light window manger - fluxbox.

I intend to have the Pi auto-login and start the legacy program when booted, so it should work as-is.  But, for the guys in my group that like to drive the ship and change options on the fly in the field, I think a VNC connection would suit just fine.  (maybe if this goes well, I could get a small LCD display and micro keyboard to integrate into the project...)

It makes me more than a little sad to see the Neowin Linux forums so barren.  There were no posts in this forum (other than the pinned "Which Distro" forum) in two weeks.

 

Cheers!

Share this post


Link to post
Share on other sites
Barney T.    2,184

Nice post, Mark! I will follow this as you move forward. I also miss the Linux subforums being busier. Not sure if it is members moving to other platforms or other reasons. I am still a huge Linux fan. Xubuntu is still my favorite!

Share this post


Link to post
Share on other sites
Mindovermaster    1,220

I still use Mint 18.2, but it's just that I haven't had any issues...

Share this post


Link to post
Share on other sites
+BudMan    3,032

I like this sort of post.. Just a good reason to start a discussion etc..

 

If the section needs traffic, guess I could post up some of the stuff I have been doing in the linux area.. Latest project was running litecoin node on one of my pi's just for something to do on it, etc. Not sure if keep it running its a on a pi2 and its a bit underpowered ;)

 

Could go over setting up netdata which is pretty slick way to get lots of info about your linux boxes, etc..

 

When I get around to it want to move my pi zero to be monitoring my ups I just moved into my av cab, etc.

 

To be honest I am more curious to the specific of this antiquated software you need to maintain ;)  Vs any details of how you are setting up in linux..

Share this post


Link to post
Share on other sites
InsaneNutter    1,003

Interesting project!

 

I'm currently making use of Raspberry Pi 3 Model B's around our office, these boot up and start streaming various rtsp CCTV feeds from our UniFi Video CCTV system. Each office has a 27" wall mounted monitor, with a Pi connected to it.

 

The streams differ depending on who's office it is, mainly this allows people to see if their's anyone in the showroom who might need attending to. I've found the Pi can multiplex 6-9 streams at 30fps on a 1080p screen perfectly.

Share this post


Link to post
Share on other sites
markjensen    94
9 hours ago, BudMan said:

I like this sort of post.. Just a good reason to start a discussion etc..

...

To be honest I am more curious to the specific of this antiquated software you need to maintain ;)  Vs any details of how you are setting up in linux..

I thought it would be interesting to share a real-world application in (near) real time.  I travel a lot for work, and often long hours, so when I get home, and I get the chance to play I can update until project completion.

As for the legacy software, I can imagine this falls in where a large number do.  I need to talk to older robots that customers still have running production. But these units are old enough that RS-232 was the method of communication (including important features like backing up or restoring files in the event of hardware replacement or other failure requires it). It has a vendor-specific protocol, so I can't use commercially available (or Open Source) software as a substitute for this program.  That leaves keeping an old laptop around with obsolete Windows for this purpose (which my company does, and FedExes it around where it is needed), or running in a VM in a current Windows environment (which has been problematic), or trying it in Linux using dosbox.  It works in dosbox, as tested on a laptop running Ubuntu.  But every tech could easily be running different hardware, and one should not have to go though a lot of Linux-y work to set up dual boot (which is against IT policy, and these are their computers), or I was thinking inexpensive commodity hardware could do the trick.

I've set up fstab so I think it will automount a USB stick presenting itself as /dev/sda, mounting the first (and likely only, if using a USB stick) to a mount point already declared as /mnt/usbstick.  I have yet to do all the dosbox setup to mount that as C:, but I have done that once before it is pretty trivial.  Just need to test it all when done to make sure it is reasonably bulletproof.

I'm at the point now where I am trying to get a vncviewer to log in and display X. I dealt with the free version not supporting encryption, and added settings on the Pi to not require encryption. But I get a small black window, instead of the fluxbox environment I see when I am locally on the Pi and startx.

 

Hardware wise, I know I need to get something to bring up the 3.3V serial levels to at least TTL levels, since we have been able to use USB serial adapters in Windows before, so the robots are able to communicate with devices that only send 5V.

If there are any thoughts on this, I'd appreciate the guidance, otherwise I will just recheck what I am doing to see if I overlooked something.  :)

Share this post


Link to post
Share on other sites
markjensen    94
9 hours ago, InsaneNutter said:

Interesting project!

 

I'm currently making use of Raspberry Pi 3 Model B's around our office, these boot up and start streaming various rtsp CCTV feeds from our UniFi Video CCTV system. Each office has a 27" wall mounted monitor, with a Pi connected to it.

 

The streams differ depending on who's office it is, mainly this allows people to see if their's anyone in the showroom who might need attending to. I've found the Pi can multiplex 6-9 streams at 30fps on a 1080p screen perfectly.

I like that use!  I have always thought that a Pi attached right to the back of a TV is a great way to do networked video (or even corporate displays that maybe show powerpoint type marketing stuff, or interactive information kiosks).

Share this post


Link to post
Share on other sites
+BudMan    3,032

To be honest pi doesn't seem like the best option for such a project..

 

Why does it need to be a OLDER laptop... Why not just run your software in a vm...  What VM software have you tried.. Why are you running the vm software in XP..  Just use whatever OS you want on the hardware that has the connection you need... You could for sure use a usb to rs232 adapter I would think even.

 

You could then use virtualbox, qemu, vmware, parallels, etc. etc.. many of them support all 3 OSes, etc. 

 

I would for sure think you should have no problems with say vmware workstation.. Small price to pay to be able to just have anyone on their current laptop fire up a virtual machine, etc.  Why would you fedex something like this around?  Anyone anywhere could just download the VM image fire up on whatever laptop is around, etc.

Share this post


Link to post
Share on other sites
markjensen    94

Yes, if the VM was reliable or supported by our IT department.  It's been temperamental, and fails if you don't have the Apple usb/ethernet adapter plugged in, etc.  Our IT installed Oracle for us, and the machines we have are otherwise locked down.  They do NOT (oddly enough) support running the old company software in that virtual machine.  That is left to us individually to get it working again when it fails.

 

It is an absolutely awful situation to be in, and I am tired of feeling powerless in getting this to work. It worked in VM for maybe 6 months then suddenly stopped.  I made sure that the host Windows 10 serial port hadn't changed COM ports for any weird reason, and that it was mapped through to the Virtual XP.

 

And, yes, FedExing an old laptop here and there is perhaps the worst solution of all, and that is what I want to improve.

Even if only for me, and let the other guys decide if they want to even bother.

 

The number of these really old robots that only talk on RS-232 is dwindling, and most of the newer guys probably aren't assigned to them much when an older tech like myself is available to go. Maybe some guys never see a serial port, and others need this twice a year or so.

 

I guess, like most of the theory of Open Source Software, this is my itch. And I need to scratch it because I am tired of banging my head against my Oracle VM which no longer functions properly, and asking for "the old laptop" to be FedExed to a customer I'm heading to that runs really old robots.

 

Offtopic, but if you are into figuring out what's wrong with a VM, I am willing to discuss further (in another thread, since it would be more appropriate) this issue with my virtual XP. It runs, and everything seems good. But it just doesn't work.  It's like the cables (usb serial adapter and null modem) are bad. But they aren't, as I have exchanged hardware there and it just doesn't work.

Share this post


Link to post
Share on other sites
+BudMan    3,032

What did the software originally run on. Dos 6.22 ?  Concurrent Dos, something else?

 

Why bother with the XP at all - why not just run the VM the software designed to run on?  But sure be happy to join in another thread working with that.  There is the vm section which seems appropriate for such a topic ;)  It doesn't get much love either.. hehehehe

Share this post


Link to post
Share on other sites
markjensen    94

It is a dos program. I remember running it when I used Windows 3.11.  The OS and the rest of the computing world has moved on.  This has not.  :p

Share this post


Link to post
Share on other sites
+BudMan    3,032

You can run dos 6.22 on VM easy enough...   Or how about just boot it from usb stick ;)  So as long as your hardware has the correct port for your rs232 connection.

Share this post


Link to post
Share on other sites
markjensen    94

It's a Surface tablet, with one usb port. I use a usb serial adapter that has generally worked fine.  Since the tablet is owned (and locked down) by the company, there isn't a lot I can do, and near as I can tell, even DOS isn't legally available for free (maybe it is for subscribers/members of TechNet or such).  And the other guys report the same problems with using a virtualized environment to work reliably.

Unless you think that the problem is with the XP part?  Not just the virtualization software and configuration?

Share this post


Link to post
Share on other sites
markjensen    94

As far as the progress on the Pi goes, I have problems getting VNC to work right.  Part of the problem is the default setting of the vncserver on the Pi is for Encryption=AlwaysOn, and the free version of vncviewer isn't capable of encryption, so I kept getting kicked out before I could even try logging in.  Googled and found that setting, and it now prompts for password, but when entered and connected, I get a small black rectangle, with the mouse cursor.
 

vnc-blackscreen.png

Share this post


Link to post
Share on other sites
markjensen    94
6 hours ago, BudMan said:

You can run dos 6.22 on VM easy enough...   Or how about just boot it from usb stick ;)  So as long as your hardware has the correct port for your rs232 connection.

I have tested a DOS 6.22 install in Virtualbox, using questionably-sourced install media.  Just for testing, so morally, I feel only slightly wrong. That was the easy part, though.

I have DOS.  Just DOS.  I cannot access USB (even trying to map storage), and Shared Folders with the host is also a no-go.  As is network access.

I think I could create a filesystem image that I could connect to, in order to get the legacy program into the virtual DOS.  But then every tech would need to do similar wrangling, since I think plugging in USB hotswapping would not work.

Then, even if this were successful, I would anticipate the same temperamental issues that virtualization has provided for XP for all of us traveling techs.

Share this post


Link to post
Share on other sites
+BudMan    3,032

Why are you stuck using VB?  There are multiple VM hosting options other than this... Windows 7 has built in XP mode VM that should be able to run your software..

 

https://technet.microsoft.com/en-us/library/hh859554.aspx

Windows 7: Load and Configure Windows XP Mode

Share this post


Link to post
Share on other sites
markjensen    94
2 minutes ago, BudMan said:

Why are you stuck using VB?  There are multiple VM hosting options other than this... Windows 7 has built in XP mode VM that should be able to run your software..

 

https://technet.microsoft.com/en-us/library/hh859554.aspx

Windows 7: Load and Configure Windows XP Mode

Not my computer.  No permissions to install programs. It pops up a box saying the action is blocked, and provides an optional submission form for requesting administrator review of the program if I feel there is a business need for it.

Share this post


Link to post
Share on other sites
+BudMan    3,032

Sure seems like a business need to me ;)  Our systems are locked down too - but they allow us to install and use VM.. They have to use a wifi card to get on any network.. or a usb nic so they are isolated from work network, etc.  Ie we can get on the internet via guest wifi for internet, etc.

 

If at customer site we can fire up a vm and get on customer network with that, etc. etc.

Share this post


Link to post
Share on other sites
markjensen    94

Solved the VNC issue.  The problem I encountered was due to the raspi-config utility sets up vncserver as a service, and I had the same problems when running it as a user and trying to connect to the display :1 it created.

The solution was to disable that service, and I ran the command

sudo systemctl enable vncserver-x11-serviced

which set up the vncserver-x11 service daemon to start on init.

Share this post


Link to post
Share on other sites
Matthew S.    263
On 1/23/2018 at 9:00 PM, markjensen said:

I have tested a DOS 6.22 install in Virtualbox, using questionably-sourced install media.  Just for testing, so morally, I feel only slightly wrong. That was the easy part, though.

I have DOS.  Just DOS.  I cannot access USB (even trying to map storage), and Shared Folders with the host is also a no-go.  As is network access.

I think I could create a filesystem image that I could connect to, in order to get the legacy program into the virtual DOS.  But then every tech would need to do similar wrangling, since I think plugging in USB hotswapping would not work.

Then, even if this were successful, I would anticipate the same temperamental issues that virtualization has provided for XP for all of us traveling techs.

Did you ever think of giving freedos a shot in the vm and see if that would work?

Share this post


Link to post
Share on other sites
markjensen    94
2 hours ago, Matthew S. said:

Did you ever think of giving freedos a shot in the vm and see if that would work?

A quick look shows it has network support, so that is good, but it does not seem to support swappable USB storage media (just to boot from, like a hard drive).  It won't cost much time to install and play, thanks!

Share this post


Link to post
Share on other sites
Unobscured Vision    2,276

Possibly look into the industrial form-factor 486-DX4 and Pentium-4 boards that are still made and still supported ... stackable modules for whatever is needed, too. Small form factor, runs DOS 6.22 and 7.1, IBM-DOS, Win 3.11, Win-95/98 and OS/2 .. even XP (though it's slow) ... pretty awesome the hardware and software that's been made for those. Even has SD-Card support at the BIOS level. We've been messing around with those in the lab and they are VERY good.

 

AND they have GPIO headers with tons of documentation. Not Pi-compatible OOTB, but they can be made to communicate at least.

 

Very low-cost, very easily-obtained and quite extendable. :yes: And talk about compatible ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.