Commit Graph

70 Commits

Author SHA1 Message Date
Cort Buffington
45618999a1 More on timestamps 2013-10-15 14:35:21 -05:00
Cort Buffington
4fd7b7f74a More date/time stamping. 2013-10-15 14:18:06 -05:00
Cort Buffington
9ac7727b7a Added Timestamp 2013-10-15 05:50:02 -05:00
Cort Buffington
6edf3ef978 Type Fix - SEE PREVIOUS SYNC FOR MORE INFO 2013-10-14 15:13:34 -05:00
Cort Buffington
0a35eb61b4 Added Handling for Known Packet Types
Callback functions were added to parse known packet types. Also, the
hardwired "flags" section in our own config was updated to handle voice
and data packets. PLEASE NOTE: The mode and flags change what repeaters
send to DMRlink -- the fields are documented in ipsc/ipsc_mask.py
2013-10-14 15:09:16 -05:00
Cort Buffington
6b1b074628 DRASTICALLY sped up text/number lookup times.
added a function to do it the *right* way.
2013-10-13 20:10:58 -05:00
Cort Buffington
ae16d096f8 Numeric ID to Name Mapping Added 2013-10-13 17:01:50 -05:00
Cort Buffington
37513a03c1 Group Voice Function Changed
Group Voice Function is now set up to help decode more parameters, such
as the timeslot in use, which will help build a better bridging
function.
2013-10-12 14:19:52 -05:00
Cort Buffington
59cb7666f5 Added Config File Parser
No longer is it necessary to build the configuration by hand as a
python file. It now uses a basic INI style… not my favorite, but easily
added thanks to ConfigParser.

This BREAKS group-voice forwarding for now, as there's no good way to
add the rules config in the basic config file right NOW, but it will be
fixed soon.
2013-10-12 11:08:06 -05:00
Cort Buffington
b2d256b024 added peer validation to registration requests we reply to 2013-10-10 16:23:52 -05:00
Ryan Turner
3cc2afafda Fixed a typo, made error messages consistent. 2013-10-09 23:07:38 -05:00
Adam Fast
303e92795e Adds a private function for alerting when events happen inside the library. This function no-ops by default but can be overridden by subclassing IPSC and extending the method to perform whatever type of notification is desired. 2013-09-14 19:07:32 -05:00
Cort Buffington
ee2a8953ee Update to print-peer-list function
Made it prettier
2013-09-10 20:36:35 -05:00
Cort Buffington
f04dd45346 MAJOR UPDATE!
Added a derived class for the rare event of an un-authenticated IPSC,
this necessitated moving two global functions into the classese.

Changes to prepare this as a module -- all "user space" packets that
are received now have expliciet callback functions (handily located in
one place)

Moved the supporting characters into the ipsc sub-directory. The config
is the only likely one to be touched.

