Update beagle-term/js/connect_dialog.js

handle serial functions at background js