Climate data logger ... !

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Climate data logger ... !

Post by littleideas »

Hello everyone ...

Before I give up and install windows on my HD as well :-)

Maybe there is a solution.

The program to read the sampled data in the data-logger can be installed and started using WINE without problems. But the driver (which is installed separately) which allows the Data-logger to be recognised by the program on the USB port, cannot be installed.

Its name is "Silicon laboratories CP210 x USB to UART Bridge Driver"

The installer loads on wine, after clicking on "install" there is a wine-error message:
"In the program CP210xVCPinstaller.exe an error occurred"

Hope someone can help
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

Oh i forgot to say,

i use Ubuntu 10.04LTS, 64 Bit version

The sensor is a Temperature & Humidity data logger from Voltcraft
User avatar
L. Rahyen
Moderator
Moderator
Posts: 339
Joined: Fri Feb 22, 2008 9:13 pm

Climate data logger ... !

Post by L. Rahyen »

On 2010-08-26 (August, Thursday) 23:24:13 littleideas wrote:
The program to read the sampled data in the data-logger can be installed
and started using WINE without problems. But the driver (which is
installed separately) which allows the Data-logger to be recognised by the
program on the USB port, cannot be installed.
Hardware drivers will not work in Wine, sorry.

However, from your post I understood that you have Windows. So you can
download VirtualBox for Ubuntu 10.04LTS 64-bit:
http://download.virtualbox.org/virtualb ... _amd64.deb

Install it by running (assuming that you downloaded the file into current
directory):
sudo dpkg -i virtualbox-3.2_3.2.8-64453~Ubuntu~lucid_amd64.deb


And run it:

VirtualBox

If you never used it before, read documentation:
http://www.virtualbox.org/wiki/End-user_documentation

Set memory to recommended minimum for your version of Windows (in order to
preserve as much as possible memory for Linux host) and then install Windows in
it; then install your software (and the driver), plug-in your device and that's
it. This isn't perfect solution, but it is better than dual-boot.

If you have any question about VirtualBox please ask them at
http://forums.virtualbox.org/ (but make sure to read VirtualBox documentation
first).
halfnitty
Level 1
Level 1
Posts: 6
Joined: Wed Aug 18, 2010 4:39 am

Climate data logger ... !

Post by halfnitty »

On Thu, Aug 26, 2010 at 06:24:13PM -0500, littleideas wrote:
The program to read the sampled data in the data-logger can be installed and started using WINE without problems. But the driver (which is installed separately) which allows the Data-logger to be recognised by the program on the USB port, cannot be installed.

Its name is "Silicon laboratories CP210 x USB to UART Bridge Driver"
I have just had to patch the cp210x driver to support a similar chip
(in a Pirelli mobile).

The first thing to check - at the linux level - is that the driver
recognises your device. When you plug it in, does the cp210x driver
get loaded (lsmod |grep cp210x) and does /dev/ttyUSB* appear?

Use lsusb -v to inspect the idVendor and idProduct: that pair needs to be
recognised by the driver. There is a list in cp210x.c, and you might
have to add an extra line if that pair is not already present. If you do
that and it works, send the patch to the author & maybe the kernel bugzilla.

After that, I can suggest how to get it connected under wine, but first
things first.

I am assuming that you know a little about patching and so on. If not,
at least post the lsusb -v output if /dev/ttyUSB* does not appear.

ael
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

@Rayhen:

VirtualBox is a wonderful thing ...

The driver readily installes, but when plugged in the USB, the field for the USB device in DosBox remains grey...

don't know how to help it...
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

not DosBox i meant Virtual Box ... sorry
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

Well, there were many pages output. Sorry I don't understand anything about patching etc...
But I hope I recognized the interesting part...

Here it is.

Bus 005 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x10c4 Cygnal Integrated Products, Inc.
idProduct 0xea60 CP210x Composite Device
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
cannot read device status, Operation not permitted (1)
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

I opened a topic in the VirtualBox forum ...

http://forums.virtualbox.org/viewtopic.php?f=2&t=34051

lets discuss only WINE-solutions in here.
halfnitty
Level 1
Level 1
Posts: 6
Joined: Wed Aug 18, 2010 4:39 am

Climate data logger ... !

Post by halfnitty »

On Fri, Aug 27, 2010 at 11:46:22AM -0500, littleideas wrote:
But I hope I recognized the interesting part...

Here it is.

Bus 005 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
..[snip]..
idVendor 0x10c4 Cygnal Integrated Products, Inc.
idProduct 0xea60 CP210x Composite Device
Ok. We need to know whether (0x10c4,0xea60) is already complied into the
cp210x driver. I am replying from a netbook without kernel source
installed, so can't check directly just now. But if
/dev/ttyUSB(something) appears when you plug your device in, then it
must be. You can confirm by checking that cp210x is loaded by looking
with lsmod as in my previous message. Look also in /var/log/messages:
that is sure to record the device being plugged in, but does it also
say that the cp210x driver is being loaded?

ael
halfnitty
Level 1
Level 1
Posts: 6
Joined: Wed Aug 18, 2010 4:39 am

Climate data logger ... !

Post by halfnitty »

On Fri, Aug 27, 2010 at 06:34:27PM +0100, ael wrote:
On Fri, Aug 27, 2010 at 11:46:22AM -0500, littleideas wrote:
But I hope I recognized the interesting part...

Here it is.

Bus 005 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
..[snip]..
idVendor 0x10c4 Cygnal Integrated Products, Inc.
idProduct 0xea60 CP210x Composite Device
Ok. We need to know whether (0x10c4,0xea60) is already complied into the
cp210x driver. I am replying from a netbook without kernel source
Actually, a quick google threw up

http://lxr.free-electrons.com/source/dr ... l/cp210x.c
and

{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */

so, unless you have an older version of the driver, it looks as if
it is there.

So you should see /dev/ttyUSB0 or /dev/ttyUSB1 or whatever.
If that doesn't happen, maybe there is a udev rule problem.

So please confirm that /dev/ttyUSBsomething is created, and cp210x is
loaded (use lsmod). Otherwise we might have to worry above udev as above.

ael
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

Hello,

I klicked on the link of the driver.

I definitely DONT understand anything about patching, installations etc ... :-)

Don't know what to do with this page there ...
littleideas
Level 1
Level 1
Posts: 8
Joined: Thu Aug 26, 2010 3:59 pm

Post by littleideas »

Okay ... now after i tried to reinstall the Program for the datalogger this ALSO does not work any more.

I give it up... Thanks for your help!
halfnitty
Level 1
Level 1
Posts: 6
Joined: Wed Aug 18, 2010 4:39 am

Climate data logger ... !

Post by halfnitty »

On Fri, Aug 27, 2010 at 04:19:27PM -0500, littleideas wrote:
Okay ... now after i tried to reinstall the Program for the datalogger this ALSO does not work any more.

I give it up... Thanks for your help!
Well, I don't know why you are giving up: it is looking quite promising.
As for re installing, you seem to be back in wine.

As for clicking on the link to the driver, it should just display the
source of the driver, and if you scroll down (or use use ^F or whatever
your browser search sequence is & look for 0x10C4) you will eventually
find the line that I quoted. That merely confirms that the driver
already knows about your data logger, and that it should get loaded
automagically when you plug it in.

So that link was just for information.

You don't seem to have actually found out whether the driver is loaded.
Does that mean that you just don't understand how to read
/var/log/messages, display lsmod or look for /dev/ttyUSB*?

Simple instructions:

1) Plug in your logger.
2) In a terminal, type
less /var/log/messages
{if that doesn't work, do it as root or use sudo};
scroll down towards the end { esc > } will get you there immediately};
Look for messages about the logger being plugged in.

For example, here is what happens when I plug in one of my mobiles
using the same chip:

------------------------------------------------------------------------------------
Aug 28 08:39:40 elf kernel: [ 1628.808139] usb 2-1: new full speed USB device using uhci_hcd and address 2
Aug 28 08:39:40 elf kernel: [ 1628.971181] usb 2-1: New USB device found, idVendor=0489, idProduct=e000
Aug 28 08:39:40 elf kernel: [ 1628.971199] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 28 08:39:40 elf kernel: [ 1628.971211] usb 2-1: Product: TC 300
Aug 28 08:39:40 elf kernel: [ 1628.971221] usb 2-1: Manufacturer: Silicon Labs
Aug 28 08:39:40 elf kernel: [ 1628.971230] usb 2-1: SerialNumber: 0001
Aug 28 08:39:40 elf kernel: [ 1628.971845] usb 2-1: configuration #1 chosen from 1 choic
Aug 28 08:39:40 elf kernel: [ 1629.011334] usbcore: registered new interface driver usbserial
Aug 28 08:39:40 elf kernel: [ 1629.012303] USB Serial support registered for generic
Aug 28 08:39:40 elf kernel: [ 1629.013145] usbcore: registered new interface driver usbserial_generic
Aug 28 08:39:40 elf kernel: [ 1629.013155] usbserial: USB Serial Driver core
Aug 28 08:39:40 elf kernel: [ 1629.019656] USB Serial support registered for cp210x
Aug 28 08:39:40 elf kernel: [ 1629.020672] cp210x 2-1:1.0: cp210x converter detected
Aug 28 08:39:40 elf kernel: [ 1629.132147] usb 2-1: reset full speed USB device using uhci_hcd and address 2
Aug 28 08:39:40 elf kernel: [ 1629.281764] usb 2-1: cp210x converter now attached to ttyUSB0
Aug 28 08:39:40 elf kernel: [ 1629.281843] usbcore: registered new interface driver cp210x
Aug 28 08:39:40 elf kernel: [ 1629.281855] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver

---------------------------------------------------------------------------------------------------------

If you see something similar & particularly the last line mentioning the
cp210x driver, then all is well.


As an additional check, although it is not necessary if the message is
ok, (3) in a terminal type:

lsmod |grep cp210x
{again you might need to do that as root or use sudo}

On my machine, I get:
--------------------------------------------------

# lsmod |grep cp210x
cp210x 9417 0
usbserial 21847 1 cp210x
usbcore 98402 6 cp210x,usbserial,uvcvideo,uhci_hcd,ehci_hcd

---------------------------------------------------------------------------

The first line above shows that the cp210x driver has loaded.

The last step (4) is to check that /dev/ttyUSB(something) has been created.
As usual in a terminal, type

ls -l /dev/ttyUSB*

Example, on my machine this gives:
----------------------------------------------------------

$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Aug 28 08:39 /dev/ttyUSB0
----------------------------------------------------------

If you plug and unplug, that might change to ttyUSB1.

If any on these steps fails, then I may be able to suggest how to fix
the problem.



As for the failure to re-install the program under wine, a wine expert
can probably suggest a solution: probably just need to clean out
registry or other wine files. But it is pointless until you have the
cp210x driver working as above. In case you don't realise, the
Windoze driver under wine is completely replaced by cp210x. When
you have the data logger working under wine, wine will use cp210x, so
forget the windoze driver garbage.

ael
Locked