Add registerMethod in SerialAPI. Add recv msg Callback for javascript(from C++)
 in Serial