{"id":5039,"date":"2013-01-24T05:57:57","date_gmt":"2013-01-24T05:57:57","guid":{"rendered":"http:\/\/zerokidz.com\/ideas\/?p=5039"},"modified":"2014-06-24T17:06:01","modified_gmt":"2014-06-24T21:06:01","slug":"how-to-transfer-ssdv-images","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=5039","title":{"rendered":"How to transfer SSDV images"},"content":{"rendered":"<h5>notes<\/h5>\n<p>Here&#8217;s Dave Akerman&#8217;s explanation of how to write the code to get the Raspberry-Pi to send images via SSDV. It seems kind of impossible&#8230;<\/p>\n<p>The usual technique with the NTX2 is to send the \u20191\u2032 and \u20190\u2032 values in RTTY by waggling a general purpose I\/O pin up and down at the correct rate. e.g. every 20ms for the common 50 baud data rate. This is easy when you\u2019re programming a bare-metal AVR or PIC \u2013 just use a delay routine or, as in my trackers, a timer interrupt. However the Pi runs a non-real-time operating system, so I could not rely on accurate timing especially if the operating system is busy taking a photo from the webcam. There are other options but I opted for the simplest one \u2013 connect the NTX2 to the serial port. RTTY is just normal RS232-style serial marks and spaces and stop bits etc., so why not let the hardware UART do the timing for me? It didn\u2019t take long to write a small \u2018C\u2019 program that opened the serial port at 4800 baud, read enough GPS strings to find the longitude, latitude and altitude, then close the port and re-open at 300 baud (I found that switching baud rates without closing and opening wasn\u2019t always reliable) to send out a formatted telemetry string. Of course to do this I had to disable the login prompt on the serial port, and stop the kernel debug messages being sent to it, but all in all it was simple. All of this was done using the standard Debian image on a 4GB SD card.<\/p>\n<p>Now for the live images. I had to apply a patch to Debian after which it happily recognised the webcam as \/dev\/video0. I tried a few webcams and settled on the Logitech C270 which is reasonable quality, light and cheap (in case the payload goes missing!). I tried several webcam imaging programs and found fswebcam to be the best (worked without fiddling, yet had enough options to tailor the picture taking). Remember that the radio system has low bandwidth and with a typical flight lasting 2 hours or so we don\u2019t have time to send large images, so there\u2019s no point using the very best webcam and the highest resolution. I settled on 432 x 240 pixels with 50% compression as a good compromise between quality and download speed. I measured the webcam current and it went from 50mA at idle to 250mA peak when taking a picture, hence the need to short out the USB fuse (140mA max). A simple shell script took a photo every 30 seconds, saving them on the SD card so that the tracker program could choose the \u201cbest\u201d image (largest jpeg!) for transmission. Each chosen image is then converted to the form for download (split into blocks each with FEC) before being sent 1 block at a time. I interspersed the image data with telemetry \u2013 4 image packets for each telemetry packet). Here\u2019s the Pi making a self-portrait:<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/?attachment_id=587\" rel=\"attachment wp-att-587\"><img loading=\"lazy\" decoding=\"async\" title=\"Self\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png\" alt=\"\" width=\"476\" height=\"334\" \/><\/a><\/p>\n<p>Also this is very useful<\/p>\n<div><cite><a href=\"http:\/\/ns6t.net\/\" rel=\"external nofollow\">Tom Epperly &#8211; NS6T<\/a><\/cite>\u00a0says:<\/div>\n<div><a href=\"http:\/\/www.daveakerman.com\/?p=592#comment-3406\">07\/01\/2013 at 9:19 pm<\/a><\/div>\n<div>\n<p>Did you connect the Raspberry PI\u2019s TXD output directly to the Radiometrix TXD line? Or did you use some kind of v3.3 to v5.0 level conversion hardware? If you did level conversion, can you share your design? I am planning to build an APRS transmitter using a cheap USB GPS and a Radiometrix HX1, and I am wondering how complex the connection between the Raspberry Pi and the HX1 needs to be.<\/p>\n<\/div>\n<div><a href=\"http:\/\/www.daveakerman.com\/?p=592&amp;replytocom=3406#respond\">Reply<\/a><\/div>\n<ul>\n<li id=\"li-comment-3412\">\n<div id=\"comment-3412\">\n<div><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.gravatar.com\/avatar\/5b1e15b0bb1201d43a6d455a06d97d26?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite>dave<\/cite>\u00a0says:<\/div>\n<div><a href=\"http:\/\/www.daveakerman.com\/?p=592#comment-3412\">08\/01\/2013 at 10:20 am<\/a><\/div>\n<div>\n<p>Connected via some resistors to set the level and bias. This means that the low\/high digital outputs from the Pi result in 2 slightly different voltages at the NTX2, which then transmits two frequencies approx 600Hz apart.<\/p>\n<p>This won\u2019t work for APRS. For that you need an analog output, or PWM.<\/p>\n<\/div>\n<div><a href=\"http:\/\/www.daveakerman.com\/?p=592&amp;replytocom=3412#respond\">Reply<\/a><\/div>\n<\/div>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>notes Here&#8217;s Dave Akerman&#8217;s explanation of how to write the code to get the Raspberry-Pi to send images via SSDV. It seems kind of impossible&#8230; The usual technique with the NTX2 is to send the \u20191\u2032 and \u20190\u2032 values in RTTY by waggling a general purpose I\/O pin up and down at the correct rate. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=5039\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to transfer SSDV images&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[143],"tags":[6,296,25,57,172,184],"class_list":["post-5039","post","type-post","status-publish","format-standard","hentry","category-interactive-media-art","tag-interactive-media","tag-notebook","tag-programming","tag-radio","tag-raspberry-pi","tag-ssdv"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to transfer SSDV images - reactive music<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/reactivemusic.net\/?p=5039\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to transfer SSDV images - reactive music\" \/>\n<meta property=\"og:description\" content=\"notes Here&#8217;s Dave Akerman&#8217;s explanation of how to write the code to get the Raspberry-Pi to send images via SSDV. It seems kind of impossible&#8230; The usual technique with the NTX2 is to send the \u20191\u2032 and \u20190\u2032 values in RTTY by waggling a general purpose I\/O pin up and down at the correct rate. &hellip; Continue reading &quot;How to transfer SSDV images&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=5039\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-24T05:57:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-24T21:06:01+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png\" \/>\n<meta name=\"author\" content=\"Tom Zicarelli\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tom Zicarelli\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"How to transfer SSDV images\",\"datePublished\":\"2013-01-24T05:57:57+00:00\",\"dateModified\":\"2014-06-24T21:06:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039\"},\"wordCount\":650,\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.daveakerman.com\\\/wp-content\\\/uploads\\\/2012\\\/07\\\/Self.png\",\"keywords\":[\"interactive media\",\"notebook\",\"programming\",\"radio\",\"raspberry pi\",\"SSDV\"],\"articleSection\":[\"interactive media art\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039\",\"name\":\"How to transfer SSDV images - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.daveakerman.com\\\/wp-content\\\/uploads\\\/2012\\\/07\\\/Self.png\",\"datePublished\":\"2013-01-24T05:57:57+00:00\",\"dateModified\":\"2014-06-24T21:06:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=5039\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#primaryimage\",\"url\":\"http:\\\/\\\/www.daveakerman.com\\\/wp-content\\\/uploads\\\/2012\\\/07\\\/Self.png\",\"contentUrl\":\"http:\\\/\\\/www.daveakerman.com\\\/wp-content\\\/uploads\\\/2012\\\/07\\\/Self.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=5039#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to transfer SSDV images\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/\",\"name\":\"reactive music\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/reactivemusic.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\",\"name\":\"Tom Zicarelli\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"caption\":\"Tom Zicarelli\"},\"sameAs\":[\"http:\\\/\\\/tomzicarelli.com\"],\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to transfer SSDV images - reactive music","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/reactivemusic.net\/?p=5039","og_locale":"en_US","og_type":"article","og_title":"How to transfer SSDV images - reactive music","og_description":"notes Here&#8217;s Dave Akerman&#8217;s explanation of how to write the code to get the Raspberry-Pi to send images via SSDV. It seems kind of impossible&#8230; The usual technique with the NTX2 is to send the \u20191\u2032 and \u20190\u2032 values in RTTY by waggling a general purpose I\/O pin up and down at the correct rate. &hellip; Continue reading \"How to transfer SSDV images\"","og_url":"https:\/\/reactivemusic.net\/?p=5039","og_site_name":"reactive music","article_published_time":"2013-01-24T05:57:57+00:00","article_modified_time":"2014-06-24T21:06:01+00:00","og_image":[{"url":"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png","type":"","width":"","height":""}],"author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=5039#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=5039"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"How to transfer SSDV images","datePublished":"2013-01-24T05:57:57+00:00","dateModified":"2014-06-24T21:06:01+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=5039"},"wordCount":650,"image":{"@id":"https:\/\/reactivemusic.net\/?p=5039#primaryimage"},"thumbnailUrl":"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png","keywords":["interactive media","notebook","programming","radio","raspberry pi","SSDV"],"articleSection":["interactive media art"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=5039","url":"https:\/\/reactivemusic.net\/?p=5039","name":"How to transfer SSDV images - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=5039#primaryimage"},"image":{"@id":"https:\/\/reactivemusic.net\/?p=5039#primaryimage"},"thumbnailUrl":"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png","datePublished":"2013-01-24T05:57:57+00:00","dateModified":"2014-06-24T21:06:01+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=5039#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=5039"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/reactivemusic.net\/?p=5039#primaryimage","url":"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png","contentUrl":"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2012\/07\/Self.png"},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=5039#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"How to transfer SSDV images"}]},{"@type":"WebSite","@id":"https:\/\/reactivemusic.net\/#website","url":"https:\/\/reactivemusic.net\/","name":"reactive music","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/reactivemusic.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571","name":"Tom Zicarelli","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","caption":"Tom Zicarelli"},"sameAs":["http:\/\/tomzicarelli.com"],"url":"https:\/\/reactivemusic.net\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/5039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5039"}],"version-history":[{"count":6,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/5039\/revisions"}],"predecessor-version":[{"id":16649,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/5039\/revisions\/16649"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}