{"id":117,"date":"2013-04-08T17:00:30","date_gmt":"2013-04-08T17:00:30","guid":{"rendered":"http:\/\/alpsayin.com\/new\/?page_id=117"},"modified":"2021-03-22T21:22:09","modified_gmt":"2021-03-22T21:22:09","slug":"playing-around-with-radiotftp-without-any-radio","status":"publish","type":"page","link":"https:\/\/alpsayin.com\/blog\/manuals\/playing-around-with-radiotftp-without-any-radio\/","title":{"rendered":"Playing around with Radiotftp without any Radio"},"content":{"rendered":"<p>You don&#8217;t have UHX1, Bim2A or any other similar devices, but you still want to play around with radiotftp maybe even develop some software of your own on our IP stack? Go ahead you can easily do this stuff with using virtual pipes in Linux with a help of little software called socat. Here is how!<\/p>\n<p>You can create virtual serial ports using a software called socat in Linux.<\/p>\n<h1>To install radiotftp:<\/h1>\n<ul>\n<li><span style=\"line-height: 15px;\">Clone the radiotftp repository to your home directory.<\/span><\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">cd ~\/\r\ngit clone https:\/\/github.com\/alpsayin\/radiotftp.git\r\ncd ~\/radiotftp<\/pre>\n<ul>\n<li>You should select the ax25 build, so cd into the ax_25 build folder.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">cd ax25_build\/<\/pre>\n<ul>\n<li>It is always good practice to clean and then make. So clean and make.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">make clean &amp;&amp; make<\/pre>\n<ul>\n<li>If you are seeing &#8220;<em>Finished building target: radiotftp<\/em>&#8220;, you are almost good to go. Now \u00a0we are going to create symbolic links to binary files so that we access them anywhere.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">sudo ln -s ~\/radiotftp\/ax25_build\/radiotftp \/usr\/sbin\/radiotftp<\/pre>\n<ul>\n<li>Go to your home directory again and try typing radiotftp, if you get the help text, then you are good to go<\/li>\n<\/ul>\n<pre lang=\"text\" escaped=\"true\">radiotftp sends or listens for a tftp request<\/pre>\n<pre lang=\"text\" escaped=\"true\">legal invocations:\r\n radiotftp_uhf\r\n radiotftp_vhf\r\nBuild Date: Apr 4 2013 12:54:33\r\nUses ax25 link layer\r\nradiotftp mode [-dst] [-b] [-f] terminal [command filename] \r\n mode uhf or vhf -b run in background (EXPERIMENTAL, do NOT use this!)\r\n -f defines a different local filename for put and get\r\n and defines a different remote filename for append and appendline\r\n -dstXXX.XXX.XXX.XXX sends the request to XXX.XXX.XXX.XXX\r\n default is broadcast Local address settings are read from a 'radiotftp.conf' file\r\n Examples: \r\n radiotftp uhf \/dev\/ttyUSB0 \r\n radiotftp uhf -flocalphoto.jpg \/dev\/ttyUSB0 get remotephoto.jpg\r\n radiotftp uhf -flocalmusic.mp3 \/dev\/ttyUSB0 put remotemusic.mp3\r\n radiotftp vhf -dst10.0.0.1 \/dev\/ttyUSB0 appendfile logfile.txt\r\n radiotftp vhf -fremote_sensors.dat \/dev\/ttyUSB0 appendline '{TELEMETRY BATTERY=3.3V}'\r\nexiting...<\/pre>\n<h1>To install socat:<\/h1>\n<ul>\n<li>Install socat using apt-get.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">sudo apt-get install socat<\/pre>\n<ul>\n<li>After that you can easily create two virtual serial ports connected to each other by entering the command below.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">socat -d -d pty,raw,echo=0 pty,raw,echo=0<\/pre>\n<ul>\n<li>This will output something like below<\/li>\n<\/ul>\n<pre lang=\"text\" escaped=\"true\">2013\/04\/09 16:00:45 socat[4468] N PTY is \/dev\/pts\/4\r\n2013\/04\/09 16:00:45 socat[4468] N PTY is \/dev\/pts\/5\r\n2013\/04\/09 16:00:45 socat[4468] N starting data transfer loop with FDs [3,3] and [5,5]<\/pre>\n<ul>\n<li>After this you can use radiotftp as usual but using \/dev\/pts\/4 instead of \/dev\/ttyUSB0. Type in the command below in a terminal to start the server.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">radiotftp uhf \/dev\/pts\/4<\/pre>\n<ul>\n<li>And in a new terminal and in a DIFFERENT directory you start sending files.<\/li>\n<\/ul>\n<pre lang=\"bash\" escaped=\"true\">radiotftp uhf \/dev\/pts\/5 put localdata.txt<\/pre>\n<ul>\n<li>You should start seeing the data flow in both terminals. Ta da! Start playing with radiotftp and start exploring it. And if you are into it try developing your applications for the radiotftp stack.<\/li>\n<\/ul>\n<figure id=\"attachment_149\" aria-describedby=\"caption-attachment-149\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/alpenian.alpsayin.com\/blog\/wp-content\/uploads\/2013\/04\/radiotftp_local.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-149\" src=\"https:\/\/alpenian.alpsayin.com\/blog\/wp-content\/uploads\/2013\/04\/radiotftp_local-300x147.png\" alt=\"Radiotftp with Socat\" width=\"300\" height=\"147\" \/><\/a><figcaption id=\"caption-attachment-149\" class=\"wp-caption-text\">Radiotftp with Socat<\/figcaption><\/figure>\n<h2>Finally; remember that there isn&#8217;t much documentation about this on the internet. So if you have a question, ask it below and I&#8217;ll try to answer. In such way we can build up a knowledge base.<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t have UHX1, Bim2A or any other similar devices, but you still want to play around with radiotftp maybe even develop some software of your own on our IP stack? Go ahead you can easily do this stuff with using virtual pipes in Linux with a help of little software called socat. Here is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":40,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-117","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/pages\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":1,"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/pages\/117\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/pages\/117\/revisions\/290"}],"up":[{"embeddable":true,"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/pages\/40"}],"wp:attachment":[{"href":"https:\/\/alpsayin.com\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}