[McHUG] Arduino Packet Transmission Working!
n3sb at qis.net
n3sb at qis.net
Sat Dec 20 21:13:53 EST 2008
Hi Pete;
I used a couple different sources of info. There's an AX.25 version 2.2
specification from the TAPR website. I dug up some Bell 202 Modem specs on the
internet to understand the physical layer. Another interesting read is a paper
written by John Hansen, W2FS, called "PICet Radio: How to Send AX.25 UI Frames
Using Inexpensive PIC Microprocessors" available on the internet. The hardest
part was figuring out the CRC-16 calculation. I found several references that
explained the algorithm in a method that just left my head spinning. But I came
across a project on the internet called the WhereAVR (which does pretty much
what I want to do with an Arduino, except it uses an ATMega8.) A quick review
of the supplied source showed that the CRC-16 calculation is very easy to
implement.
I haven't hooked my Arduino to a transceiver yet. Right now I'm feeding the
audio into a laptop, and running either MultiPSK or AGWPE. MultiPSK has an
option to accept & display packets with errors, which I used a lot until the
CRC calculation was working. AGWPE is more selective and discriminating. When I
can get a packet to decode via AGWPE then I know I have it right.
The TX Audio out is a couple Volts, which is going to be more than enough to
drive a mobile or HT. However the receive algorithm hasn't been written yet.
The
ATMega168 has a comparator input that I think I'll be able to use directly for
receive, without any audio amplification stages. I'll know in a little bit if
that'll be the case.
An Arduino based Packet engine should really be useful for packet processing,
due to their low cost and ease of programming. I hope that once the code is all
written and working, that others will develop applications and put packet to
use
in new ways. I have some plans in mind myself.
73; Steve, N3SB
Quoting Peter Morton <mortonph at comcast.net>:
> Congratulations Steve!!
>
> Where did you get the specs for all the formatting, protocols, timing, etc.?
>
> Does it work with the audio in/out of a transceiver?
>
> -Pete
>
> ----- Original Message -----
> From: <n3sb at qis.net>
> To: <mchug at mailman.qth.net>
> Sent: Saturday, December 20, 2008 5:02 PM
> Subject: [McHUG] Arduino Packet Transmission Working!
>
>
> I finally found and fixed the last bug in my packet code. I can now send UI
> packets from an Arduino!
>
> This is a fairly huge step. It means that I've got the interrupt based
> frequency
> generation right, the bit timing right, the data formatting right, the
> checksum
> generation right, and the bit stuffing right, among other things.
>
> The packet data frames I can now generate are Unnumbered Information (UI)
> frames, which are fine for APRS purposes. It would be easy to add some
> additional code to send telemetry info, like what the PICetSAT module does
> today. The program only takes 4.2 kbytes right now, so there's 10 kbytes
> left
> on a base Arduino for adding custom functionality.
>
> There's another layer of protocol that still has to be worked out to connect
>
> to
> another station (or allow another station to connect) and exchange data.
>
> I'll get that layer worked out after I get all the Packet Receive stuff
> working.
> Receiving will be a bit easier to figure out now that I have a better
> understanding of all the low-level formatting.
>
> I'll post the source code after getting it cleaned up and properly
> commented.
>
> On the hardware side, six resistors and a capacitor are needed to make a
> simple
> D/A converter to generate reasonably clean sinewaves. An additional resistor
> and an NPN transistor will have to be added (I haven't done this yet) to key
>
> a
> transmitter.
>
> More to come. I'll have some time to continue this project over the holiday
> break.
>
> 73; Steve, N3SB
>
> ______________________________________________________________
> McHUG mailing list
> Home: http://mailman.qth.net/mailman/listinfo/mchug
> Help: http://mailman.qth.net/mmmain.htm
> Post: mailto:McHUG at mailman.qth.net
>
> ______________________________________________________________
> McHUG mailing list
> Home: http://mailman.qth.net/mailman/listinfo/mchug
> Help: http://mailman.qth.net/mmmain.htm
> Post: mailto:McHUG at mailman.qth.net
>
More information about the McHUG
mailing list