old=b"b'\xb7\xb5\xbb\xd8\xd6\xb5,\xd5\xe2\xc0\xef\xbc\xf2\xb5\xa5\xb5\xc8\xb4\xfd\xba\xf3\xbc\xcc\xd0\xf8 */\r\n\t}\r\n\tCAT1_DBG_LOG("ETH Init check done");\r\n\r\n\t/* \xb2\xbd\xd6\xe81: \xd2\xbb\xb4\xce\xd0\xd4\xd0\xb4\xc8\xeb\xb4\xd30x00\xbf\xaa\xca\xbc\xb5\xc4\xcd\xf8\xc2\xe7\xb2\xce\xca\xfd(LocalIP~WorkMode, \xb9\xb20x15\xd7\xd6\xbd\xda)\r\n\t * \xc6\xab\xd2\xc60x00~0x14: LocalIP(4) + NetMask(4) + Gateway(4) + DestIP(4) + LocalPort(2) + DestPort(2) + WorkMode(1)\r\n\t */\r\n\tidx = 0;\r\n\tcmdBuf[idx++] = 0xED; cmdBuf[idx++] = 0xF2; cmdBuf[idx++] = 0xA3; cmdBuf[idx++] = 0x56;\r\n\tcmdBuf[idx++] = 0xCA; cmdBuf[idx++] = 0xDB; cmdBuf[idx++] = 0x91; cmdBuf[idx++] = 0x84;\r\n\tcmdBuf[idx++] = 0xB0; cmdBuf[idx++] = 0xD7;\r\n\tcmdBuf[idx++] = 0x03;   /* \xc3\xfc\xc1\xee\xc0\xe0\xd0\xcd: \xd0\xb4\xb2\xce\xca\xfd\xb2\xa2\xb1\xa3\xb4\xe6\xb5\xbdFlash */\r\n\tcmdBuf[idx++] = 0x00;   /* \xc6\xab\xd2\xc6: 0x00 */\r\n\tcmdBuf[idx++] = 0x15;   /* \xb3\xa4\xb6\xc8: 21\xd7\xd6\xbd\xda */\r\n\r\n\t/* Local IP */\r\n\tcmdBuf[idx++] = pCfg->EthNet.IpAddr[0];\r\n\tcmdBuf[idx++] = pCfg->EthNet.IpAddr[1];\r\n\tcmdBuf[idx++] = pCfg->EthNet.IpAddr[2];\r\n\tcmdBuf[idx++] = pCfg->EthNet.IpAddr[3];\r\n\t/* Net Mask */\r\n\tcmdBuf[idx++] = pCfg->EthNet.SubnetMask[0];\r\n\tcmdBuf[idx++] = pCfg->EthNet.SubnetMask[1];\r\n\tcmdBuf[idx++] = pCfg->EthNet.SubnetMask[2];\r\n\tcmdBuf[idx++] = pCfg->EthNet.SubnetMask[3];\r\n\t/* Gateway */\r\n\tcmdBuf[idx++] = pCfg->EthNet.Gateway[0];\r\n\tcmdBuf[idx++] = pCfg->EthNet.Gateway[1];\r\n\tcmdBuf[idx++] = pCfg->EthNet.Gateway[2];\r\n\tcmdBuf[idx++] = pCfg->EthNet.Gateway[3];\r\n\t/* Dest IP */\r\n\tcmdBuf[idx++] = pCfg->EthNet.DestIp[0];\r\n\tcmdBuf[idx++] = pCfg->EthNet.DestIp[1];\r\n\tcmdBuf[idx++] = pCfg->EthNet.DestIp[2];\r\n\tcmdBuf[idx++] = pCfg->EthNet.DestIp[3];\r\n\t/* Local Port (\xb4\xf3\xb6\xcb) */\r\n\tcmdBuf[idx++] = (uint8_t)(pCfg->EthNet.IpPort >> 8);\r\n\tcmdBuf[idx++] = (uint8_t)(pCfg->EthNet.IpPort & 0xFF);\r\n\t/* Dest Port (\xb4\xf3\xb6\xcb) */\r\n\tcmdBuf[idx++] = (uint8_t)(pCfg->EthNet.DestPort >> 8);\r\n\tcmdBuf[idx++] = (uint8_t)(pCfg->EthNet.DestPort & 0xFF);\r\n\t/* Work Mode: 0=TCP Server, 1=TCP Client, 2=UDP */\r\n\tif(pCfg->EthNet.WorkMode == ETH_MODE_TCP_SERVER) {\r\n\t\tcmdBuf[idx++] = 0x00;\r\n\t} else if(pCfg->EthNet.WorkMode == ETH_MODE_TCP_CLIENT) {\r\n\t\tcmdBuf[idx++] = 0x01;\r\n\t} else {\r\n\t\tcmdBuf[idx++] = 0x02;\r\n\t}\r\n\r\n\tCAT1_DBG_LOG("ETH Write IP/Mode, len=%d", idx);\r\n'"