Serial Port device protocol safe practice: Identification, polling -
i'm creating simple device sends data windows pc on serial com ports.
i'd software able scan available com ports until recognizes device. problem is, if pc tries initiate handshake device other mine, may interpret commands [wrongly, of course].
the solution see device periodically broadcast sort of identifier, perhaps 5 times per second or so, application needs listen identifier rather risk corrupting device connected com port. when application loads, listens on each available com port until device recognised. sound reasonable?
thanks
imo whatever direction on initiate handshake, problem same. if send handshake device , application on pc listening corresponding serial port, has risks badly interpret data sending.
so software on both side should protected against incoherent data receive outside.
Comments
Post a Comment