juhasch / pyBusPirateLite

Python library for BusPirate
https://pybuspiratelite.readthedocs.io/en/latest/
Other
58 stars 33 forks source link

Cannot communicate with Bus Pirate - "Bus Pirate malfunctioning" error #2

Open philpem opened 8 years ago

philpem commented 8 years ago

I cannot get this version of pyBusPirateLite to talk to my Bus Pirate -- the port opens correctly, but any attempt to communicate with the BP (even attempting to put it into bitbang mode) results in a long wait followed by a "bus pirate malfunctioning" error.

This is on Windows 7, Bus Pirate v3a, firmware v6.1.

If I use the version of pyBusPirateLite from the Dangerous Prototypes website (http://code.google.com/p/the-bus-pirate/downloads/detail?name=pyBusPirateLite-r597.zip), the BP works fine.

j-langlois commented 7 years ago

Same here

juhasch commented 7 years ago

You could try the update branch. That works for me on Windows and Mac.

dspmind commented 7 years ago

Same error on Master and Update too... Please help Buspirate v3a

htpc@ht-pc:~/installs/pyBusPirateLite-master$ python

Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from pyBusPirateLite.SPI import from pyBusPirateLite.BBIO_base import PinCfg spi = SPI() spi.connect('/dev/ttyUSB0') spi.enter_bb() Traceback (most recent call last): File "", line 1, in File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 120, in recurse_flush return function(args) File "pyBusPirateLite/BitBang.py", line 98, in enter_bb return self.recurse_flush(self.enter_bb) File "pyBusPirateLite/BBIO_base.py", line 121, in recurse_flush raise IOError('bus pirate malfunctioning') IOError: bus pirate malfunctioning

juhasch commented 7 years ago

Yes, there was a bug in the bitbang initialization. Hopefully it works now.

I don't really use the Buspirate anymore, as the SPI implementation is too limited for me.

dspmind commented 7 years ago

Thanks, Sorry for this simple question. Now with the new updated code, I dont know where to provide the BP uart /dev/ttyUSB0 .

Can you suggest a BusPirate alternative which you use for similar things. ?

htpc@ht-pc:~/installs/pyBusPirateLite-master/pyBusPirateLite$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from pyBusPirateLite.SPI import *

spi=SPI() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyBusPirateLite/SPI.py", line 73, in init super().init() TypeError: super() takes at least 1 argument (0 given)

juhasch commented 7 years ago

Autodetect should be fixed now. See the example in the readme.