Patent ID: 9686131
Date: 2017-06-20
CPC Classifications: H04L

Claim:
1. A method for automatic setting configuration by learning commands applied to a gateway, the method comprising the steps of: setting communication parameters of a first communication protocol used by the gateway; connecting the gateway to a first network using the first communication protocol, the first network including at least one first device and one of the first device is a master device; collecting at least one communication command by setting the gateway as a slave/sniffer device to receives/sniff the at least one communication command sent from a mater device to a plurality of slave devices with different slave addresses or destination nodes of different destination node addresses and record the at least one communication command in an internal memory of the gateway until a stop collecting condition is satisfied; establishing a mapping relation between the collected at least one communication command and at least one communication I/O module used by a second device in a second network for setting configuration of the gateway, the second device uses a second communication protocol to connect to the gateway comprise steps of: determining a length of the target data from the communication command; from an input/a output block in the internal memory, determining first free address which doesn't occupied by other target data as a storage address, wherein determining the free address from bottom address to top address of the input/output block; configuring the communication I/O module according to the length of the target data; and mapping the communication I/O module to the storage address; becoming a new master device on the first network to replace the master device based on the set configuration for the gateway when the master device is removed from the first network; and accessing the target data accessed based on one of the at least one communication command stored in the internal memory of the gateway via the at least one communication I/O module by the second device.