DevHeads.net

Re: Is there a linux Driver module for Elitech data logger RC5 ?

I HAD TO INITIATE A NEW ACCOUNT AT A NEW MAIL ADDRESS SINCE MY FORMER
PROVIDER HAS UNEXPECTEDLY CLOSED UP. Sorry if you already got the
following questions a few hours ago, any reply you may have sent won't
reach me, please resend it to the list so it gets forwarded to me, or
send it to my new private mail: <a href="mailto: ... at free dot fr"> ... at free dot fr</a>

Thanks for your help.
I haven't yet succeeded in getting this device working.
There were two things to be tested.
The first one was proposed by Eero, who suggested a device setup by 'CIVIC'
civic/elitech-datareader
This software implies that a serial driver get installed first. At this
stage, I fail to undersand. A serial driver ?? Why on Earth ? The RC5
Elitech device is not 'serial', it is a usb device with a usb plug... To
my knowledge, serial modules are somewhat outdated, and I don't know of
any recent one, years have elapsed since every computer had RS232 serial
ports... However, supposing that such system may operate with a device
that is connected to a usb port, I ought to give it a try.
Unfortunately, when the matter came to download the serial driver module
for linux on a software site in China, I found that it was all written
in Chinese, with barely 5 or 6 English words on each page, which was not
enough for me to understand... I tested a few zip files which I
couldn't unzip, the zip module saying that it couldn't find needed parts
of the files...

A comment was made by Robert :

'It might show up as a serial port (eg /dev/ttyACM? or /dev/ttyUSB?). You
would then need to write a program that reads and decodes the messages
sent.'

In my /dev directory, i found this :
drwxr-xr-x 4 root root 80 sept. 11 12:36 serial
crw-rw---- 1 root dialout 188, 0 sept. 10 19:44 ttyUSB0

those 2 lines appear and disappear when plugging/unplugging the RC5,
which confirms,
but I don't know what to do next.

Then Oliver did propose the second thing :

'first hit when googling "Elitech data logger RC5 linux" points to:

https://pypi.org/project/elitech-datareader/'

the third line of the description:

"Enables to use RC-4/RC-5 on Mac, Linux, Windows."

... kind of indicates it works'.

On this site, Brian R Mooga states that in 2015 he succeeded to get RC5
Elitech data collector to operate on his linux system Ubuntu 14.04. His
lsusb test said :

Bus 002 Device 011 id 0c45:7401 Microdia

My system (Debian Stretch) says, when the device is connected to an usb
port :

lsusb
Bus 001 Device 004 id 1a86:7523 Qin Heng Electronics HL-320
USB-Serial adapter

I tested the url above
Below are the details :

I am on Debian Stretch, so I don't use 'sudo', but I log as superuser.

lsusb shows this :
Bus 001 Device 004:ID 1a86:7523 QinHeng Electronics HL-340
USB-Serial adapter

while Brian got in 2015 :
Bus 002 Device 011:ID 0c45:7401 Microdia)

However I did install Python software as suggested. It went up to the
point :

.......................
......................
# cd /home/bd/tmp
# git clone git://....................................
# cd temper-python/
# python setup.py install

there, I got an error message, about the instruction ', encoding' that
was said not to be available. I then edited the setup.py file and
removed this parameter, and tried again :

# python setup.py install

This time, I had no errors. But, if I launch :

# temper-poll

it says :
Found 0 devices

I tried the same thing on my laptop running ubuntu 14.04 and got the
same results

Thanks in advance for more help

Bernard

On 05/09/2018 20:13, Eero Volotinen wrote:

Comments

Re: Is there a linux Driver module for Elitech data logger RC5 ?

By Robert Heller at 09/11/2018 - 12:27

There are several "USB<->MCU" chips available (some built into MCUs). Almost
all show up "emulating" a RS232 port. "MCU" == MicroController Unit,
basically a microprocessor with a pile of GPIO pins, with on-chip RAM and
"flash"/EEPROM -- these are commonly used for all sorts of gadgets, including
various USB-connected sensor devices, like your datareader.

The USB<->MCU can be used to download firmware to the MCU, using a "protocol"
of sorts over the "psuedo-serial port" that shows up. This is in fact
*exactly* what the Arduino and all of its family and friends and relatives do.
One can also use gdb over this "psuedo-serial port".

*Some* "USB<->MCU" chips can be set to disable the "psuedo-serial port"
emulation and implement some sort of "generic" USB endpoint interface. But I
suspect that many of the gadget makers don't bother and just put their I/O
over the "psuedo-serial port" and this is probably true of the older gadget
makers who were making RS232 / RS485 interfaced gadgets back in the "old
days".

In your case the "Elitech data logger RC5" is much like an Arduino and the USB
interface chip is doing its "default" thing and showing up as a "psuedo-serial
port". You don't actually need a "driver" -- Linux already has a kernel
driver for this USB-based "psuedo-seria port" (since /dev/ttyUSB0 is already
showing up). At this point you just need software that reads from this serial
port (/dev/ttyUSB0) and "decodes" the messages from the data logger. There
are two possiblities, either the data logger is sending ASCII text [lines] or
it is sending some sort of binary message (eg SOT data chksum EOT or something
like that).

Yes, this maps to the ch341.ko driver, which has been around since at least
Kernel version 2.6.32 (I have it on my CentOS 6 machine and it is also on my
Ubuntu 14.04 VM as well).

There is probably something missing or you have a python version mismatch.
Use the original setup.py file and post the complete error message here.