Powerlink serial pinout, linux daemon and web interface

Forum about Visonic products like Powermax Plus and Powermax Pro

Moderators: Rene, Willem4ever

nkildal
Starting Member
Starting Member
Posts: 10
Joined: Tue Feb 17, 2015 7:29 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by nkildal »

So I opened up my panel - apparently my 2x5 header isn't labeled PC/IR but FL-PR (Flash/Program ?):
PCB
PCB
IMG_0015.JPG (284.56 KiB) Viewed 19116 times
Panel
Panel
IMG_0018.JPG (170.04 KiB) Viewed 19116 times
When connecting to this port (the one marked by the green rectangle) I get a different output than before :-) but unfortunately still nothing passing the checksum test.

Code: Select all

powermax:/usr/local/sbin/powermax/pmaxd-master# ./pmaxd -fvvvvvvvvvvvvvvvvvvvvv
 NOTICE: [Thu Feb 26 13:42:14 2015 initLog:0058]Logging initialized
 NOTICE: [Thu Feb 26 13:42:14 2015 initLog:0059]Verbose level: 21
 NOTICE: [Thu Feb 26 13:42:14 2015 main:0411]Program started by User 0
 INFO: [Thu Feb 26 13:42:14 2015 main:0413]setting SID
 NOTICE: [Thu Feb 26 13:42:14 2015 main:0445]Starting......
 INFO: [Thu Feb 26 13:42:14 2015 initSerialPort:0069]there are 1 device in your config file
 INFO: [Thu Feb 26 13:42:14 2015 initSerialPort:0082]opening /dev/ttyAMA0
I have 15 zone:
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 0, name: 0
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 1, name: 1
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 2, name: 2
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 3, name: 3
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 4, name: 4
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 5, name: 5
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 6, name: 6
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 7, name: 7
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 8, name: 8
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 9, name: 9
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 10, name: Stue
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 11, name: Gang
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 12, name: Kontor
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 13, name: Fordør
 NOTICE: [Thu Feb 26 13:42:14 2015 PmaxInit:0162]zone: 14, name: Bagdør
 DEBUG: [Thu Feb 26 13:42:14 2015 sendBuffer:0170]Sending the following buffer to serial TTY
 DEBUG: [Thu Feb 26 13:42:14 2015 logBuffer:0153]BufferSize: 12
 DEBUG: [Thu Feb 26 13:42:14 2015 logBuffer:0154]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Thu Feb 26 13:42:14 2015 calculChecksum:0163]checksum: 001A
 DEBUG: [Thu Feb 26 13:42:14 2015 sendBuffer:0179]result of serial write:: 15
 DEBUG: [Thu Feb 26 13:42:14 2015 sendBuffer:0170]Sending the following buffer to serial TTY
 DEBUG: [Thu Feb 26 13:42:14 2015 logBuffer:0153]BufferSize: 12
 DEBUG: [Thu Feb 26 13:42:14 2015 logBuffer:0154]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Thu Feb 26 13:42:14 2015 calculChecksum:0163]checksum: 000B
 DEBUG: [Thu Feb 26 13:42:14 2015 sendBuffer:0179]result of serial write:: 15
 DEBUG: [Thu Feb 26 13:42:14 2015 main:0452]Sarting main loop....
 DEBUG: [Thu Feb 26 13:42:16 2015 packetManager:0335]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Thu Feb 26 13:42:16 2015 calculChecksum:0163]checksum: 00EB
 ERR: [Thu Feb 26 13:42:16 2015 deFormatBuffer:0199]checksum NOK calculated:00EB in packet:00B6
 ERR: [Thu Feb 26 13:42:16 2015 packetManager:0355]Packet not correctly formated
 DEBUG: [Thu Feb 26 13:42:16 2015 logBuffer:0153]BufferSize: 254
 ERR: [Thu Feb 26 13:42:16 2015 logBuffer:0154]Buffer: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 29 55 FB BE BC 55 FB BE 20 4D E6 B6 00 2D 00 00 05 00 00 00 BF 00 00 00 3B CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 80 E6 EC B6 7C 55 FB BE 00 00 00 00 00 00 00 00 D4 C7 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 00 00 00 00 00 00
 DEBUG: [Thu Feb 26 13:42:16 2015 packetManager:0362]End of packet treatment
 DEBUG: [Thu Feb 26 13:42:25 2015 packetManager:0335]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Thu Feb 26 13:42:25 2015 calculChecksum:0163]checksum: 00EB
 ERR: [Thu Feb 26 13:42:25 2015 deFormatBuffer:0199]checksum NOK calculated:00EB in packet:00B6
 ERR: [Thu Feb 26 13:42:25 2015 packetManager:0355]Packet not correctly formated
 DEBUG: [Thu Feb 26 13:42:25 2015 logBuffer:0153]BufferSize: 254
 ERR: [Thu Feb 26 13:42:25 2015 logBuffer:0154]Buffer: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 29 55 FB BE BC 55 FB BE 20 4D E6 B6 00 2D 00 00 05 00 00 00 BF 00 00 00 3B CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 80 E6 EC B6 7C 55 FB BE 00 00 00 00 00 00 00 00 D4 C7 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 00 00 00 00 00 00
 DEBUG: [Thu Feb 26 13:42:25 2015 packetManager:0362]End of packet treatment
