APRS: Uploading APRS frame ke APRS-IS

From OnnoWiki
Jump to navigation Jump to search

Tulisan ini ditujukan untuk developer yang ingin mengembangkan software di sisi client yang ingin megakses APRS dan mengupload frame yang di terima-nya. Ini sangat bermanfaat untuk peralatan, seperti I-gates, yang menerima paket APRS darui radio dan mengirimkannya ke jaringan APRS untuk distribusi informasi yang lebih luas.


Langkah 1 - Sedikit Tentang Server APRS IS

APRS Sistem adalah sekumpulan server dan client yang dibangun berbasis pada 3 "Core" Server, yang dinamakan "First", "Second", dan "Third". Traffic APRS dimasukan ke server ini melalui beberapa sumber. I-Gate, contoh, mengirim data yang di terima di penerima RF ke server. Termasuk sekitar 20000 server Tier-2 yang bertindak antara I-Gate dan Core server. Client dapat tersambung ke Core and Tier-2 server. Server akan menghasilkan aliran data APRS yang dikirim ke client. Client dapat meminta data dari server untuk di filter untuk tipe data atau area geografis tertentu. Client juga dapat upload data ke APRS server melalui sambungan ini. Upload membutuhkan validasi passcode untuk memproteksi infrastruktur APRS dari perusak.

Langkah 2 - Connect ke Server

Server APRS membuka beberapa port untuk berbagai tipe traffic. Kita dapat mengunjungi status page dari masing-masing server pada port 14501. Pada contoh ini, kita akan tersambung ke second.aprs.net. Status URL adalah

http://second.aprs.net:14501/


Scrolling down this page, you will see status, mostly irrelevant stastitics, a list of ports, and connected users. You'll notice that each of the ports serves a particular use-case. If you want a feed of all of the traffic on the APRS network, ports like 20151 and 20152 provide such data. I am not interested in looking at data, just uploading packets to the network. I will pick a port that will generate less traffic. 20157 limits the traffic to a 100 km radius of my location. Anyway, pick your port and type the following into a terminal [Ubuntu]:

 john@homepc:~/src/APRS-post$ nc second.aprs.net 20157
 # javAPRSSrvr 3.15b06

For those not familiar with netcat (nc), we have just connected to second.aprs.net with on port 20157 using TCP/IP. On connection, the server sent us a friendly message, informing us that javAPRSSrvr is running. Now, its time to log into the server using a callsign, or if you're not a ham, a nickname.

In the nc terminal we will type:

user KI4MTT pass -1 ver "manual login"

To which the server responds:

# logresp KI4MTT unverified, server CORE-2

Great, so now we have connected to the server, and logged in with KI4MTT and a passcode of -1. Using this invalid passcode allows us to receive the APRS networks data feed, but will not let us upload frames. You can also verify your presence on the APRS network by going to [1] and doing a search for your call sign. The column to the right shows a yes/no verified status. Since I have not entered a valid passcode, I am not verified.

Also, one thing I noticed is that the APRS server is not sending any data. This is probably because I have not specified my location, and the APRS server does not know what traffic is within a 100 km radius.

Langkah 3 - Dapatkan Passcode

The APRS system uses an algorithm that generates a five-digit passcode based on the user's call sign. The exact algorithm is simple and has been semi-public knowledge since the 90's. Up until a few months ago, there were easily accessible websites that would generate this passcode. After some unfortunate abuse of the APRS system, the community has made an effort to make passcodes harder to generate. I will say that you can find some Windows-based freeware to generate these passcodes, but I will not provide a link. The legit way to get a password is to e-mail pete@ae5pl.net, providing your callsign/login name for the algorithm the consume.

Langkah 4 - Connect dan Login dengan Passcode

Next, we log into APRS using the valid pass code we got from Step 3:

john@homepc:~/src/APRS-post$ nc second.aprs.net 20157
# javAPRSSrvr 3.15b06
user KI4MTT pass 12345 ver "manual login"
# logresp KI4MTT verified, server CORE-2

Of course, you need to replace 'KI4MTT' and '12345' with your callsign and valid passcode. You'll notice the server reports a verified login. If you take another look at [2] and search for your callsign, you'll notice that you callsign also shows a verified status in the table.

Langkah 5 - Kirim Beberapa Data ke APRS

Now, I'm likely violating some terms of use by doing this, but I am going to send a single, spoofed APRS packet for the purposes of demonstration. In the terminal, I copy and paste the following line:

KI4MTT-1>APRS,TCPIP*:=3449.13N/12153.55W-KI4MTT Spoofed Position 2

If you happen to be running through this tutorial, be cool and replace my callsigns after you copy-paste.

Now, if we check [3], and look in the "packets received" column, it should show that your login has produce one packet (assuming you did only paste that line one.). We can also hop over to aprs.fi to see if we're really showing up on the network:

Looks like my spoofed position is in the middle of the Pacific... Don't mind the high velocity the image shows. That's just because I spoofed another position far away just a few seconds before that. There are probably some hams getting upset that I'm send fake positions here. Please accept my apologies...

Langkah 6 - Tulis sebuah Aplikasi

Obviously, logging into the APRS system with netcat, and manually typing APRS packets isn't very practical. I went through this exercise after I tried to write a simple Python app that would format GPS data in an APRS frame and send it to the network. The app was failing, but didn't really have an visibility to the issue. As guessed, I wasn't using the correct login credentials and format. Taking these simple steps in the terminal helped me sort out the issues.

Now, the really interesting thing is to put together something funtional, like an i-gate or GPS client... So, let's head over to Uploading ARPS Frames to APRS-IS - Part II


This page will provide some links and other information to download a set of simple Python applications that can be used to log-in to APRS-IS and upload APRS frames. The intent of these examples is to show developers how to interface with APRS-IS with their own applications. This short tutorial assumes you are running Linux and you have Python + pertinent libraries installed.

This all should be applicable to Windows or MacOS environments with minor adjustments.

If you have any difficulty understanding material, and you haven't already done so, have a look at Uploading ARPS Frames to APRS-IS - Part I Contents

[hide] 
   1 Step 1 - Get The Sample Code
   2 Step 2 - Run First Sample Appliction
   3 Step 3 - This is a really easy one...
   4 Step 4 - My Excuses

Step 1 - Get The Sample Code

This is a simple step, and assumes you have git installed. In a terminal, type:

git clone https://github.com/jmalsbury/aprs-post.git

Step 2 - Run First Sample Appliction

Note - you need to change your callsign and password(passcode) for your own use. The Python script does not have a valid passcode entered, and thus, will not work. To get your own passcode to use with your corresponding callsign, e-mail Peter Lovevall, pete@ae5pl.net.

Anyway, change the callsigns and passcode and in then type this while in the source directory:

python aprs_example_1.py

Assuming you are able to connect to the server, you should be able to find your callsign with the specified location on sites like aprs.fi... If this is not the case, common errors are:

   incorrect username and/or passcode. To test username passcode, follow instructions in ploading ARPS Frames to APRS-IS - Part I
   packet doesn't conform to format restrictions [you modified something other than the callsigns in the packet string] 

Feel free to e-mail john [at] jmalsbury [dot] com if you have questions Step 3 - This is a really easy one...

Modify for your own purposes. = ) Step 4 - My Excuses

It's getting late, and I'm tired. I will create more examples when I have more time, but you're probably smart enough to take things from here.


Referensi