#1 2015-07-27 13:54:10

IW3IJQ
Member
Registered: 2015-07-27
Posts: 13

MicroAPRS KISS code Patch

Hello everyone,
I made some changes to the KISS implementation of MicroAPRS.

On my GitHub fork (https://github.com/IW3IJQ/MicroAPRS) there are two branches: KISS-RESET an SMACK.

SMACK is the implementation of SMACK crc mode in kiss frames (http://www.symek.com/g/smack.html).
Why SMACK?
Beause I have an application where MicroAPRS is connected to an host through a "long" TTL serial line, so a CRC at
the end of a data packet could be useful.

KISS-RESET do a software reset of TNC when the command 0xFF is sent.
Why a command to reset the TNC?
Because it's the only way to switch back from SMACK to KISS mode.

I'm temporarily lacking hardware and are not able to test the code.
I would be very happy if someone would checkout these changes and give me a feedback.

I will resew code nonhardly will be sure that both branches work properly.
I can upload a specific build if someone need it.

Bye

Offline

#2 2015-08-05 20:10:16

markqvist
Administrator
Registered: 2014-12-01
Posts: 112

Re: MicroAPRS KISS code Patch

Awesome work! I'll test this out when I get some time smile What software using SMACK will be good for testing?

Offline

#3 2015-08-05 20:10:33

markqvist
Administrator
Registered: 2014-12-01
Posts: 112

Re: MicroAPRS KISS code Patch

Btw, I also merged your pull request! Thanks for that!

Offline

#4 2015-08-06 13:26:21

IW3IJQ
Member
Registered: 2015-07-27
Posts: 13

Re: MicroAPRS KISS code Patch

Smack can be tested using: agwpe, bpq32 (not sure), linbpq (not sure), standard mkiss linux module, aprx.... and others.... first tests can be made send in raw frames to serial port with wrong and correct crc.

Offline

#5 2015-08-28 09:10:31

IW3IJQ
Member
Registered: 2015-07-27
Posts: 13

Re: MicroAPRS KISS code Patch

...KISS-RESET and SMACK branches updated...
Now the code work, but I need betatesters.

Notice About KISS-RESET branch:

To reboot TNC the code enable Watchdog and goes into an infinite loop.
When AVR restart the watchdog enable flag still set, this cause indefinites
reset during bootloader operations.
To avoid this issue standard arduino bootloader need to be replaced.

A good bootloader is Optiboot (https://github.com/Optiboot/optiboot) :

- 100% arduino bootloader compatible
- Smaller than standard bootloader
- Faster than standard bootloader
- WDT safe

Last edited by IW3IJQ (2015-08-28 13:27:39)

Offline

#6 2015-09-01 11:15:01

IW3IJQ
Member
Registered: 2015-07-27
Posts: 13

Re: MicroAPRS KISS code Patch

I merged together KISS-RESET and SMACK in branch SMACK-FULL.
I still need betatesters...

Offline

#7 2015-09-25 01:13:49

N2KIQ
Member
Registered: 2015-09-24
Posts: 6

Re: MicroAPRS KISS code Patch

I have one running on an HT right now in receive-only mode.  The host sees that it's in SMACK mode:

mkiss: ax0: crc mode is auto.
mkiss: ax0: Trying crc-smack

I can verify that it's decoding packets, though I can't speak to percentage decode at this point. I'm planning to split the audio and use soundmodem as the comparison. I'm still gathering the parts to make a simple splitter.

Offline

#8 2015-09-25 20:57:45

N2KIQ
Member
Registered: 2015-09-24
Posts: 6

Re: MicroAPRS KISS code Patch

N2KIQ wrote:

I can't speak to percentage decode at this point. I'm planning to split the audio and use soundmodem as the comparison. I'm still gathering the parts to make a simple splitter.

The splitter is in place and it looks to be decoding packets at the same rate as soundmodem.  I'll leave this running for a while and post an update with numbers.

Offline

#9 2015-09-26 08:41:44

IW3IJQ
Member
Registered: 2015-07-27
Posts: 13

Re: MicroAPRS KISS code Patch

This is good! smile

Offline

#10 2015-09-29 02:56:35

N2KIQ
Member
Registered: 2015-09-24
Posts: 6

Re: MicroAPRS KISS code Patch

It is good.  Soundmodem decoded 1.7 % more packets than the AVR when both received audio through a simple splitter. 

Sample size was around 8300 packets. The AVR decoded 29 packets that soundmodem (SM) did not and SM decoded 166 packets that the AVR did not. A majority (155) of the packets uniquely decoded by SM were a single station around 15 miles from me.

Despite the "precision" of the above values, this was a highly unscientific study.  Audio levels, gain on the SM microphone, input voltages to the AVR all were left unmeasured, tuned or otherwise altered. I'd say that the AVR code and SM are about equal given the conditions.

Regards,
-Paul
N2KIQ

Offline

#11 2015-10-03 02:45:47

N2KIQ
Member
Registered: 2015-09-24
Posts: 6

Re: MicroAPRS KISS code Patch

N2KIQ wrote:

It is good.  Soundmodem decoded 1.7 % more packets than the AVR when both received audio through a simple splitter.

The AVR connected in that same way, but to the "1200 baud" data port of an 857, doesn't decode anything.  I have a feeling that this is due to the volume being much lower, and impossible to control. So this circuit would require an audio amplifier of some kind to be useful with the data port on this radio. 

I suppose the ADC reference could be brought down to match the signal but that's a guess and it'll take a bit for me to set up a test of that guess.

-Paul

Last edited by N2KIQ (2015-10-03 03:42:05)

Offline

#12 2015-10-12 21:06:31

markqvist
Administrator
Registered: 2014-12-01
Posts: 112

Re: MicroAPRS KISS code Patch

Paul, your guess is correct, to be able to decode at those lower output volumes, you could bring down the ADC reference. You'd need a very stable voltage source with good filters though, since noise down at these levels is much higher, relatively speaking.

Offline

#13 2015-10-13 02:31:02

N2KIQ
Member
Registered: 2015-09-24
Posts: 6

Re: MicroAPRS KISS code Patch

I moved the ADC reference down to 3.3v but forgot that there's a voltage divider still connected to the 5v line, so that didn't work too well.  smile

I have a voltage buck / regulator chip somewhere which will supply more than 50ma, uses a reference voltage without drawing a lot of current. The question is which pile of stuff...

More later.
-Paul

Offline

Board footer

Powered by FluxBB