Improved some of the logging, but also commented it out to make things
run faster when it is not in use.
2013-09-10 15:28:18 -05:00
Cort Buffington
916ed46fef FIxed calculation of number of peers in an IPSC
Incorrect decodeing of determination of the peer-list. As it turns out,
the packet indicates the length of the list, not the number of peers.
So, take that value / 11 (length of a peer entry) for the number of
peers. Thanks to Hans for pointing this out!
2013-09-10 09:43:45 -05:00
Cort Buffington
b41cf5ff7b CLEAN UP & DOCUMENT
This was just a massive clean up and documentation festival. Many many
clean ups made for better readability and consistenty, most everything
is well commented now too.
2013-08-30 16:23:12 -05:00
Cort Buffington
75e72ce8bb Completed Group Voice Bridge
Added a function call to send a supplied packet to EVERY peer
(including master) that is active in an IPSC (except ourselves). This
completed the group voice bridge, and should facilitate EASILY adding
data and private bridging.
2013-08-28 11:06:54 -05:00
Cort Buffington
5b41354730 Cleaning out debugging items. 2013-08-27 10:32:27 -05:00
Cort Buffington
56236ec6cd Remove debugging items from TG forwarding 2013-08-27 10:23:54 -05:00
Cort Buffington
567204e961 Group Voice Forwarding Now Works
Group Voice forwarding now works, making this code sucessful at
bridging IPSC networks. Some things are missing, such as transmission
to all peers in an IPSC, right now, it only sends to the master, but
that's easily enough added, and my next goal.
2013-08-26 08:16:54 -05:00
Cort Buffington
dd1528567e Group Voice Re-Write Added
Group Voice re-writes of both sourc IPSC radio ID and group translation
work. Packets are not yet actually sent to the destination network.
Right now the code prints out the original packet and the re-written
packet (with hash added)
2013-08-25 16:13:23 -05:00
Cort Buffington
85a2fe9af9 Additional Work on Bridging 2013-08-23 07:52:50 -05:00
Cort Buffington
8e79cf8f8d Create Named "Labels" For Each IPSC
Obejct names for each IPSC class instantiation, so bridging code can
identify a target IPSC (class instantiaion) to call packet transmit
methods on.
2013-08-16 14:30:20 -05:00
Cort Buffington
d3940765ca commenting out stuff that doesn't work 2013-08-16 07:55:51 -05:00
Cort Buffington
1dc2dc0081 BEGIN working on bridge code
Stopped with this not completed, but mostly there. Need to fix some
references.
2013-08-08 21:48:28 -05:00
Cort Buffington
365f752c8e added missing logger statement on peer-list packet type 2013-08-07 21:54:57 -05:00
Cort Buffington
d877ba90dc Removed debugging print statements 2013-08-07 21:46:51 -05:00
Cort Buffington
53a3ed7828 WORKS CORRECTLY - COMPLETELY!!! 2013-08-07 14:15:53 -05:00
Cort Buffington
191a5c382e Cleaning up now proper peer list processing 2013-08-06 22:35:31 -05:00
Cort Buffington
86c03c7702 Finally! Proper peer list processing!!! 2013-08-06 22:33:04 -05:00
Cort Buffington
6660c8b810 Copyright added 2013-08-02 15:31:55 -05:00
Cort Buffington
e575186fc3 Work on improving peer list
Need to "update" the peer list instead of wipe it out and write a new
one. This is just started, so not implemented yet.
2013-08-01 15:45:57 -05:00
Cort Buffington
530a6fc612 Comments Added 2013-08-01 15:21:35 -05:00
Cort Buffington
5fead4ea91 added marker for next to-do item 2013-08-01 15:18:53 -05:00
Cort Buffington
ad57ed0ebb Added Peer/Master Timeout and Removal 2013-08-01 15:09:20 -05:00
Cort Buffington
244f53778a Added "self" note for self peer in the print peer-list function 2013-07-31 20:56:49 -05:00
Cort Buffington
851b0e9c4d More work on validation 2013-07-31 20:46:03 -05:00
Cort Buffington
835011d1a8 Fixed formatting error in peer list 2013-07-31 13:58:53 -05:00
Cort Buffington
897540243a Peer List Print & More Validation 2013-07-31 12:33:31 -05:00
Cort Buffington
8f8608cbfc Started adding conditionals to validate messages
for example: if we haven't yet received a peer list from the master, we
should not be processing keep-alives from peers.
2013-07-30 11:50:29 -05:00
Cort Buffington
2e0f29fc97 Peer Validation - In Progress
Mostly done.. must find a way to allow master registration and
reception of peer list BEFORE validating incoming messages to the peer
list -- chicken and egg problem. Easily solved, but needs an EFFICIENT
solution since EVERY PACKET will be passed through this test.
2013-07-30 10:52:10 -05:00
Cort Buffington
ca22654a13 Peer validation work 2013-07-29 21:12:12 -05:00
Cort Buffington
2d0c767c11 Begin adding valid peer and master checking… partial
Not yet completed, but done in a way to pass so the code works.
2013-07-29 21:06:25 -05:00
Cort Buffington
c1f6442f07 Standardized use of binascii for hex conversions
Had been using a mix of unhexlify/hexlify and a2b_hex/b2a_hex. I
settled on the later as it's the most descriptive to me.
2013-07-29 20:51:21 -05:00
Cort Buffington
7650e7cc4d Remove Cruft in Logging 2013-07-29 13:38:59 -05:00
Cort Buffington
724f9299cb Added IPSC Authentication Validation Function
We can now pass the auth key, and a packet to this function and get a
pass/fail (True/False) return.
2013-07-29 13:23:37 -05:00
Cort Buffington
7c6899e49f Clean up debug logging for peer lists
Fixed the peer-list printing function so that it signals there is no
peer list if we've not yet received one.
2013-07-28 22:33:14 -05:00
Cort Buffington
7518583e23 Moved peer-list processor to global scope
There was no reason for the IPSC class to contain the function for
processing a peer list. It makes the class more self-sustaining, but
the goal should be a *module* to handle connection maintenance. I moved
the peer list process, and built a mode decoder function from the
previos mode printing function, as well as added decoded mode items to
the data structure… and cleaned up the prining function so it doesn't
re-process the data.
2013-07-28 22:22:04 -05:00
Cort Buffington
8e7cdd7912 More naming cleanup
Making things read more easily.
2013-07-28 16:22:25 -05:00
Cort Buffington
c34357e10d Cleaned Up Several Items...
Mostly references to my_ipsc_config data structure items that are
commonly used. These received shortened names within the IPSC class…
also makes it easier to read, and should be self explanatory. Some
cruft also removed - object aliases that were no longer used.
2013-07-28 15:53:56 -05:00