libftdi Archives

Subject: Re: How to install libftdi under Win7

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 16 Feb 2013 21:01:43 +0800
On Sat, Feb 16, 2013 at 8:12 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Sat, Feb 16, 2013 at 7:25 PM, Robert Schilling <Fun_Extra_300@xxxxxxx> 
> wrote:
>> Hi guys,
>>
>> I got the newest binary release for Windows from:
>> http://code.google.com/p/picusb/downloads/list, 
>> libftdi1-1.0_devkit_mingw32.zip
>>
>> For my environment I'm using python. The question is how to install
>> libftdi properly outgoing from the binary package above for using
>> with python?
>
> Normally you need to copy libftdi1.dll and libusb-1.0.dll to either
> the 32bit Python directory or the system wide Windows\System32
> (for 32bit Windows) or Windows\SysWow64 (for 64bit Windows)
> directory. And then you copy the Python binding to the Python
> Lib\site-packages.
>
> I have not tested the Python bindings myself. Please let me
> know if it works for you or not.

I just tried under Windows 8 x64 and 32bit Python 2.7.3,
it seems to work fine. I tried the examples in the libftdi1-1.0
distribution (simple.py and complete.py). There seems to
be a problem with complete.py though with regard to the
following line. Commenting out the line and everything is okay.
   print ( 'version: %s\n' % ftdi.__version__  )

c:\work\libftdi\libftdi\examples\python>path=%path%;c:\Python27_x86

c:\work\libftdi\libftdi\examples\python>python simple.py
[FTDI version] major: 1, minor: 0, micro: 0, version_str: 1.0,
snapshot_str: unknown
ftdi.usb_open(): 0
ftdi.set_baudrate(): 0

c:\work\libftdi\libftdi\examples\python>python complete.py
Traceback (most recent call last):
  File "complete.py", line 17, in <module>
    print ( 'version: %s\n' % ftdi.__version__  )
AttributeError: 'module' object has no attribute '__version__'

c:\work\libftdi\libftdi\examples\python>python complete.py
devices: 1
#0: manufacturer="FTDI" description="FT232R USB UART" serial="A8007Ub5"

turning everything on
turning everything off

enabling bit #0 (0x01)
enabling bit #1 (0x02)
enabling bit #2 (0x04)
enabling bit #3 (0x08)
enabling bit #4 (0x10)
enabling bit #5 (0x20)
enabling bit #6 (0x40)
enabling bit #7 (0x80)

pins: 0xff
chip id: 30b7ef1

eeprom @ 1: 0x0403

eeprom:
00 40 03 04 01 60 00 00
a0 2d 08 00 00 00 98 0a
a2 20 c2 12 23 10 05 00
0a 03 46 00 54 00 44 00
49 00 20 03 46 00 54 00
32 00 33 00 32 00 52 00
20 00 55 00 53 00 42 00
20 00 55 00 41 00 52 00
54 00 12 03 41 00 38 00
30 00 30 00 37 00 55 00
62 00 35 00 c9 bf 1c 80
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 0f 23

device closed

> If it works, I can build 64bit Python bindings as well.



-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread