Matrix creator, z-wave et Z/IP gateway don't works


#1

hi,

i’m working on a application of matrix creator with z-wave sensors. I have a problem with the zipgateway configuration. For now, my configuration is :

ZipUnsolicitedDestinationIp6 = fd00:aaaa::1234
ZipUnsolicitedDestinationPort = 41230
#ZipUnsolicitedDestination2Ip6 = fd00:aaaa::1234
#ZipUnsolicitedDestination2Port = 41231
#SerialLog = /tmp/ziprouter.serlog
ZipCaCert=/usr/local/etc/Portal.ca_x509.pem
ZipCert=/usr/local/etc/ZIPR.x509_1024.pem
ZipPrivKey=/usr/local/etc/ZIPR.key_1024.pem
#Eepromfile=/etc/eeprom.dat
#TunScript=/usr/local/etc/zipgateway.tun
ZipLanGw6 = fd00:aaaa::1234
#ZipPortal=192.168.1.1
#ZipPortalPort=44123
#ZipTunPrefix = 2000::
#ZipTunIp6PrefixLength = 128
#ZipManufacturerID=0
#ZipHardwareVersion=1
#ZipProductID=1
#ZipProductType=1
#ZipMBPort=41230
#ZipMBDestinationIp6=
#ZipMBMode=1
ZipPSK=123456789012345678901234567890AA
#ExtraClasses= 0x43 0x75
ZipSerialAPIPortName=/dev/ttyS0
ZipLanIp6=fd00:aaaa::3
ZipPanIp6=fd00:bbbb::1

When I run the command: ‘avahi-browse -a -t’, I do not get any results.

I use Raspbian Stretch.

pi@raspberrypi:~ $ systemctl status zipgateway
● zipgateway.service - LSB: start Z/IP Gateway (zipgateway)
Loaded: loaded (/etc/init.d/zipgateway; generated; vendor preset: enabled)
Active: active (exited) since Wed 2018-02-14 11:07:51 UTC; 43min ago
Docs: man:systemd-sysv-generator(8)
Process: 769 ExecStart=/etc/init.d/zipgateway start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/zipgateway.service

Feb 14 11:07:51 raspberrypi systemd[1]: Starting LSB: start Z/IP Gateway (zipgateway)…
Feb 14 11:07:51 raspberrypi zipgateway[769]: Starting Z/IP Gateway: zipgatewayerror: unexpectedly disconnected from boot status daemon
Feb 14 11:07:51 raspberrypi zipgateway[769]: .
Feb 14 11:07:51 raspberrypi systemd[1]: Started LSB: start Z/IP Gateway (zipgateway).

With debian/jessie, zipgateway service works but avahi-browse returns:

  • tap0 IPv6 raspberrypi [9e:f9:10:47:81:dd] Workstation local
  • tap0 IPv4 raspberrypi [9e:f9:10:47:81:dd] Workstation local
  • br-lan IPv6 raspberrypi [b8:27:eb:3f:83:cc] Workstation local
  • br-lan IPv4 raspberrypi [b8:27:eb:3f:83:cc] Workstation local
  • eth0 IPv4 raspberrypi [b8:27:eb:3f:83:cc] Workstation local

No z-wave!

Any idea ? Thanks


"Error Connecting" ./reference_client - Unable to connect to ZIP Gateway
#2

Hi @eric_FR, can you please with the following command: avahi-browse _z-wave._udp -r.
Also, can you provide with which installation steps did you followed?


#3

“avahi-browse _z-wave._udp -r -t” returns nothing

Installation steps on Rpi 3 + Matrix creator:

I think it comes from the configuration file.


#4

Nobody use z-wave with Matrix Creator?


#5

Hi,
I am also facing the same issue

I installed the malos-zwave and Z/IP Gateway

and believe ZIP Gateway runs properly as when I query the status
$ systemctl status zipgateway

I get below response

