kopia lustrzana https://github.com/eleccoder/raspi-pico-aprs-tnc
Porównaj commity
8 Commity
a3b1d43973
...
849d5f3490
Autor | SHA1 | Data |
---|---|---|
eleccoder | 849d5f3490 | |
eleccoder | e148498b9f | |
eleccoder | 0818b545be | |
eleccoder | b979d3aedf | |
eleccoder | d78e42f10d | |
eleccoder | f0fc245cf4 | |
eleccoder | 0658e99721 | |
eleccoder | 023cff3589 |
32
README.md
32
README.md
|
@ -41,6 +41,8 @@ The line-out voltage can be as high as 2.7 V<sub>pp</sub> (~1 V<sub>rms</sub>) (
|
|||
|
||||
## Build the library and the 'beacon' demo application
|
||||
|
||||
NOTE: In case you want to allow the Pico to control the PTT (*Push-To-Talk*) input of your transmitter, set the appropriate `#define` parameters in `src/aprs_pico_beacon_demo.c`.
|
||||
|
||||
```
|
||||
git clone https://github.com/eleccoder/raspi-pico-aprs-tnc.git
|
||||
cd raspi-pico-aprs-tnc
|
||||
|
@ -52,24 +54,28 @@ cmake --build build
|
|||
|
||||
## Run the 'beacon' demo application
|
||||
|
||||
The analog AFSK audio signal will be available at the filter's line-out. You can probe it by a scope, listen to it by using an audio amp, or connect it to any RF transceiver to send it on the air (ham radio license required).
|
||||
|
||||
But for testing the signal integrity, you can feed the signal into the soundcard of your computer and let decode its data content by [Dire Wolf](https://github.com/wb2osz/direwolf) - see down below.
|
||||
|
||||
### Flash the Pico
|
||||
|
||||
```
|
||||
cd build
|
||||
Flash 'aprs_pico_beacon_demo[.uf2|.elf|.bin|.hex]' to the Pico board as usual.
|
||||
```
|
||||
|
||||
The analog AFSK audio signal will be available at the filter's line-out. You can probe it by a scope, listen to it by using an audio amp, or connect it to any RF transceiver to send it on the air (ham radio license required).
|
||||
Flash `aprs_pico_beacon_demo[.uf2|.elf|.bin|.hex]` to the Pico board as you're usually doing.
|
||||
|
||||
|
||||
### Test the 'beacon' demo application using *Dire Wolf* (on LINUX)
|
||||
|
||||
We can use the famous [Dire Wolf](https://github.com/wb2osz/direwolf) CLI software to decode the APRS data after sampling our APRS audio signal by means of a soundcard.
|
||||
|
||||
1. Connect the line-out of our circuit above to the microphone input of your soundcard of your (ALSA-supported) LINUX system.
|
||||
2. Check if you can hear the typical APRS 'modem-sound' on your audio output device by monitoring the input signal:
|
||||
2. Check if you can hear the typical APRS 'modem-sound' on your audio output device by monitoring the input signal (44.1 kHz, mono, WAVE):
|
||||
|
||||
```
|
||||
arecord -f cd -c 1 - | aplay -f cd -c 1
|
||||
arecord -f cd -c 1 - | aplay
|
||||
```
|
||||
|
||||
3. Install [Dire Wolf](https://github.com/wb2osz/direwolf) on your system. Probably, you just have to run:
|
||||
|
@ -78,7 +84,7 @@ arecord -f cd -c 1 - | aplay -f cd -c 1
|
|||
sudo apt install direwolf
|
||||
```
|
||||
|
||||
4. Let's sample the APRS audio signal fed to the soundcard and forward the audio stream to *Dire Wolf*:
|
||||
4. Let's sample the APRS audio signal fed to the soundcard and forward the audio stream to *Dire Wolf* (44.1 kHz, mono, WAVE):
|
||||
|
||||
```
|
||||
arecord -f cd -c 1 - | direwolf -
|
||||
|
@ -90,7 +96,11 @@ arecord -f cd -c 1 - | direwolf -
|
|||
|
||||
### Audio file of the 'beacon' demo
|
||||
|
||||
Here is a [recorded audio wav-file](https://github.com/eleccoder/raspi-pico-aprs-tnc/blob/main/doc/aprs_pico_beacon_demo.wav) captured by the soundcard using `arecord -f cd -c 1 -t wav > aprs_pico_beacon_demo.wav`.
|
||||
Here is a [recorded audio wav-file](https://github.com/eleccoder/raspi-pico-aprs-tnc/blob/main/doc/aprs_pico_beacon_demo.wav) (44.1 kHz, mono, WAVE) captured by the soundcard using:
|
||||
|
||||
```
|
||||
arecord -f cd -c 1 > aprs_pico_beacon_demo.wav
|
||||
```
|
||||
|
||||
You can replay and decode this file by:
|
||||
|
||||
|
@ -98,11 +108,17 @@ You can replay and decode this file by:
|
|||
cat aprs_pico_beacon_demo.wav | direwolf -
|
||||
```
|
||||
|
||||
## Going on the air: RF-transmission with the *Baofeng UV-5* HT
|
||||
|
||||
If you actually want to RF-transmit the APRS signal, you can simply do it by one of the many cheap HTs, like the *Baofeng UV-5*. The complete schematic including PTT control looks like this:
|
||||
|
||||
![APRS-Pico with Baofeng_UV-5](https://github.com/eleccoder/raspi-pico-aprs-tnc/blob/main/doc/img/APRS_Pico_with_Baofeng_UV-5R.png)
|
||||
|
||||
Don't forget to set the appropriate `#define` parameters in `src/aprs_pico_beacon_demo.c` to configure PTT control.
|
||||
|
||||
## TODO (Dec. 2022)
|
||||
|
||||
- [x] Send the APRS message on the console (USB or UART) rather than hard-coding
|
||||
- [x] PTT control for RF transceivers
|
||||
- [x] Show how to physically connect to a Baofeng HT
|
||||
|
||||
## Ingredients / Acknowledgements
|
||||
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 37 KiB |
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 21 KiB Po Szerokość: | Wysokość: | Rozmiar: 22 KiB |
Plik binarny nie jest wyświetlany.
Plik diff jest za duży
Load Diff
|
@ -42,6 +42,8 @@ audio_buffer_pool_t* aprs_pico_init();
|
|||
* \param[in] latitude_in_deg The latitude of the geo-location (in degrees)
|
||||
* \param[in] longitude_in_deg The longitude of the geo-location (in degrees)
|
||||
* \param[in] altitude_in_m The altitude of the geo-location (in meters)
|
||||
* \param[in] sym_table The APRS symbol table (e.g. '/' stands for 'Primary')
|
||||
* \param[in] sym_code The APRS symbol code (e.g. '-' stands for 'House QTH')
|
||||
* \param[in] volume The volume level of the generated signal (0 ... 256)
|
||||
*
|
||||
* \retval 'true' - Successful operation
|
||||
|
@ -57,6 +59,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool,
|
|||
double latitude_in_deg,
|
||||
double longitude_in_deg,
|
||||
double altitude_in_m,
|
||||
char sym_table,
|
||||
char sym_code,
|
||||
uint16_t volume);
|
||||
|
||||
|
||||
|
|
|
@ -237,6 +237,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool,
|
|||
double latitude_in_deg,
|
||||
double longitude_in_deg,
|
||||
double altitude_in_m,
|
||||
char sym_table,
|
||||
char sym_code,
|
||||
uint16_t volume)
|
||||
{
|
||||
// NOTE: 'aprs_message' is allowed to be 'NULL'
|
||||
|
@ -261,7 +263,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool,
|
|||
longitude_in_deg,
|
||||
altitude_in_m,
|
||||
aprs_message,
|
||||
'/', 'O');
|
||||
sym_table,
|
||||
sym_code);
|
||||
|
||||
return ret_val == AX25_OK;
|
||||
}
|
||||
|
|
|
@ -16,37 +16,70 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/* This program demonstrates the usage of the 'libaprs_pico.a' library by showing
|
||||
* how to send a static APRS beacon.
|
||||
*
|
||||
* Optionally, PTT control can be enabled (see the #define section down below).
|
||||
*/
|
||||
|
||||
// Define whether/how the RPi Pico should control a transmitter's PTT input
|
||||
#define PTT_ENABLE (false)
|
||||
#define PTT_GPXX_PIN (1)
|
||||
#define PTT_DELAY_BEFORE_TX_IN_MSEC (400)
|
||||
#define PTT_TX_PERIOD_IN_MIN (10)
|
||||
|
||||
|
||||
#include "aprs_pico.h"
|
||||
#include "pico/stdlib.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
stdio_init_all();
|
||||
|
||||
#if PTT_ENABLE == true
|
||||
|
||||
gpio_init(PTT_GPXX_PIN);
|
||||
gpio_set_dir(PTT_GPXX_PIN, GPIO_OUT);
|
||||
|
||||
#endif // PTT_ENABLE
|
||||
|
||||
audio_buffer_pool_t* audio_buffer_pool = aprs_pico_init();
|
||||
|
||||
// Let the altitude run over time
|
||||
double alt_in_m = 0.0;
|
||||
|
||||
while (true) // Loop forever
|
||||
// Loop forever
|
||||
while (true)
|
||||
{
|
||||
#if PTT_ENABLE == true
|
||||
|
||||
gpio_put(PTT_GPXX_PIN, true);
|
||||
sleep_ms(PTT_DELAY_BEFORE_TX_IN_MSEC);
|
||||
|
||||
#endif // PTT_ENABLE
|
||||
|
||||
// Send an APRS test message
|
||||
aprs_pico_sendAPRS(audio_buffer_pool,
|
||||
"DL3TG", // Source call sign
|
||||
"DL3TG", // Destination call sign
|
||||
"PATH1", // APRS path #1
|
||||
"PATH2", // APRS path #2
|
||||
"DL3TG-9", // Source call sign
|
||||
"APPIPI", // Destination call sign
|
||||
"WIDE1-1", // APRS path #1
|
||||
"WIDE2-2", // APRS path #2
|
||||
"APRS by RPi-Pico - https://github.com/eleccoder/raspi-pico-aprs-tnc", // Text message
|
||||
10.0, // Latitude (in deg)
|
||||
20.0, // Longitude (in deg)
|
||||
alt_in_m, // Altitude (in m)
|
||||
128u); // Volume (0 ... 256)
|
||||
48.75588, // Latitude (in deg)
|
||||
9.19011, // Longitude (in deg)
|
||||
483, // Altitude (in m)
|
||||
'/', // APRS symbol table: Primary
|
||||
'>', // APRS symbol code: Car
|
||||
128u); // Volume (0 ... 256)
|
||||
|
||||
// Don't raise too high ...
|
||||
alt_in_m = (alt_in_m < 1000.0) ? alt_in_m + 100.0 : 0.0;
|
||||
#if PTT_ENABLE == true
|
||||
|
||||
gpio_put(PTT_GPXX_PIN, false);
|
||||
sleep_ms(PTT_TX_PERIOD_IN_MIN * 60 * 1000);
|
||||
|
||||
#endif // PTT_ENABLE
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue