Δευτέρα 23 Ιανουαρίου 2017

Quad antenna ADSB software receiver

   Finally, after many months of downtime due to a thunderstorm that actually fried most of the pcb's, the ADSB receiver is back online.
Feeding to fr24.com and Flightaware it only takes an underutilized ARM SBC and a USB HUB that costs more than the SBC to decode all this information and transport it to the community network.
A few years ago it all sounded unfeasible, but economies of scale made their miracle and the major expense has moved from electronics to aerials. Indeed the antennas, box and mast cost way more than the actual SDR decoding device.

Τετάρτη 29 Ιουνίου 2016

L-Band reception spectrogram with Helix antenna and LNA, E4000 tuner + Odroid C1

I was excited the other day to re-discover this beautiful tool rtl-power from keenerd! In combination with some handy scripts made by Superkuh and heatmap.py generator I've managed to burn a lot of cpu cycles and many Gbytes of disk space. But in the end, one can see the RF spectrum from another view! Here you can see some weird satellite signals coming down on earth on the L-Band!
Enjoy!

Παρασκευή 6 Μαΐου 2016

Decoding both AIS channels simultaneously with a single RTL-SDR

With the advent of Software Defined Radio, most hardware problems have become software problems. I knew the hardware was here to support decoding both AIS channels with a single USB RTL-SDR stick, but there is no software (besides gnuradio based software) to support that. Gnuradio is "too much" to fit on an ARM board, and I've started to look for other solutions.
The main obstacle was how to shift frequency from a command line utility in order to provide both channels that have a 50KHz space between them.
Our friend of the openwebrx project, Andras Retzler, HA7ILM, has built a very handy and efficient library for manipulating IQ data, csdr
However I still had to find a way to provide data to csdr, and then demodulate each channel separately, but let's start from the beginning.
AIS transmissions are at 162.025 MHz and at 161.975 MHz. We select the middle frequency 162.000 MHz as center, to avoid also any DC bias interference. Then we shift frequency by 25KHz by using the "csdr shift_addition_cc". A demodulator follows that demodulates Narrowband FM and then data is handled to "aisdecoder" a tool that takes demodulated audio data and decodes AIS messages.
rtl_fm has the ability to provide raw 16 bit integer IQ data by using the -M raw switch, but we need to multiply this data twice and then shift it by 25KHz lower for one channel and upper for the other one.
The idea of using a network streaming server to provide IQ data for all our demodulators comes also from openwebrx project where Andras uses ncat to stream the data and has proven to be very efficient.
On the demodulator part, I've tried the "demod" tool from Andres Vahter that uses the liquid-dsp library. It's a lot more cpu hungry than the original rtl_fm demodulator, but it works. If you are aware of any other more efficient solution just provide it in the comments section.
Each demodulator handles data via a FIFO pipe to aisdecoder, and each aisdecoder connects to aisdispatcher that provides AIS data to both AISHub.net and marinetraffic.com 
So I provide below the commands I've ended up using after many hours of testing!

Aisdispatcher:
aisdispatcher -u -h 0.0.0.0 -p 5000 -H 5.9.207.224:xxxx,data.aishub.net:xxxx -G

AisDecoders:
aisdecoder -h 127.0.0.1 -p 5000 -a file -c mono -d -f /home/sdr/ais.fifo
aisdecoder -h 127.0.0.1 -p 5000 -a file -c mono -d -f /home/sdr/ais1.fifo



of course you will first have to make the FIFO pipe using the mkfifo command.



rtl_fm:
/usr/local/bin/rtl_fm -d AIS -f 162000000 -M raw -s 1008000 | ncat -4l 4952 -k --send-only --allow 127.0.0.1

Demodulators:
ncat -v 127.0.0.1 4952 | csdr convert_i16_f |csdr shift_addition_cc 0.024801587 |csdr convert_f_i16 | demod --samplerate 1008000 --resamplerate 48000 -i i16 -o i16 --bandwidth 4500 fm --deviation 3500 > /home/sdr/ais.fifo
ncat -v 127.0.0.1 4952 | csdr convert_i16_f |csdr shift_addition_cc -0.024801587 |csdr convert_f_i16 | demod --samplerate 1008000 --resamplerate 48000 -i i16 -o i16 --bandwidth 4500 fm --deviation 3500 > /home/sdr/ais1.fifo


The 0.024801587 number comes from dividing the shift frequency with sampling rate ( 25000/1008000)

More experiments have to be done, specially in the sampling rate and down-sampling ratio. I suspect that rtl_fm provides a more efficient down-sampler, but we still have to have enough samples to cover a broader range for both channels

Of course to increase your chances of receiving AIS data with an RTL-SDR you'd better use RTL-SDR.com dongle that has a much much better clock with a TCXO.

You can check the station online at http://www.aishub.net/live-map.php?rrdname=2546&sname=Patras and http://www.marinetraffic.com/en/ais/details/stations/2566
Enjoy your fresh AIS messages!



Κυριακή 24 Απριλίου 2016

Serial over Air for Maritime use

   As I read somewhere on the Internet lately, a quote said that getting over old methods is much harder than creating new ones. Hence some protocols older than my age will be haunting us forever. A bright example is the RS-232 serial protocol that will keep haunting us for the remaining of our lives. Obsolete, yes, useful though and established to millions of embedded devices, we must cope with the overhead it carries and adjust our modern designs to support this last century serial communication protocol.
   Of course any modern communication design has to be cable free, especially in a boat where weight, complexity and oxidation matter. One might say that wireless is not secure, and another one that it's not reliable. Well true in some cases, but be assured that modern wireless devices designs have grown enough to provide industrial grade security and reliability if not yet military.
Many thanks goes to our friends who designed and built the ESP8266 chip that draws a path to the future of embedded wireless devices. Disregarding the yet undiscovered hardware "design flaws" that can be used to undermine the security of this device, we bet on it and use it for our open wireless communication solution within a sailboat. I name it SEA OWL (Open Wireless Link).
  Using ESP-201 (that has an external antenna and more available ports) to interface with various electronics on board like Navigation equipment, Auto pilot, Wind instruments, depth meter, speed meter, and many sensors that measure things like air/engine/water temperature, XY rotation (inclination), battery/engine/solar voltage, engine RPM, acceleration, speed etc, we are linking the dots and connecting everything to our central management systems that consists of a very low cost and low energy consuming ARM based device that logs everything, and also handles AIS, Wi-Fi, and GPS data combining all this to a lite database and also transmitting telemetry home.
Most of this has already been integrated and might also be available as a commercial ready made solution if there is enough interest.
More details will follow soon!

Τετάρτη 21 Οκτωβρίου 2015

Parallella uptime

parallella@parallella:~$ w
 16:02:24 up 174 days, 45 min,  2 users,  load average: 0.05, 0.03, 0.05
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      30Apr15 16729days  0.09s  0.04s -bash
parallel pts/0    192.168.1.26     16:02    0.00s  0.04s  0.01s w



Happy to have my Parallella board up for almost half a year :)

Τετάρτη 17 Ιουνίου 2015

RF Sniffing on HF bands

It was some time ago when I discovered PSKreporter and reversebeacon networks. It's all about reporting what you listen on the air to check about band propagation any given time and place. Multiple reporters exist, and most digi mode ham radio software is now reporting when you use it.
I like PSK reporter mostly because of the way they visualize everything. It's also a nice way to test your equipment, antennas, pre-amps by comparing the stations and the range you can hear.
A few months after reporting PSK and JT65 and burning my FT-920 on a thunderstorm, I decided it was time to move on. Multi band reporting using a single SDR and software was intriguing but needed some setup. The main set back, was that only Windows software exists for CW skimming and there was no way to use my existing PC's and SBC's. A few days ago I switched on my old Windows XP machine and installed all the required software, only to find out that everything was working flawlessly as described by the software authors!
A great thanks to OL5Q for providing the USRP library software for CW skimmer! Now I can use my USRP1 to listen and report from 4 HF bands simultaneously! I've picked the 20,17,15,12 meter bands mostly because my Cushcraft R5 antenna is made for those bands. Now my call-sign appears on the global top 10 chart of reporters with more than 100 different countries reported in one single day. Next is to be able to report digital modes also, and more HF bands.

I've also tried using RTL-SDR USB sticks with up-converters but the issue was that the up-converter clock was not stable enough to decode JT65. I've used both No-elec and SV1AFN up-converter. After talking with Makis, he confirmed that the clock was not for such use, and I've purchased a surplus stock 200MHz crystal from ebay to upgrade my up-converter. But, to use RTL-SDR you need one device for each band due to the "narrow" bandwidth they have, so you need to have RF power splitters for each stick. Moreover the USRP has a 12bit ADC instead of 8bit resulting in better dynamic range of the receiver. At the moment I use the LNA4HF  but I've also ordered the J310 pre amp from SV1AFN to compare them. 

Πέμπτη 4 Ιουνίου 2015

Farnell vs Mouser

Every radio amateur should have at least one in his hobbyist career wondered where to order parts from. Here in Greece, in the city I live, there are NO local stores that offer parts besides the most common ones.
So when I decided to build the mcHF, I have had my BOM's ready to upload them and get a price quote for the parts. The amount was respectable, about 200 Euros so I needed to find an economic solution. Since I was in Europe Farnell was the obvious choice, in terms of speed of delivery and customs. However due to an incident with a Farnell salesman I took the other way, across the Atlantic ocean.

Farnell has a "tool" to upload the BOM and give you a price quote. To my surprise this is NOT an automated procedure! You just upload the BOM and then wait until someone does something for it!
The same day I get the following reply on my e-mail"

"Would you like to place the order for the attached parts"

Besides the fact that there is no question-mark on this sentence, if I was to order I would have ordered, I wouldn't be asking for a price quote! The guy that replied to me was the "International Sales Co-ordinator" 

Anyway I decide to be polite, and reply to him that I would like to know what would be the total cost to decide if I'm going to place the order or not.

A few minutes later I get this fantastic reply!

If you visit our fantastic website, www.*******.com

Scroll down and click the farnell export link

We have a great search engine with prices, technical data sheets etc

Imagine that! There is a web site that has the technical data sheets and prices of all the parts! And it's also a fantastic one!
Then I realized that I did not want to do business with the English guys. I went through the process of building a BOM for Mouser, I uploaded it to their web site, and in seconds I had my price quote! There were some parts out of stock, but I easily replaced them with the suggested alternative ones. Mouser had FREE shipping, and guess what else! No need to wait for customs clearance and to pay extra money on custom fees because they have settled everything for you! They use a special freight service in co-operation with FedEx in which they import the parts to Europe for you. Also billing was made from within the EU and if you have a business VAT number withing the EU, you can exempt VAT. The parts arrived within a week, and generally their customer experience is amazing.

So, the Americans beat us in this...