Re: Multimeter USB output
Larry Hudsonwrites: > Actually "Brain Dead Software" it was not! Brain Damage Software, apparently: https://en.wikipedia.org/wiki/BDS_C -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 08/29/2016 09:24 PM, Paul Rubin wrote: Larry Hudsonwrites: with BDS-C under CP/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? I remember it well. It's what I used to initially learn C. Source code is online here: http://www.bdsoft.com/resources/bdsc.html [...] I remember reading a magazine interview with Leor Zolman (the author of BDS-C) where he mentioned what the BDS stood for... He said is was his nickname in college: Brain Dead. Actually "Brain Dead Software" it was not! It was really quite good, and rather widely used at the time. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 29/08/2016 09:54, Joe wrote: Am 28.08.2016 um 17:22 schrieb Dennis Lee Bieber: If you can read spaghetti coded C, you might want to study https://sourceforge.net/projects/ut61/ Interesting, but... The last time I did something with c, it was with BDS-C under CM/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? Yes. It was a long time ago when I used BDS-C on initially Apple II + Microsoft CP/M card. Then on other Z80 CP/M systems. I also was introduced to the editor MINCE (Mince is not complete Emacs) which was compiled with BDS-C. 33 years ago and it seems like yesterday! -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 08/30/2016 04:01 AM, D'Arcy J.M. Cain wrote: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-listwrote: I remember it well. It's what I used to initially learn C. I'm a completely self-taught, hobby programmer. Been around since the MITS Altair. How many remember that beast?? Remember it and still have it in the basement. Mine is stuffed into the back of a closet. :-) It was still working when I stored it, but I don't think I could remember how to bring it up again. As I recall, you had to set the starting memory address via the front-panel switches — but the details have long since evaporated from my memory. :-( -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Am 30.08.2016 um 13:01 schrieb D'Arcy J.M. Cain: On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-listwrote: I remember it well. It's what I used to initially learn C. I'm a completely self-taught, hobby programmer. Been around since the MITS Altair. How many remember that beast?? Remember it and still have it in the basement. I read a lot about the Altair in Byte in those days, but never had a chance to touch it. Wasn't it horrible expensive? -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On Mon, 29 Aug 2016 21:21:05 -0700 Larry Hudson via Python-listwrote: > I remember it well. It's what I used to initially learn C. I'm a > completely self-taught, hobby programmer. Been around since the MITS > Altair. How many remember that beast?? Remember it and still have it in the basement. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Am 30.08.2016 um 06:24 schrieb Paul Rubin: Larry Hudsonwrites: with BDS-C under CP/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? I remember it well. It's what I used to initially learn C. Source code is online here: http://www.bdsoft.com/resources/bdsc.html I've looked at it a little. I don't know if I ever might have had it in me to write big chunks of asm code like that. Wow! Great surprise. Very interesting this link. Thank you, Paul. -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Larry Hudsonwrites: >> with BDS-C under CP/M. Somebody remenbering this no-fp compiler from >> the dark age before PC und Linux? > I remember it well. It's what I used to initially learn C. Source code is online here: http://www.bdsoft.com/resources/bdsc.html I've looked at it a little. I don't know if I ever might have had it in me to write big chunks of asm code like that. Wow! -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 08/29/2016 01:54 AM, Joe wrote: [snip...] Interesting, but... The last time I did something with c, it was with BDS-C under CM/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? I remember it well. It's what I used to initially learn C. I'm a completely self-taught, hobby programmer. Been around since the MITS Altair. How many remember that beast?? (And yes -- as you already corrected yourself -- that's CP/M not CM/M.) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Joe wrote: > The UT61B has two interfaces, a RS232C interface and this usb interface. > The RS232 interface works well with PySerial. It continously transmits 2 > .. 3 Pakets per second with 14 Bytes each. This happens unsolicited > without any command as long as the RS232C/USB button on the DMM is active. > >From someone who does a LOT of code to talk to DMMs, scopes, counters, etc? Word of advice. You're done. Declare victory and move on. You've got it working on one interface. The other is even less well documented and requires doing deep-down stuff against libusb because there's no actual kernel driver, and you've got a Chinese manufacturer of a low-end device being of little to no help so now you're trying to reverse engineer the protocol from bad code without even the help of a packet sniffer. This is the sort of rabbit hole that weeks manage to fall into with nothing to show for them. If this is an exercise in learning to work with libusb then have at. But if what you actually need from this is to talk to the meter? You're talking to it already. Take the win and walk. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Am 29.08.2016 um 10:54 schrieb Joe: it was with BDS-C under CM/M. under CP/M, of course. -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
Am 28.08.2016 um 17:22 schrieb Dennis Lee Bieber: If you can read spaghetti coded C, you might want to study https://sourceforge.net/projects/ut61/ Interesting, but... The last time I did something with c, it was with BDS-C under CM/M. Somebody remenbering this no-fp compiler from the dark age before PC und Linux? -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 8/28/2016 5:13 AM, Joe wrote: Am 28.08.2016 um 00:45 schrieb Terry Reedy: On 8/27/2016 3:35 PM, Joe wrote: Hi, I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read the USB output of a DMM 'UT61B'. import usb.core import usb.util import usb.backend.libusb1 def Gosub(): dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) # Digital Multimeter UT61B if dev == None: print ('Multimeter not found') else: print ('Multimeter was found') dev.set_configuration() cfg = dev.get_active_configuration() intf = cfg[(0,0)] ep = usb.util.find_descriptor( intf, custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN) if ep == None: print ('ep is None') else: s = ep.read(64, 500) print ('Len s: ' + len(s)) print ('Starting') Gosub() print ('Ready.-') Result: I presume you saw Starting Multimeter was found File "d:\work-d\PythonProgs\ut61b.py", line 27, in Gosub() File "d:\work-d\PythonProgs\ut61b.py", line 23, in Gosub s = ep.read(64, 500) File "D:\Python3\Lib\site-packages\usb\core.py", line 402, in read return self.device.read(self, size_or_buffer, timeout) File "D:\Python3\Lib\site-packages\usb\core.py", line 988, in read self.__get_timeout(timeout)) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 851, in intr_read timeout) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 936, in __read _check(retval) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 10060] Operation timed out What's wrong? How to fix? Read (again?) the doc for the interface for the device. Because reading timed out, I suspect that it is waiting for a command for it to send something. Yes, I saw this: Starting Multimeter was found The UT61B has two interfaces, a RS232C interface and this usb interface. The RS232 interface works well with PySerial. It continously transmits 2 .. 3 Pakets per second with 14 Bytes each. This happens unsolicited without any command as long as the RS232C/USB button on the DMM is active. So I assumed the USB interface also doesn't need any command and also transmit this stream of 2 to 3 Pakets per second. But unfortunately I don't have any doc for the USB interface for this device. To the accompanying software of the UT61B there is a ready windos app which shows and logs the output of the UT61B. This app can be switched between RS232C and USB; both work. I asked the manufacturer (Uni-T in Shenzen) for additional info and are now waiting for an answer. Assumed the USB interface sends this 2 to 3 pakets per second unsolicited - should the code shown work? Is this ok: lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN) I am in doubt: Is usb.util.ENDPOINT_IN really correct? I do not know as I have not used the usb package. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Multimeter USB output
Am 28.08.2016 um 00:45 schrieb Terry Reedy: > On 8/27/2016 3:35 PM, Joe wrote: >> Hi, >> >> I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read >> the USB output of a DMM 'UT61B'. >> >> import usb.core >> import usb.util >> import usb.backend.libusb1 >> >> def Gosub(): >> dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) # Digital >> Multimeter UT61B >> if dev == None: >> print ('Multimeter not found') >> else: >> print ('Multimeter was found') >> dev.set_configuration() >> cfg = dev.get_active_configuration() >> intf = cfg[(0,0)] >> ep = usb.util.find_descriptor( >> intf, >> custom_match = \ >> lambda e: \ >> usb.util.endpoint_direction(e.bEndpointAddress) == \ >> usb.util.ENDPOINT_IN) >> if ep == None: >> print ('ep is None') >> else: >> s = ep.read(64, 500) >> print ('Len s: ' + len(s)) >> >> print ('Starting') >> Gosub() >> print ('Ready.-') >> >> Result: > > I presume you saw > Starting > Multimeter was found > >> File "d:\work-d\PythonProgs\ut61b.py", line 27, in >>Gosub() >> File "d:\work-d\PythonProgs\ut61b.py", line 23, in Gosub >>s = ep.read(64, 500) >> File "D:\Python3\Lib\site-packages\usb\core.py", line 402, in read >>return self.device.read(self, size_or_buffer, timeout) >> File "D:\Python3\Lib\site-packages\usb\core.py", line 988, in read >>self.__get_timeout(timeout)) >> File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 851, in >> intr_read >>timeout) >> File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 936, in >> __read >>_check(retval) >> File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 595, in >> _check >>raise USBError(_strerror(ret), ret, _libusb_errno[ret]) >> >> usb.core.USBError: [Errno 10060] Operation timed out >> >> What's wrong? How to fix? > > Read (again?) the doc for the interface for the device. Because reading > timed out, I suspect that it is waiting for a command for it to send > something. > Yes, I saw this: Starting Multimeter was found The UT61B has two interfaces, a RS232C interface and this usb interface. The RS232 interface works well with PySerial. It continously transmits 2 .. 3 Pakets per second with 14 Bytes each. This happens unsolicited without any command as long as the RS232C/USB button on the DMM is active. So I assumed the USB interface also doesn't need any command and also transmit this stream of 2 to 3 Pakets per second. But unfortunately I don't have any doc for the USB interface for this device. To the accompanying software of the UT61B there is a ready windos app which shows and logs the output of the UT61B. This app can be switched between RS232C and USB; both work. I asked the manufacturer (Uni-T in Shenzen) for additional info and are now waiting for an answer. Assumed the USB interface sends this 2 to 3 pakets per second unsolicited - should the code shown work? Is this ok: >> lambda e: \ >> usb.util.endpoint_direction(e.bEndpointAddress) == \ >> usb.util.ENDPOINT_IN) I am in doubt: Is usb.util.ENDPOINT_IN really correct? Thanx - Joe -- https://mail.python.org/mailman/listinfo/python-list
Re: Multimeter USB output
On 8/27/2016 3:35 PM, Joe wrote: Hi, I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read the USB output of a DMM 'UT61B'. import usb.core import usb.util import usb.backend.libusb1 def Gosub(): dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) # Digital Multimeter UT61B if dev == None: print ('Multimeter not found') else: print ('Multimeter was found') dev.set_configuration() cfg = dev.get_active_configuration() intf = cfg[(0,0)] ep = usb.util.find_descriptor( intf, custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN) if ep == None: print ('ep is None') else: s = ep.read(64, 500) print ('Len s: ' + len(s)) print ('Starting') Gosub() print ('Ready.-') Result: I presume you saw Starting Multimeter was found File "d:\work-d\PythonProgs\ut61b.py", line 27, in Gosub() File "d:\work-d\PythonProgs\ut61b.py", line 23, in Gosub s = ep.read(64, 500) File "D:\Python3\Lib\site-packages\usb\core.py", line 402, in read return self.device.read(self, size_or_buffer, timeout) File "D:\Python3\Lib\site-packages\usb\core.py", line 988, in read self.__get_timeout(timeout)) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 851, in intr_read timeout) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 936, in __read _check(retval) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 10060] Operation timed out What's wrong? How to fix? Read (again?) the doc for the interface for the device. Because reading timed out, I suspect that it is waiting for a command for it to send something. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Multimeter USB output
Hi, I'm using Python 3.5.1 with PyUSB 1.0 under Win 10 (64). We try to read the USB output of a DMM 'UT61B'. import usb.core import usb.util import usb.backend.libusb1 def Gosub(): dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) # Digital Multimeter UT61B if dev == None: print ('Multimeter not found') else: print ('Multimeter was found') dev.set_configuration() cfg = dev.get_active_configuration() intf = cfg[(0,0)] ep = usb.util.find_descriptor( intf, custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN) if ep == None: print ('ep is None') else: s = ep.read(64, 500) print ('Len s: ' + len(s)) print ('Starting') Gosub() print ('Ready.-') Result: File "d:\work-d\PythonProgs\ut61b.py", line 27, in Gosub() File "d:\work-d\PythonProgs\ut61b.py", line 23, in Gosub s = ep.read(64, 500) File "D:\Python3\Lib\site-packages\usb\core.py", line 402, in read return self.device.read(self, size_or_buffer, timeout) File "D:\Python3\Lib\site-packages\usb\core.py", line 988, in read self.__get_timeout(timeout)) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 851, in intr_read timeout) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 936, in __read _check(retval) File "D:\Python3\Lib\site-packages\usb\backend\libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 10060] Operation timed out What's wrong? How to fix? Regards -- Joe -- https://mail.python.org/mailman/listinfo/python-list