Serial port - how to perform safe search for my device?
问题 Im writing application that communicate (via serial port) with electronic device which i designed myself. When my PC application starts - it opens available COM ports one by one and it sends some string ("What are you?" for example). My device is programmed, to reply to that "magic question" with own ID (for example: "I am evil device for supervising employees"). When my PC software receive that "magic reply" it starts working normally and its not searching other ports anymore. Of course im