�� zipgateway.service - LSB: start Z/IP Gateway (zipgateway)
Loaded: loaded (/etc/init.d/zipgateway; generated; vendor preset: enabled)
Active: active (running) since Tue 2018-02-27 16:51:06 UTC; 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 449 ExecStart=/etc/init.d/zipgateway start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/zipgateway.service
������527 /usr/sbin/dhcp-helper -b wlan0
������532 /usr/local/sbin/zipgateway –

Feb 27 16:51:05 raspberrypi systemd[1]: Starting LSB: start Z/IP Gateway (zipgateway)…
Feb 27 16:51:06 raspberrypi zipgateway[449]: Starting Z/IP Gateway: zipgatewayRestarting DHCP relay agent:
Feb 27 16:51:06 raspberrypi zipgateway[449]: .
Feb 27 16:51:06 raspberrypi systemd[1]: Started LSB: start Z/IP Gateway (zipgateway).
lines 1-13/13 (END)

Also I just wanted to confirm that while setting up Z/IP Gateway I left it as default
Serial Port : /dev/ttyAMA0. (not default)
IPv6 for gateway - fd000:aaaa::3
IPV6 prefix for noed - fd00:bbbb::1

Now when I try to run
$ avahi-browse _z-wave._udp -r

to get the Z/IP Gateway IP address and list the services
I am not getting any response.
It just gets stuck in the bash shell

And when I try to run
$ ./reference_client -s fd00:aaaa::3

I keep getting error

PSK not configured - using default
connect: Network is unreachable
Error connecting

Could you please help me get pass this issue and connect to Z/IP gateway

Just for reference :
When I run
$ malos_zwave

I get below response

MALOS ZWave starting

You can query specific driver info using port 50000.

FLAGS_psk : 123456789012345678901234567890aa
I/O warning : failed to load external entity "ZWave_custom_cmd_classes.xml"
Could not load Command Class definitions
terminate called after throwing an instance of 'zmq::error_t’
what(): Address already in use


#6

Hi Jay,

is the z-wave sticker on your Matrix Creator?


#7

yeah,we have zwave plus sticker in bottom


#8

Ok! It’s a good news :wink:

Change /dev/ttyAMA0 by /dev/ttyS0


#9

Hello @eric_FR and @jay7583

Just to clarify some points:

1- Raspberry Pi has just one serial port. The current MATRIX Creator FPGA firmware has connected this port to Zigbee Software. The Zwave port is an internal serial into the FPGA core. Now we are testing the Zwave serial port with our kernel modules: https://github.com/matrix-io/matrixio-kernel-modules. We are working on it now!

2- In order to use it easier, I will post tomorrow morning a recipe with a special FPGA firmware, that allows the Zwave serial port in the ttyS0 port.

Thank You,

Kevin Patino


#10

Hi @eric_FR ,I have tried by changing but it’s still same

Hi @kevindpatino , i am waiting for your firmware
thanks


"Error Connecting" ./reference_client - Unable to connect to ZIP Gateway
#11

Hello!!

I create a branch in malos-zwave. It include:

Update:

1- Update README
2- Add blob directory with FPGA firmware and simple script to replace it.

You could check if malos-zwave is running:

1- Check if the zipgateway are working, check with:

~ $ more /tmp/zipgateway.log 
14830 Opening config file /usr/local/etc/zipgateway.cfg
Starting Contiki
Opening eeprom file /usr/local/var/lib/zipgateway/eeprom.dat
Lan device tap0
LAN HW addr 6A:CF:88:CF:56:89
14854 Starting zipgateway ver2_61 build ver2_61
14854 Resetting ZIP Gateway
14854 Using serial port /dev/ttyS0
 SerialAPI: Serial API version     : 5.34
15030 500 series chip version 0
15060 I'am SUC
15540 Key  class  80 
F83C9C7888E766D743EA03DB7D97656B
15630 Key  class  1 
95F2E42BDE04EDEA8A3FAC9C4AB1339B
15700 Key  class  2 
0135D1F0BD3F692DAC03B98BAA009247
15760 Key  class  4 
690EB5CC6C6021418F29857142A5845F
15790 Network shceme is:15790 S2 ACCESS
15820 Resetting IMA
15820 I'm a primary or inclusion controller.
15820 Command classes updated
15822  nodeid=1 0
15823 Checking for new sessions
15823 We should send a discover
15850 Waiting for bridge
15880 Version: Z-Wave 4.61, type 7
15950 ................. the  version 0 ...............16010 NVM version is 2
16040 L2 HW addr 00:1e:32:1b:5d:f2
16040 
16040 ZIP_Router_Reset: pan_lladdr: fc:f7:ab:f7:00:01  Home ID = 0xf7abf7fc 
16040 Tunnel prefix ::
16040 
16040 Lan address fd00:aaaa::03

If you have an output like this, the zipgateway are working well.

2- Now you could use the ZM5202 module in the MATRIX Creator with the Zwave public documentation. http://zwavepublic.com/developer.

if want to use avahi-browser, install with: sudo apt-get install avahi-utils

3- MALOS-Zwave is a command builder. You could check an example: https://github.com/matrix-io/matrix-malos-zwave/blob/kp/add_fpga/src/js_test/list.js

Let me know how are your test.

Regards,

Kevin Patino


#12

Hello Guys!

Just to keep you updated, here is the Github issue: https://github.com/matrix-io/matrix-malos-zwave/issues/13.

Also, I just want to show you the Zwave community page: https://forum.z-wavepublic.com/ As you know, Zwave support has a third-party software.

Regards,

Kevin Patino


#13

Hello Kevin,

i updated the FPGA firmware but i obtain an error of serial port opening:

 13736 Opening config file /usr/local/etc/zipgateway.cfg 
 Starting Contiki
 Opening eeprom file /usr/local/var/lib/zipgateway/eeprom.dat
 Lan device tap0
 LAN HW addr DA:62:D3:BB:2E:A9
 13750 Starting zipgateway ver2_61 build ver2_61
 13750 Resetting ZIP Gateway
 13750 Using serial port /dev/ttyS0
  SerialAPI: Retransmission 0 of 0x07
  SerialAPI: Retransmission 1 of 0x07
  SerialAPI: Retransmission 2 of 0x07
  SerialAPI: Retransmission 3 of 0x07
  SerialAPI: Retransmission 4 of 0x07
  SerialAPI: Retransmission 5 of 0x07
  SerialAPI: Retransmission 6 of 0x07
  SerialAPI: Retransmission 7 of 0x07
  SerialAPI: Reopening serial port
  SerialAPI: Retransmission 8 of 0x07
  SerialAPI: Retransmission 9 of 0x07
  SerialAPI: Retransmission 10 of 0x07
  SerialAPI: Retransmission 11 of 0x07
  SerialAPI: Retransmission 12 of 0x07
  SerialAPI: Retransmission 13 of 0x07
  SerialAPI: Retransmission 14 of 0x07
  SerialAPI: Retransmission 15 of 0x07
  SerialAPI: Reopening serial port
  SerialAPI: Retransmission 16 of 0x07
  SerialAPI: Retransmission 17 of 0x07
  SerialAPI: Retransmission 18 of 0x07
  SerialAPI: Retransmission 19 of 0x07
  SerialAPI: Unable to send frame!!!!!!
  SerialAPI: SendFrameWithResponse() returning failure
  SerialAPI: SendFrameWithResponse(FUNC_ID_SERIAL_API_GET_CAPABILITIES,...) failed in  SerialAPI_Init()
 SerialAPI: Assertion failed at /drone/src/bitbucket.org/admobilize/zipgateway/src/serialapi/Serialapi.c:43 5
 62956 Error opening serial API 
 62956 Fatal error

Any idea?

Thanks

Eric


#14

Hello @eric_FR

Due to the kernel release, we detect some issues in the zwave configuration software. We are working on it.

I will let you know when we fix it.

Regards,

Kevin Patino


#15

Thanks a lot!

We are very impatient. The Matrix Creator is a real opportunity for our project.

Eric


#16

Hello, eric_FR

We’d like do a projet with matrix et ZWAVE now but no idea how to get start to installation .Could you give us a step by step installation how you did that?

Thanks


#17

Hello!

We are working on some bugs in the Zwave Software and update our examples.

Kernel Bug: Fixed! - https://github.com/matrix-io/matrixio-kernel-modules/pull/23
Zwave Utils: Some bugs with kernel Implementation (Working on it)
Zwave examples : We are working on it - https://github.com/matrix-io/matrix-malos-zwave/tree/dr/demo

We expect to release these changes this wee. I will let you know when we finish it.

Regards,

Kevin Patino


#18

Thanks a lot for work.

Here is my install process:

I do not want to use malos. I develop applications directly in C ++ with the HAL layer.

Thanks

Regards,

Eric


#19

I still have a problem: no detect remote device.

“./reference_client” returns error :

AppCmdHdlr: 34020007000001
cmd_class: COMMAND_CLASS_NETWORK_MANAGEMENT_INCLUSION v2
cmd: NODE_ADD_STATUS
Seq. No >
00
Status >
NODE_ADD_STATUS_FAILED
Reserved >
00
New Node ID >
00
Node Info Length >
01
bytestream: 34 02 00 07 00 00 01
Inclusion done

In /tmp/zipgateway.log file:

tcpip_ipv6_output: nbr cache entry stale moving to delay
392019 New server session allocated
392019 DTLS: DTLS read failed
lipaddr: fd00:aaaa::0003 lport: 41230
ripaddr: fd00:aaaa::7b4b:5df0:e245:9ba5 rport: 59120
392019
392021 PSK callback identity:Client_identity PSK len 16
392022 DTLS: DTLS read failed
lipaddr: fd00:aaaa::0003 lport: 41230
ripaddr: fd00:aaaa::7b4b:5df0:e245:9ba5 rport: 59120
392022
392022 DTLS: Client handshake done
lipaddr: fd00:aaaa::0003 lport: 41230
ripaddr: fd00:aaaa::7b4b:5df0:e245:9ba5 rport: 59120
392022
397784 nm_fsm_post_event event: NM_EV_FRAME_RECEIVED state: NM_IDLE
397788 NetworkManagementCommandHandler 34 1
397812 nm_fsm_post_event event: NM_EV_NODE_ADD_S2 state: NM_IDLE
397843 nm_fsm_post_event event: NM_EV_ADD_LEARN_READY state: NM_WAITING_FOR_ADD
428447 Sending keep alive ACK to port:61670 of IP:fd00:aaaa::7b4b:5df0:e245:9ba5
tcpip_ipv6_output: nbr cache entry stale moving to delay
457815 nm_fsm_post_event event: NM_EV_TIMEOUT state: NM_WAITING_FOR_ADD
457818 Sending network management reply
tcpip_ipv6_output: nbr cache entry stale moving to delay
457893 nm_fsm_post_event event: NM_EV_ADD_NODE_STATUS_DONE state: NM_IDLE
tcpip_ipv6_output: nbr cache entry stale moving to delay
483335 DTLS: DTLS read failed
lipaddr: fd00:aaaa::0003 lport: 41230
ripaddr: fd00:aaaa::7b4b:5df0:e245:9ba5 rport: 59120
483336
tcpip_ipv6_output: nbr cache entry stale moving to delay
483336 DTLS: Closing DTLS connection
lipaddr: fd00:aaaa::0003 lport: 41230
ripaddr: fd00:aaaa::7b4b:5df0:e245:9ba5 rport: 59120
483336

Any idea?

Thanks.

Eric


#20

Nobody have same error?