You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

A Python Library for Uniden DMA Scanner Communication

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/PC, Mac & Vintage Computers publicado por u/CVSoft January 12, 2016, 10:32:38 PM
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.
Inicia sesión o crea una cuenta para dejar un comentario
u/Yuki January 12, 2016, 10:43:28 PM
I don't have those machines, but I always liked RS232 programming. Good luck!
u/CVSoft January 13, 2016, 12:25:05 AM
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.
Last Edit: January 13, 2016, 05:36:12 AM by CVSoft
u/CVSoft January 13, 2016, 05:38:07 AM
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:
u/Dream of Omnimaga January 13, 2016, 05:40:34 AM
So what is the main purpose of those scanners? I'm not familiar with those devices and Google images didn't show much.
u/CVSoft January 13, 2016, 05:44:15 AM
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.
u/Yuki January 13, 2016, 07:41:59 AM
That would be pretty useful to scan, for instance, which radio and TV channels you can get.
u/CVSoft January 13, 2016, 07:49:56 AM
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.
u/Yuki January 13, 2016, 08:05:43 AM
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 c (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.
u/CVSoft January 13, 2016, 08:12:26 AM
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.
u/Dream of Omnimaga January 13, 2016, 08:41:20 AM
inb4 CVSoft spies the NSA <_<
u/CVSoft January 14, 2016, 10:06:44 AM
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.
u/Dream of Omnimaga January 14, 2016, 07:03:44 PM
Interesting data you got here :)
u/CVSoft January 15, 2016, 08:05:19 AM
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
u/Dream of Omnimaga January 15, 2016, 05:33:41 PM
You should put it on EFnet :P
Start a Discussion

b/PC, Mac & Vintage Computers

Computer programming discussion and project showcase

132
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal