utzig commented on issue #2144: OTP Tool: Support BLE Addr and HWID URL: https://github.com/apache/mynewt-core/pull/2144#issuecomment-571757405 I am under the impression that every function starts with: ``` try: ser = serial.Serial(port=uart, baudrate=1000000, timeout=1, bytesize=8, stopbits=serial.STOPBITS_ONE) except serial.SerialException: raise SystemExit("Failed to open serial port") cmd = cmd_no_payload(0xaa55aa55, Cmd.READ_HWID) msg = struct.pack('II', *cmd) try: ser.write(msg) except serial.SerialException: raise SystemExit("Failed to write to %s" % uart) ``` where the only difference is the command used in `cmd_no_playload`, maybe a bit of refactoring for reuse? Also default baudrate of 1_000_000 looks a bit weird, but I assume you know it works! ;-) Apart from the comments, code looks fine.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