Regardless of which timeout value I set (tried a lot of values from as low as 10 ms to 100000 ms) I get the same output repeatedly from the panel:

Code: Select all

00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 29 55 FB BE BC 55 FB BE 20 4D E6 B6 00 2D 00 00 05 00 00 00 BF 00 00 00 3B CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 80 E6 EC B6 7C 55 FB BE 00 00 00 00 00 00 00 00 D4 C7 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 2D 00 00 05 00 00 00 BF 00 00 00 31 CA 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A FF 12 0F 17 16 FF 00 00 00 00 00 00 00 00 00
Does this make any sense ?

Regards
Nicolai
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

oups.....
I thought you where using a powermax pro and not a powermax plus....

It look like the protocol is compatible on the powermax plus, but I don't know where to plug it, I never tried it and there might be some bug..........

still away from internet so sorry for the lag.......
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

I am back with internet:
according to this video : https://www.youtube.com/watch?v=tZpPvuiFj-Q
you need to connect the powerlink to the upper port, but I don't know the pinout of this port, there might (in fact i am quite sure) many serial IO on this header, did you find a complete description of the port ?

best regards

Vincent
nkildal
Starting Member
Starting Member
Posts: 10
Joined: Tue Feb 17, 2015 7:29 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by nkildal »

Hi Vincent

I'll go poke around on my spare Powermax+ to see whether there are other serial IO's on that port.

I initially found out about that port via this post: http://www.raspberrypi.org/forums/viewt ... 44&t=25890
Unfortunately they don't seem to have gotten any further...

Regards
Nicolai
nkildal
Starting Member
Starting Member
Posts: 10
Joined: Tue Feb 17, 2015 7:29 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by nkildal »

Hi again

Ok - I am finally making progress :-) :

I have now again connected to the top 2x7 pin header - using the pins shown here:
Powermax+ serial port
Powermax+ serial port
Powermax+ serial port.png (97.13 KiB) Viewed 18830 times
I then set up a ser2net daemon on the Raspberry Pi, sharing its serial port over the network.
On a Windows 7 PC I then installed RealTerm and enabled capturing in HEX.
I then initiated Powerlink pairing on the Powermax+ panel - getting this capture:

Code: Select all

0D   AB 0A 00 01 00 00 00 00 00 00 00 43   06 0A
0D   AB 0A 00 01 00 00 00 00 00 00 00 43   06 0A
(I filled in blanks to show preamble, message, checksum and post amble)

The above two comm strings are exactly as expected, when the Powermax+ panel initiates Powerlink pairing - so now I am sure I found the right port to use :-)
I'll try to compile the pmaxd daemon on another platform (first try will probably be Debian)...

/Nicolai
nkildal
Starting Member
Starting Member
Posts: 10
Joined: Tue Feb 17, 2015 7:29 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by nkildal »

Ok - got pmaxd compiled on Debian, and now seem to have usable communication with the panel :-)
Here a snip from the interesting lines when running in debug mode:

