{"id":1984,"date":"2018-04-25T08:30:48","date_gmt":"2018-04-25T12:30:48","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?p=1984"},"modified":"2018-04-25T08:30:48","modified_gmt":"2018-04-25T12:30:48","slug":"more-fun-with-rs232-c","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/career\/2018\/04\/25\/more-fun-with-rs232-c\/","title":{"rendered":"More fun with RS232-C"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1985\" data-permalink=\"https:\/\/ninecrows.com\/career\/2018\/04\/25\/more-fun-with-rs232-c\/img_20180425_082129\/\" data-orig-file=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?fit=4048%2C3036&amp;ssl=1\" data-orig-size=\"4048,3036\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Pixel XL&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1524644490&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.67&quot;,&quot;iso&quot;:&quot;414&quot;,&quot;shutter_speed&quot;:&quot;0.008328&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"IMG_20180425_082129\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?fit=474%2C356&amp;ssl=1\" class=\"alignleft size-thumbnail wp-image-1985\" src=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?resize=150%2C150\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?zoom=2&amp;resize=150%2C150 300w, https:\/\/i0.wp.com\/ninecrows.com\/career\/wp-content\/uploads\/2018\/04\/IMG_20180425_082129.jpg?zoom=3&amp;resize=150%2C150 450w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a>I need to do some RS232-C communications from a java program. My initial investigations suggest that java support for serial port connections is at best rudimentary and that the dedicated solutions are mostly old and poorly maintained.<\/p>\n<p>I odn&#8217;t need all that much sophistication from the solution so I may be able to get away with treating &#8216;&#92;.\\COM10&#8217; as a file type device and simply streaming bytes to and from it. I&#8217;m currently putting together a setup here at home that will help to play with the alternatives.<\/p>\n<p class=\"mentions-texteditor__content\">I bought a null modem adapter on the way home at a local computer shop (I was mildly surprised they still stocked them, but they had a broad selection of RS232 adapters).<\/p>\n<p class=\"mentions-texteditor__content\">Turned out that the pin 2\/3 swap wasn&#8217;t the issue after all though.<\/p>\n<p><!--more--><\/p>\n<p class=\"mentions-texteditor__content\">I&#8217;m using some old multi-port hardware I have lying around and the four port adapter that I&#8217;ve got plugged into my ubuntu linux machine labels its ports 1-&gt;4 but they map ttyUSB3-&gt;ttyUSB0 in linux. Once I played musical serial ports it became clear that was the problem and I could move forward.<\/p>\n<p class=\"mentions-texteditor__content\">Since I need two sides to the interaction, I started spinning together a simple non-blocking responder in C++ on the linux side. Once that is done I can experiment with java based solutions driven from the windows side.<\/p>\n<p class=\"mentions-texteditor__content\">Looks like tonight I may be at the point where I can try some more interesting communications than two copies of putty shoving keyboard characters at each other. If all goes well I may try plugging my serial adapter into one of my raspberry pi controllers as well to see if it will be recognized and run there&#8230;that would make for a very nice test target.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I need to do some RS232-C communications from a java program. My initial investigations suggest that java support for serial port connections is at best rudimentary and that the dedicated solutions are mostly old and poorly maintained. I odn&#8217;t need all that much sophistication from the solution so I may be able to get away &hellip; <a href=\"https:\/\/ninecrows.com\/career\/2018\/04\/25\/more-fun-with-rs232-c\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">More fun with RS232-C<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"More fun with RS232-C","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1984","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7F2Qc-w0","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1984"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=1984"}],"version-history":[{"count":1,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1984\/revisions"}],"predecessor-version":[{"id":1987,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1984\/revisions\/1987"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=1984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/categories?post=1984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/tags?post=1984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}