From: bombilee Date: Thu, 7 May 2015 14:11:58 +0000 (-0400) Subject: add 'v' command response X-Git-Url: https://rtime.felk.cvut.cz/gitweb/can-utils.git/commitdiff_plain/dc374b074be79ea80084c4b1651db19fa1f5c4e7 add 'v' command response add v command response. Some software like USBtinViewer using v for software version. Tested on USBtinViewer 1.0 Signed-off-by: Marc Kleine-Budde --- diff --git a/slcanpty.c b/slcanpty.c index c062a02..f485ac7 100644 --- a/slcanpty.c +++ b/slcanpty.c @@ -185,6 +185,13 @@ rx_restart: ptr = 1; goto rx_out; } + /* check for 'v'ersion command */ + if (cmd == 'v') { + sprintf(replybuf, "v1014\r"); + tmp = strlen(replybuf); + ptr = 1; + goto rx_out; + } /* check for serial 'N'umber command */ if (cmd == 'N') {