Comments (4)
Can you capture a trace with more verbose logging? i.e. at the start
import logging
logging.basicConfig(level=logging.DEBUG)
should show what's going on in the underlying communication protocol
from python-saleae.
INFO:saleae.saleae:Connected.
DEBUG:saleae.saleae:Send >CLOSE_ALL_TABS<
DEBUG:saleae.saleae:Recv >ACK<
DEBUG:saleae.saleae:Send >GET_CONNECTED_DEVICES<
DEBUG:saleae.saleae:Recv >1, Logic Pro 16, LOGIC_PRO_16_DEVICE, 0x85e0d350d7673c58, ACTIVE
ACK<
DEBUG:saleae.saleae:Send >GET_CONNECTED_DEVICES<
DEBUG:saleae.saleae:Recv >1, Logic Pro 16, LOGIC_PRO_16_DEVICE, 0x85e0d350d7673c58, ACTIVE
ACK<
DEBUG:saleae.saleae:Send >SET_ACTIVE_CHANNELS, digital_channels, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15<
DEBUG:saleae.saleae:Recv >ACK<
DEBUG:saleae.saleae:Send >GET_CONNECTED_DEVICES<
DEBUG:saleae.saleae:Recv >1, Logic Pro 16, LOGIC_PRO_16_DEVICE, 0x85e0d350d7673c58, ACTIVE
ACK<
DEBUG:saleae.saleae:Send >GET_ACTIVE_CHANNELS<
DEBUG:saleae.saleae:Recv >digital_channels, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, analog_channels
ACK<
DEBUG:saleae.saleae:Send >SET_TRIGGER, , , , , , , , , , , , , , , , <
DEBUG:saleae.saleae:Recv >ACK<
DEBUG:saleae.saleae:Send >SET_CAPTURE_SECONDS, 1.0<
DEBUG:saleae.saleae:Recv >ACK<
DEBUG:saleae.saleae:Send >GET_ALL_SAMPLE_RATES<
DEBUG:saleae.saleae:Recv >125000000, 0
100000000, 0
50000000, 0
25000000, 0
20000000, 0
12500000, 0
10000000, 0
6250000, 0
5000000, 0
4000000, 0
2500000, 0
2000000, 0
1000000, 0
ACK<
DEBUG:saleae.saleae:Send >GET_ALL_SAMPLE_RATES<
DEBUG:saleae.saleae:Recv >125000000, 0
100000000, 0
50000000, 0
25000000, 0
20000000, 0
12500000, 0
10000000, 0
6250000, 0
5000000, 0
4000000, 0
2500000, 0
2000000, 0
1000000, 0
ACK<
DEBUG:saleae.saleae:Send >SET_SAMPLE_RATE, 125000000, 0<
DEBUG:saleae.saleae:Recv >ACK<
DEBUG:saleae.saleae:Send >CAPTURE<
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Recv >NAK<
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Recv >NAK<
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Recv >NAK<
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Recv >ACKTRUE
ACK<
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Send >GET_ANALYZERS<
DEBUG:saleae.saleae:Recv >TRUE
ACKSPI, 1
SPI, 2
I2C, 3
I2C, 4
ACK<
Traceback (most recent call last):
File "test2.py", line 20, in <module>
print(s.get_analyzers())
File "/home/tester/.local/lib/python3.7/site-packages/saleae/saleae.py", line 1014, in get_analyzers
analyzer_index = int(line.split(',')[1])
IndexError: list index out of range
from python-saleae.
DEBUG:saleae.saleae:Send >IS_PROCESSING_COMPLETE<
DEBUG:saleae.saleae:Recv >ACKTRUE
ACK<
That looks like a bug on Logic's end, I don't think that is a valid response to that command, @Marcus10110 any insight?
from python-saleae.
I had the same problem and found a workaround slightly modifying the capture_start to block the code. So, capture_start:
def capture_start(self): self._cmd('CAPTURE', False)
Becomes:
def capture_start(self): self._cmd('CAPTURE')
My guess is that once the capture is finished in 'unblocking' mode, it sends an extra ACK and it breaks the flow of the rest of the code.
I could also verify this sending sending a capture_stop() before the capture is finished (in unblocking mode), since the capture is stopped, no ACK is sent by the unblocking capture_start and the code works.
Edit: I just read the other issues and I believe the cause of this issue is explained in #18
from python-saleae.
Related Issues (20)
- Add parameter to launch_logic allowing the caller to specify path HOT 4
- export_analyzer returns before csv file is completed HOT 3
- Random CommandNAKedError occurrence during "capture_to_file(log_file)" call HOT 3
- Implement get_sample_rate HOT 2
- erratic behavior after calling get_analyzer HOT 8
- enum34 should not be required above Python 3.4 HOT 2
- Path manipulation doesn't work when Logic is running on different OS than the Python module HOT 1
- is_analyzer_complete raising self.CommandNAKedError when using custom analyzer HOT 1
- Windows str.replace not implemented properly HOT 3
- Implement several missing methods.
- get_capture_range throws ValueError HOT 1
- Export data to a python container HOT 2
- How to use this library with the new logic 2 HOT 1
- Is there a way to get ACK when the capture starts HOT 1
- AttributeError: partially initialized module 'saleae' has no attribute 'Saleae' (most likely due to a circular import) HOT 1
- Getting a type error while executing the launch_logic method HOT 1
- Saleae Init function doesn't take logic_path variable HOT 1
- Logic 2 Automation Interface - Feedback Request HOT 3
- Problem with export_data2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-saleae.