[aprssig] APRS POST HTTP
John Gorkos
jgorkos at gmail.com
Tue Mar 10 17:31:34 EDT 2020
If you’re using Linux to test with, you might consider using ‘nc’ to connect to the aprs server and watching specifically for your traffic, like this:
$ nc localhost 14580
Once you connect, validate with and monitor for all packets from your device:
user SQ4LOL pass 23475
#filter b/SQ4LOL
Mine looks like this
$ nc localhost 14580
# aprsc 2.1.5-g8af3cdc
user AB0OO pass 19951
# logresp AB0OO verified, server T2POLAND
#filter b/AB0OO-1
# filter b/AB0OO-1 active
# aprsc 2.1.5-g8af3cdc 9 Mar 2020 22:00:08 GMT T2POLAND [2a02:2928:a::19]:14580
AB0OO-1>APRX29,TCPIP*,qAU,T2POLAND:!3724.13NT12206.28W&Temp=23.90,Humidity=34.04,Pressure=1016.65
Also, after you build aprsc, do a “sudo make install” and it will wind up in /opt/aprsc
Run this:
sudo /opt/aprsc/sbin/aprsc -c /opt/aprsc/etc/aprsc.conf -e DEBUG -u aprsc
and you’ll see the guts of what the server is doing.
John Gorkos
From: Rafał Antas <antas.rafal at gmail.com>
Date: Tuesday, March 10, 2020 at 5:33 AM
To: John Gorkos <jgorkos at gmail.com>
Cc: VZW engr <vzwengr at gmail.com>, <aprssig at lists.tapr.org>
Subject: Re: [aprssig] APRS POST HTTP
Hi,
can you make a instruction about how to check what is beeing send to APRS server from? I have setup APRS server and it is fine but I cannot find where I can see what exactly is pushed from my code
Pozdrawiam,
Rafał Antas
wt., 10 mar 2020 o 01:27 John Gorkos <jgorkos at gmail.com> napisał(a):
It takes about 15 minutes to download, compile, configure, and run aprsc on a basically standard Linux installation. If you’d like, I can come up with pretty detailed instructions to get a virtual machine up and running (works on all modern OSes/hardware) and run a server that you can test to your heart’s content against. Having your own test server is generally best, so you can view the logs, and run it in foreground mode so you can watch what’s happening.
de AB0OO,
John Gorkos
From: aprssig <aprssig-bounces at lists.tapr.org> on behalf of VZW engr <vzwengr at gmail.com>
Date: Monday, March 9, 2020 at 4:14 PM
Cc: <aprssig at lists.tapr.org>
Subject: Re: [aprssig] APRS POST HTTP
This thread started me to thinking (which is sometimes "dangerous"). :-)
Is there a test port, test server or a procedure that one can use when testing software?
I'd like to try some things, but I don't want to become an annoyance.
Eric
WB6TIX
On Mon, Mar 9, 2020, 15:05 Rafał Antas <antas.rafal at gmail.com> wrote:
Hi!
I have changed port to 8080. I have managed to get what I want using UDP. There is ESP Easy limitation in command SendToUDP which is using only IP not DNS name to connect to UDP server. My aim is to use rotate.aprs2.net Now I am trying to setup everything using HTTP Controller. I have managed to put right HTTP headers and on my option correct http body (user SQ4LOL pass 23475 vers EasyESPWX 1.0%CR%%LF%SQ4LOL>APRS,TCPIP*:=5244.43N/02333.50E-430.400MHz /A=000538 Pi-Star Rafal QTH:Hajnowka 73!%CR%%LF%) but it does not work. Curl command is throwing 400 No newline (LF) found in data
curl -v -d "user SQ4LOL pass 23475 vers EasyESPWX 1.0%CR%%LF%SQ4LOL>APRS,TCPIP*:=5244.43N/02333.50E-430.400MHz /A=000538 Pi-Star Rafal QTH:Hajnowka 73!%CR%%LF%" poland.aprs2.net:8080 -H "Content-Type: application/octet-stream"
* Rebuilt URL to: 192.168.237.197:8080/
* Trying 192.168.237.197...
* TCP_NODELAY set
* Connected to 192.168.237.197 (192.168.237.197) port 8080 (#0)
> POST / HTTP/1.1
> Host: 192.168.237.197:8080
> User-Agent: curl/7.55.1
> Accept: */*
> Content-Type: application/octet-stream
> Content-Length: 147
>
* upload completely sent off: 147 out of 147 bytes
< HTTP/1.1 400 No newline (LF) found in data
< Content-Type: text/html
< Connection: close
< Date: Mon, 09 Mar 2020 22:00:53 GMT
< Content-Length: 130
<
Pozdrawiam,
Rafał Antas
pon., 9 mar 2020 o 22:33 Heikki Hannikainen <hessu at hes.iki.fi> napisał(a):
Rafał,
The basic problem with your 'curl' approach is that you are using a HTTP
client (curl) to talk to an APRS-IS server, on port 14580. Port 14580 does
not talk the HTTP protocol, and it never has, even on javaprssrvr.
When you run that curl command, it'll send a number of HTTP request
headers, and only then it sends the 'user' command line as the POST body.
javaprssrvr 3.x apparently ignores all those invalid commands and then
accepts the 'user' login command. aprsc throws the client out a bit faster
after a few invalid commands (repeatedly failed login).
Try 'nc' (netcat) instead of 'curl' to make a plain TCP connection instead
of HTTP over TCP.
John Gorkos suggested that javaprssrvr might do a websocket connection,
but no, that's a recent javaprssrvr 4.x feature, the server in question
was an old 3.15 version, and the websocket thing still won't run on port
14580 on the 4.x versions (websocket happens over HTTP, not over the
APRS-IS port). And no, aprsc doesn't do the websocket thing.
Both aprsc and javaprssrvr do support a HTTP post of a packet on port
8080, as documented here: http://www.aprs-is.net/SendOnlyPorts.aspx - the
curl command should probably work there if a packet was also appended
after the "user" login command (with a CRLF in between). Not all servers
are configured with port 8080 support, but all servers on the
rotate.aprs2.net DNS rotate service should have it.
On Thu, 5 Mar 2020, Rafał Antas wrote:
>
> Hi Guys,
>
>
> I am writing to you since you might help with my small problem. My friend (SQ2CET) and I (SQ4LOL) developed
> small WX station using ESP8266 powered by ESPEASY software. Everything was fine WX date was pushed to APRS.fi
> without any problems till yesterday. Poland APRS server (Poland.aprs2.net) was migrated from java
> to aprsc and I think this is causing this problem for us. We are using POST http method to push data to APRS.
> I am trying to compare Poland APRS server, running on aprsc to Czech running java. Everything is ok when we
> are sending data to Czech server, but Poland server is not. I tried to compare it using curl command.
>
> Poland:
>
> curl --verbose --data "user SQ4LOL pass 12345" poland.aprs2.net:14580
>
> * Rebuilt URL to: poland.aprs2.net:14580/
>
> * Trying 46.21.223.230...
>
> * TCP_NODELAY set
>
> * Connected to poland.aprs2.net (46.21.223.230) port 14580 (#0)
>
> > POST / HTTP/1.1
>
> > Host: poland.aprs2.net:14580
>
> > User-Agent: curl/7.55.1
>
> > Accept: */*
>
> > Content-Length: 22
>
> > Content-Type: application/x-www-form-urlencoded
>
> >
>
> * upload completely sent off: 22 out of 22 bytes
>
> # aprsc 2.1.5-g8af3cdc
>
> # Invalid login command
>
> # Invalid login command
>
> * Connection #0 to host poland.aprs2.net left intact
>
>
>
> Czech:
>
>
>
> curl --verbose --data "user SQ4LOL pass 12345" czech.aprs2.net:14580
>
> * Rebuilt URL to: czech.aprs2.net:14580/
>
> * Trying 89.235.48.27...
>
> * TCP_NODELAY set
>
> * Connected to czech.aprs2.net (89.235.48.27) port 14580 (#0)
>
> > POST / HTTP/1.1
>
> > Host: czech.aprs2.net:14580
>
> > User-Agent: curl/7.55.1
>
> > Accept: */*
>
> > Content-Length: 22
>
> > Content-Type: application/x-www-form-urlencoded
>
> >
>
> * upload completely sent off: 22 out of 22 bytes
>
> # javAPRSSrvr 3.15b08
>
>
>
> Do you have any idea how we can solve this small problem?
>
> Pozdrawiam,
> Rafał Antas
>
>
- Hessu_______________________________________________
aprssig mailing list
aprssig at lists.tapr.org
http://lists.tapr.org/mailman/listinfo/aprssig_lists.tapr.org
_______________________________________________
aprssig mailing list
aprssig at lists.tapr.org
http://lists.tapr.org/mailman/listinfo/aprssig_lists.tapr.org
_______________________________________________ aprssig mailing list aprssig at lists.tapr.org http://lists.tapr.org/mailman/listinfo/aprssig_lists.tapr.org
_______________________________________________
aprssig mailing list
aprssig at lists.tapr.org
http://lists.tapr.org/mailman/listinfo/aprssig_lists.tapr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/aprssig_lists.tapr.org/attachments/20200310/55715e5c/attachment.html>
More information about the aprssig
mailing list