From: Jim H. <jim...@ea...> - 2014-03-23 22:31:36
|
I've just started using sigrok and in the last couple of days I've been successful at using sigrok-cli to connect to my new Rigol DS2072A oscilloscope and with a Saleae Logic clone. Now I'm trying to work with a Bus Pirate v3.6 and I'm having a USB serial communication problem. I'm running sigrok on Ubuntu 13.10 and I've built all of the sigrok components from source code I retrieved from gitweb about two days ago. Here's what I see in the kernel log when after I plug in my Bus Pirate: [31365.737698] usb 2-2.2: new full-speed USB device number 8 using uhci_hcd [31366.384877] usb 2-2.2: New USB device found, idVendor=0403, idProduct=6001 [31366.384881] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [31366.384883] usb 2-2.2: Product: FT232R USB UART [31366.384884] usb 2-2.2: Manufacturer: FTDI [31366.384885] usb 2-2.2: SerialNumber: A901LS1L [31367.001602] ftdi_sio 2-2.2:1.0: FTDI USB Serial Device converter detected [31367.001765] usb 2-2.2: Detected FT232RL [31367.001767] usb 2-2.2: Number of endpoints 2 [31367.001769] usb 2-2.2: Endpoint 1 MaxPacketSize 64 [31367.001770] usb 2-2.2: Endpoint 2 MaxPacketSize 64 [31367.001771] usb 2-2.2: Setting MaxPacketSize 64 [31367.003880] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB0 sigrok-cli doesn't show my device when it scans: jim@newt:~$ sudo sigrok-cli --scan The following devices were found: demo - Demo device with 12 probes: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3 alsa - ALSA: Ensoniq AudioPCI ES1371 DAC2/ADC with 2 probes: Ch_0 Ch_1 but my understanding is that this is normal for the Bus Pirate. Here's how I've been trying to establish contact with the Bus Pirate, and the resulting debug output: jim@newt:~$ sudo LIBSERIALPORT_DEBUG=1 sigrok-cli --loglevel 5 --driver ols:conn=/dev/ttyUSB0:serialcomm=115200/8n1 --show sr: libsigrok loglevel set to 5. sr: backend: Sanity-checking all drivers. sr: backend: Sanity-checking all input modules. sr: backend: Sanity-checking all output modules. srd: libsigrokdecode loglevel set to 5. sr: hwdriver: Initializing driver 'ols'. sr: ols: Probing /dev/ttyUSB0. sr: serial: Opening serial port '/dev/ttyUSB0' (flags 5). sp: sp_get_port_by_name(/dev/ttyUSB0, 0x1cd1618) called. sp: Building structure for port /dev/ttyUSB0. sp: sp_get_port_by_name returning SP_OK. sp: sp_open(0x1cd0390, 0x3) called. sp: Opening port /dev/ttyUSB0. sp: get_config(0x1cd0390, 0x7fffd6d58b10, 0x7fffd6d58ae0) called. sp: Getting configuration for port /dev/ttyUSB0. sp: sp_last_error_message() called. sp: sp_last_error_message returning Input/output error. sp: get_config returning SP_ERR_FAIL: TIOCMGET ioctl failed: Input/output error. sp: sp_free_error_message(Input/output error) called. sp: sp_free_error_message returning. sp: sp_close(0x1cd0390) called. sp: Closing port /dev/ttyUSB0. sp: sp_close returning SP_OK. sp: sp_open returning SP_ERR_FAIL. sp: sp_last_error_message() called. sp: sp_last_error_message returning Input/output error. sp: sp_last_error_code() called. sp: sp_last_error_code returning 5. sr: serial: Error opening port (5): Input/output error. sp: sp_free_error_message(Input/output error) called. sp: sp_free_error_message returning. sr: hwdriver: Scan of 'ols' found 0 devices. No devices found. I get the same TIOCMGET error when I try to access that same USB serial port using serialstat: jim@newt:~$ sudo statserial /dev/ttyUSB0 statserial: TIOCMGET failed: Input/output error However, I can access the Bus Pirate on /dev/ttyUSB0 without any problems using the PuTTY serial client configured for 115200/8n1. Can anyone suggest a possible cause of the sigrok-cli TIOMCGET error, or something I can do to determine the cause? I've included the output of "sigrok-cli --version" at the bottom of this e-mail. Jim Hollister P.S. I'm impressed by the debug logging capabilities of the sigrok software. I've been able to work out a number of my own 'newbie' issues over the last couple of days because of those log messages. Thank you. jim@newt:~$ sudo sigrok-cli --version sigrok-cli 0.4.0 Using libsigrok 0.2.2 (lib version 1:2:0). Using libsigrokdecode 0.2.0 (lib version 1:0:0). Supported hardware drivers: agilent-dmm Agilent U12xx series DMMs alsa ALSA driver appa-55ii APPA 55II asix-sigma ASIX SIGMA/SIGMA2 atten-pps3203 Atten PPS3203T-3S bbcgm-m2110 BBC Goertz Metrawatt M2110 brymen-bm857 Brymen BM857 brymen-bm86x Brymen BM86X cem-dt-885x CEM DT-885x center-309 Center 309 chronovu-la8 ChronoVu LA8 colead-slm Colead SLM conrad-digi-35-cpu Conrad DIGI 35 CPU demo Demo driver and pattern generator digitek-dt4000zc Digitek DT4000ZC fluke-dmm Fluke 18x/28x series DMMs fx2lafw fx2lafw (generic driver for FX2 based LAs) gmc-mh-1x-2x-rs232 Gossen Metrawatt Metrahit 1x/2x, RS232 interface gmc-mh-2x-bd232 Gossen Metrawatt Metrahit 2x, BD232/SI232-II interface hameg-hmo Hameg HMO hantek-dso Hantek DSO ikalogic-scanalogic2 IKALOGIC Scanalogic-2 ikalogic-scanaplus IKALOGIC ScanaPLUS iso-tech-idm103n ISO-TECH IDM103N kecheng-kc-330b Kecheng KC-330B lascar-el-usb Lascar EL-USB mastech-mas345 MASTECH MAS345 metex-m3640d Metex M-3640D metex-m4650cr Metex M-4650CR metex-me31 Metex ME-31 mic-98581 MIC 98581 mic-98583 MIC 98583 norma-dmm Norma DM9x0 / Siemens B102x DMMs ols Openbench Logic Sniffer pce-pce-dm32 PCE PCE-DM32 peaktech-3410 PeakTech 3410 peaktech-4370 PeakTech 4370 radioshack-22-168 RadioShack 22-168 radioshack-22-805 RadioShack 22-805 radioshack-22-812 RadioShack 22-812 rigol-ds Rigol DS saleae-logic16 Saleae Logic16 sysclk-lwla SysClk LWLA series tecpel-dmm-8061 Tecpel DMM-8061 tecpel-dmm-8061-ser Tecpel DMM-8061 (UT-D02 cable) tekpower-tp4000zc TekPower TP4000ZC teleinfo Teleinfo tenma-72-7745 Tenma 72-7745 tenma-72-7745-ser Tenma 72-7745 (UT-D02 cable) tenma-72-7750 Tenma 72-7750 tenma-72-7750-ser Tenma 72-7750 (UT-D02 cable) tondaj-sl-814 Tondaj SL-814 uni-t-ut32x UNI-T UT32x uni-t-ut60a UNI-T UT60A uni-t-ut60a-ser UNI-T UT60A (UT-D02 cable) uni-t-ut60e UNI-T UT60E uni-t-ut60e-ser UNI-T UT60E (UT-D02 cable) uni-t-ut60g UNI-T UT60G uni-t-ut60g-ser UNI-T UT60G (UT-D02 cable) uni-t-ut61b UNI-T UT61B uni-t-ut61b-ser UNI-T UT61B (UT-D02 cable) uni-t-ut61c UNI-T UT61C uni-t-ut61c-ser UNI-T UT61C (UT-D02 cable) uni-t-ut61d UNI-T UT61D uni-t-ut61d-ser UNI-T UT61D (UT-D02 cable) uni-t-ut61e UNI-T UT61E uni-t-ut61e-ser UNI-T UT61E (UT-D02 cable) va-va18b V&A VA18B va-va40b V&A VA40B victor-dmm Victor DMMs voltcraft-k204 Voltcraft K204 voltcraft-m3650d Voltcraft M-3650D voltcraft-m4650cr Voltcraft M-4650CR voltcraft-vc820 Voltcraft VC-820 voltcraft-vc820-ser Voltcraft VC-820 (UT-D02 cable) voltcraft-vc830 Voltcraft VC-830 voltcraft-vc830-ser Voltcraft VC-830 (UT-D02 cable) voltcraft-vc840 Voltcraft VC-840 voltcraft-vc840-ser Voltcraft VC-840 (UT-D02 cable) zeroplus-logic-cube ZEROPLUS Logic Cube LAP-C series Supported input formats: binary Raw binary chronovu-la8 ChronoVu LA8 csv Comma-separated values (CSV) vcd Value Change Dump wav WAV file Supported output formats: analog Analog data ascii ASCII binary Raw binary bits Bits chronovu-la8 ChronoVu LA8 csv Comma-separated values (CSV) gnuplot Gnuplot hex Hexadecimal ols OpenBench Logic Sniffer vcd Value Change Dump (VCD) Supported protocol decoders: avr_isp AVR In-System Programming can Controller Area Network dcf77 DCF77 time protocol ds1307 Dallas DS1307 edid Extended Display Identification Data guess_bitrate Guess bitrate/baudrate i2c Inter-Integrated Circuit i2cdemux I²C demultiplexer i2cfilter I²C filter i2s Integrated Interchip Sound ir_nec IR NEC ir_rc5 IR RC-5 jtag Joint Test Action Group (IEEE 1149.1) jtag_stm32 Joint Test Action Group / ST STM32 lm75 National LM75 lpc Low-Pin-Count maxim_ds28ea00 Maxim DS28EA00 1-Wire digital thermometer midi Musical Instrument Digital Interface mlx90614 Melexis MLX90614 mx25lxx05d Macronix MX25Lxx05D mxc6225xu MEMSIC MXC6225XU nunchuk Nintendo Wii Nunchuk onewire_link 1-Wire serial communication bus (link layer) onewire_network 1-Wire serial communication bus (network layer) pan1321 Panasonic PAN1321 parallel Parallel sync bus rgb_led_spi RGB LED string decoder (SPI) rtc8564 Epson RTC-8564 JE/NB sdcard_spi Secure Digital card (SPI mode) spi Serial Peripheral Interface tlc5620 Texas Instruments TLC5620 uart Universal Asynchronous Receiver/Transmitter usb_packet Universal Serial Bus (LS/FS) packet usb_signalling Universal Serial Bus (LS/FS) signalling xfp 10 Gigabit Small Form Factor Pluggable Module (XFP) z80 Zilog Z80 CPU |