Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Terry Coles
On Sunday 07 February 2016 14:22:01 Ralph Corderoy wrote:
> The protocol is described in
> http://www.pdamusician.com/dpscope/files/DPScope_SE_Interface_Description.pd
> f, linked from http://www.pdamusician.com/dpscope/downloads_se.html, and
> looks pretty simple.

Yes it does, but I'm not sure how that helps in this instance.  That's the 
information needed for someone who wants to write the code to communicate with 
the scope; it still needs the underlying HID functionality which is made 
available in Windows, but not in Linux.  The DPScopeSE.exe program, (which is 
very impressive by the way), must already implement that protocol.

Unless of course, I'm missing something.
 
-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Terry Coles
On Sunday 07 February 2016 15:42:00 Ralph Corderoy wrote:
> I was wondering if you could set parameters and run a capture at the
> command line, and then view the data with GtkWave, or xoscope, or
> similar.  https://github.com/zserge/hid/blob/master/example/main.go is a
> little shell for talking HID using hex strings, just to see if CMD_PING
> works, for example.  But it still all requires coding.  Clearly, the
> future belongs to programmers.  :-)

I take it that the 'you' in this case is generic, something like the Royal 
'we' :-)

I think I'll wait for the wine developers to implement HID (which could be a 
long time, since the original discussion on the forum dates back to 2008.

-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Terry Coles
On Thursday 04 February 2016 14:20:34 Ralph Corderoy wrote:
> The creator of the scope seems quite open about its workings, e.g. the
> PDFs describing its circuit.  On the forum he provides, I found this old
> post about creating a symbolic link to have COM1 access the USB scope in
> WINE;  that's probably an older version of the scope that may have
> presented a different, serial-port, interface.
> http://dpscope.freeforums.org/dpscope-software-under-linux-using-wine-t62.ht
> ml I'd try that.

Having spent a bit of time researching this, I have established that DPScopeSE 
(the one I have) is definitely using HID.  The old posts referred to the 
original DPScope, which is now obsolete.

(As a matter of interest, the owner of that website is selling the *kit* 
version of DPScopeSE for 34 Euros, so I wonder how Picaxe can sell it for £10 
+ VAT?)

Anyway, I searched the WineHQ forums for HID support and discovered a 
development thread with patches being submitted in June to September of last 
year.  I installed the Development version of wine, but still no go, even 
though my wine installation includes the hid.dll and hidclass.sys files being 
developed.

Having queried this on the wine forums and the response is that HID support 
"is not yet complete".

Looks like I have to scrounge a laptop running Windows, or lug my Dell 
Optiplex down to the Wimborne Model Town tomorrow ;-(

-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Ralph Corderoy
Hi Terry,

> > The creator of the scope seems quite open about its workings
...
> > creating a symbolic link to have COM1 access the USB scope in WINE;
> > that's probably an older version of the scope that may have
> > presented a different, serial-port, interface.
>
> Having spent a bit of time researching this, I have established that
> DPScopeSE (the one I have) is definitely using HID.  The old posts
> referred to the original DPScope, which is now obsolete.

I had an email today from Wolfgang Maichen, the designer of these
scopes.  The picaxe.com PCB-scope is functionally identical to the
DPScope SE, and it does use USB HID, and not the USB virtual serial port
like earlier models.

The protocol is described in
http://www.pdamusician.com/dpscope/files/DPScope_SE_Interface_Description.pdf,
linked from http://www.pdamusician.com/dpscope/downloads_se.html, and
looks pretty simple.

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Ralph Corderoy
Hi Terry,

> Yes it does, but I'm not sure how that helps in this instance.

I agree, just helps those that come Googling afterwards.  :-)

> That's the information needed for someone who wants to write the code
> to communicate with the scope; it still needs the underlying HID
> functionality which is made available in Windows, but not in Linux.

If you compare the output of

find /dev/bus/usb -ls

with lsusb(1)'s, I think you'll see a character device matching the
location of the scope, and that can be used to access it and talk HID.
The hotplug rules are to make it have a more obvious name, etc., rather
than to fundamentally make it visible AIUI.

> The DPScopeSE.exe program, (which is very impressive by the way), must
> already implement that protocol.

Yes.  It looks, given VB6STKIT.DLL is present, that Visual Basic 6 is
involved.

