RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Software > Trunking Control Channel Decoding

Trunking Control Channel Decoding For discussion of installation, setup, configuration, and use of the Trunker / Unitrunker digital decoding utilities (for decoding Trunking control channels)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-2011, 12:34 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Apr 2011
Posts: 233
Default Arduino bitstream-1.0 release

After an energetic and fruitful discussion on serial bit slicers here:
Data Slicer and unitrunker

I'm happy to release v1.0 of the Arduino multi-channel bitstream package.
You can download it here:
http://www.trix.com/GroundLoop/bitstream-1.0.zip

This package contains and Arduino sketch that samples one or two discriminator audio feeds and streams timed sample bits out the serial port. It also has a sample log and test application to decode packets.

It's a work in progress, and will hopefully be useful to programs like UniTrunker that sample data streams using audio input today. The source code is GPL, so you may use it for other projects.

There are a few advantages to using an Arduino instead of audio line-in:
  • Reduced CPU load, since there are fewer binary serial samples than 16-bit audio samples.
  • Scales to multiple systems. It's difficult to add audio inputs to most computers
  • Less expensive than added audio inputs. Arduinos are less than US$30 and can sample two inputs.

The current version samples two streams, but three or four may be possible in the future.

I'd be curious to hear from anyone that tries it, successful or otherwise.
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 06-29-2011, 4:24 AM
scottbailey's Avatar
Member
   
Join Date: Mar 2005
Location: California
Posts: 68
Default

Now that is some nicely commented code!

I can't believe I didn't discover the Arduino sooner!
Reply With Quote
  #3 (permalink)  
Old 06-29-2011, 5:36 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Apr 2011
Posts: 233
Default

It's fun stuff. I've been dorking around with Atmel AVRs since Butterfly, before Arduino, and the bar is that much lower with these pre-fab hacker boards. The price is right.

Arduino brings you a nice bootloader (so you can share the RS-232 port between your program and flash programming), and a slew of interesting and strange libraries of pre-existing code.

You do have to be careful with the Arduino convenience libraries, though.. some are too slow compared to raw avr-gcc calls or macros.

Anyway, let me know if you get the bitstream program running. Next up, the Tuner.
Reply With Quote
  #4 (permalink)  
Old 06-29-2011, 6:16 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Apr 2011
Posts: 233
Default

Ah, where to get Arduinos.

There are many different kinds, with different features. Any board that boasts an "Arduino" name is likely to work just fine with the Arduino software package, but some are better fits than others. If you want to run code without modification, then your options are more limited:
Arduino Buying Guide - SparkFun Electronics

First, there's flash size.. ATmega168, ATmega328 -- this indicates how much flash memory is available for code.. 16K or 32K. This sounds like a big deal, but most of the small projects fit just fine into 16K, so either will work. The bitstream is less than 3K. There used to be a price difference, but lately there doesn't seem to be any reason not to buy 32KB. Same code runs on both.

Avoid any designs that are not based on those two chips, as they tend to be more specialized and have different in/out options.

Since the older radios are 5v logic, get a 5v Arduino, rather than the 3.3v "pro" board. This gives you more options for connectivity.

The Arduino UNO is the newest board, but arguably the weakest. It has a less-precise resonator (vs oscillator) for the main 16MHz clock, and a new RS-232 to USB interface chip that is faster, but less proven and universal than the venerable FTDI.

So.. Arduino Duemilanove, while discontinued, is still a fine choice:
Arduino - ArduinoBoardDuemilanove

You shouldn't spend more than about US$30.00 for it.
Amazon:
http://amzn.com/B004A7L3NC

There are 'clones'.. derivative designs that improve on certain things. I like the Seeeduino:
Seeeduino V2.21 (Atmega 328P) [ARD128D2P] - $22.50 : Seeed Studio Bazaar, Boost ideas, extend the reach
Smaller USB connector. Switch options.

If you're going to bury the board inside the MaxTrac or other radio, the Nano rocks:
Arduino - ArduinoBoardNano
Same stuff, smaller package. We're not using any add-on Shields anyway.
Arduino Nano 3.0 Atmel ATmega328 Mini-USB Board with USB Cable [bzb8780502] - $24.99 : Bizoner.com, Online Shop,Arduino Boards,Shield,Tools,Sensors,Robot,Cables,Hobby,Sel l
I haven't tried them, but if I was ordering now, I'd get these.
Reply With Quote
  #5 (permalink)  
Old 06-04-2012, 6:29 PM
  Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2011
Posts: 2
Default

Seems the bitstream file link is invalid now. Any chance groundloop or someone else could repost it?
Reply With Quote
Sponsored links
        
  #6 (permalink)  
Old 06-05-2012, 12:03 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Apr 2011
Posts: 233
Default

Yeah, I'm real sorry about that. The web host I was using got wiped out by some miscreants and didn't come back.
I do have backups.
If anyone has a stable host that wants the files, I'm happy to resend them.
By all means, pass 'em around.
Reply With Quote
  #7 (permalink)  
Old 06-05-2012, 1:05 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

GL - I think Brandon's blog includes your sketch files.

Utah Radio: Maxtroller and Maxduino

I need to merge the new slicer code into it.

Edit - sorry that's GL's other project, not the bitstream.

Last edited by Unitrunker; 06-05-2012 at 1:10 AM..
Reply With Quote
  #8 (permalink)  
Old 06-05-2012, 1:08 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

Speaking of Arduinos, what are your thoughts on the atmega32u8 in place of the atmega328?
Reply With Quote
  #9 (permalink)  
Old 06-28-2012, 8:20 AM
Member
   
Join Date: Sep 2007
Posts: 6
Default

Hi,

Can someone share (send me) Arduino bitstream files?

Piotr
Reply With Quote
Sponsored links
  #10 (permalink)  
Old 06-29-2012, 2:28 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

Here is the original 1.0 release with the sample log file removed to fit file size limits on this site.
Attached Files
File Type: zip bitstream-1.0.zip (18.6 KB, 116 views)
Reply With Quote
  #11 (permalink)  
Old 06-29-2012, 4:09 PM
Member
   
Join Date: Sep 2007
Posts: 6
Default

Thank, you I will try it. I'm thinking is it possible to implement into Arduino FFSK decoder. I'm interested in decoding 1200bps FFSK signal (MPT1327 control channel). What do you think about it?
I've found hardware decoder (CML FX429A) but it's very old IC and it's hard to buy. I've contacted CML sales department and fortunately they said that it's still in production but it's not recommended for new designs.
Now I'm waiting for answer from my local CML distributor. My idea is to implement on base of arduino hardware based MPT1327 scanner controller.

Piotr
Reply With Quote
  #12 (permalink)  
Old 06-29-2012, 4:27 PM
cg cg is offline
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Dec 2000
Location: Connecticut
Posts: 1,973
Default

If anyone has been able to control an Astro Spectra, I would be interested trying that to monitor a digital system. Someone had remarked that it should be possible since it is similar enough to the Maxtrac.

chris
Reply With Quote
  #13 (permalink)  
Old 06-30-2012, 2:16 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

Quote:
Originally Posted by bilbolodz View Post
I'm thinking is it possible to implement into Arduino FFSK decoder. I'm interested in decoding 1200bps FFSK signal (MPT1327 control channel).
This would be very easy. Use speaker audio so you don't need to filter out any subaudible CTCSS tone. At 18,000 bit-samples per second ... FFSK would have 15 bits per symbol. Ideally - the number of bits should be divisible by 6 (which 15 isn't) but should still be tolerable.

The "2 pi" 1200 Hz tone looks like ...

0000000x111111 or 1111111x000000 where "x" could be either 0 or 1 (don't care).

The "3 pi" 1800 Hz tone looks like ...

000001111100000 or 111110000011111.

The idea behind the bitstream is to defer processing these patterns on the host PC so that the Arduino code remains fast and simple. This also allows the bitstream to decode multiple protocols.

I have a faster version running at 28,800 that successfully decodes Motorola and EDACS (wide and narrow) control channels while still supporting MPT1327.
Reply With Quote
  #14 (permalink)  
Old 06-30-2012, 2:36 AM
mancow's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Feb 2003
Location: N.E. Kansas
Posts: 4,640
Default

There is a thread over at p25.ca in which a guy made a program to control various Motorola radios. It worked on the Spectra and legacy Astro stuff. It was a bit rough but it got the point across.

I would like to come up with a way to tap the tuning data inside a Pro197 or Uniden 996 or whatever and perhaps use an Arduino to control an Astro product. Offloading the receiver function to an Astro would provide an incredible receive improvement. The program the guy came up with was called Remoto but unfortunately he seems to have disappeared before he found a way to initiate the digital decoder but the application did allow for tuning in analog mode.

Maybe this is off topic but I thought it might be of some interest.
Reply With Quote
  #15 (permalink)  
Old 06-30-2012, 3:18 AM
Member
   
Join Date: Sep 2007
Posts: 6
Default

Quote:
Originally Posted by Unitrunker View Post
This would be very easy. Use speaker audio so you don't need to filter out any subaudible CTCSS tone. At 18,000 bit-samples per second ... FFSK would have 15 bits per symbol. Ideally - the number of bits should be divisible by 6 (which 15 isn't) but should still be tolerable.
Actually I've thought about putting all decoding stuff into Arduino (to get at RS232 "clear MTP1327" codewords). Because it's 1200 I can lower sample rate to release some CPU resources but I don't quite sure isn't to much for Arduino to do all decoding work: detect carrier, recover clocking, synchronize symbols, strip off preamble, count cheksum.
Of course I can chain two Arduino together: on for data slicing second to decoding but it still a lot of work with FFSK processing. Actually I'm not fluent with decoding analog signals into digital that's the reason why I was thinking about FX429A. It do all these stuf in hardware and give you clear received byte....

Piotr
Reply With Quote
Sponsored links
        
  #16 (permalink)  
Old 06-30-2012, 4:03 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

Quote:
Originally Posted by bilbolodz View Post
Actually I've thought about putting all decoding stuff into Arduino (to get at RS232 "clear MTP1327" codewords). Because it's 1200 I can lower sample rate to release some CPU resources
I think 7200 is the lowest you can go for FFSK at 1200 bps.
Quote:
for Arduino to do all decoding work: detect carrier, recover clocking, synchronize symbols, strip off preamble, count cheksum.
The checksum is expensive. Some MPT1327 systems use nonstandard sync bits. This forces calculating CRC on every symbol until sync is found. 1200 CRCs per second on 16 MHz Atmega328 is a bit much.

An ARM based Maple or a Raspberry Pi might be better/cheaper than two Arduinos.
Reply With Quote
  #17 (permalink)  
Old 09-03-2012, 6:24 AM
Member
   
Join Date: Sep 2007
Posts: 6
Default

OK, I've working prototype (Arduino + FX429A). I can receive via Arduino decoded MPT1327 codwords so I can quickly implement "Inline Control Panel Decoding" but I don't know the format which UniTrunker require.... My final goal is to make full MPT1327 decoding in Arduino.

Piotr
Reply With Quote
  #18 (permalink)  
Old 09-03-2012, 11:05 AM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

The interface you've constructed sounds very much like the modem required by Ian Wraith's FTrunk and PTrunk.

Talkback Systems Australia

Unitrunker expects a time sliced bitstream at 28,800 bps. The Arduino code samples an analog input. An external modem chip isn't used. MPT1327, Motorola and EDACS can all be decoded from this common format.
Reply With Quote
  #19 (permalink)  
Old 09-03-2012, 11:51 AM
Member
   
Join Date: Sep 2007
Posts: 6
Default

Yes, it's something like that. About Unitrunker:
if scanner is capable of it can listen to ("control channel" decoded from air to digital stream using RS232 (but decoded string, not just sample of analog data).
Unfortunatelly there is no scanner which can decode MPT1327 (I know that Uniden can decode Motorola, EDACS and LTR). So maybe it could be a good idea to make arduino based "control channel decoder"? I think it's not a problem but I don't know format which Unitrunker expects to receive.
Reply With Quote
  #20 (permalink)  
Old 09-03-2012, 7:25 PM
Seņor Member
  RadioReference Database Admininstrator
Database Admin
 
Join Date: Dec 2001
Location: Texas
Posts: 5,934
Default

Quote:
Originally Posted by bilbolodz View Post
I think it's not a problem but I don't know format which Unitrunker expects to receive.
The expected format is as described above. If your Arduino does the extra work of decoding codewords, I'd have to modify the program to accept the codewords. It would be a new format.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 5:26 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2011 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions