Are most other trunked systems that small???

Status
Not open for further replies.

wm8s

Member
Premium Subscriber
Joined
Oct 30, 2004
Messages
792
Location
Houston, TX
It's official: The WV Interoperable Radio Project has arrived at a big-city milestone. I went to program my BCD-996T today, and received the dreaded error:

==========
Error: Too many TGID (251) in system "WV/IOP System"
1 system(s) excluded from configuration because of error.

==========

I love many features of the 996, and I appreciate how good the company has been at incorporating user requests into radios, but I have to say that they really blew this, thinking a trunked system only needed 250 talkgroups. Are other statewide and big-city systems < 250TGs? So now I get to either (1) exclude some talkgroups as unworthy, or (2) break the system into "North" and "South", as I had to elect for Ohio MARCS. Arg. That seems to be something a minor firmware update could fix, if there are some bytes lying around somewhere (obviously UASD doesn't care that much, since it let me add 251 TGs the system just fine).
 

RolnCode3

Member
Joined
Jun 7, 2004
Messages
2,255
Location
Sacramento/Bay Area, CA
It's not that they think systems won't be that big. Other threads seem to say that many systems won't be that big, but some are. This is a compromise for technical reasons.

There are technical reasons that were discussed at great length when the 246T came out. I can't remember off-hand, but Uniden had very valid reasons for doing so, and I believe Paul spent time explaining it.

If I find any threads containing the answer I'll link to them.

Here's one thread discussing the issue:
http://www.radioreference.com/forums/showthread.php?t=35071&highlight=uniden+talkgroup+limit

Just type "uniden talkgroup limit" into the search and you'll find other threads.
 
Last edited:

radio50

Member
Joined
Jul 29, 2007
Messages
134
Location
Mequon, WI
Yup, I've had the same problem with several systems in my locale too. Rather than break them into North and South, I break them into "worthy" and "unworthy" to use your lingo (not a bad choice of words). For example, I put police, sheriff and fire in one system, and DPW and highway crews, etc., into the other. Actually, most of the time I leave that one turned off.

Unfortunately, scanning the two systems means that while the radio is waiting for action on one, it's missing things on the other, if only for a few seconds.
 
Last edited:

slicerwizard

Member
Joined
Sep 19, 2002
Messages
7,774
Location
Toronto, Ontario
RolnCode3 said:
There are technical reasons that were discussed at great length when the 246T came out. I can't remember off-hand, but Uniden had very valid reasons for doing so, and I believe Paul spent time explaining it.
They're not valid reasons. If a 25 year old 16 bit PC running at 4.77 MHz can keep up with the OSW stream while maintaining a list of 2000 or more talkgroups PLUS ten thousand radio ID's, the 32 bit processor in a 246/396/996 running at 20 MHz (IIRC) can easily handle 1000 talkgroups. And the PC doesn't spit out bogus talkgroups like my 396 keeps doing when the signal gets a bit noisy.

Yeah, that one explains it fairly well.
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
Andrew makes a good point. Paul's explanation implies the firmware uses a linear search to match IDs. A hash lookup would cost less than the effort to parse the OSW. Even if a hash map wasn't practical in terms of memory, a binary search would do just fine. A dozen iterations covers the entire ID space of a Type II system.

wm8s' comment about the UASD software makes me wonder. Is the limit imposed only when keying the IDs in manually?
 

RolnCode3

Member
Joined
Jun 7, 2004
Messages
2,255
Location
Sacramento/Bay Area, CA
slicerwizard said:
They're not valid reasons. If a 25 year old 16 bit PC running at 4.77 MHz can keep up with the OSW stream while maintaining a list of 2000 or more talkgroups PLUS ten thousand radio ID's, the 32 bit processor in a 246/396/996 running at 20 MHz (IIRC) can easily handle 1000 talkgroups. And the PC doesn't spit out bogus talkgroups like my 396 keeps doing when the signal gets a bit noisy.


Yeah, that one explains it fairly well.
I'm saying it's not arbitrary. Uniden decided on a number based on certain criteria. Whether you agree with them or not, that's how they decided. That's all.

If Paul claims there's technical issues, I'm personally in no position to refute his statements.

I read your response in the other thread, and you obviously have a much better handle on the validity of Uniden's claims. I'll defer to your knowledge.
 
Last edited:

rdale

Completely Banned for the Greater Good
Joined
Feb 3, 2001
Messages
11,380
Location
Lansing, MI
Also realize that 251 talkgroups will not be regularly utilized by your neighborhood tower. If it does become an issue for you, get a PSR500
 

wm8s

Member
Premium Subscriber
Joined
Oct 30, 2004
Messages
792
Location
Houston, TX
rdale said:
Also realize that 251 talkgroups will not be regularly utilized by your neighborhood tower. If it does become an issue for you, get a PSR500

But that misses the point: If I have to break the system up into, e.g., one tower (site) per "system" in the radio, then (1) I'll have lost the benefit of multi-site systems, (2) I'll have a bunch of systems to maintain in UASD, (3) I'll have to repeat all of the statewide talkgroups in every one of them (so changes will be difficult to propagate, etc.), and (4) if -- as does happen -- somebody from a different part of the state roams into my neighborhood and I'm scanning "my tower's" system, I won't get the TG's name.

I have this happen when I'm in Ohio: I have MARCS divided into "public safety" and "public service", with both "systems" having identical sites (because MARCS has >>250 TGs). If my radio happens to be scanning the "public service" "system" when a public safety user keys up, I lose the TG name (b/c it's scanning the "wrong system"). I could do ID Scan instead of ID Search, but I would miss a lot of calls completely. Bad idea.

