Page 1 of 1

pyDrivewire - another drivewire server solution

Posted: Tue Apr 25, 2017 6:56 pm
by tjewell
Hi all you Drivewire users, thought you might be interested in this:

https://github.com/n6il/pyDriveWire/

Not my project, I found out about it on the Coco list. It looks good on paper, although I'm having trouble getting it running at the moment - I hope I can, my Python skills are not quite as poor as my Java skills, and hopefully this project will be easier to work on.

Cheers, Tony

Re: pyDrivewire - another drivewire server solution

Posted: Wed Apr 26, 2017 11:49 am
by sorchard
I found it a complete ratbag to install on Windows.

I have python 3 installed, so I downloaded pypy 2.7 and had to manually edit the registry so that the pyserial installer could find pypy 2.7. After that, pypy still couldn't find the serial library, so I had to move the pyserial files to the correct location. Not really knowing what I was doing, I used dumb luck. It was very effective.

Finally I got a dw server up and listening on port 65504. I started xroar with a Becker port & Tormod's dwload-becker rom

It connected (Woohoo!)

It showed "cmdErr" (!Woohoo)

Sadly, opcode 0x01 (OP_NAMEOBJ_MOUNT) is not implemented, meaning it doesn't work with Tormod's drivewire client. Though it would probably be fairly easy to add for someone who is experienced with python...

Re: pyDrivewire - another drivewire server solution

Posted: Wed Apr 26, 2017 12:20 pm
by sorchard
For info jedie wrote a python 3 dwload server a while back:

https://github.com/6809/DwLoadServer

Re: pyDrivewire - another drivewire server solution

Posted: Wed Apr 26, 2017 9:59 pm
by sorchard
If anyone wants to hack around with this in windows, I found a slightly easier way to install it, without interfering with any existing python installation:

Download the win32 python 2.7 compatible pypy from http://www.pypy.org/download.html

Extract it somewhere and rename to a short path for convenience e.g. c:\pypy2

Download the win32 pyserial for 2.7 from https://pypi.python.org/pypi/pyserial/2.7

Don't run the pyserial exe. Uncompress it with 7-Zip or similar.

Go into the newly uncompressed folder and copy the contents of PURELIB into c:\pypy2\site-packages

Download pyDriveWire using Tony's link above.

From within the pyDriveWire folder:

Start the server on a serial port:
c:\pypy2\pypy pyDriveWire.py COM1 57600

Start the server listening on a TCP port:
c:\pypy2\pypy pyDriveWire.py accept 65504

Re: pyDrivewire - another drivewire server solution

Posted: Thu Apr 27, 2017 6:04 pm
by tjewell
Cheers for the Windows instructions Stew - you're brave! I had enough fun getting it working on a Raspberry Pi, which you'd think would be a much more natural environment for it.

Lack of support for OP_NAMEOBJ_MOUNT is a shame, although it looks like it works with Fuzix okay. My experience of Python can be counted in hours, if that - but it's still stronger than my Java skills (I tried, and gave up, trying to fix the problem with not being able to create files on the java server). I'm in touch with the developer, so I'll see if this is on his roadmap.