I was wondering if you could set parameters and run a capture at the
command line, and then view the data with GtkWave, or xoscope, or
similar.  https://github.com/zserge/hid/blob/master/example/main.go is a
little shell for talking HID using hex strings, just to see if CMD_PING
works, for example.  But it still all requires coding.  Clearly, the
future belongs to programmers.  :-)

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-07 Thread Terry Coles
On Sunday 07 February 2016 13:43:58 Tim wrote:
> I probably have a laptop you can have but you will need to find a copy
> of Windows XP Pro (license key is on the bottom of the laptop), I might
> be able to find the disks but that won't be until Wednesday at the
> earliest when I go to Head Office.

Thanks for the offer, but I actually have a Dell laptop which originally had 
XP on, what I don't have is a legal copy of any Windows installation media to 
put on it because I bought it off my old company,with no OS installed, when I 
retired last April.

My VMWare instance is running XP Pro, but that was created from my MSDN 
licence which I held while I was still working.  I don't have the original 
installation image for it (for the life of me, I cannot image why).

I think I'll be able to twist my daughter's arm and borrow her Sony Vaio, 
which is running W8.
-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-05 Thread Terry Coles
On Thursday 04 February 2016 14:20:34 Ralph Corderoy wrote:
> This is assuming the Windows application wants access to a USB HID
> device.  It might be that the MCU presents something else, e.g. a serial
> port?

Well the installer says that it is a HID device and it appears and disappears 
from the list of hidraw devices when I plug and unplug it.

> > So as detailed in parts 1 and 2 of that link, I have added the rule:
> > KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> > to /etc/udev/rules.d
> 
> You might want to undo that;  I'm not sure it's relevant.

Yes.  I probably will.

> The creator of the scope seems quite open about its workings, e.g. the
> PDFs describing its circuit.  On the forum he provides, I found this old
> post about creating a symbolic link to have COM1 access the USB scope in
> WINE;  that's probably an older version of the scope that may have
> presented a different, serial-port, interface.
> http://dpscope.freeforums.org/dpscope-software-under-linux-using-wine-t62.ht
> ml I'd try that.

I'm not sure that it is a COM port in Windows,  I'll check it out, but at the 
moment I want to use the scope to sort out my PWM issue.  I can at least do 
that in VMWare.

-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


[Dorset] Using USB HID Device that isn't accessible

2016-02-04 Thread Terry Coles
Hi,

