Skip to content

Commit 2e472f0

Browse files
authored
Merge pull request #16 from etherkit/v1.2.0
V1.2.0
2 parents 97db283 + c973000 commit 2e472f0

File tree

10 files changed

+804
-47
lines changed

10 files changed

+804
-47
lines changed

README.md

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
JT65/JT9/JT4/WSPR/FSQ Encoder Library for Arduino
2-
=============================================
3-
This library very simply generates a set of channel symbols for JT65, JT9, JT4, or WSPR based on the user providing a properly formatted Type 6 message for JT65, JT9, or JT4 (which is 13 valid characters) or a callsign, Maidenhead grid locator, and power output for WSPR. It will also generate an arbitrary FSQ message of up to 200 characters in both directed and non-directed format. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
1+
JT65/JT9/JT4/FT8/WSPR/FSQ Encoder Library for Arduino
2+
=====================================================
3+
This library very simply generates a set of channel symbols for JT65, JT9, JT4, FT8, or WSPR based on the user providing a properly formatted Type 6 message for JT65, JT9, or JT4 (which is 13 valid characters), Type 0.0 or 0.5 message for FT8 (v2.0.0 protocol) or a callsign, Maidenhead grid locator, and power output for WSPR. It will also generate an arbitrary FSQ message of up to 200 characters in both directed and non-directed format. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
44

55
Please feel free to use the issues feature of GitHub if you run into problems or have suggestions for important features to implement.
66

@@ -28,7 +28,7 @@ There is a simple example that is placed in your examples menu under JTEncode. O
2828