[And the PSR500 only has 1,800 channels. My 996T (6K channels) is already full just from travel around this little rural state.]
 

slicerwizard

Member
Joined
Sep 19, 2002
Messages
7,774
Location
Toronto, Ontario
rdale said:
Also realize that 251 talkgroups will not be regularly utilized by your neighborhood tower.
One of my local systems (3C08) has more than 200 talkgroups and any of them can show up on any of the four zones. Neither my 246T or 396T can properly handle this system. As wm8s has noted, with a 996, you're supposed to only have to program a networked system once so you can take advantage of the 996's multi-site feature, but the talkgroup limit kills that. Sure, one can somewhat work around this issue by programming a system in more than once, but that increases the number of quick keys used (and the nice ones [0 to 9] are in short supply) and you'll miss some comms while the scanner is checking the wrong system (e.g. police comms won't be heard while the "fire" system is being scanned, etc.)
 

slicerwizard

Member
Joined
Sep 19, 2002
Messages
7,774
Location
Toronto, Ontario
Unitrunker said:
A hash lookup would cost less than the effort to parse the OSW. Even if a hash map wasn't practical in terms of memory, a binary search would do just fine. A dozen iterations covers the entire ID space of a Type II system.

Rick, a few points to consider:

The ID space that a scanner has to cover isn't the valid Type II talkgroups (1 to 4000 or so); it's the ID's that the scanner will let you store, which are the "scanner talkgroups" 1 through 65535 plus radio ID's 1 through 65535 plus the wildcard (i700000).

Of course, a binary search is only concerned with how many sorted entries you're searching and a dozen iterations can handle 4096 entries, which I think most of us would be more than happy with (there's always someone looking for more...)

Problem is, unlike a PC-based decoder app, scanners let the users pick the order that talkgroups are stored in (or at least presented in). Keeping the list truly sorted while still presenting it to the user in the user's order would use more memory per system. You could probably do it by adding an extra field to each record to indicate where the record falls in the user's order. So the memory bite isn't huge, but the coding changes could be significant.

Further, are talkgroups actually stored in contiguous memory? If I add a new talkgroup to the first system in the scanner does it push everything in every other system down by few dozen bytes? Maybe it does - it takes long enough... If the data is really stored as a linked list with a pointer to the next (and previous?) record, binary searching isn't an option. I haven't actually looked in to this question, but aren't systems stored in some form of flash RAM where you wouldn't want to be rewriting large chunks of it every time something is added or deleted?


As you know, most problems can be addressed by throwing one or more of the following at them:

- 1: higher clock speed

- 2: more memory

- 3: more code (e.g. smarter algorithms, etc.)


1 isn't an option here. The hardware is already in our hands and higher clock speeds equals higher battery drain, perhaps a more expensive processor, etc.

2 is often an option on modern PC's, but not on a scanner that's limited to 1 MB or so for all stored systems. More memory could be added, but that raises the cost for every unit sold (I wouldn't mind paying an extra $25 though). So a hash-based approach really isn't ideal here.

That leaves number 3. But you can't go too crazy; management isn't going to OK a total rewrite. From what we've seen, the current firmware crop is designed to complete a talkgroup list scan in less time than it takes for the next OSW to fully arrive. Changing it so that some variable number of OSW's can be buffered while long searches complete may or may not be an easy task and the changes wouldn't be localized. For one, you would have to add the smarts to avoid checking every grant or late entry, since you'd risk never getting caught up - a big talkgroup list combined with a busy site would sink you.

Ideally, you'd come up with something that's simple, localized, and uses a fixed amount of data storage. I figure you could do that if you just wedged some small cache logic between the "OK, I have an ID; should I tune to it?" and the "Let me look that up for you." bits. I'd start with about 30 or so cache slots to store the status of recently looked up talkgroups or radio ID's. Each cache entry would need several fields:

- the ID (a talkgroup or radio ID)

- where it's stored (e.g. its actual address in memory; zero = entry doesn't exist)

