A computerized gateway device for the Internet of Things domain, comprising: a central processing unit; a power source; a digital memory coupled to the CPU; one or both of physical communication ports and circuitry providing a wireless communication interface receiving data in a variety of communication protocols from a plurality of heterogeneous data-gathering devices; an output interface to a wide-area network; a plurality of dedicated channels (102 (1-n)), having one end tightly coupled to an hardware interface layer and one end tightly coupled to the communication channels for each protocols (103 (1-n)), managing the data received from the data-gathering devices generalized through the protocol characterization layer and reconstructed through protocol specific workflow operations, through execution of firmware in the hardware of the dedicated channels (102 (1-n)); and coded instructions executing on the CPU from a non-transitory medium; wherein the CPU, executing portions of the coded instructions, connects physically or wirelessly to one of the data-gathering devices, obtains protocol characterization information for a protocol generic to the data-gathering device, selects pieces of code from code stored in the digital memory according to the protocol characterization information, and programs the firmware in a dedicated channel (102 (1-n)) to receive data from the data-gathering device in the generic protocol, and to communicate that data to the wide area network at the output interface in a generalized protocol compatible with an upstream processing nodes, characterised by wherein the coded instructions comprise a protocol characterization layer capable of generating or aquiring an XML file that abstractly characterizes the protocol and operations used by the connected data-gathering device and capable of building a protocol application profile to use as input for constructing a protocol application; wherein the protocol characterization layer is adapted to use program units to construct a protocol application profile and wherein the coded instructions further comprise a machine-learning algorithm capable of building knowledge of protocol characteristics, the protocol characterization layer is adapted to build a protocol application by retrieving a set of program units identified through results of execution of the machine-learning algorithm,. a central processing unit; a power source; a digital memory coupled to the CPU; one or both of physical communication ports and circuitry providing a wireless communication interface receiving data in a variety of communication protocols from a plurality of heterogeneous data-gathering devices; an output interface to a wide-area network; a plurality of dedicated channels (102 (1-n)), having one end tightly coupled to an hardware interface layer and one end tightly coupled to the communication channels for each protocols (103 (1-n)), managing the data received from the data-gathering devices generalized through the protocol characterization layer and reconstructed through protocol specific workflow operations, through execution of firmware in the hardware of the dedicated channels (102 (1-n)); and coded instructions executing on the CPU from a non-transitory medium; wherein the CPU, executing portions of the coded instructions, connects physically or wirelessly to one of the data-gathering devices, obtains protocol characterization information for a protocol generic to the data-gathering device, selects pieces of code from code stored in the digital memory according to the protocol characterization information, and programs the firmware in a dedicated channel (102 (1-n)) to receive data from the data-gathering device in the generic protocol, and to communicate that data to the wide area network at the output interface in a generalized protocol compatible with an upstream processing nodes, characterised by wherein the coded instructions comprise a protocol characterization layer capable of generating or aquiring an XML file that abstractly characterizes the protocol and operations used by the connected data-gathering device and capable of building a protocol application profile to use as input for constructing a protocol application;