OpenADC capture app errors


#1

Hi! I was try runing " OpenADC capture app" with my own board LX9 and FX2 chip, that programmed as ZTEX1.11.
Application window is present, but i have many error messages in python console:

(<type ‘exceptions.ImportError’>, ImportError(‘No module named ftd2xx’,), <trace
back object at 0x03641990>)
ftd2xx import failed. Install XXX from XXX for FTDI support
update
Traceback (most recent call last):
File “C:\1\OpenADC\controlsw\python\examples\adc-capture-example.py”, line 323
, in connectClicked
if self.adccon.connect() == False:
File “C:\1\OpenADC\controlsw\python\examples\adc-capture-example.py”, line 232
, in connect
dev.set_configuration()
File “C:\Program Files\WinPython-32bit-2.7.10.2\python-2.7.10\lib\site-package
s\usb\core.py”, line 547, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File “C:\Program Files\WinPython-32bit-2.7.10.2\python-2.7.10\lib\site-package
s\usb\core.py”, line 92, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File “C:\Program Files\WinPython-32bit-2.7.10.2\python-2.7.10\lib\site-package
s\usb\backend\libusb10.py”, line 503, in set_configuration
_check(_lib.libusb_set_configuration(dev_handle, config_value))
File “C:\Program Files\WinPython-32bit-2.7.10.2\python-2.7.10\lib\site-package
s\usb\backend\libusb10.py”, line 403, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found

Do you help me? What is wrong?


#2

Hello,

Hmm… those errors seem to suggest something with the USB. Did the device enumerate OK? Can you use the ZTEX Loader app to communicate with it ok?

Thanks,

-Colin


#3

Hi, Colin!
Thanks for your responce.

Did the device enumerate OK?
Yes
2.png

Can you use the ZTEX Loader app to communicate with it ok?
Yes

