func (mc3 *MC3) GSM_print(data string) (err error) {
	var payload_rx piwiError
	mapstructure.Decode(mc3.model.Call("serialport", "Write", data), &payload_rx)
	err = payload_rx.GetError()
	if err != nil {
	} else {
		mc3.Log("INF","GSM","Tx >> " + data)
	}
	mc3.gsm_log_error(err)
	return
}
/*
This function call the "Write" method from "serialport" PIWI.
Returns nil if the serial port write was succesful, otherwise returns an error.
package mc3
import (
	"github.com/mitchellh/mapstructure"
	"encoding/json"
	"regexp"
	"errors"
	"time"
	"fmt"
)
const(
	CMD_ERROR_REGEXP string = "(^ERROR$)"
	CMD_OK_REGEXP string = "(^OK$)"
	CMD_AT string = "AT"
	CMD_CMGF string = "AT+CMGF=1"
	CMD_CMGS string = "AT+CMGS=\"%s\""
	CMD_CTRL_Z string = "\x1A"
	CMD_CMGS_RX_REGEXP string = "(^[+]CMGS[:] [0-9]+$)"
	CMD_CMTI_REGEXP string = "(^[+]CMTI[:] \"SM\",[0-9]+$)" 
	CMD_CMTI_RX string = "+CMTI: \"SM\","
	CMD_CMGR string = "AT+CMGR=%s"
	CMD_CMGR_REGEXP string = "(^[+]CMGR[:] .*)" 
	CMD_CMGR_RX string = "+CMGR: "
)
var(
	GSM_portOpen bool = false
	GSM_sp sp_config_t
)
func (mc3 *MC3) GSM_OpenPort(name string, br uint32) (err error) {	
	var portConfig = sp_config_t { Port: name, Baudrate: br	}
	json_2_send, e := json.Marshal(portConfig)
	if e != nil {
		err = e
	} else {
		var payload_rx piwiError
		err = mapstructure.Decode(mc3.model.Call("serialport", "Open", json_2_send), &payload_rx)
		if err != nil {
		} else {
			err = payload_rx.GetError()
			if err != nil {
			} else {
				GSM_portOpen = true
				GSM_sp = portConfig
				mc3.Log("INF","GSM","Serial port open.")
			}
		}
	}
	mc3.gsm_log_error(err)
	return
}
func (mc3 *MC3) GSM_ClosePort() (err error) {
	if GSM_portOpen {
		var payload_rx piwiError
		err = mapstructure.Decode(mc3.model.Call("serialport", "Close", uint8(0)), &payload_rx)
		if err != nil {
		} else {
			err = payload_rx.GetError()
			if err != nil {
			} else {
				GSM_portOpen = false
				GSM_sp.Port = ""
				GSM_sp.Baudrate = 0
				mc3.Log("INF","GSM", "Serial port closed.")
			}
		}
	} else {
		err = errors.New("Unable to Close Port, Serial Port is not open.")
	}
	mc3.gsm_log_error(err)
	return
}