- when this entry was last queried (this is for slot reuse - toss the least recently accessed). An 8 bit value should suffice here.


Now you still have to honour the "no more than 200 (or 250) lookups per OSW" limitation that currently exists, so one added wrinkle is that the "Let me look that up for you." code has to be told where to start in the list and it has to limit itself to no more that 200 checks per call and it has to return an addition result (e.g. list scan not completed).

The cache logic can handle this requirement by using that second field (the address field) to track the status of the list scan. E.g. a very small value (like 1 to 4) means that a partial scan has been done and the status of the given ID has not been determined yet. E.g. 1 = the first 200 have been scanned, so scan the next 200; 2 = the first 400 have been scanned, so check from 401 to 600, etc. As long as no talkgroup records are stored that low in memory (easy to force them higher anyway), there should be no problem.

So the first time an ID is seen, if it's not in the first 200 entries, the cache logic will return a "Don't tune to it (at this time)" result. 0.05 or 0.1 seconds later, when the ID is seen again in one of the copies of the call grant and the list scan completes, a definitive "it doesn't exist" or "here it is, figure out what you need to do" result is returned. Users would never notice the slight delay. Any further checks on the ID will not trigger a scan as the result is now cached (until that cache slot gets reused).

The above numbers are for a 246/396 processor. You can adjust them up for a 996 (250 vs 200, etc.)

If the user makes any edits (like adding/deleting/changing an ID), just wipe the entire cache. When the scanner switches to another trunked system, wipe the cache.

That pretty much covers it. There might be issues on systems with slow data rates (e.g. LTR), but I don't think there are very many LTR systems out there with 500+ group ID's. Even if there are, you have to look at the tradeoffs (a simple fix that helps most users vs a real fix that costs many programmer man hours). LTR monitors would have the option of programming important or common group ID's first anyway, so no worries.


I don't expect anything like this to be backported to the 246/396/996/etc., as it involves too many other changes (UASD, user manual, etc.), but it could be dropped in to the firmware for the next round of scanners they offer up, so I ain't buying any "we can only handle 250 (or 300) talkgroups per system" claims.


Just thinking out loud here, but I have to wonder if they've fully optimized their existing talkgroup scanning code. As I understand it, the firmware is probably written in C or something similar. Have time-critical portions like this been written in tight assembler code? I wonder...
 

jon_k

Member
Joined
May 7, 2008
Messages
271
Location
Fort Worth, Republic of Texas
slicerwizard said:
management isn't going to OK a total rewrite.

Not on current scanners as a firmware update -- but I'd hope that if it could increase scan speed and capability they'd code an entire new system for the next model. If the old isn't up to snuff, then a recode is in order for the next product. It would be poor to deliver a sub-par processing system in the brand new units.

Just thinking out loud here, but I have to wonder if they've fully optimized their existing talkgroup scanning code. As I understand it, the firmware is probably written in C or something similar. Have time-critical portions like this been written in tight assembler code? I wonder...

C is about as low-level as you can get without sinking into assembly. With a beast like a 400mhz processor (Quite fast for a scanner.) I don't see the major benefit in coding substantial parts in assembler. I doubt operations would see substantial speed increase to justify the trouble of assembly code. C is easy to maintain, more people know it, and it's "fast nuff".

I've been wondering why battery performance is so poor. Now that I know this has a 400mhz processor, I see why. My Windows Mobile phone runs at that speed.

Do you know which arch the processor is? ARM I'm assuming?

I do hope they implement new code techniques in the next model. With embedded devices speed is important and hopefully their programmed operations are thought out in a way that the program doesn't do unnecessary legwork. From your explanations it would seem the devices do lots of work that is needless and could be cut out by changing the way it listens/handles the control channel. I do wish luck to Uniden as they're a local company in Fort Worth here. I'd love to buy new products that are up to snuff.
 
Last edited:

slicerwizard

Member
Joined
Sep 19, 2002
Messages
7,774
Location
Toronto, Ontario
I wrote "time-critical portions", not "substantial parts". Two totally different beasts.

Where did you get 400 MHz from? I don't think it's anywhere near that high.

Renesas 32 bit RISC micro (IIRC)

Why revive an old thread?
 
Status
Not open for further replies.
Top