Linux-Hams archive - June 1997: Re: CW Ident.

Re: CW Ident.

Alun ()
Mon, 9 Jun 1997 16:26:20 +0100


Alan Crosswell doodled:
>
[details of X1J4 - thanks!]

> PS: How are you sending raw data? Have you watched your packets on the
> air to see if maybe the kernel made them "nice".

I don't have the facilities to view them on the air, unfortunately. I don't
*think* the kernel made them nice. listen -rat shows bad header and invalid
callsign error messages on the outgoing packets, but wonderful callsigns
like UUUUUU-5 show up in the local node's list!

My little program was based on kissparms, so effectively it did:

int s;
struct sockaddr sa;
char buffer[256];

s = socket(AF_INET, SOCK_PACKET, ETH_P_AX25);
strcpy(sa.sa_data, ax25_config_get_dev("tnc")); /* where "tnc" is the port */

buffer[0] = 0;
memcpy(buffer+1, data, datalength); /* data, datalen refer to the raw data */
sendto(s, buffer, datalength+1, 0, &sa, sizeof(struct sockaddr));

close(s);

Whether this is even vaguely the correct way to go about this, I don't know
(hint: a quick guide to AX.25 socket programming would be nice ;-)

Cheers,
Alun.

-- 
/P{def}def/E{curveto}P/N{moveto}P/G{lineto}P/U{setgray}P/I{fill}P/n{stroke}P
(2V<;;F<K5F5=8<5K-/3/6//C3?/367/W/O6/-0+3'//K3?/3:[0[/WB>>H<W6/;/C///1W'T1Q)
6 6 scale .2 setlinewidth 1 .7 0 setrgbcolor{}forall N G G I 0 U N E E E E E
I 1 U N E E E gsave I grestore 0 U n .3 U N E E n 1 0 360 arc I showpage%auj