[Ymodem]Add device open flag as input parameter to ymodem function.