2929
To run this example, be sure to download the [Si5351Arduino](https://github.com/etherkit/Si5351Arduino) library and follow the instructions there to connect the Si5351A Breakout Board to your Arduino. In order to trigger transmissions, you will also need to connect a momentary pushbutton from pin 12 of the Arduino to ground.
3030

31-
The example sketch itself is fairly straightforward. JT65, JT9, JT4, WSPR, and FSQ modes are modulated in same way: phase-continuous multiple-frequency shift keying (MFSK). The message to be transmitted is passed to the JTEncode method corresponding to the desired mode, along with a pointer to an array which holds the returned channel symbols. When the pushbutton is pushed, the sketch then transmits each channel symbol sequentially as an offset from the base frequency given in the sketch define section.
31+
The example sketch itself is fairly straightforward. JT65, JT9, JT4, FT8, WSPR, and FSQ modes are modulated in same way: phase-continuous multiple-frequency shift keying (MFSK). The message to be transmitted is passed to the JTEncode method corresponding to the desired mode, along with a pointer to an array which holds the returned channel symbols. When the pushbutton is pushed, the sketch then transmits each channel symbol sequentially as an offset from the base frequency given in the sketch define section.
3232

3333
An instance of the JTEncode object is created:
3434

@@ -64,6 +64,12 @@ On sketch startup, the mode parameters are set based on which mode is currently
6464
tone_spacing = WSPR_TONE_SPACING;
6565
tone_delay = WSPR_DELAY;
6666
break;
67+
case MODE_FT8:
68+
freq = FT8_DEFAULT_FREQ;
69+
symbol_count = FT8_SYMBOL_COUNT; // From the library defines
70+
tone_spacing = FT8_TONE_SPACING;
71+
tone_delay = FT8_DELAY;
72+
break;
6773
case MODE_FSQ_2:
6874
freq = FSQ_DEFAULT_FREQ;
6975
tone_spacing = FSQ_TONE_SPACING;
@@ -105,6 +111,9 @@ Before transmit, the proper class method is chosen based on the desired mode, th
105111
case MODE_WSPR:
106112
jtencode.wspr_encode(call, loc, dbm, tx_buffer);
107113
break;
114+
case MODE_FT8:
115+
jtencode.ft_encode(message, tx_buffer);
116+
break;
108117
case MODE_FSQ_2:
109118
case MODE_FSQ_3:
110119
case MODE_FSQ_4_5:
@@ -135,8 +144,8 @@ Public Methods
135144
* a channel symbol table.
136145
*
137146
* message - Plaintext Type 6 message.
138-
* symbols - Array of channel symbols to transmit retunred by the method.
139-
* Ensure that you pass a uint8_t array of size JT65_SYMBOL_COUNT to the method.
147+
* symbols - Array of channel symbols to transmit returned by the method.
148+
* Ensure that you pass a uint8_t array of at least size JT65_SYMBOL_COUNT to the method.
140149
*
141150
*/
142151
```
@@ -149,8 +158,8 @@ Public Methods
149158
* a channel symbol table.
150159
*
151160
* message - Plaintext Type 6 message.
152-
* symbols - Array of channel symbols to transmit retunred by the method.
153-
* Ensure that you pass a uint8_t array of size JT9_SYMBOL_COUNT to the method.
161+
* symbols - Array of channel symbols to transmit returned by the method.
162+
* Ensure that you pass a uint8_t array of at least size JT9_SYMBOL_COUNT to the method.
154163
*
155164
*/
156165
```
@@ -164,8 +173,8 @@ Public Methods
164173
* a channel symbol table.
165174
*
166175
* message - Plaintext Type 6 message.
167-
* symbols - Array of channel symbols to transmit retunred by the method.
168-
* Ensure that you pass a uint8_t array of size JT9_SYMBOL_COUNT to the method.
176+
* symbols - Array of channel symbols to transmit returned by the method.
177+
* Ensure that you pass a uint8_t array of at least size JT9_SYMBOL_COUNT to the method.
169178
*
170179
*/
171180
```
@@ -178,14 +187,30 @@ Public Methods
178187
* Takes an arbitrary message of up to 13 allowable characters and returns
179188
*
180189
* call - Callsign (6 characters maximum).
181-
* loc - Maidenhead grid locator (4 charcters maximum).
190+
* loc - Maidenhead grid locator (4 characters maximum).
182191
* dbm - Output power in dBm.
183-
* symbols - Array of channel symbols to transmit retunred by the method.
184-
* Ensure that you pass a uint8_t array of size WSPR_SYMBOL_COUNT to the method.
192+
* symbols - Array of channel symbols to transmit returned by the method.
193+
* Ensure that you pass a uint8_t array of at least size WSPR_SYMBOL_COUNT to the method.
185194
*
186195
*/
187196
```
188197

198+
### ft8_encode()
199+
```
200+
/*
201+
* ft8_encode(const char * message, uint8_t * symbols)
202+
*
203+
* Takes an arbitrary message of up to 13 allowable characters or a telemetry message
204+
* of up to 18 hexadecimal digit (in string format) and returns a channel symbol table.
205+
* Encoded for the FT8 protocol used in WSJT-X v2.0 and beyond (79 channel symbols).
206+
*
207+
* message - Type 0.0 free text message or Type 0.5 telemetry message.
208+
* symbols - Array of channel symbols to transmit returned by the method.
209+
* Ensure that you pass a uint8_t array of at least size FT8_SYMBOL_COUNT to the method.
210+
*
211+
*/
212+
```
213+
189214
### fsq_encode()
190215
```
191216
/*
@@ -195,7 +220,7 @@ Public Methods
195220
*
196221
* from_call - Callsign of issuing station (maximum size: 20)
197222
* message - Null-terminated message string, no greater than 130 chars in length
198-
* symbols - Array of channel symbols to transmit retunred by the method.
223+
* symbols - Array of channel symbols to transmit returned by the method.
199224
* Ensure that you pass a uint8_t array of at least the size of the message
200225
* plus 5 characters to the method. Terminated in 0xFF.
201226
*
@@ -213,7 +238,7 @@ Public Methods
213238
* to_call - Callsign to which message is directed (maximum size: 20)
214239
* cmd - Directed command
215240
* message - Null-terminated message string, no greater than 100 chars in length
216-
* symbols - Array of channel symbols to transmit retunred by the method.
241+
* symbols - Array of channel symbols to transmit returned by the method.
217242
* Ensure that you pass a uint8_t array of at least the size of the message
218243
* plus 5 characters to the method. Terminated in 0xFF.
219244
*
@@ -226,16 +251,20 @@ Here are the defines, structs, and enumerations you will find handy to use with
226251

227252
Defines:
228253

229-
JT65_SYMBOL_COUNT, JT9_SYMBOL_COUNT, JT4_SYMBOL_COUNT, WSPR_SYMBOL_COUNT
254+
JT65_SYMBOL_COUNT, JT9_SYMBOL_COUNT, JT4_SYMBOL_COUNT, WSPR_SYMBOL_COUNT, FT8_SYMBOL_COUNT
230255

231256
Acknowledgements
232257
----------------
233-
Many thanks to Joe Taylor K1JT for his innovative work in amateur radio. We are lucky to have him. The algorithms in this program were derived from the source code in the [WSJT](http://sourceforge.net/projects/wsjt/) suite of applications. Also, many thanks for Andy Talbot G4JNT for [his paper](http://www.g4jnt.com/JTModesBcns.htm) on the WSPR coding protocol, which helped me to understand the WSPR encoding process, which in turn helped me to understand the related JT protocols.
258+
Many thanks to Joe Taylor K1JT for his innovative work in amateur radio. We are lucky to have him. The algorithms in this program were derived from the source code in the [WSJT-X](https://sourceforge.net/p/wsjt/) suite of applications. Also, many thanks for Andy Talbot G4JNT for [his paper](http://www.g4jnt.com/JTModesBcns.htm) on the WSPR coding protocol, which helped me to understand the WSPR encoding process, which in turn helped me to understand the related JT protocols.
234259

235260
Also, a big thank you to Murray Greenman, ZL1BPU for working allowing me to pick his brain regarding his neat new mode FSQ.
236261

237262
Changelog
238263
---------
264+
* v1.2.0
265+
266+
* Add support for FT8 protocol (79 symbol version introduced December 2018)
267+
239268
* v1.1.3
240269

241270
* Add support for ESP8266

examples/Si5351JTDemo/Si5351JTDemo.ino

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//
2-
// Simple JT65/JT9/WSPR/FSQ beacon for Arduino, with the Etherkit
2+
// Simple JT65/JT9/JT4/FT8/WSPR/FSQ beacon for Arduino, with the Etherkit
33
// Si5351A Breakout Board, by Jason Milldrum NT7S.
44
//
55
// Transmit an abritrary message of up to 13 valid characters
6-
// (a Type 6 message) in JT65 and JT9, or a standard Type 1
7-
// message in WSPR.
6+
// (a Type 6 message) in JT65, JT9, JT4, a type 0.0 or type 0.5 FT8 message,
7+
// a FSQ message, or a standard Type 1 message in WSPR.
88
//
99
// Connect a momentary push button to pin 12 to use as the
1010
// transmit trigger. Get fancy by adding your own code to trigger
@@ -43,11 +43,12 @@
4343
#include "Wire.h"
4444

4545
// Mode defines
46-
#define JT9_TONE_SPACING 174 // ~1.74 Hz
47-
#define JT65_TONE_SPACING 269 // ~2.69 Hz
48-
#define JT4_TONE_SPACING 437 // ~4.37 Hz
49-
#define WSPR_TONE_SPACING 146 // ~1.46 Hz
50-
#define FSQ_TONE_SPACING 879 // ~8.79 Hz
46+
#define JT9_TONE_SPACING 174 // ~1.74 Hz
47+
#define JT65_TONE_SPACING 269 // ~2.69 Hz
48+
#define JT4_TONE_SPACING 437 // ~4.37 Hz
49+
#define WSPR_TONE_SPACING 146 // ~1.46 Hz
50+
#define FSQ_TONE_SPACING 879 // ~8.79 Hz
51+
#define FT8_TONE_SPACING 625 // ~6.25 Hz
5152

5253
#define JT9_DELAY 576 // Delay value for JT9-1
5354
#define JT65_DELAY 371 // Delay in ms for JT65A
@@ -57,12 +58,14 @@
5758
#define FSQ_3_DELAY 333 // Delay value for 3 baud FSQ
5859
#define FSQ_4_5_DELAY 222 // Delay value for 4.5 baud FSQ
5960
#define FSQ_6_DELAY 167 // Delay value for 6 baud FSQ
61+
#define FT8_DELAY 159 // Delay value for FT8
6062

6163
#define JT9_DEFAULT_FREQ 14078700UL
6264
#define JT65_DEFAULT_FREQ 14078300UL
6365
#define JT4_DEFAULT_FREQ 14078500UL
6466
#define WSPR_DEFAULT_FREQ 14097200UL
6567
#define FSQ_DEFAULT_FREQ 7105350UL // Base freq is 1350 Hz higher than dial freq in USB
68+
#define FT8_DEFAULT_FREQ 14075000UL
6669

6770
#define DEFAULT_MODE MODE_JT65
6871

@@ -72,7 +75,7 @@
7275

7376
// Enumerations
7477
enum mode {MODE_JT9, MODE_JT65, MODE_JT4, MODE_WSPR, MODE_FSQ_2, MODE_FSQ_3,
75-
MODE_FSQ_4_5, MODE_FSQ_6};
78+
MODE_FSQ_4_5, MODE_FSQ_6, MODE_FT8};
7679

7780
// Class instantiation
7881
Si5351 si5351;
@@ -139,6 +142,9 @@ void set_tx_buffer()
139142
case MODE_WSPR:
140143
jtencode.wspr_encode(call, loc, dbm, tx_buffer);
141144
break;
145+
case MODE_FT8:
146+
jtencode.ft8_encode(message, tx_buffer);
147+
break;
142148
case MODE_FSQ_2:
143149
case MODE_FSQ_3:
144150
case MODE_FSQ_4_5:
@@ -193,6 +199,12 @@ void setup()
193199
tone_spacing = WSPR_TONE_SPACING;
194200
tone_delay = WSPR_DELAY;
195201
break;
202+
case MODE_FT8:
203+
freq = FT8_DEFAULT_FREQ;
204+
symbol_count = FT8_SYMBOL_COUNT; // From the library defines
205+
tone_spacing = FT8_TONE_SPACING;
206+
tone_delay = FT8_DELAY;
207+
break;
196208
case MODE_FSQ_2:
197209
freq = FSQ_DEFAULT_FREQ;
198210
tone_spacing = FSQ_TONE_SPACING;

keywords.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ jt65_encode KEYWORD2
44
jt9_encode KEYWORD2
55
jt4_encode KEYWORD2
66
wspr_encode KEYWORD2
7+
ft8_encode KEYWORD2
78
fsq_encode KEYWORD2
89
fsq_dir_encode KEYWORD2
910

1011
JT65_SYMBOL_COUNT LITERAL1
1112
JT9_SYMBOL_COUNT LITERAL1
13+
JT4_SYMBOL_COUNT LITERAL1
1214
WSPR_SYMBOL_COUNT LITERAL1
15+
FT8_SYMBOL_COUNT LITERAL1
1316
JT65_ENCODE_COUNT LITERAL1
1417
JT9_ENCODE_COUNT LITERAL1
18+
FT8_ENCODE_COUNT LITERAL1
1519
JT9_BIT_COUNT LITERAL1
20+
JT4_BIT_COUNT LITERAL1
1621
WSPR_BIT_COUNT LITERAL1
22+
FT8_BIT_COUNT LITERAL1

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=Etherkit JTEncode
2-
version=1.1.3
2+
version=1.2.0
33
author=Jason Milldrum <[email protected]>
44
maintainer=Jason Milldrum <[email protected]>
5-
sentence=Generate JT65, JT9, JT4, WSPR, and FSQ symbols on your Arduino.
6-
paragraph=This library very simply generates a set of channel symbols for JT65, JT9, JT4, or WSPR based on the user providing a properly formatted Type 6 message for JT65, JT9, or JT4 (which is 13 valid characters) or a callsign, Maidenhead grid locator, and power output for WSPR. It will also generate an arbitrary FSQ message of up to 200 characters in both directed and non-directed format. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
5+
sentence=Generate JT65, JT9, JT4, FT8, WSPR, and FSQ symbols on your Arduino.
6+
paragraph=This library very simply generates a set of channel symbols for JT65, JT9, JT4, FT8, or WSPR based on the user providing a properly formatted Type 6 message for JT65, JT9, or JT4 (which is 13 valid characters), Type 0.0 or 0.5 message for FT8 (v2.0.0 protocol) or a callsign, Maidenhead grid locator, and power output for WSPR. It will also generate an arbitrary FSQ message of up to 200 characters in both directed and non-directed format. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
77
category=Data Processing
88
url=https://github.com/etherkit/JTEncode
99
architectures=*

0 commit comments

Comments
 (0)