Fixed closing/opening serial port
Support for JSON device registration request and flexible parameters structure (arrays and objects)