Hi ,
I've also tried PySerial. The result is same. only able to open the port not
able to read.
I tried this code:
import serial
import io
import time
ser=serial.Serial('COM5',
baudrate=9600,
bytesize=8,
stopbits=1,
parity=serial.PARITY_NONE,
timeout=1)
print ("port Com5 opened")
print ("------------------------------------------------------------")
ser.isOpen()
while True:
#\r\n is for device terminators set to CR LF
ser.write(bytes(':FETCh?\r\n', encoding='ascii'))
data = ser.read(16)
print((data))
ser.close()
The output I got is like this: b' '
Don't know what it exactly means!
- ryan
________________________________
From: Steven Michalske <smichal...@gmail.com>
To: ranzam ali <ryanzam2...@yahoo.com>; "pyusb-users@lists.sourceforge.net"
<pyusb-users@lists.sourceforge.net>
Cc: "pyusb-users@lists.sourceforge.net" <pyusb-users@lists.sourceforge.net>
Sent: Thursday, October 3, 2013 12:40 AM
Subject: Re: [pyusb-users] accessing DMM
The damn uses a USB to serial UART converter. You can skip pyUSB and use
pySERIAL on /dev/ttyUSB0.
Steve.
On Oct 2, 2013, at 3:49 PM, ranzam ali <ryanzam2...@yahoo.com> wrote:
hello frens,
>
>
>I am having problem trying to read the data from my digital multimeter
>http://www.appatech.com/upload/download/file11349831248683.pdf. Actually, I am
>using PyUSB to access the DMM But, I am only able to open the port not able to
>read anything. The kernel version I am using is Linux version 3.6.11+.
>The output of dmesg gives me this
>[ 351.020927] cp210x 1-1.2:1.0: device disconnected
>[ 353.563977] usb 1-1.2: new full-speed USB device number 5 using dwc_otg
>[ 353.666404] usb 1-1.2: New USB device found, idVendor=10c4, idProduct=ea60
>[ 353.666432] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
>SerialNumber=3
>[ 353.666448] usb 1-1.2: Product: CP2102 USB to UART Bridge Controller
>[ 353.666462] usb 1-1.2: Manufacturer: Silicon Labs
>[ 353.666474] usb 1-1.2: SerialNumber: 0001
>[ 353.668672] cp210x 1-1.2:1.0: cp210x converter detected
>[ 353.764017] usb 1-1.2: reset full-speed USB device number 5 using dwc_otg
>[ 353.865753] usb 1-1.2: cp210x converter now attached to ttyUSB0
>
>
>The PyUSB code i used was:
>import usb.backend
>import usb.core
>import usb.util
>
>
>dev=usb.core.find(idVendor=0x10c4, idProduct=0xea60)
>
>
>if dev is None:
> raise ValueError("Device not found")
>else:
> print ("Device found")
>dev.set_configuration()
>endpoint = dev[0][(0,0)][0]
>
>data = dev.read(0x81, 0x0040, 0,0)
>
>print(data)
>
>
>Can anyone help me?
>
>
>I have also attached the log of the SnoopyPro.
>
>
>Thanks,
>-ryan(newbie)
>
>
>“Do you love your creator? Love your fellow-beings first.”
>
>
>
<Capture-setup packet.PNG>
<Capture1.PNG>
<Capture2.PNG>
------------------------------------------------------------------------------
>October Webinars: Code for Performance
>Free Intel webinars can help you accelerate application performance.
>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>the latest Intel processors and coprocessors. See abstracts and register >
>http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
>pyusb-users mailing list
>pyusb-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users