Code: Select all

 INFO: [Sat Mar  7 00:57:39 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Arm/disarm-event
 INFO: [Sat Mar  7 00:58:14 2015 PmaxStatusUpdatePanel:0384]setting Zone 10 to interior
 INFO: [Sat Mar  7 00:58:14 2015 PmaxStatusUpdatePanel:0386]Zone 10 type: interior
 INFO: [Sat Mar  7 00:58:14 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Zone-event     Zone 10 Violated (Motion)
 INFO: [Sat Mar  7 00:58:25 2015 PmaxStatusUpdatePanel:0384]setting Zone 11 to interior
 INFO: [Sat Mar  7 00:58:25 2015 PmaxStatusUpdatePanel:0386]Zone 11 type: interior
 INFO: [Sat Mar  7 00:58:25 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Zone-event     Zone 11 Violated (Motion)
 INFO: [Sat Mar  7 00:58:31 2015 PmaxStatusUpdatePanel:0384]setting Zone 12 to interior
 INFO: [Sat Mar  7 00:58:31 2015 PmaxStatusUpdatePanel:0386]Zone 12 type: interior
 INFO: [Sat Mar  7 00:58:31 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Zone-event     Zone 12 Violated (Motion)
 INFO: [Sat Mar  7 00:58:50 2015 PmaxStatusUpdateZoneBat:0406]Status Update : Zone state/Battery
 INFO: [Sat Mar  7 00:58:50 2015 PmaxStatusUpdateZoneBat:0416]Zone 14 is open
 INFO: [Sat Mar  7 00:58:50 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Zone-event     Zone 14 Open
 INFO: [Sat Mar  7 00:58:52 2015 PmaxStatusUpdateZoneBat:0406]Status Update : Zone state/Battery
 INFO: [Sat Mar  7 00:58:52 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Zone-event     Zone 14 Closed
 INFO: [Sat Mar  7 00:59:06 2015 PmaxStatusUpdatePanel:0384]setting Zone 10 to interior
 INFO: [Sat Mar  7 00:59:06 2015 PmaxStatusUpdatePanel:0386]Zone 10 type: interior
 INFO: [Sat Mar  7 00:59:06 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Zone-event     Zone 10 Violated (Motion)
 INFO: [Sat Mar  7 00:59:50 2015 PmaxStatusUpdatePanel:0399]System status: disarmed   Flags : Ready Arm/disarm-event
Thanks for all your help - I'm now going to decide exactly how I will design my system (what will run where and so forth) :-)

Regards Nicolai
powermaxuser
Starting Member
Starting Member
Posts: 2
Joined: Mon May 18, 2015 4:44 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by powermaxuser »

I have a PowerMax Pro and I've connected a USR-TCP-E to the PC/IP pins but I still can't see the PowerMax Pro to send any serial data to the PC/IP port. Is there any configuration required to tell the PowerMax Pro to use this?
viknet
Member
Member
Posts: 65
Joined: Thu Jan 26, 2012 1:48 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by viknet »

depending on the firmware on your powermax, you might have to discover the (faked) "powerlink" using the installer menu
Dan_Richardson
Starting Member
Starting Member
Posts: 1
Joined: Mon May 18, 2015 4:37 am

Re: Powerlink serial pinout, linux daemon and web interface

Post by Dan_Richardson »

viknet wrote:depending on the firmware on your powermax, you might have to discover the (faked) "powerlink" using the installer menu
Would I go through the enrollment process as one would do if the Powerlink2 is installed?
povlhp
Starting Member
Starting Member
Posts: 1
Joined: Mon Jun 22, 2015 3:23 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by povlhp »

Did anybody try to connect the $2-$3 ESP8266 WiFi<-> 3.3V serial module directly to the PowerMax, to network enable it ? Then use a remote PC / AP to render the we interface, and talk to the PowerMax Pro through WiFi -> the ESP8266

Shuldn't this be easy and doable ? Just need the FTDI to program the ESP8266 to connect to home network.
malo
Starting Member
Starting Member
Posts: 2
Joined: Tue Jun 30, 2015 2:27 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by malo »

Trying to compile (on a 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux)
btw.. same result on my raspberry pi

root@NUC:/usr/local/src/powermax/pmaxd-master# make
cc -I /FLU -fsigned-char -c pmaxd.c
pmaxd.c:300:6: warning: conflicting types for ‘serialHandler’ [enabled by default]
void serialHandler() {
^
In file included from pmaxd.c:23:0:
pmaxd-xpl.c:44:7: note: previous implicit declaration of ‘serialHandler’ was here
serialHandler();
^
pmaxd.c:336:6: warning: conflicting types for ‘packetManager’ [enabled by default]
void packetManager(struct PlinkBuffer * commandBuffer) {
^
pmaxd.c:328:9: note: previous implicit declaration of ‘packetManager’ was here
packetManager(&commandBuffer);
^
malo
Starting Member
Starting Member
Posts: 2
Joined: Tue Jun 30, 2015 2:27 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by malo »

I have some problem here...

pmaxd -fvvvvvvv
NOTICE: [Wed Jul 1 00:48:48 2015 initLog:0058]Logging initialized
NOTICE: [Wed Jul 1 00:48:48 2015 initLog:0059]Verbose level: 7
NOTICE: [Wed Jul 1 00:48:48 2015 main:0412]Program started by User 0
INFO: [Wed Jul 1 00:48:48 2015 main:0414]setting SID
NOTICE: [Wed Jul 1 00:48:48 2015 main:0446]Starting......
INFO: [Wed Jul 1 00:48:48 2015 initSerialPort:0069]there are 2 device in your config file
INFO: [Wed Jul 1 00:48:48 2015 initSerialPort:0082]opening /dev/ttyUSB0
I have 5 zone:
NOTICE: [Wed Jul 1 00:48:48 2015 PmaxInit:0162]zone: 0, name: entre-door
NOTICE: [Wed Jul 1 00:48:48 2015 PmaxInit:0162]zone: 1, name: basement-door
NOTICE: [Wed Jul 1 00:48:48 2015 PmaxInit:0162]zone: 2, name: ir-kok
NOTICE: [Wed Jul 1 00:48:48 2015 PmaxInit:0162]zone: 3, name: ir-hall
NOTICE: [Wed Jul 1 00:48:48 2015 PmaxInit:0162]zone: 4, name: fire-nedervaning
DEBUG: [Wed Jul 1 00:48:48 2015 sendBuffer:0171]Sending the following buffer to serial TTY
DEBUG: [Wed Jul 1 00:48:48 2015 logBuffer:0154]BufferSize: 12
DEBUG: [Wed Jul 1 00:48:48 2015 logBuffer:0155]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
DEBUG: [Wed Jul 1 00:48:48 2015 calculChecksum:0164]checksum: 001A
DEBUG: [Wed Jul 1 00:48:48 2015 sendBuffer:0180]result of serial write:: 15
DEBUG: [Wed Jul 1 00:48:48 2015 sendBuffer:0171]Sending the following buffer to serial TTY
DEBUG: [Wed Jul 1 00:48:48 2015 logBuffer:0154]BufferSize: 12
DEBUG: [Wed Jul 1 00:48:48 2015 logBuffer:0155]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
DEBUG: [Wed Jul 1 00:48:48 2015 calculChecksum:0164]checksum: 000B
DEBUG: [Wed Jul 1 00:48:48 2015 sendBuffer:0180]result of serial write:: 15
DEBUG: [Wed Jul 1 00:48:48 2015 main:0453]Sarting main loop....


and then nothing more ??
marck
Member
Member
Posts: 127
Joined: Sat Sep 18, 2010 4:12 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by marck »

Hi everyone,

I really can use some help with setting this up. I'm already quite far, but currently I have an issue with getting the checksum correct. I have tried to change the packet_timeout from 2000 to 5000, 6000 and 7000, with the same checksum NOK result. Using a time out of 6000 at least gives me the preferred length of 12. Maybe someone can give me some suggestions to point me to the right direction.

Thanks

Config:
Raspberry Pi
Prolific Technology, Inc. PL2303 USB to Serial Port. This one is connected to ttyUSB0
Visonic PowerMax Pro which is connected via the PC/IP to the PL2303 USB to Serial Port
xplhub is running
I can load the alarm.html website
Added this to pmaxd.c: while (((c = getopt (argc, argv, "fvh")) != -1) && (c != 255))
Compiled with ayasystems Makefile which among other things includes : -fsigned-char

Code: Select all

pmax.info
  # authenticator
    usercode=0x1234;
    device = ["/dev/ttyUSB0", "/dev/ttyUSB1"]; // Use more than 2
    zonename = ["R.D.C.", "Etage", "Salon", "Salle a manger", "cuisine", "porte$
    restartscript = "/etc/restart.sh";
    packet_timeout = 6000;

Code: Select all

pi@raspberrypi /etc $ sudo pmaxd -fvvvvvvv
 NOTICE: [Tue Jul 14 23:25:22 2015 initLog:0058]Logging initialized
 NOTICE: [Tue Jul 14 23:25:22 2015 initLog:0059]Verbose level: 7
 NOTICE: [Tue Jul 14 23:25:22 2015 main:0412]Program started by User 0
 INFO: [Tue Jul 14 23:25:22 2015 main:0414]setting SID
 NOTICE: [Tue Jul 14 23:25:22 2015 main:0446]Starting......
 INFO: [Tue Jul 14 23:25:22 2015 initSerialPort:0069]there are 2 device in your config file
 INFO: [Tue Jul 14 23:25:22 2015 initSerialPort:0082]opening /dev/ttyUSB0
I have 8 zone:
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 0, name: R.D.C.
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 1, name: Etage
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 2, name: Salon
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 3, name: Salle a manger
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 4, name: cuisine
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 5, name: porte garage
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 6, name: volet garage
 NOTICE: [Tue Jul 14 23:25:22 2015 PmaxInit:0162]zone: 7, name: detecteur incendie
 DEBUG: [Tue Jul 14 23:25:22 2015 sendBuffer:0171]Sending the following buffer to serial TTY
 DEBUG: [Tue Jul 14 23:25:22 2015 logBuffer:0154]BufferSize: 12
 DEBUG: [Tue Jul 14 23:25:22 2015 logBuffer:0155]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jul 14 23:25:22 2015 calculChecksum:0164]checksum: 001A
 DEBUG: [Tue Jul 14 23:25:22 2015 sendBuffer:0180]result of serial write:: 15
 DEBUG: [Tue Jul 14 23:25:23 2015 sendBuffer:0171]Sending the following buffer to serial TTY
 DEBUG: [Tue Jul 14 23:25:23 2015 logBuffer:0154]BufferSize: 12
 DEBUG: [Tue Jul 14 23:25:23 2015 logBuffer:0155]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Tue Jul 14 23:25:23 2015 calculChecksum:0164]checksum: 000B
 DEBUG: [Tue Jul 14 23:25:23 2015 sendBuffer:0180]result of serial write:: 15
 DEBUG: [Tue Jul 14 23:25:23 2015 main:0453]Sarting main loop....
 DEBUG: [Tue Jul 14 23:25:47 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jul 14 23:25:47 2015 calculChecksum:0164]checksum: 00D5
 ERR: [Tue Jul 14 23:25:47 2015 deFormatBuffer:0200]checksum NOK calculated:00D5 in packet:0019
 ERR: [Tue Jul 14 23:25:47 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Tue Jul 14 23:25:47 2015 logBuffer:0154]BufferSize: 12
 ERR: [Tue Jul 14 23:25:47 2015 logBuffer:0155]Buffer: 0B 13 08 01 00 00 00 00 00 00 00 03
 DEBUG: [Tue Jul 14 23:25:47 2015 packetManager:0363]End of packet treatment
 DEBUG: [Tue Jul 14 23:25:50 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Tue Jul 14 23:25:50 2015 calculChecksum:0164]checksum: 00D5
 ERR: [Tue Jul 14 23:25:50 2015 deFormatBuffer:0200]checksum NOK calculated:00D5 in packet:0019
 ERR: [Tue Jul 14 23:25:50 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Tue Jul 14 23:25:50 2015 logBuffer:0154]BufferSize: 12
 ERR: [Tue Jul 14 23:25:50 2015 logBuffer:0155]Buffer: 0B 13 08 01 00 00 00 00 00 00 00 03
 DEBUG: [Tue Jul 14 23:25:50 2015 packetManager:0363]End of packet treatment
marck
Member
Member
Posts: 127
Joined: Sat Sep 18, 2010 4:12 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by marck »

Did a couple of more test, and for certain the cabling is setup correctly.

I connected the PL2303 USB dongle to my windows pc and the powermax alarm. I used Realterm to see the output when the pairing function for the powerlink is started within the Visonic alarm. The below code is the output, therefore I'm using the correct cable setup and also the correct ports/pins. These two strings are aparently the default strings that are used to pair the powerlink, at least according to this post.. http://www.domoticaforum.eu/viewtopic.p ... 180#p74242

Code: Select all

0D AB 0A 00 01 00 00 00 00 00 00 00 43 06 0A
0D AB 0A 00 01 00 00 00 00 00 00 00 43 06 0A
I also tried to setup communication by using the ttyAMA0 port. The exact same results, as can be seen below (used time out values between 100 and 6000). I'm would think that is more likely a software issue.

Code: Select all

pi@raspberrypi /etc $ sudo pmaxd -f -vvvvvvvvvv
 NOTICE: [Fri Jul 17 14:58:34 2015 initLog:0058]Logging initialized
 NOTICE: [Fri Jul 17 14:58:34 2015 initLog:0059]Verbose level: 10
 NOTICE: [Fri Jul 17 14:58:34 2015 main:0412]Program started by User 0
 INFO: [Fri Jul 17 14:58:34 2015 main:0414]setting SID
 NOTICE: [Fri Jul 17 14:58:34 2015 main:0446]Starting......
 INFO: [Fri Jul 17 14:58:34 2015 initSerialPort:0069]there are 2 device in your config file
 INFO: [Fri Jul 17 14:58:34 2015 initSerialPort:0082]opening /dev/ttyAMA0
I have 5 zone:
 NOTICE: [Fri Jul 17 14:58:34 2015 PmaxInit:0162]zone: 0, name: R.D.C.
 NOTICE: [Fri Jul 17 14:58:34 2015 PmaxInit:0162]zone: 1, name: cuisine
 NOTICE: [Fri Jul 17 14:58:34 2015 PmaxInit:0162]zone: 2, name: porte garage
 NOTICE: [Fri Jul 17 14:58:34 2015 PmaxInit:0162]zone: 3, name: volet garage
 NOTICE: [Fri Jul 17 14:58:34 2015 PmaxInit:0162]zone: 4, name: detecteur incendie
 DEBUG: [Fri Jul 17 14:58:34 2015 sendBuffer:0171]Sending the following buffer to serial TTY
 DEBUG: [Fri Jul 17 14:58:34 2015 logBuffer:0154]BufferSize: 12
 DEBUG: [Fri Jul 17 14:58:34 2015 logBuffer:0155]Buffer: A2 00 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Fri Jul 17 14:58:34 2015 calculChecksum:0164]checksum: 001A
 DEBUG: [Fri Jul 17 14:58:34 2015 sendBuffer:0180]result of serial write:: 15
 DEBUG: [Fri Jul 17 14:58:34 2015 sendBuffer:0171]Sending the following buffer to serial TTY
 DEBUG: [Fri Jul 17 14:58:34 2015 logBuffer:0154]BufferSize: 12
 DEBUG: [Fri Jul 17 14:58:34 2015 logBuffer:0155]Buffer: AB 06 00 00 00 00 00 00 00 00 00 43
 DEBUG: [Fri Jul 17 14:58:34 2015 calculChecksum:0164]checksum: 000B
 DEBUG: [Fri Jul 17 14:58:34 2015 sendBuffer:0180]result of serial write:: 15
 DEBUG: [Fri Jul 17 14:58:34 2015 main:0453]Sarting main loop....
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:40 2015 calculChecksum:0164]checksum: 00D6
 ERR: [Fri Jul 17 14:58:40 2015 deFormatBuffer:0200]checksum NOK calculated:00D6 in packet:0002
 ERR: [Fri Jul 17 14:58:40 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:40 2015 logBuffer:0154]BufferSize: 5
 ERR: [Fri Jul 17 14:58:40 2015 logBuffer:0155]Buffer: 1A 0D 01 00 01
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0363]End of packet treatment
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:40 2015 calculChecksum:0164]checksum: 0000
 ERR: [Fri Jul 17 14:58:40 2015 deFormatBuffer:0200]checksum NOK calculated:0000 in packet:0003
 ERR: [Fri Jul 17 14:58:40 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:40 2015 logBuffer:0154]BufferSize: 5
 ERR: [Fri Jul 17 14:58:40 2015 logBuffer:0155]Buffer: 00 00 00 00 00
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0363]End of packet treatment
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:40 2015 calculChecksum:0164]checksum: 0019
 ERR: [Fri Jul 17 14:58:40 2015 deFormatBuffer:0200]checksum NOK calculated:0019 in packet:0008
 ERR: [Fri Jul 17 14:58:40 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:40 2015 logBuffer:0154]BufferSize: 255
 ERR: [Fri Jul 17 14:58:40 2015 logBuffer:0155]Buffer: 01 00 00 00 00 03 19 00 00 00 00 00 B8 81 F7 76 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 29 F5 95 7E BC F5 95 7E 00 61 EA 76 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 80 F6 F0 76 7C F5 95 7E 00 00 00 00 00 00 00 00 44 C8 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 00 00 00 00 00 00 00
 DEBUG: [Fri Jul 17 14:58:40 2015 packetManager:0363]End of packet treatment
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:44 2015 calculChecksum:0164]checksum: 00D6
 ERR: [Fri Jul 17 14:58:44 2015 deFormatBuffer:0200]checksum NOK calculated:00D6 in packet:0002
 ERR: [Fri Jul 17 14:58:44 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:44 2015 logBuffer:0154]BufferSize: 5
 ERR: [Fri Jul 17 14:58:44 2015 logBuffer:0155]Buffer: 1A 0D 01 00 01
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0363]End of packet treatment
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:44 2015 calculChecksum:0164]checksum: 0000
 ERR: [Fri Jul 17 14:58:44 2015 deFormatBuffer:0200]checksum NOK calculated:0000 in packet:0003
 ERR: [Fri Jul 17 14:58:44 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:44 2015 logBuffer:0154]BufferSize: 5
 ERR: [Fri Jul 17 14:58:44 2015 logBuffer:0155]Buffer: 00 00 00 00 00
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0363]End of packet treatment
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0336]Timeout while waiting packet: assumig packet is complete......
 DEBUG: [Fri Jul 17 14:58:44 2015 calculChecksum:0164]checksum: 0019
 ERR: [Fri Jul 17 14:58:44 2015 deFormatBuffer:0200]checksum NOK calculated:0019 in packet:0008
 ERR: [Fri Jul 17 14:58:44 2015 packetManager:0356]Packet not correctly formated
 DEBUG: [Fri Jul 17 14:58:44 2015 logBuffer:0154]BufferSize: 255
 ERR: [Fri Jul 17 14:58:44 2015 logBuffer:0155]Buffer: 01 00 00 00 00 03 19 00 00 00 00 00 B8 81 F7 76 00 00 00 00 00 00 00 00 36 00 00 00 02 54 00 00 29 F5 95 7E BC F5 95 7E 00 61 EA 76 00 05 00 00 05 00 00 00 BF 00 00 00 3B 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 80 F6 F0 76 7C F5 95 7E 00 00 00 00 00 00 00 00 44 C8 00 00 04 00 00 00 02 00 02 00 00 00 00 00 00 05 00 00 05 00 00 00 BF 00 00 00 31 8A 00 00 00 03 1C 7F 15 04 00 01 00 11 13 1A 00 12 0F 17 16 00 00 00 00 00 00 00 00 00 00 00
 DEBUG: [Fri Jul 17 14:58:44 2015 packetManager:0363]End of packet treatment
