Initial try at porting this to the new chrome serial api