After using Linphone from the post HERE , I realized how simple it would be to create a ad hoc phone, video, and messaging network with just a wireless access point and smart phones loaded with the Linphone application. The basic recipe is one wireless access point like an old Linksys and two smartphones with Linphone loaded. The two smartphone will need to join the Linksys wireless network. The Linksys does not need to be connected to the Internet. The two smartphone will basically just be on the local wireless network offered by the Linksys. The only catch is you do need to know each others IP addresses to communicate. Once you know that you can call each other by just using the SIP address in the form - name@IPAddress:5060 the name can actually be anything (e.g. Bill@192.168.1.50:5060).
What this means is that if you take a old Linksys Access Point and run it off a battery and maybe put it up on a mast in the air say 20 to 30 feet up you could provide voice, video, and chat capabilities to a parking lot full of people. This may be useful for an emergency situation, etc.
If the WiFi setup included a registration process, perhaps a directory could be populated so people joining the network would "see" the other members.
I am looking at a Raspberry Pi image that can run as an Access Point, this would then allow a web server to be part of the network. Also the Rasp Pi is small and light and should use less power than a old Linksys wireless router, will need to verify.
Tuesday, May 12, 2015
Tuesday, May 5, 2015
Teensy 3.1 APRS
I came across an interesting post in the Teensy PJRC Forum about using a Teensy 3.1 as a APRS tracker. This is based on the trackuino code, but since the Teensy 3.1 has a 12 bit DAC no external hardware is needed thanks to this modified code.
I wanted to try out the code posted HERE but it took a few steps to get it running in the Arduino IDE so I thought I would share what I did:
I wanted to try out the code posted HERE but it took a few steps to get it running in the Arduino IDE so I thought I would share what I did:
- I took the posted code and placed it in a folder called "Aprs" in the Arduino IDE "libraries" folder.
- I removed the file called "APRSExample.cpp" from that "libraries" folder.
- I also grabbed the Adafruit GPS Library files from HERE and placed them in a folder called "Gps" in the Arduino IDE "libraries" folder.
- Next I started the Arduino IDE and opened a new sketch and pasted the content of the "APRSExample.cpp" into the editor.
- Next I tried to compile it and got a few errors and ended up removing the bottom 10 lines that contain the "int main(void)" section (not valid in Arduino sketches). After that it compiled (cool!).
Since I don't currently have a GPS connected to my Teensy 3.1 and wanted to try it without a GPS so I needed to make a few more changes to the code. Basically I just commented the original "aprs_send" method and substituted my own with fixed values for time, lat/lon, speed, heading, etc. and in the main "loop" commented all the "if" statements out so it would just loop and send every 10 seconds. If this was used the define sections in the code would need to reflect the call sign, ID, etc.
Below is the working code running in my Arduino IDE v1.0.6 and the teensyduino add-on. I hope to further modifiy the code to support other APRS packet types like weather and telemetry.
Below is the working code running in my Arduino IDE v1.0.6 and the teensyduino add-on. I hope to further modifiy the code to support other APRS packet types like weather and telemetry.
/*
aprs-teensy31
=============
Example code for generating APRS
packet "sounds" on the teensy 3.1's DAC pin.
Summary
=======
This code is intended to be used with the Arduino Library
for Teensy 3.1. For simplicity you can use Teensyduino.
aprs.h contains the two function calls you need.
Call aprs_setup with the parameters you want.
Call aprs_send to send a packet.
Note:
=====
It will not return until the entire packet has been sent.
The code is structured as generic C-code with no clases
or object oriented features. It is purely functional in nature anyway.
Acknowledgement
===============
The APRS library is based on code retrieved from the Trackuino project.
This is a hardware/software project designed to use the
Arduino and a Radiometrix HX1 transmitter as a position tracking system.
The code was written by Javier Martin under the same GNU General
Public License.
*/
#include <WProgram.h>
// Note: this example uses my GPS library for the Adafruit Ultimate GPS
// Code located here: https://github.com/rvnash/ultimate_gps_teensy3
#include <GPS.h>
#include <aprs.h>
// APRS Information
#define PTT_PIN 13 // Push to talk pin
// Set your callsign and SSID here. Common values for the SSID are
#define S_CALLSIGN "KC3ARY"
#define S_CALLSIGN_ID 1 // 11 is usually for balloons
// Destination callsign: APRS (with SSID=0) is usually okay.
#define D_CALLSIGN "APRS"
#define D_CALLSIGN_ID 0
// Symbol Table: '/' is primary table '\' is secondary table
#define SYMBOL_TABLE '/'
// Primary Table Symbols: /O=balloon, /-=House, /v=Blue Van, />=Red Car
#define SYMBOL_CHAR 'v'
struct PathAddress addresses[] = {
{(char *)D_CALLSIGN, D_CALLSIGN_ID}, // Destination callsign
{(char *)S_CALLSIGN, S_CALLSIGN_ID}, // Source callsign
{(char *)NULL, 0}, // Digi1 (first digi in the chain)
{(char *)NULL, 0} // Digi2 (second digi in the chain)
};
HardwareSerial &gpsSerial = Serial1;
GPS gps(&gpsSerial,true);
// setup() method runs once, when the sketch starts
void setup()
{
Serial.begin(9600); // For debugging output over the USB port
gps.startSerial(9600);
delay(1000);
gps.setSentencesToReceive(OUTPUT_RMC_GGA);
// Set up the APRS module
aprs_setup(50, // number of preamble flags to send
PTT_PIN, // Use PTT pin
100, // ms to wait after PTT to transmit
0, 0 // No VOX ton
);
}
// Function to broadcast your location
void broadcastLocation(GPS &gps, const char *comment)
{
// If above 5000 feet switch to a single hop path
int nAddresses;
if (gps.altitude > 1500) {
// APRS recomendations for > 5000 feet is:
// Path: WIDE2-1 is acceptable, but no path is preferred.
nAddresses = 3;
addresses[2].callsign = "WIDE2";
addresses[2].ssid = 1;
} else {
// Below 1500 meters use a much more generous path (assuming a mobile station)
// Path is "WIDE1-1,WIDE2-2"
nAddresses = 4;
addresses[2].callsign = "WIDE1";
addresses[2].ssid = 1;
addresses[3].callsign = "WIDE2";
addresses[3].ssid = 2;
}
// For debugging print out the path
Serial.print("APRS(");
Serial.print(nAddresses);
Serial.print("): ");
for (int i=0; i < nAddresses; i++) {
Serial.print(addresses[i].callsign);
Serial.print('-');
Serial.print(addresses[i].ssid);
if (i < nAddresses-1)
Serial.print(',');
}
Serial.print(' ');
Serial.print(SYMBOL_TABLE);
Serial.print(SYMBOL_CHAR);
Serial.println();
// Send the packet
/*
aprs_send(addresses, nAddresses
,gps.day, gps.hour, gps.minute
,gps.latitude, gps.longitude // degrees
,gps.altitude // meters
,gps.heading
,gps.speed
,SYMBOL_TABLE
,SYMBOL_CHAR
,comment);
*/
aprs_send(addresses, nAddresses
,1, 15, 59
,33.47,-118 // degrees
,10 // meters
,0
,0
,SYMBOL_TABLE
,SYMBOL_CHAR
,comment);
}
uint32_t timeOfAPRS = 0;
bool gotGPS = false;
// the loop() methor runs over and over again,
// as long as the board has power
void loop()
{
//if (gps.sentenceAvailable()) gps.parseSentence();
//if (gps.newValuesSinceDataRead()) {
//gotGPS = true; // @TODO: Should really check to see if the location data is still valid
//gps.dataRead();
//Serial.printf("Location: %f, %f altitude %f\n\r",
//gps.latitude, gps.longitude, gps.altitude);
//}
//if (gotGPS && timeOfAPRS + 60000 < millis()) {
broadcastLocation(gps, "Hi Gary N6SER" );
//timeOfAPRS = millis();
delay(10000);
//}
}
Monday, April 27, 2015
APRS & GPS Software
I continue to explore different software packages to aid in balloon payload tracking using APRS.
I came across two applications that may be useful:
The extModem application is a command line tool that implements a software packet modem. What's interesting is that it supports the KISS protocol via a TCP port. I have used SoundModem which is very good but only supports the AGW Packet engine API. With extModem and the Virtual Serial Port Emulator I can connect the modem to APRS applications that use KISS modems over COM ports.
The NMEA GPS application is an iPhone application that allows me to send GPS data to other applications over the local network. In this case I can again use the Virtual Serial Port Emulator to connect my iPhone GPS to legacy APRS applications that need to use a COM port.
Below are some notes of how I connected the extModem and NMEA GPS to UI-View32 using the Virtual Serial Ports:
Here is my Virtual Serial Port Emulator configuration
I came across two applications that may be useful:
The extModem application is a command line tool that implements a software packet modem. What's interesting is that it supports the KISS protocol via a TCP port. I have used SoundModem which is very good but only supports the AGW Packet engine API. With extModem and the Virtual Serial Port Emulator I can connect the modem to APRS applications that use KISS modems over COM ports.
The NMEA GPS application is an iPhone application that allows me to send GPS data to other applications over the local network. In this case I can again use the Virtual Serial Port Emulator to connect my iPhone GPS to legacy APRS applications that need to use a COM port.
Below are some notes of how I connected the extModem and NMEA GPS to UI-View32 using the Virtual Serial Ports:
Here is my Virtual Serial Port Emulator configuration
Sunday, April 19, 2015
VOIP Audio Tools for Ham Radio
I like to operate my FT-817 remotely over my local LAN and have been using IPSound to carry the audio for many years. This has worked great using Ham Radio Deluxe 5.x to control the radio tuning, etc. however I was thinking there must be something out there that will work with my iPad by now since IPSound is a Windows only application.
I figured I would look for a Open Source Voice Over IP (VOIP) application and found one called Linphone. Linphone is one of many SIP telephone applications available. What interesting is I have seen Hams using Wifi Mesh applications like Broadband-Hamnet and connecting ATA phone adapters like a Grandstream HT701 so they can talk over the mesh. They of course are using a analog phone and to dial each other you just use the IP address of each station, but why do that when you can just use a softphone like Linphone. You can setup the contacts and you will not need to remember IP addresses, etc. I guess depending on the analog phones they use with the ATA adapters they could have memories in the phones. The analog phone do make it simpler to use if it were needed in some emergency communication situations.
Anyway, I did successfully get Linphone running on my Windows XP PC that I use to control my FT-817 and another copy on my iPad. The only thing I discovered is that I could not achieve the same audio quality as IPSound. I tried all the Linphone CODECs and the best one was the G722. For standard HF radio use this is fine. There may be better CODECs available as plugins but I have not yet pursued that direction.
Since Linphone is multi-platform it makes it very handy (e.g. Andriod, IOS, Linux, Windows, etc.) There is also a command line mode that I have not tested yet. All in all this seems like a usable solution and I will use it to monitor some of the HF nets for the next few weeks.
I figured I would look for a Open Source Voice Over IP (VOIP) application and found one called Linphone. Linphone is one of many SIP telephone applications available. What interesting is I have seen Hams using Wifi Mesh applications like Broadband-Hamnet and connecting ATA phone adapters like a Grandstream HT701 so they can talk over the mesh. They of course are using a analog phone and to dial each other you just use the IP address of each station, but why do that when you can just use a softphone like Linphone. You can setup the contacts and you will not need to remember IP addresses, etc. I guess depending on the analog phones they use with the ATA adapters they could have memories in the phones. The analog phone do make it simpler to use if it were needed in some emergency communication situations.
Anyway, I did successfully get Linphone running on my Windows XP PC that I use to control my FT-817 and another copy on my iPad. The only thing I discovered is that I could not achieve the same audio quality as IPSound. I tried all the Linphone CODECs and the best one was the G722. For standard HF radio use this is fine. There may be better CODECs available as plugins but I have not yet pursued that direction.
Since Linphone is multi-platform it makes it very handy (e.g. Andriod, IOS, Linux, Windows, etc.) There is also a command line mode that I have not tested yet. All in all this seems like a usable solution and I will use it to monitor some of the HF nets for the next few weeks.
Sunday, April 12, 2015
Balloon Tracking Simulation Experiment
I was thinking about how to prepared for a balloon launch carrying an APRS payload without actually launching a balloon and thought that if the APRS data could be simulated and transmitted from the ground anyone receiving the APRS packet would interpret it as if it where real and coming from a balloon. This would allow us to create a simulated balloon flight profile and then transmit it from the same area it would be flying from but it would not be in the air, but instead from a mobile vehicle. We could have two groups (e.g. one tracking team and one simulated balloon team) go out and exercise the equipment and verify they could recover the payload by succesfully finding the simulated payload. This method should also be picked up via the APRS IGATEs and on the Internet APRS-IS network so the folks supporting us from their home QTH could monitor APRS.fi and track it as well.
I searched the Internet for various solutions and settled on the following:
I searched the Internet for various solutions and settled on the following:
UI-View32 is a very popular APRS applications and I have spent many hours exploring it and I still find new things it can do (like this!). It has the ability to connect a GPS to it via a COM port. When a GPS is connected to UI-View it basically becomes a tracker like you would use in a balloon, but it is running on a PC. The next component is the NMEA Generator. I found the link to this on WA8LMF site which is a great resource for all things APRS. The NMEA Generator is the key and it basically can generate the serial strings that come from a GPS and send them to a COM port. This makes UI-View think it is receiving GPS location data. So now I need to connect the NMEA Generator to UI-View32. To do this I use a Virtual Serial Port emulator. This allows both applications to run on the same PC and talk to each other. The nice feature of the NMEA Generator is its ability to take a .INI file that you have created and drag and drop onto the application (read the docs) and it will load a set of points that you have created for the flight or trip into the generator. See below for a file I created ti simulate a flight. I created the flight profile using real wind data and balloon weights, etc. using Balloon Track for Windows another outstanding application. Balloon Track can export in many formats but I used CSV .because I need Lat, Lon, Altitude, and speed (mind your units!). Then I used Excel to format it to work in the INI file (Note: you need a sequence number D1, D2, D3, etc.)The key thing I discovered was unless you want the NMEA Generator to loop and repeat your data points, the last record should have a blank speed value. In addition, if you don't want the simulated balloon to continue to drift forever on the ground, the second to last speed value should be set to zero '0'.
I did all the experiments connected the APRS-IS and have not transmitted any of the packets on the air which is the next step and the final goal. I will need to see how this setup will run on a 800 Mhz Windows XP laptop.
I did all the experiments connected the APRS-IS and have not transmitted any of the packets on the air which is the next step and the final goal. I will need to see how this setup will run on a 800 Mhz Windows XP laptop.
[Option]
SpeedUnit=0
Version=Ver1.18
EngCharset=0
EngFontName=Arial
EngFontSize=8
JpCharset=1
JpFontName=Tahoma
JpFontSize=8
TrackMax=50
TimeDiff=
MagVari=
MainTop=36
MainLeft=28
[Track]
D1=33.75176235,-118.0567753,85,2
D2=33.75188794,-118.0565514,106,20.37468822
D3=33.75331956,-118.0536856,323,24.08305198
D4=33.75508722,-118.0504115,542,27.7701033
D5=33.75649766,-118.0470814,768,25.93723385
D6=33.75714538,-118.0441726,999,20.37468822
D7=33.757194,-118.0424913,1235,11.10377883
D8=33.75679214,-118.0421775,1478,3.708363756
D9=33.75572611,-118.0429181,1729,9.249596954
D10=33.75412309,-118.0443713,1983,14.81214259
D11=33.75231754,-118.0461303,2246,16.66632447
D12=33.75014851,-118.0479573,2514,18.52050634
D13=33.74745902,-118.0495352,2791,20.37468822
D14=33.74472201,-118.0502351,3075,18.52050634
D15=33.73888334,-118.0503581,3667,18.52050634
D16=33.73346457,-118.048734,4297,16.66632447
D17=33.7281628,-118.0484004,4971,14.81214259
D18=33.72100578,-118.0522323,5694,20.37468822
D19=33.71070127,-118.0585446,6477,27.7701033
D20=33.69364442,-118.0672461,7332,40.74937644
D21=33.66465533,-118.079235,8275,61.12406466
D22=33.62329029,-118.0992921,9329,79.64457101
D23=33.59469352,-118.1175273,9999,90.74834984
D24=33.5864404,-118.1227875,9329,90.74834984
D25=33.57353805,-118.1290326,8275,79.64457101
D26=33.56386113,-118.1330223,7332,61.12406466
D27=33.55781541,-118.1360955,6477,40.74937644
D28=33.55396045,-118.1384479,5694,27.7701033
D29=33.55114968,-118.1399464,4971,20.37468822
D30=33.54897387,-118.1398074,4297,14.81214259
D31=33.54665698,-118.139112,3667,16.66632447
D32=33.54406341,-118.1391638,3075,18.52050634
D33=33.54282553,-118.1394783,2791,18.52050634
D34=33.54158725,-118.1402014,2514,20.37468822
D35=33.54057153,-118.1410532,2246,18.52050634
D36=33.53971191,-118.141887,1983,16.66632447
D37=33.53893682,-118.1425865,1729,14.81214259
D38=33.53841359,-118.1429483,1478,9.249596954
D39=33.53821353,-118.1427921,1235,3.708363756
D40=33.53823878,-118.1419447,999,11.10377883
D41=33.53857184,-118.1404583,768,20.37468822
D42=33.53930566,-118.1387338,542,25.93723385
D43=33.54023695,-118.1370163,323,27.7701033
D44=33.54100122,-118.1354928,106,24.08305198
D45=33.54132354,-118.1349205,7,20.37468822
D46=33.54134483,-118.134878,0,0
D47=33.54134483,-118.134878,0,
[DGPS]
Invalid=,
SPS=,
Thursday, April 9, 2015
Club Balloon Launch (no payload)
Last Saturday was our planned Club Balloon launch. Everything was going very well until we discovered our APRS payload was not working. After we spent more than 2 hours trying to resolve the issue we had to abort, however we had already filled the balloon partially so we ended up just releasing the balloon with no payload attached. Lesson learned was don't start filling the balloon until the complete payload chain is operational!
That lesson cost us a $40 balloon and $60 of helium.
That lesson cost us a $40 balloon and $60 of helium.
Sunday, March 29, 2015
Teensy 3.1 Impressions and the Audio Library
I have been hearing a lot of good things about the Teensy 3.1 development board regarding its use as a SDR platform HERE. It seems like it has a great deal of capability over the the Teensy 2.0 that I have been using. This power is due to it's 32 bit ARM processor. The coolest thing is that it uses the Arduino IDE and nearly all of your sketches will run on it. The Teensy SDR linked above exploits the Teensy 3.1 audio DSP functions and PJRC has created a simple GUI tool to help you create your audio projects easily.
As a simple test after I powered up my Teensy 3.1, I used the audio design tool to define two sine wave sources, mix them together and output them to the on-board DAC. Below is an image of my session with the tool (it is web based or you can download and run locally).
After the design is completed in the tool you just press the RED "Export" button and it will output the code for your sketch. I ended up tailoring mine to generate a Dial Tone and I was blown away how good it sounded! I just took the output of the DAC and feed it directly into a standard PC powered speaker.
You do need to do a little coding since the tool just sets up the streams. The tool generated the code that is between the "// GUItool ..." comments below in the example. I needed to call the audio objects in the "loop()" section which you can figure out from the docs and the examples provided. The comment section at the bottom is when I was playing with other Tel-co sounds (e.g. Busy Signal).
I am very impressed with the Teensy 3.1 platform and intend on replacing my Teensy 2.0 in my Proto Type Radio with it soon and try out some of the audio SDR functions.
Example Code:
As a simple test after I powered up my Teensy 3.1, I used the audio design tool to define two sine wave sources, mix them together and output them to the on-board DAC. Below is an image of my session with the tool (it is web based or you can download and run locally).
After the design is completed in the tool you just press the RED "Export" button and it will output the code for your sketch. I ended up tailoring mine to generate a Dial Tone and I was blown away how good it sounded! I just took the output of the DAC and feed it directly into a standard PC powered speaker.
You do need to do a little coding since the tool just sets up the streams. The tool generated the code that is between the "// GUItool ..." comments below in the example. I needed to call the audio objects in the "loop()" section which you can figure out from the docs and the examples provided. The comment section at the bottom is when I was playing with other Tel-co sounds (e.g. Busy Signal).
I am very impressed with the Teensy 3.1 platform and intend on replacing my Teensy 2.0 in my Proto Type Radio with it soon and try out some of the audio SDR functions.
Example Code:
// Simple Mixer to generate a Dialtone
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=183,181
AudioSynthWaveformSine sine2; //xy=192,251
AudioMixer4 mixer1; //xy=392,207
AudioOutputAnalog dac; //xy=591,178
AudioConnection patchCord1(sine1, 0, mixer1, 0);
AudioConnection patchCord2(sine2, 0, mixer1, 1);
AudioConnection patchCord3(mixer1, dac);
// GUItool: end automatically generated code
void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
AudioMemory(3);
}
void loop() {
sine1.frequency(350); //350
sine1.amplitude(0.1);
sine2.frequency(440);//440
sine2.amplitude(0.1);
//delay(100);
//sine1.amplitude(0);
//sine2.amplitude(0);
//delay(100);
}
Subscribe to:
Posts (Atom)

