HTTP POST ?

60 views
Skip to first unread message

jon4156

unread,
Nov 17, 2023, 6:27:22 PM11/17/23
to wxqc
Can I use HTTP POST to upload data?  If so, can someone point me to the specific instructions please.

googl...@tedlum.com

unread,
Nov 17, 2023, 6:31:53 PM11/17/23
to wxqc
No. Not much more I can say.

googl...@tedlum.com

unread,
Nov 17, 2023, 6:47:20 PM11/17/23
to wxqc
In theory, you could write your own HTTP(S) <-> APRS-IS gateway, but I'm guessing you want to leverage HTTP and existing apps like curl so you don't have to deal with writing code for raw sockets, so NO, there is no way around having to do socket programming one way or the other. Also, APRS-IS is stateful, HTTP(S) is not, so there's that too.

jon4156

unread,
Nov 17, 2023, 7:46:53 PM11/17/23
to wxqc
Not sure I agree statefulness matters for wx data when parameter criteria can be defined at the server and the stream rejected if critical parameters are missing, but it's not my server so I'll try to comply with whatever the protocols are.  I can code sockets but you are correct, I'd rather not have to especially since other wx data servers I've encountered accept HTTP POST format.  Are the uploading protocols published for CWOP...as in name:value pairs for data, etc?  I've built my own station and also written my own software so need protocol details if they are available.

jon4156

unread,
Nov 17, 2023, 7:53:56 PM11/17/23
to wxqc
Looks like this might be it:    http://wxqa.com/faq.html

What port should the socket connect to?

On Friday, November 17, 2023 at 6:47:20 PM UTC-5 googl...@tedlum.com wrote:

googl...@tedlum.com

unread,
Nov 18, 2023, 1:09:42 AM11/18/23
to wxqc
CWOP was cooked up by a bunch of HAM radio operators over two decades ago and the protocols are those which they used to send data over packet radio. So, whatever you have experience with, this isn't that.

You asked about HTTP(S) specifically, which is an application layer protocol. CWOP uses the APRS-IS protocol. State most certainly matters, since you must first log in to establish the session state before you're able to send any data packets, unlike HTTP(S) where credentials can be supplied in the GET/POST, so there is more programming overhead to manage state.

You need to become familiar with the APRS-IS protocol and the APRS protocol, as well as special requirements for the DNS lookup. It depends on the platform and language you're using, but most getHostByName() calls return a single server. CWOP uses a round robin list of servers so you need to use the extended DNS lookup function which returns the full list of servers, and then try each in order until you get a response. Also, never cache the server, look it up every time. The APRS-IS protocol is needed for establishing a connection with the server. It also defines the packet headers. The APRS protocol defines the message format. The APRS-IS info is here: https://www.aprs-is.net/ , although the page you need is this: https://www.aprs-is.net/Connecting.aspx . Once you've established a TCP/IP connection and have logged into an APRS-IS server you are ready to send a packet which you form according to the APRS specification in this document: http://www.aprs.org/doc/APRS101.PDF , specifically, see Chapter 12 starting on page 62.

You might want to consider using the code from other open source projects rather than wasting you time and patients on reinventing the wheel... it's not as easy as it might seem at first.

Leo Herzog

unread,
Nov 18, 2023, 7:39:36 AM11/18/23
to jon4156, wxqc
I made a web service that will allow this.

https://cwop.rest/

~Leo
------------------------
Sent from my phone; Please excuse brevity

On Fri, Nov 17, 2023, 6:27 PM jon4156 <jon...@gmail.com> wrote:
Can I use HTTP POST to upload data?  If so, can someone point me to the specific instructions please.

--
You received this message because you are subscribed to the Google Groups "wxqc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxqc+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wxqc/faaea62f-1a71-46a2-8409-8fd71c73b45cn%40googlegroups.com.

Michael Galassi

unread,
Nov 18, 2023, 10:42:19 AM11/18/23
to googl...@tedlum.com, wxqc
It's really not that hard at all, here's what I did years ago for
CW3202 and it has been working just fine:

https://github.com/michaelgalassi/fwx/blob/c70d400da645b810354f6285ad7bac5096b037c2/fwx.c#L755

It runs fine on FreeBSD or Linux. This isn't how I would write it
today but it's not broken so I'm not fixing it yet.

-michael
> --
> You received this message because you are subscribed to the Google Groups "wxqc" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wxqc+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wxqc/f4897a43-4740-4b58-b60d-46a1dad90506n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages