ZigBee controller loses network on power cycle


#1

I’ve noticed that when the matrix creator is power cycled the ZigBee network that was created before the power cycle is lost and a new one is created. When the new network is created all previous paired devices are practically orphaned until they are reset ( which is feasible until you have a philips hue product ). I am not certain if new network creation on power cycles is expected behavior. Any suggestions towards how the network could be persisted through power cycles in order to avoid having to reset all devices?


#2

Hi @mikeblakeney, Sorry for the delayed response.
Can you share the content of the file /tmp/em358-program.log immediately after boot?

Try:

cd
cat /tmp/em358-program.log

-Yoel


#3

there’s no em358-program.log file in the /tmp folder. I have a em358 dump that appears to be a binary type.


#4

I will have more time this weekend to dig into why maybe that file is missing. However, it seems like from this thread that the standard behavior is to do a factory reset when power cycled. The script that triggers the reset is
/usr/share/matrixlabs/matrixio-devices/matrix-init.bash

According to this thread, commenting out ./em358-program.bash will disable the factory reset behavior. I haven’t tested the theory though…


#5

Below is the contents of the emp-program.log file:

Open On-Chip Debugger 0.10.0-dev-g629c2417 (2017-11-08-21:47)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 200 kHz
Warn : em357.bs.bs: nonstandard IR value
Warn : Specify TAP 'em357.cpu.cpu' by name, not number 0
cortex_m reset_config vectreset
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 200 kHz
Info : JTAG tap: em357.cpu.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : em357.cpu: hardware has 6 breakpoints, 4 watchpoints
em357.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x080803f6 msp: 0x200000f8
Info : flash size = 192kbytes
em357 mass erase complete
#0 : em357 at 0x08000000, size 0x00030000, buswidth 0, chipwidth 0
	#  0: 0x00000000 (0x800 2kB) not protected
	#  1: 0x00000800 (0x800 2kB) not protected
	#  2: 0x00001000 (0x800 2kB) not protected
	#  3: 0x00001800 (0x800 2kB) not protected
	#  4: 0x00002000 (0x800 2kB) not protected
	#  5: 0x00002800 (0x800 2kB) not protected
	#  6: 0x00003000 (0x800 2kB) not protected
	#  7: 0x00003800 (0x800 2kB) not protected
	#  8: 0x00004000 (0x800 2kB) not protected
	#  9: 0x00004800 (0x800 2kB) not protected
	# 10: 0x00005000 (0x800 2kB) not protected
	# 11: 0x00005800 (0x800 2kB) not protected
	# 12: 0x00006000 (0x800 2kB) not protected
	# 13: 0x00006800 (0x800 2kB) not protected
	# 14: 0x00007000 (0x800 2kB) not protected
	# 15: 0x00007800 (0x800 2kB) not protected
	# 16: 0x00008000 (0x800 2kB) not protected
	# 17: 0x00008800 (0x800 2kB) not protected
	# 18: 0x00009000 (0x800 2kB) not protected
	# 19: 0x00009800 (0x800 2kB) not protected
	# 20: 0x0000a000 (0x800 2kB) not protected
	# 21: 0x0000a800 (0x800 2kB) not protected
	# 22: 0x0000b000 (0x800 2kB) not protected
	# 23: 0x0000b800 (0x800 2kB) not protected
	# 24: 0x0000c000 (0x800 2kB) not protected
	# 25: 0x0000c800 (0x800 2kB) not protected
	# 26: 0x0000d000 (0x800 2kB) not protected
	# 27: 0x0000d800 (0x800 2kB) not protected
	# 28: 0x0000e000 (0x800 2kB) not protected
	# 29: 0x0000e800 (0x800 2kB) not protected
	# 30: 0x0000f000 (0x800 2kB) not protected
	# 31: 0x0000f800 (0x800 2kB) not protected
	# 32: 0x00010000 (0x800 2kB) not protected
	# 33: 0x00010800 (0x800 2kB) not protected
	# 34: 0x00011000 (0x800 2kB) not protected
	# 35: 0x00011800 (0x800 2kB) not protected
	# 36: 0x00012000 (0x800 2kB) not protected
	# 37: 0x00012800 (0x800 2kB) not protected
	# 38: 0x00013000 (0x800 2kB) not protected
	# 39: 0x00013800 (0x800 2kB) not protected
	# 40: 0x00014000 (0x800 2kB) not protected
	# 41: 0x00014800 (0x800 2kB) not protected
	# 42: 0x00015000 (0x800 2kB) not protected
	# 43: 0x00015800 (0x800 2kB) not protected
	# 44: 0x00016000 (0x800 2kB) not protected
	# 45: 0x00016800 (0x800 2kB) not protected
	# 46: 0x00017000 (0x800 2kB) not protected
	# 47: 0x00017800 (0x800 2kB) not protected
	# 48: 0x00018000 (0x800 2kB) not protected
	# 49: 0x00018800 (0x800 2kB) not protected
	# 50: 0x00019000 (0x800 2kB) not protected
	# 51: 0x00019800 (0x800 2kB) not protected
	# 52: 0x0001a000 (0x800 2kB) not protected
	# 53: 0x0001a800 (0x800 2kB) not protected
	# 54: 0x0001b000 (0x800 2kB) not protected
	# 55: 0x0001b800 (0x800 2kB) not protected
	# 56: 0x0001c000 (0x800 2kB) not protected
	# 57: 0x0001c800 (0x800 2kB) not protected
	# 58: 0x0001d000 (0x800 2kB) not protected
	# 59: 0x0001d800 (0x800 2kB) not protected
	# 60: 0x0001e000 (0x800 2kB) not protected
	# 61: 0x0001e800 (0x800 2kB) not protected
	# 62: 0x0001f000 (0x800 2kB) not protected
	# 63: 0x0001f800 (0x800 2kB) not protected
	# 64: 0x00020000 (0x800 2kB) not protected
	# 65: 0x00020800 (0x800 2kB) not protected
	# 66: 0x00021000 (0x800 2kB) not protected
	# 67: 0x00021800 (0x800 2kB) not protected
	# 68: 0x00022000 (0x800 2kB) not protected
	# 69: 0x00022800 (0x800 2kB) not protected
	# 70: 0x00023000 (0x800 2kB) not protected
	# 71: 0x00023800 (0x800 2kB) not protected
	# 72: 0x00024000 (0x800 2kB) not protected
	# 73: 0x00024800 (0x800 2kB) not protected
	# 74: 0x00025000 (0x800 2kB) not protected
	# 75: 0x00025800 (0x800 2kB) not protected
	# 76: 0x00026000 (0x800 2kB) not protected
	# 77: 0x00026800 (0x800 2kB) not protected
	# 78: 0x00027000 (0x800 2kB) not protected
	# 79: 0x00027800 (0x800 2kB) not protected
	# 80: 0x00028000 (0x800 2kB) not protected
	# 81: 0x00028800 (0x800 2kB) not protected
	# 82: 0x00029000 (0x800 2kB) not protected
	# 83: 0x00029800 (0x800 2kB) not protected
	# 84: 0x0002a000 (0x800 2kB) not protected
	# 85: 0x0002a800 (0x800 2kB) not protected
	# 86: 0x0002b000 (0x800 2kB) not protected
	# 87: 0x0002b800 (0x800 2kB) not protected
	# 88: 0x0002c000 (0x800 2kB) not protected
	# 89: 0x0002c800 (0x800 2kB) not protected
	# 90: 0x0002d000 (0x800 2kB) not protected
	# 91: 0x0002d800 (0x800 2kB) not protected
	# 92: 0x0002e000 (0x800 2kB) not protected
	# 93: 0x0002e800 (0x800 2kB) not protected
	# 94: 0x0002f000 (0x800 2kB) not protected
	# 95: 0x0002f800 (0x800 2kB) not protected
Info : flash size = 192kbytes
flash 'em357' found at 0x08000000
Info : Padding image section 0 with 10240 bytes
Warn : empty section 2
wrote 165888 bytes from file blob/ncp_xon_xoff.hex in 10.391638s (15.589 KiB/s)
Info : JTAG tap: em357.cpu.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
shutdown command invoked