[drats_users] Arduino and D-RATS

Timothy Le
Sun Jan 13 13:29:49 PST 2013


Hi,
     Just wondering if anyone got my previous email. Thanks.

-Timothy Le
  Sierra Canyon School

-----Original Message-----
From: drats_users-bounces at intrepid.danplanet.com
[mailto:drats_users-bounces at intrepid.danplanet.com] On Behalf Of Timothy Le
Sent: Saturday, January 12, 2013 14:44
To: 'Discussion of D-RATS'
Subject: Re: [drats_users] Arduino and D-RATS

I've looked at the source files and I could get a little info from them
since I'm not experienced with programming. The structure of the packets is
clear now; I'm just not sure how the variables are calculated like the magic
number or the checksum or the lengths. A sample packet that I got over a
terminal was [SOB]"=@=@=@=@TIMOTHY9CQCQCQ~~Test message.[EOB] Would the =@
be the magic numbers or is it just that the encoding in the terminal is off
and is interpreting the values as "=@"s? Thanks.
-Timothy Le
  Sierra Canyon School


-----Original Message-----
From: drats_users-bounces at intrepid.danplanet.com
[mailto:drats_users-bounces at intrepid.danplanet.com] On Behalf Of Dan Smith
Sent: Saturday, January 12, 2013 13:44
To: drats_users at intrepid.danplanet.com
Subject: Re: [drats_users] Arduino and D-RATS

>      I was talking with Dan a few weeks ago about sending the GPS 
> coordinates from an Arduino microprocessor and getting the results to 
> display on the map. He also recommended that I post on this mailing 
> list to discuss the solution. I now also need the capability to send 
> text to the IM interface of D-RATS. I've been able to output a message 
> sent from D-RATS into HyperTerminal and what I concluded from that is 
> that there is some type of message ID and checksum value that needs to 
> be calculated upon transmission of the message and a check on the 
> receiving end of the message. I'm working on a homing system for 
> firefighters that sends the GPS results to the map screen and sensor 
> data to the IM screen. Could someone fill me in on how this checksum 
> works? Thanks for your help.

There's more than just a checksum, there is some framing on either end of
the packet, as well as multiplex information (similar to what a normal
network stack provides.

Most of what you need is found here:

http://d-rats.com/hg/hgwebdir.cgi/d-rats.hg/file/021203b75329/d_rats/ddt2.py

In the get_packed() method, you can see the structure of the frame. It
starts with a magic number, a sequence number, a session number, frame type,
checksum, length, address information, and finally the data.
Either end is capped in an [SOB] and [EOB].

The information you need for the type to use for the various chat traffic is
here:

http://d-rats.com/hg/hgwebdir.cgi/d-rats.hg/file/021203b75329/d_rats/session
s/chat.py

Since D-STAR radios are not 8-bit clean, there is also escaping that needs
to be done, the algorithm for which you can find here:

http://d-rats.com/hg/hgwebdir.cgi/d-rats.hg/file/021203b75329/d_rats/yencode
.py

Hope that helps!

--
Dan Smith
www.danplanet.com
KK7DS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6085 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/drats_users/attachments/20130113/26fd6a58/attachment.bin 


More information about the drats_users mailing list