C:\1\OpenADC\hdl\example_targets\ezusb-firmware\ztex-sdk\fwloader>java -cp FWLoa der.jar FWLoader -p -ii 0: bus=bus-0 device=1 (`\\.\libusb0-0001--0x221a-0x0100') ID=221a:100 Manufacturer="ZTEX" Product="OpenADC for UFM 1.11" SerialNumber="00000000 00" productID=10.12.0.0 fwVer=0 ifVer=1 bus=bus-0 device=1 (`\\.\libusb0-0001--0x221a-0x0100') ID=221a:100 Manufacturer="ZTEX" Product="OpenADC for UFM 1.11" SerialNumber="00000000 00" productID=10.12.0.0 fwVer=0 ifVer=1 FPGA configured Capabilities: EEPROM read/write FPGA configuration Flash memory support


#4

Hmm… not sure as it seems to work in that, but the call to “dev.set_configuration()” goes off. You might look at that area of the Python source code - if you can try running each line, it might give some better ideas.

Also you could try installed the “ChipWhisperer Instant” setup… it’s possible the issue is some version of the Python/USB interface (I haven’t tested everything…)


#5

It’s good idea. Have ChipWhisperer supported FX2 usb chip?


#6

Just checked now… I had forgotten to make one change for CW-Instant. To get it working with the ZTEX board you need to make a file called /etc/udev/rules.d/99-libftdi.rules with the following content:

# allow users to claim the device
SUBSYSTEM=="usb", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="8613", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="221a", ATTRS{idProduct}=="0100", MODE="0664", GROUP="plugdev"

And reboot the VM. I’ll upload a newer CW-Instant with those fixes but will take a little bit. I did confirm this works with the FX2 device (i.e. the old CW-Capture Rev2 boards).

As another note, do you get different errors if you just run the “Download CW Firmware”?


#7

Now I executed OpenADC capture on your CW VMWare ubuntu image. This is what i see from console:

cwuser@chipwhisperer-vm:~/chipwhisperer/openadc/controlsw/python/examples$ sudo python adc-capture-example.py /usr/share/themes/Lubuntu-default/gtk-2.0/apps/thunar.rc:55: error: invalid string constant "thunar-statusbar", expected valid string constant

And I have chosen FX2 and pressed down connect button:

update Traceback (most recent call last): File "adc-capture-example.py", line 330, in connectClicked self.oa.con(self.adccon.ser) File "/home/cwuser/chipwhisperer/openadc/controlsw/python/openadc/qt.py", line 234, in con self.sc = openadc.OpenADCInterface(self.ser, self.console) File "/home/cwuser/chipwhisperer/openadc/controlsw/python/openadc/openadc.py", line 758, in __init__ self.settings(); File "/home/cwuser/chipwhisperer/openadc/controlsw/python/openadc/openadc.py", line 933, in settings sets = self.sendMessage(CODE_READ, ADDR_SETTINGS) File "/home/cwuser/chipwhisperer/openadc/controlsw/python/openadc/openadc.py", line 875, in sendMessage self.serial.write(str(message)) File "adc-capture-example.py", line 262, in write self.dev.write(self.writeEP, data, self.interface, 500) TypeError: write() takes at most 4 arguments (5 given)


#8

Ah can you try running the “ChipWhisperer-Capture”? Just select the OpenADC/ChipWhisperer on the “Scope” Pull-Down, and then hit “Connect Scope”. Or press the “Download CW FW” from the “Tools” menu.

I know this works for sure… I didn’t check that script was working on my image. Just as a first-step in troubleshooting.


#9

Hi, Colin!
I have change my project with Rx-Tx interface (LX9 board base) and it working well. But I want to use FX2 interface.
I was try compiling ztex1.11 project for beginning " as is", and I have those errors

ERROR:HDLCompiler:281 - "C:/OpenADC/hdl/example_targets/ztex_1.11c_ise/ztex_example.v" Line 1: Cannot open include file "includes.v". ERROR:HDLCompiler:870 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 139: Macro <SYSTEM_CLK> is not defined. ERROR:HDLCompiler:806 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 139: Syntax error near ";". ERROR:HDLCompiler:870 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 142: Macro <HW_TYPE> is not defined. ERROR:HDLCompiler:806 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 142: Syntax error near ";". ERROR:HDLCompiler:870 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 143: Macro <HW_VER> is not defined. ERROR:HDLCompiler:806 - "C:/OpenADC/hdl/hdl/reg_openadc.v" Line 143: Syntax error near ";". ERROR:HDLCompiler:281 - "C:/OpenADC/hdl/hdl/spartan6/fifo_top.v" Line 1: Cannot open include file "includes.v". ERROR:HDLCompiler:870 - "C:/OpenADC/hdl/hdl/spartan6/fifo_top.v" Line 96: Macro <MAX_SAMPLES> is not defined. ERROR:HDLCompiler:806 - "C:/OpenADC/hdl/hdl/spartan6/fifo_top.v" Line 96: Syntax error near ";". ERROR:ProjectMgmt - 10 error(s) found while parsing design hierarchy.

Please tell me what are defines for <HW_TYPE> ,<HW_VER> and <MAX_SAMPLES> macros in this project ?
I’ll be add to setup.v

regards


#10

Colin, please, answer me, or it is impossible?


#11

Sorry for the delay - somehow missed your response in our closure the last two week, huge apologies! Those files are generated automatically when you run the “make ise” script. You can see there is an example “setup.v” which contains the values of those definitions. The setup.v is included by the includes.v I believe.


#12

Hi! I want compile ZTEX project.
Setup.v from its dir is not contain the <HW_TYPE> ,<HW_VER> and <MAX_SAMPLES> definitions. Please check it!

[code]
//Uncomment this to get code for using CHIPSCOPE
//`define CHIPSCOPE

//Define the board in use
`define ZTEX

ifdef ZTEXdefine UART_CLK 30000000
define MAX_SAMPLES 24573define FAST_FTDI
define NOBUFG_ADCCLKendif

//`define USE_DDR

//Uncomment the following if you want the DDR pins in your UCF file
//If your design may use the DDR you should do this, so you can then
//just use the USE_DDR flag to decide if it’s compiled in or not
//`define OPT_DDR[/code]


#13

???


#14

If you run the makeise script, it should be filling those out. They are in the “.in” file, see the bottom of this:
github.com/newaetech/chipwhispe … 11c_ise.in

But again it’s safer to let makeise write that automatically so they get the correct value!


#15

OK. Big thanks! I’ll try it… :exclamation:


#16

Hi, Colin!
My board works well on Kubuntu 14.04 64bit, but from win 7 32 I have next errors on connect :

Found programmed device Traceback (most recent call last): File "C:\Chipwhisperer\software\chipwhisperer\capture\ChipWhispererCapture.py", line 768, in doConDis self.doConDisScope(True) File "C:\Chipwhisperer\software\chipwhisperer\capture\ChipWhispererCapture.py", line 753, in doConDisScope self.scope.con() File "C:\Chipwhisperer\software\chipwhisperer\capture\scopes\OpenADC.py", line 645, in con self.scopetype.con() File "C:\Chipwhisperer\software\chipwhisperer\capture\scopes\OpenADC.py", line 463, in con self.CWFirmwareConfig.loadRequired() File "C:\Chipwhisperer\software\chipwhisperer\capture\scopes\ChipWhispererFWLoader.py", line 192, in loadRequired self.ztex.probe(True) File "C:\Chipwhisperer\software\chipwhisperer\capture\scopes\ztex_fwloader.py", line 297, in probe buf = self.dev.ctrl_transfer(0xc0, 0x22, 0, 0, 40, 500) File "C:\Python27\lib\site-packages\usb\core.py", line 971, in ctrl_transfer self.__get_timeout(timeout)) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 819, in ctrl_transfer timeout)) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 552, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 541, in _strerror return _lib.libusb_strerror(errcode).decode('utf8') File "C:\Python27\lib\ctypes\__init__.py", line 378, in __getattr__ func = self.__getitem__(name) File "C:\Python27\lib\ctypes\__init__.py", line 383, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'libusb_strerror' not found

Can you help me?

Thank You and best regards in new 2016 year!


#17

Is there some old version of libusb installed? Seems like it’s missing the libusb_strerror function which is odd!


#18

how to find it? I have last installed it with CW drivers…


#19

Hi, Colin! You are right- I found it! It is old libusb dll from the old rtl-sdr installation.

Thank you


#20

Great! Sorry on the slow response here, glad you found it.