{"id":333,"date":"2018-11-27T14:33:38","date_gmt":"2018-11-27T13:33:38","guid":{"rendered":"http:\/\/www.netraam.nl\/ramblings\/?p=333"},"modified":"2018-11-27T14:33:38","modified_gmt":"2018-11-27T13:33:38","slug":"feeding-to-flightradar24-using-a-usb-dvb-t-stick-on-freebsd","status":"publish","type":"post","link":"https:\/\/www.netraam.nl\/ramblings\/feeding-to-flightradar24-using-a-usb-dvb-t-stick-on-freebsd\/","title":{"rendered":"Feeding to Flightradar24 using a USB DVB-T stick on FreeBSD"},"content":{"rendered":"<p>I have been feeding data to FlightRadar24 for some years now, using a cheap DVB-T USB stick plugged into a Windows PC that gets used less and less. For that reason, the data feed wasn\u2019t very consistent at all. There is a computer in the house which acts as a DHCP\/DNS\/whatnot server and is on 24\/7, so it made sense to see if I could move the fr24feed service over to that machine. Trouble is, it runs FreeBSD and Flightradar24 doesn\u2019t provide the necessary software for that OS. Getting it to work proved to be a bit cumbersome, but after some hours of happily nerding about, it\u2019s now working quite nicely.<\/p>\n<p>Here\u2019s how to do it:<\/p>\n<p>Plug the USB stick into the machine running FreeBSD (I\u2019m on 11.2-RELEASE with a GENERIC kernel. Your mileage may vary a bit when using a different version and\/or kernel). See if it\u2019s detected (everything after the $&#8217;s is a command line):<\/p>\n<p>$ \u00a0dmesg<\/p>\n<p><em>ugen6.3: &lt;Realtek RTL2838UHIDIR&gt; at usbus6<\/em><\/p>\n<p>Great. Let\u2019s see if we can get some data from it and upload that.<\/p>\n<p>First install some packages (or compile them from the ports if you prefer):<\/p>\n<p>$ pkg install comms\/rtl-sdr comms\/dump1090 emulators\/linux_base-c6<\/p>\n<p>Now download the uploader from Flightradar24 and enable it to run:<\/p>\n<p>$ fetch <a href=\"https:\/\/repo-feed.flightradar24.com\/linux_x86_binaries\/fr24feed_1.0.18-5_i386.tgz\">https:\/\/repo-feed.flightradar24.com\/linux_x86_binaries\/fr24feed_1.0.18-5_i386.tgz<\/a><\/p>\n<p>Extract the contents of the package and enter the newly created directory:<\/p>\n<p>$ tar xzvf fr24feed_1.0.18-5_i386.tgz; cd fr24feed_i386\/<\/p>\n<p>Enable the OS to run the fr24feed Linux program:<\/p>\n<p>$ kldload linux<\/p>\n<p>And make that automatically possible after the next reboot too:<\/p>\n<p>$ echo \u2018linux_enable=&#8221;YES&#8221;\u2019 &gt;&gt; \/etc\/rc.conf<\/p>\n<p>Tell FreeBSD that we\u2019re dealing with a Linux Binary:<\/p>\n<p>$ brandelf -t Linux fr24feed<\/p>\n<p>You should now be able to see a bunch of planes:<\/p>\n<p>$ dump1090 &#8211;enable-agc &#8211;net \u2013interactive<\/p>\n<p>Transfer the data to Flightradar24:<\/p>\n<p>$ .\/fr24feed &#8211;fr24key=1234567890 &#8211;receiver=avr-tcp &#8211;raw=no &#8211;bs=no &#8211;logmode=0<\/p>\n<p>That\u2019s it. You need a working feeders account and key of course, but that\u2019s all straightforward and well documented stuff.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been feeding data to FlightRadar24 for some years now, using a cheap DVB-T USB stick plugged into a Windows PC that gets used less and less. For that reason, the data feed wasn\u2019t very consistent at all. There is a computer in the house which acts as a DHCP\/DNS\/whatnot server and is on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[17,16,15],"class_list":["post-333","post","type-post","status-publish","format-standard","hentry","category-nerd","tag-flightradar24","tag-fr24feed","tag-freebsd"],"_links":{"self":[{"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/posts\/333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/comments?post=333"}],"version-history":[{"count":1,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/posts\/333\/revisions"}],"predecessor-version":[{"id":334,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/posts\/333\/revisions\/334"}],"wp:attachment":[{"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/media?parent=333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/categories?post=333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netraam.nl\/ramblings\/wp-json\/wp\/v2\/tags?post=333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}