[vz-dev] iskra mt171
Henry van Gestel
henry.van.gestel at gmail.com
Wed Dec 19 13:45:12 CET 2012
On Dec 19, 2012, at 9:49 AM, Jakob Hirsch wrote:
> Henry van Gestel, 18.12.2012 15:18:
>>>> the apt-get didn’t gave me the wanted results.
>>> If you post the output of apt-get and of iskra2.pl, I could tell you
>>> what's wrong.
>> I temp removed /home/pi/lib/perl5... ( lib made with Cpan termios)
>> result when ./iskra2.perl is started:
>> Can't locate IO/Tty.pm in @INC (@INC contains: /home/pi/lib/perl5
>
> So you need IO::Tty, which you can install with "apt-get install
> libio-tty-perl" (which will actually libio-pty-perl, but this contains
> IO::Tty).
>
> But I just noticed that I was wrong about libio-termios-perl, it is not
> in the debian repos, so built it on my own. Sorry about the fuzz.
> So for testing, your way is probably ok.
With your advise I was be able add the needed libraries to Perl. ("apt-cache search"
>> When running with ## at 76 and 110 output is not consistent:
>> 13:13:20.501 data: '!^B!^@^B^@ ^F^P^@@(^A\n' (21 5e 42 21 5e 40 5e 42
>> 5e 40 20 20 5e 46 5e 50 5e 40 40 28 5e 41 0a)
> ...
>
> It looks like the serial communication is flawed.
> Did you read the wiki entry?
> http://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/iskraemeco_mt171
> It says the MT171's IR signal is quite low, so you should reduce R3 in
> the IR head.
>
Yes I red that, but when I run attached perl iskra-read.perl I got at least the first reply "/ISk5MT171-0133" after sending "/?!"
I miss the results after send Ack ("/x06 x00 x00 x00 x0d x0a)
So it looks like "socat" is working better than "termios" to approach the ttyUSB0
When I exercice the strings with Hterm or comm port toolkit from a win7 NB I got the wanted results ( attachment)
U
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comm port toolkit screen dump.pdf
Type: application/pdf
Size: 85907 bytes
Desc: not available
URL: <http://volkszaehler.org/pipermail/volkszaehler-dev/attachments/20121219/00cd83a9/attachment-0001.pdf>
-------------- next part --------------
Unbelievable it is so hard to accomplish the same results under linux.
So I hope I dont take to much of your time but I think it must be possible under linux, but how?
Is it an idea to use socat instead of termios to approach the ttyUSB ports?
regards
Henry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iskra-read.perl
Type: application/octet-stream
Size: 5096 bytes
Desc: not available
URL: <http://volkszaehler.org/pipermail/volkszaehler-dev/attachments/20121219/00cd83a9/attachment-0001.obj>
More information about the volkszaehler-dev
mailing list