[aprssig] APRS POST HTTP

Heikki Hannikainen hessu at hes.iki.fi
Mon Mar 9 17:32:38 EDT 2020


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


More information about the aprssig mailing list