marck
Member
Member
Posts: 127
Joined: Sat Sep 18, 2010 4:12 pm

Re: Powerlink serial pinout, linux daemon and web interface

Post by marck »

Ok. Tried another thing. Just wanted to check if the rs232 parameters are setup correctly

According to this first post, http://www.domoticaforum.eu/viewtopic.php?f=68&t=6581, the serial parameters should be set as follows;

Code: Select all

9600 Baud; Data Bits 8; Stop Bits 1; Parity None
Or put differently the setting should be set as 9600 8N1

So for the raspberry I issued the following to check how the rs232 are set currently, which returns

Code: Select all

pi@raspberrypi ~ $ stty -F /dev/ttyUSB0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 100; time = 2;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
Speed: 9600 . That's set ok.
Databits should be 8. that's cs8. That's set ok.
Stop bits should be set to 1. -cstopb. That's set ok.
Parity = none. -parenb. That's set also ok.

And now for the AMA0 port

Code: Select all

pi@raspberrypi ~ $ stty -F /dev/ttyAMA0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 100; time = 2;
-parenb -parodd cs5 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
Speed: 9600 . That's set ok.
Databits should be 8. that's cs5. Databits is apperently set at 5. That's incorrect
Stop bits should be set to 1. -cstopb. That's set ok.
Parity = none. -parenb. That's set also ok.

To correct the above issue the following;

Code: Select all

sudo stty -F /dev/ttyAMA0 9600 cs8 -parenb -cstopb 
And now again.

stty -F /dev/ttyAMA0 -a

Which returns

Code: Select all

pi@raspberrypi ~ $ stty -F /dev/ttyAMA0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 100; time = 2;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
Now also AMA0 RS232 parameters are setup correctly.

Did it help to communicate with the Visonoc? The answer is no. So research continues. Again, any help from others would be much appreciated.
Post Reply

Return to “Visonic Alarm systems”