{"id":17,"date":"2010-11-24T14:33:17","date_gmt":"2010-11-24T14:33:17","guid":{"rendered":"https:\/\/robertrath.com\/gadgetzone\/archives\/17-virtually-comm-unicating-2.html"},"modified":"2010-11-25T00:51:46","modified_gmt":"2010-11-25T00:51:46","slug":"virtually-comm-unicating-2","status":"publish","type":"post","link":"https:\/\/robertrath.com\/gadgetzone\/archives\/17-virtually-comm-unicating-2.html","title":{"rendered":"Virtually COMM Unicating"},"content":{"rendered":"Sometimes it is the simplest of things that really make my day. And what is really cool is where something simple is solved in a really complex way and made to appear simple! Almost like magic in fact!!<br \/>\n<br \/>\n<strong>The Problem<\/strong><br \/>\n<br \/>\nI have a serial device next to me connected to the comm port of my Windows PC. Let&#8217;s make it connected through a serial-usb adapter just to make things complicated. Next; I am developing an application on a remote virtual (vmware ) linux machine which needs to communicate with the small serial device next to me!<br \/>\n<br \/>\nProblem 1. I have no direct access to the virtual machine in order to take my serial device and plug it into the virtual machine&#8217;s host. <br \/>\nProblem 2. Even if I could have my little serial device plugged into my remote virtual machine&#8217;s host I would no longer be able to interact with it during development work.<br \/>\n<br \/>\nThe simple solution would be to have my little serial device magically connected to my remote virtual machine and still be sitting next to me and my Windows PC.<br \/>\nNote my use of the word &#8216;simple&#8217;; simple in description but not so in solution.<br \/>\n<br \/>\n<strong>The Outcome<\/strong><br \/>\n<br \/>\nWhen a problem has been nagging to the point of being insufferable it is amazing how a little action, imagination and perseverance can produce magic.<br \/>\nWith the help of two little tools; &#8216;tcp2com.exe&#8217; and &#8216;socat&#8217;; I am now able to enjoy the convenience of having my little serial device plugged into my Windows PC and being plugged into my remote virtual linux machine at the same time &#8230; simply magic!<br \/>\n<br \/>\n<strong>The Solution<\/strong><br \/>\n<br \/>\nI am not going to recount chapter and verse on how I made this magic happen. I don&#8217;t want to make it easy for anyone else. So here is an incredibly terse, dot-point-list of actions I took.<br \/>\n<br \/>\n<strong>Setup<\/strong><br \/>\n<br \/>\nOn Windows<br \/>\n Install &#8216;COM2TCPInstall_1_4_0.exe&#8217; or use &#8216;tcp2com-1.0.0-bin.zip&#8217;<br \/>\n Configure tcp2com to export comm port and settings as required.<br \/>\n Example, on machine 10.0.0.10 export com4,57600,n,8,1,none to port 5555<br \/>\n<br \/>\nOn Linux<br \/>\n $ sudo apt-get install socat<br \/>\n $ sudo socat PTY,link=\/dev\/remotetty0,raw,echo=0,wait-slave tcp:10.0.0.10:5555<br \/>\n<br \/>\n<strong>Testing<\/strong><br \/>\n<br \/>\nOn Windows<br \/>\n Open &#8216;hypertrm&#8217; and connect to com4,57600,n,8,1,none<br \/>\n<br \/>\nOn Linux ( different console session )<br \/>\n $ sudo kermit -l \/dev\/remotetty0<br \/>\n C-Kermit-&gt;set flow none<br \/>\n C-Kermit-&gt;set carrier off<br \/>\n C-Kermit-&gt;set speed 57600<br \/>\n C-Kermit-&gt;connect<br \/>\n<br \/>\nYou should now be able to communicate between the two local terminals as if the machines were connected with a serial cable.<br \/>\n<br \/>\n&#8230; enjoy \ud83d\ude42<br \/>\n<br \/>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it is the simplest of things that really make my day. And what is really cool is where something simple is solved in a really complex way and made to appear simple! Almost like magic in fact!! The Problem I have a serial device next to me connected to the comm port of my &#8230; <a title=\"Virtually COMM Unicating\" class=\"read-more\" href=\"https:\/\/robertrath.com\/gadgetzone\/archives\/17-virtually-comm-unicating-2.html\" aria-label=\"Read more about Virtually COMM Unicating\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertrath.com\/gadgetzone\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}