The good news is that my cheapo USB scope 
(http://www.picaxe.com/Hardware/Add-on-Modules/PCB-scope/) has arrived and 
seems to work.

The bad news is that I have only been able to use it on Windows!  (To be fair, 
that's all that was on offer.)  I have been able to install the software under 
wine, and the program launches, but says that there is no instrument attached.  
In VMWare running Windows XP, the device is recognised and installs 
automatically, but the Installer claims that the installation program is 
inaccessible.  I've put the VMWare solution on the back-burner for now.

I've seen the scope working on my son's laptop running W7.  However, I have 
little access to my son's computer and I feel sure that it could be made to 
work under wine, if only the OS would 'attach' the device.

I found a scattering of information; the best being here http://
www.appnearme.com/blog/2014/7/21/chrome-usb-hid-controlling-your-usb-device-
javascr/ .  That resource is obviously aimed at a particular application, but 
other resources seem to be heading in the same direction, including one for a 
temperature monitor, which is more like a scope than anything else I've found.

So as detailed in parts 1 and 2 of that link, I have added the rule:

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"

to /etc/udev/rules.d and get the results below when the device is plugged in.  
The scope is the Microchip Technology one at Bus 001, Device 008.  Also, I'm 
assuming that /dev/hidraw0 etc are to allow raw access to an HID physical 
device?  Unfortunately, the scope still doesn't get recognised.

terry@OptiPlex:~$ lsusb 
Bus 002 Device 005: ID 045e:0084 Microsoft Corp. Basic Optical Mouse 
Bus 002 Device 004: ID 046a:0023 Cherry GmbH CyMotion Master Linux Keyboard 
G230 
Bus 002 Device 003: ID 046d:09a2 Logitech, Inc. QuickCam Communicate Deluxe/
S7500 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
Bus 001 Device 008: ID 04d8:f891 Microchip Technology, Inc.  
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

terry@OptiPlex:~$ lsusb -t   
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M 
   |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M 
   |__ Port 3: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M 
   |__ Port 3: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M 
   |__ Port 3: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 480M 
   |__ Port 3: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 480M 
   |__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M 
   |__ Port 4: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 
1.5M 
   |__ Port 6: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 
1.5M 
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M 
   |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M 
   |__ Port 4: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 
12M

terry@OptiPlex:~$ ls -l /dev/hidraw* 
crw--- 1 root root246, 0 Feb  4 06:45 /dev/hidraw0 
crw--- 1 root root246, 1 Feb  4 06:45 /dev/hidraw1 
crw--- 1 root root246, 2 Feb  4 06:45 /dev/hidraw2 
crw-rw-r-- 1 root plugdev 246, 3 Feb  4 10:48 /dev/hidraw3

When the device is unplugged, hidraw3 disappears, so I assume that is the 
device that the scope software should be using.  I have tried plugging the 
device into other USB sockets, but the only thing that changes seems to be the 
device ID in lsusb. 

Any ideas on how I can get this to work under Linux to avoid having to mug my 
son?

-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-04 Thread Terry Coles
On Thursday 04 February 2016 11:26:25 Terry Coles wrote:
> I've put the VMWare solution on the back-burner
> for now.

Replying to myself; I've just got that working.  I was trying to install the 
program when the scope was plugged in.

> Any ideas on how I can get this to work under Linux to avoid having to mug
> my son?

I'd still like to run it under wine if possible, so ideas still welcome.

Could it be that the Windows program is expecting the device to be at a 
particular location in a Windows OS and not at /dev/hidraw?  If so, then is it 
possible to create a simlink if I can find out where it really wants to go?

-- 

Terry Coles



--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-04 Thread Simon P Smith
On 04/02/16 11:26, Terry Coles wrote:
> Hi,
>
> The good news is that my cheapo USB scope 
> (http://www.picaxe.com/Hardware/Add-on-Modules/PCB-scope/) has arrived and 
> seems to work.
>
> The bad news is that I have only been able to use it on Windows! 

I have a similar issue with the Hantech cheapo USB scope.   There is a
community, however, who are writing linux firmware extraction and driver
code for them and I started looking at that but found it easier (limited
time) to run a windows guest on qemu/kvm

Links incase your model is a similar type.

http://openhantek.org/
http://sourceforge.net/projects/hantekdso/

Cheers

Si


--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-04 Thread Ralph Corderoy
Hi Terry,

> http://www.picaxe.com/Hardware/Add-on-Modules/PCB-scope/

Looking at the Resources' tab's PDFs, I think that it's made by
http://www.pdamusician.com/dpscope/

> Bus 001 Device 008: ID 04d8:f891 Microchip Technology, Inc.  

That's the microcontroller that does all the work and also has a USB
interface.

> I found a scattering of information; the best being here
> http://www.appnearme.com/blog/2014/7/21/chrome-usb-hid-controlling-your-usb-device-javascr/.

This is assuming the Windows application wants access to a USB HID
device.  It might be that the MCU presents something else, e.g. a serial
port?

> So as detailed in parts 1 and 2 of that link, I have added the rule:
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> to /etc/udev/rules.d

You might want to undo that;  I'm not sure it's relevant.

The creator of the scope seems quite open about its workings, e.g. the
PDFs describing its circuit.  On the forum he provides, I found this old
post about creating a symbolic link to have COM1 access the USB scope in
WINE;  that's probably an older version of the scope that may have
presented a different, serial-port, interface.
http://dpscope.freeforums.org/dpscope-software-under-linux-using-wine-t62.html
I'd try that.

In
http://dpscope.freeforums.org/can-i-write-my-own-application-for-the-dpscope-t6.html
he says the protocol is documented.  Again, that's probably an old
scope, but he may have made later ones available.

http://dpscope.freeforums.org/is-there-an-open-source-version-of-the-pc-software-t125.html
and
http://dpscope.freeforums.org/can-i-run-the-dpscope-software-with-linux-t64.html
point to a simple Linux Python Tk program that talks a bit of the
protocol.

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] Using USB HID Device that isn't accessible

2016-02-04 Thread Peter Merchant

On 04/02/16 11:26, Terry Coles wrote:

Hi,

The good news is that my cheapo USB scope 
(http://www.picaxe.com/Hardware/Add-on-Modules/PCB-scope/) has arrived and 
seems to work.

The bad news is that I have only been able to use it on Windows!  (To be fair,
that's all that was on offer.)  I have been able to install the software under
wine, and the program launches, but says that there is no instrument attached.
In VMWare running Windows XP, the device is recognised and installs
automatically, but the Installer claims that the installation program is
inaccessible.  I've put the VMWare solution on the back-burner for now.

I've seen the scope working on my son's laptop running W7.  However, I have
little access to my son's computer and I feel sure that it could be made to
work under wine, if only the OS would 'attach' the device.


Any ideas on how I can get this to work under Linux to avoid having to mug my
son?


Well, you could try this

Only £169 + Vat
Lenovo G500 Notebook
Core i3-3110M







from elf.co.uk.

Peter
--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR