Re: [kminternals] Re: Trouble running PDDemulate.py on WindowsXP (Brother 930)
- For hardware sniffing, this unit works for me:It's 5V only input, but it has protocol analyzers for async serial and a lot of other protocols.I've been very happy with mine.I don't have ownership or interest in the company that makes these, I just thought I'd mention it, since it's the tool I use.SteveOn Tue, Apr 24, 2012 at 11:01 AM, John R. Hogerhuis <jhoger@...> wrote:On Tue, Apr 24, 2012 at 8:40 AM, Steve Conklin <steve@...> wrote:I don't really have any good ideas about what the problem could be, if it's not a flow control issue.It could possibly be a difference in the way pyserial works under windows.I'm betting on a problem with pyserial and how it sets up the serial DCB structure or some plain old bug in interaction with the windows api. It sure smells like a platform dependency to me. Somebody's going to have to get in there with a protocol analyzer though to prove it.There are software-only sniffers likePortmonThat MIGHT give some clues.There seem to be a lot of these programs around. Maybe someone can recommend a good Windows one that would be worth looking at.A hardware sniffer or a software "man in the middle" two-serial-port thing is the ultimate tool for this work.-- John.
- Bart and others,I was having the exact same error on XP, "Error, write of N bytes when expecting 1024", with N around 900 from multiple attempts.I found that by changing from timeout=1 second, to timeout=10 seconds ( or timeout=none ) the problem went away.I changed this line in PDDEmulator.py to...self.ser = serial.Serial(port=cport, baudrate=9600, parity='N', stopbits=1, timeout=10, xonxoff=0, rtscts=0, dsrdtr=0)I'm using the FTDI TTL-232R-5V cable with TXD/RXD/CTS/RTS all inverted and connected with KH950i. The emulator worked fine on Mac Leopard, but not on XP. Changing the rtscts hardware flow control did not seem to make any difference.Caz
- Hi folks,
Whilst re-installing my Windows XP laptop ready to take to Maker Faire UK next month I thought that (1) it was a good idea to make sure that the software was working on my machine, and (2) that I should document it to make sure that Windows users don't feel left out. I had written down pretty ropey notes last time, and I couldn't find a site that documented the Windows side of things.
So, here goes:
Install Python 2.7.3
Install PIL 1.1.7
Install pyserial 2.6 (remembering to run the [setup.py install] command).
Plug in FTDI cable (appropriately configured, lots of info already available on that).
Point driver installer at VCP driver (ie. CDM 2.08.28 WHQL Certified).
Edit line 287 of PDDemulate.py > change timeout=1 to timeout=5 (this works for Brother 950i, 930 may require timeout=10 given previous post).
Download files from GIT (either main trunk for 930, or 950i branch for 950i).
Create a CAT batch file, or install the CoreUtils-5.3.0.exe from GnuWin32.sourceforge.net (remembering to add BIN folder to PATH).
Test saving blank pattern to computer (I used 1x1 cards = 60sts x 150 rows).
Test inserting image in to blank pattern, and save back to machine.
Test using pattern on machine.
All up and running again :-)
Happy knitting everyone,
--- In firstname.lastname@example.org, "andy.caslaw" <andy@...> wrote:
> Bart and others,
> I was having the exact same error on XP, "Error, write of N bytes when
> expecting 1024", with N around 900 from multiple attempts.
> I found that by changing from timeout=1 second, to timeout=10 seconds (
> or timeout=none ) the problem went away.
> I changed this line in PDDEmulator.py to...
> self.ser = serial.Serial(port=cport, baudrate=9600,
> parity='N', stopbits=1, timeout=10, xonxoff=0, rtscts=0, dsrdtr=0)
> I'm using the FTDI TTL-232R-5V cable with TXD/RXD/CTS/RTS all inverted
> and connected with KH950i. The emulator worked fine on Mac Leopard, but
> not on XP. Changing the rtscts hardware flow control did not seem to
> make any difference.