{"id":1847,"date":"2014-12-27T10:47:53","date_gmt":"2014-12-27T10:47:53","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=1847"},"modified":"2014-12-27T13:17:13","modified_gmt":"2014-12-27T13:17:13","slug":"uart-transmit-from-the-command-line","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/command-line\/io-pins-command-line\/uart-transmit-from-the-command-line","title":{"rendered":"UART transmit from the command line"},"content":{"rendered":"<p>\nYou may first need to turn&nbsp;off the UART functioning as a serial console by following the instructions&nbsp;<a href=\"https:\/\/raspberry-projects.com\/pi\/pi-operating-systems\/raspbian\/io-pins-raspbian\/uart-pins\">here<\/a>.\n<\/p>\n<p>\nThe default setup of the UART is 115200-8-N-1 (115200 baud, 8 data bits, No partity, 1 stop bit and&nbsp;no flow control).\n<\/p>\n<h4>\nWhat is current port setup?<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\u200bstty -F \/dev\/ttyAMA0\r\n<\/code>\r\n<\/pre>\n<h4>\nTransmit String<br \/>\n<\/h4>\n<p>\nThis will send &quot;hello&quot; from the serial port:\n<\/p>\n<pre>\r\n<code>\r\necho &quot;hello&quot; &gt; \/dev\/ttyAMA0\r\n<\/code><\/pre>\n<p>\n\u200bpress Enter to send&nbsp;it. &nbsp;(The last character is a zero not &#39;O&#39;).\n<\/p>\n<p>\nTo send with a carriage return and line feed:\n<\/p>\n<pre>\r\n<code>\r\necho -e &quot;hello world\\r\\n&quot; &gt; \/dev\/ttyAMA0\r\n<\/code><\/pre>\n<h4>\nSet Baud Rate<br \/>\n<\/h4>\n<pre>\r\n<code>\r\nstty -F \/dev\/ttyAMA0 57600\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may first need to turn&nbsp;off the UART functioning as a serial console by following the instructions&nbsp;here. The default setup of the UART is 115200-8-N-1 (115200 baud, 8 data bits, No partity, 1 stop bit and&nbsp;no flow control). What is current port setup? \u200bstty -F \/dev\/ttyAMA0 Transmit String This will send &quot;hello&quot; from the serial [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[],"class_list":["post-1847","post","type-post","status-publish","format-standard","hentry","category-io-pins-command-line"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=1847"}],"version-history":[{"count":6,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1847\/revisions"}],"predecessor-version":[{"id":1853,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1847\/revisions\/1853"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=1847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=1847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=1847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}