Alternatively, join us on Discord.

A Python Library for Uniden DMA Scanner Communication

Started by CVSoft, January 12, 2016, 10:32:38 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CVSoft

Because I like RS232, I'm writing a Python library for RS232 communication with Uniden DMA scanners (BR330T, BC346T/XT, BCD396XT). Being 5 lines long in an early stage of development, I don't have a whole lot to say about it, but in the end it should allow complete programming and monitoring of the scanner via serial, and maybe even include a simple bridge for TCP/IP relaying. It'll be more of a SDK with a demo included once it's done.

This will be a progress thread as I figure out an increasing number of silly things I can do with this level of automation.

Juju

I don't have those machines, but I always liked RS232 programming. Good luck!
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

CVSoft

An initial demo, to demonstrate communication and basic parsing of information:

I don't remap the characters so weird stuff shows up where small print should be.

CVSoft

I improved the communication code to allow faster exchanges and handle errors properly without hanging. Using a short code bit:
for f in xrange(100, 1200000, 100):
    scanner.set_freq(float(f)/1000)
    fil.write("%.3f,%d\r\n" % (float(f)/1000, scanner.get_rssi()))

I was able to get a view of raw RF power level between 100 kHz and 1.2 GHz in a neat little graph:

DJ Omnimaga

So what is the main purpose of those scanners? I'm not familiar with those devices and Google images didn't show much.

CVSoft

https://en.wikipedia.org/wiki/Scanner_%28radio%29
They quickly scan a bunch of radio frequencies and stop at any transmissions they come across.
I'm testing with a Uniden BR330T.

Juju

That would be pretty useful to scan, for instance, which radio and TV channels you can get.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

CVSoft

I'll research things a bit more, and see how the output of this compares to actual software-defined radio output. In theory, it should actually work quite well despite being slow. Around 650-750 MHz you can see some spikes, those are DTV channels. The big spike in the graph is FM broadcast, and the very tiny spike at the first part of the graph is AM broadcast (local stations are stupidly strong, but the others aren't picked up by my antenna due to antenna size). Resolution can get down to about 20 kHz per useful data point, which is 50 data points per megahertz. Since data is oversampled, filtering could increase selectivity, but this is out of my scope.

I can use it to characterize noise being received on my outdoor antenna and identify what things generate RFI noise at what frequencies. Uses for such a tool are niche, but they are certainly fun.

Juju

I bet, that woould be pretty fun watching all those frequencies and figuring out what is what. I remember when we still had some decent AM stations before they all closed down in favor of FM, audio quality was s*** (which is why the last stations to survive on AM were mostly talk radios) but on good days you could pick up stations from 250 km away. In some extreme cases you can even pick up CBC Radio from Regina, Saskatchewan in Norway.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

CVSoft

I can regularly pick up stations from Colorado every night (specifically KSL 1160) with better quality than the semi-local stations. With reasonably large antennas, the 1000km line can get easy to pass. The sheer number of stations is the factor that makes clear reception of distant stations difficult, as while there may be many frequencies and sparse station population, there's still multiple stations on every frequency within that large radius. The clear-channel (50 kilowatt) stations also tend to stomp out any other stations on frequency.

DJ Omnimaga


CVSoft

Glorious data! Blue indicates 25000 watt power or more, red means 0 to 24999 watts power. Labels should be 95% accurate. The red graph was made at night, and the blue graph was made during the day when AM broadcast can't skip.

DJ Omnimaga


CVSoft

It's controllable remotely by anyone at irc.digitaladdiction.info / #BR330T
It's my primary radio so it won't be up 24/7 (not even close to 24/7). It does effectively demonstrate the capabilities of my code. IRC communication is handled by an earlier work of mine, stickybot, and there's about 100 lines of code between the two programs allowing IRC to communicate easily with my Uniden communication library.
[05:07] <@notipa> set freq 152.84
[05:07] <@BR330T> BR330T> Frequency set to 152.8400 MHz.
[05:07] <@notipa> set volume 4
[05:07] <@BR330T> BR330T> Volume set to 4.
[05:08] <@notipa> set squelch 7
[05:08] <@BR330T> BR330T> Squelch set to 7.
[05:08] <@notipa> rssi
[05:08] <@BR330T> BR330T> RSSI: 463
[05:09] <@notipa> get freq
[05:09] <@BR330T> BR330T> 152.8400 MHz
[05:09] <@notipa> batt
[05:09] <@BR330T> BR330T> Battery: 3.83V

DJ Omnimaga


Powered by EzPortal