* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: A Python Library for Uniden DMA Scanner Communication  (Read 1425 times)

0 Members and 1 Guest are viewing this topic.

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
A Python Library for Uniden DMA Scanner Communication
« on: 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.


  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 2910
  • Post Rating Ratio: +22/-1
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
I don't have those machines, but I always liked RS232 programming. Good luck!
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

subscribe to my patreon for updates you'll probably get here anyway

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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 »
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
I improved the communication code to allow faster exchanges and handle errors properly without hanging. Using a short code bit:
Code: [Select]
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:
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
So what is the main purpose of those scanners? I'm not familiar with those devices and Google images didn't show much.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 2910
  • Post Rating Ratio: +22/-1
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
That would be pretty useful to scan, for instance, which radio and TV channels you can get.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

subscribe to my patreon for updates you'll probably get here anyway

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 2910
  • Post Rating Ratio: +22/-1
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
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.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

subscribe to my patreon for updates you'll probably get here anyway

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
inb4 CVSoft spies the NSA <_<
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Interesting data you got here :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
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.
Code: [Select]
[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
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18428
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
You should put it on EFnet :P
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games