Wednesday, August 17, 2011

APRS2Twitter v9.0 Setup Information

Tonight I spent some time to write a setup.php script, I am trying to make it easy to use the script.

It's not perfect, What it does is ask you questions about what you want to do, it will try to direct you to the correct website to get the right API keys, ect.
It also will not ask some question if you answer no, IE: if you don't want to use SMS
you answer N, it will not ask you your phone number, or tropo api token.

I am trying to make it smart enough that it will be easy to setup.
IT writes the setup information to a file called setup.txt - this is a .ini format so it can be edited in a text editor to make changes later. The setup.txt is created on the fly, as the setup.php asks questions.

It's clean and fast to setup now.

I want to try to make the setup.php smart enough to know if something has been added, and not have to ask all of the questions again if you have already setup the script and changes have been made. That will be my next project.

Again, this is just a quick update to what is going on with APRS2Twitter
I am working on getting v9 out ASAP

Thanks, LeRoy, KD8BXP

Monday, August 15, 2011

Progress report on Client/Server PUSH for Amatuer Paging network

The server side software has been written, may need to be tweaked a little depending on a few things Mark (KC8GRQ) does on the server side of things, it's very simple very easy to use.
The script needs four things from the website, and can be called as an external script
include('serverpush.php');
The 1st thing it needs is:
$text this is the encoder sentence already formated and ready to goto the encoder (IE: #poc,1234567,3,a,"Hello World")

$text = '#poc,1234567,3,a,"Hello World"';

The 2nd thing it will need is the TX point (IT hasn't been decided yet how we are naming the TX points, so for the tests I just used my call sign):
$to - This is the TX point identification (callsign, node number, ???)

$to = 'KD8BXP';

The next thing -> Is the destination call sign - this is who will receive the page. I know the capcode also would indicate this, but for logging reasons I thought it would be a good idea to include the real call sign

$destination = This is the callsign of the person to receive the page
$destination = "N4TRQ";

The last is the originator call sign - this is the person who is sending the page (every effort should be made to include this in the message part of the encoder string as well) But again,
for logging reasons I wanted to include this.

$originator = This is who sent the page (callsign)
$originator = "KD8BXP";

That's it for the server side of the push notifications....easy peasy.

The client side, does some work, but not much, it will work on anything that can run PHP CLI and has a "REAL" serial port. (a USB to SERIAL port was used to test)

The client (TX point) does need to setup a couple of things - IT's very easy, but I will try to make it even easier. The client does need to be able to run php cli version 5.2 or better.

Here is what the TX point will need to setup. (3 things, not much really)

$mytxid this is you call sign or node number, or whatever we end up with, it will be something that is unique and will be used to identify you on the network. IE: The server will send your TX point (node number, callsign ???) out across the network, your TX point is just listening for your (node number, callsign ???) and will become active if it sees it. Otherwise it will just sit and wait until it does see it.

At the time of this writing we haven't decided what this will be, but it will most like be assigned by the server software when you register on the network.

The next thing that will need to be setup will be the TX point station ID - AT this time,
you will need to edit one line in the clientpush.php script. (I will be changing this very soon)

The line currently looks like this:
$text = '#poc,' . $capcode . ',3,a,"KD8BXP Pager TX node 123"';

At the time of this writing, we haven't determined how to or what to say when we ID the TX point.
The one thing that needs to be there is your call sign this will keep everything nice a legal.
The extra stuff is just a nice bonus.

You could put a small personal message - "Tnks for using TX node 123 DE KD8BXP" or something like that...I am not sure we will really have a set ID you will need to use.
IDing your station is your responsibility, this is an FCC (part 97) requirement. IT can be digital.

You may or may not also want to add a CW IDer to your personal setup. The only thing there is The CW can't not cover the pages that are going out over the air, so you'll need to come up with a way to turn the encoder off (or on hold) until after the CW goes out.

The last thing you need to setup is the COM port. This should be a REAL com port, I did not write the routes for serial usage it was written by Remy Sanchez, and is somewhat picky about having a "real com port"!

$comport - this is the com port number - NOTICE: for linux it's "/dev/ttyS?" where ? = a number
and for windows it's "com?" where ? = a number. (IE: /dev/ttyS0 or COM1)

That's it for the setup of the clientpush.php

To run the script, goto the command line, go into the directory/folder where the clientpush.php is located and type "PHP clientpush.php" without the quotes (NOTE: PHP much be installed, CLI version) and two other PHP scripts must be in the same directory (php_serial.class.php which is all of the routes for working with the serial port, and Pubnub.php - which is the how the script listens for it's ID)

The script will sit and just wait, you may or may not see any output on the screen (at least until you get a page to send out) (I will probably change this so at least you know the script did start)

How it works: IT just sits and waits, when the server gets a page it will "PUSH" that information out over the internet, IF your TX point hears it's ID (node number, call sign ???) it will grab the cap-code out of the message string. IT will send the entire encoder string to the encoder (using the serial port), It will log the DATE TIME ENCODER SENTENCE DESTINATION & ORIGINATOR in a file called log.txt, IT will then send a 2nd page with the TX point call sign (or personal message you setup), it will then LOG That page in the same format as above (with out the ORIGINATOR - you are the originator of this page)

After that (Which takes only a few seconds to complete) IT will sit and wait some more.
IT does output most of the information on screen so you can watch it work if you want.

The log file looks like this:

Mon, 15 Aug 2011 00:47:37 #poc,1234567,3,a,"Hello World" N4TRQ,KD8BXP
Mon, 15 Aug 2011 00:47:37 #poc,1234567,3,a,"KD8BXP Pager TX node 123" N4TRQ

At the time of this writing you need to make an empty file called log.txt (That will be changing very soon, it's on the todo list)

To stop getting pages -> just hit CTRL C, it will exit the script

My self and Authur (N4TRQ) did test this over the network, he got the messages I pushed to him.

During that testing is when I realized I could make it a little better. But it is usable in it's current condition. And it does work!

Thats about it for my report on how it went with getting a "push" to work! This setup uses very little CPU time, the client script can be ran on anything that can handle php 5.2 and has a real serial port.

My original envision what a simple computer with a command line install of linux - after the tests with N4TRQ I realized you don't need a dedicated computer to use this script, you may one a dedicated computer just because, but you don't need one.

-Report Ends

LeRoy, KD8BXP




Saturday, August 13, 2011

response to POCSAG Paging – Ideas By KC8GRQ

Below is my response to Marks POCSAG Paging - Ideas (KC8GRQ)
That can be found here:
Paging Ideas
I couldn't get his "CAPTCHA" system - I am a real person I promise!


Mark
I do like the idea of the hy-bird system, connected and unconnected systems -> but I think that will just lead to problems, the more I think about it...the more I wonder how you would get the page information to the non-connected systems without some sort of RX/TX combination....which leads to the PL tone, which leads to the (well...you know)...

A hy-bird system may sound like a good idea...but I am not so sure it will work the way we want it to.

I admit, my idea needs some work, it's was a rough idea this morning....but it still makes since to me...it really does.


I think we also need a fall down patern -> IE:

APRS (lat/lon), (Foursquare, Geoloqi, other Lat/Lon services), Dstar (last repeater connected to via RF), Allstarlink/echolink (???) I don't think we can really use IRLP (It is VoIP, but it doesn't contain a call sign - so no way to really know who is connected unless we are listening to it)

Your right, the TX site wouldn't need to add anything to the pager - since the server system would know where it's going to send the message it can just add that information right at the start. And that makes since... having the TX stations CW id makes since too. (The software would need to be smart enough to not transmit while it's CWing like you hear on some repeaters)

I was thinking about the cap codes as well...this would be a nationwide system, but if we did something like just "push" the page to the right TX site, cap codes become less of an issue, since only 1 TX would get it...you'd just need to make sure that people in your area are not using the same cap-code

IF you do travel a lot or a little, you'll just be aware you could get a message meant for someone else...for the most part none of this is truly private - think about messages on APRS, anyone who knows where to look can get those messages. So they are not private at all.

But you do want to try and avoid using a cap code over and over and over again as well...So a published list of codes should probably be on the website someplace.

The idea being that if you know a ham has a pager - all you need is his/her call sign to get them a message of course.

I would have to check again, but I think to stay legal we need to also be able to store the messages that are sent, and where they were/who sent to.

But that should be easy to do in a mysql database.

I don't know lots to think about still...and honestly I don't know which system will be better, the RX/TX combination or the closest TX site

As I said both have the good and both have the bad. I know it would take some work to get a database of the locations, but I am pretty sure we want to do that anyway.
Getting the APRS data is easy (lat/lon) and the calculations to figure out how far something is from something else is easy I've got the code to do that.

So yes, some work needed, but nothing that would be overly hard to do.

Personally (and it's a personal thing) I know how lazy I am - the last thing I want to do if I'm going to go somewhere is log on to a site and tell the site where I will be and when...I would rather just have the site "follow" me automatic
I do see a problem with that, now we aren't putting a load on the RF side of things but could be putting a load on the computer site of things....
SO, maybe if we made something like...send a email to the system to tell it to follow you...or log-on the system and put it in "Travel" mode...then it would only follow you if you told it to.

I don't know - lots to still work out...I just don't think you want people to say where they are or will be...things happen (and if you don't have access to the net you'll not be able to update the site yourself) if the site follows it will know where/when you are someplace. (Within reason)

Just some more of my thoughts on the subject. I don't know which would be the best...My thought money wise it would be cheaper for the end user to setup a TX point then a RX/TX point - less hardware needed (assumes you already have a computer you can use - but if you don't have a computer why would you build an encoder LOL)

Ok, just my 2cents.

Friday, August 12, 2011

Seeing the ISS!

Normally when you hear a ham talking about the ISS they want to talk to it, or hear it send out packets, and SSTV. And until today I was right along with them, I wanted to work the ISS, get the SSTV, get into the packet and hopefully find a pass that had someone on voice for the pass.

BUT. I must say it was really cool to SEE the ISS moving overhead. And I look forward to seeing it again.
I mean really, You can SEE it from the ground with the naked eye. On this pass it was a big bright light moving very fast across the sky.


In the video I just uploaded you can hear me question myself if I really saw it. I just wasn't sure, not seeing it before I wasn't sure if I was really looking at it or not, I was not excepting it to be as bright as it was. It was one of the brightest things in the sky tonight.

The other day (one day last week) I heard a Ham talking about seeing the ISS on one of the local repeaters, I just didn't understand why he was so happy to have seen it.... I think I understand now!

So what did I see (BTW My camera's battery was dead, I tried quickly to use my iPod to record a video - it didn't see it, it was bright to the eye, but too dim for the iPod to "see") Out of the South West I was looking...I didn't see anything at all, I looked away for a second. AND looked back, and there was a BIG Bright Light, I could tell it was high up, there was a small plane below it, relative to what I saw the plane was moving faster (However that isn't true) if
I saw it at the begin of the pass which I should have been able to do - It was over the Gulf of Mexico....a good thousand, 1500 miles away from me, The plane was much closer so it looked as if it was moving faster. At the end of the 4 minute pass the ISS would have been over Maine - so it was moving much faster then any plane could.

Do you love have the laws of relativity come into play here! But that is a different blog.

At it's highest point (44 degrees I am thinking it would have been over TN) and at the point where I would have lost sight of it, it would have been just on the edge of KY/WV

IT was very cool, I watched it the whole time, As it was moving "relative" toward me it was a bright white light, and at the point where I could just see it, it was a very dim light that was changing to a redish/orange color

There are a few places on the internet where you can find information for where and when to look. The best times I have been told are just at day break, and right after the sun has gone down.

http://n2yo.com has some great listing on when and where you can see the ISS as well as other satellites

IF you are on twitter, follow @twisst it will tweet to you a few hours before a visible pass. It tries to figure out where you are located from you profile location.

If you can do it, I would go out and do it! it might not sound like much, but it really is something to see.

73 - KD8BXP

Wednesday, August 10, 2011

APRS2Twitter v9.0 update information

Just a little update.
I have a working prototype to auto-checkin to foursquare, I still need to work out how to tell if you have really stopped moving or if you are moving before triggering the auto-checkins. But the basic script and idea does work.

I have decided that geoloqi.com will be a great way to distribute some of the information that I didn't know how to distribute before. IE: traffic information, geocache, and gas prices (if any ever get posted to the mygasfeed.com site)

I've cleaned up some of the v8.0 code, I still randomly get a couple of the $checksum2 errors, still not so sure why that is going on.

Passing/Near on my end still isn't working, I am not sure why some users of the script get the passing, and others just get the near (I'm one that just gets "near")

A couple of things I need to figure out still, because I don't want to over whelm the geonote system on geoloqi -> So I need to figure out how to keep duplicated notes from going into the system.

I think at least for putting geonotes about traffic, something like the method I used for the repeaters and wifi would be good - Circles, maybe even circles for gas prices.

The geocaches - I am thinking about, circles may not be the way to go with those...not sure yet.

- I found a old script that I wrote to use posterous - It still works, I need to clean it up a bit, and change a few things but this can be used as a replacement for tumblr, or for another part of the script.

I am working on making the script simpler to setup. That includes using a couple of sites that use oAuth2 - if twitter ever starts using oAuth2 then it will be even easier to setup.

I am planing on writing a script that will ask you the questions, or direct you to the right website to get some of the information the script needs. That should really simplify setup.

Toying with the idea of including a script that I wrote that looks at a RSS feed of echolink users and sees if a given callsign is listed and then posts that information to twitter. A few issues with that would need worked out.

With Version 8 there was some confusion as to what goes on with some of the scripts:

APRS.PHP posts your location (hopefully grabbing a business name,street address, or as a fall back just the lat/lon) to twitter IT used most of the scripts that were included in the archive. It was the main script.

Currentwx.php - would post to twitter just the current WX conditions for a given zipcode -> IT would attempt to get the zipcode of the City you are in using APRS, if it could not - it would fall back to your home zipcode - IT used USERSETUP.PHP and Variablesetup.php AS long as usersetup.php was setup correctly you can run Currentwx.php without ever having to run APRS.php - it will just always use the home qth zipcode. But otherwise the script if fully functional without APRS.php

Forecastwx.php - This posts a WX forecast to either 140plus (140plus then posts a link to the forecast on twitter), or posts a bunch of shorter "forecasts" to twitter (I would recommend using 140plus as it's a much nicer cleaner look and easier to read) This script also uses usersetup.php and variablesetup.php - the script uses or attempts to use the zipcode from APRS if not it falls back to your home qth zipcode - APRS.PHP is not needed to run this script as long as usersetup.php is setup

msg.php - This script checks for messages to you on the aprs system and posts those messages to twitter or will send them to you via sms, or both. In version 8 - this scrip only required usersetup.php to be setup. V9 of the script is making a few changes to how this script works (In fact most of the scripts will have some changes to how they work in v9) Msg.php also will write a msgcheck.txt file, which will stop (hopefully) duplicated messages from being posted to twitter
so the script needs read/write access to the directory it's in.

wxalert.php - This script sends WX alerts to twitter, again APRS is not required to run this script, simply variablesetup.php and usersetup.php - it will use or try to us the zipcode from APRS, but will fall back to your home qth zipcode. WXalert.php also needs sms.php because it will sms you the alert if you have it setup.

So basically with with version 8. if you don't want to post your location you don't have to.
If you are just interested in the WX information you can run just the wx scripts as long as usersetup.php is setup.



Version 9, not much will change with respect to the idea of not having to run APRS.php if you don't want to, what will change will be the interactions between some of the scripts. I realized that I was repeating code a lot in many of the scripts. I make a "functions.php" that handles all or most common code that is used in all the scripts. SO that script will be required.
I've also moved some of the scripts back into the "parent" script in attempt to make it a little less confusing about which script does what.

Something that I added in v8, but only a handful of people have is a script called comment.php - I have yet to decide how I want to use this. It will post the beacon comment to twitter. Which may be of interest (My beacon is usually saying what other freq I am monitoring)

That may get included into the main aprs.php script on v9 I've not decided and kind of looking for input.

That is about it for the update. I am still working on an update, I am making progress on it.




Tuesday, August 9, 2011

Got into the ISS Aug 9, 2011 12:20EDT



Taken from the Stations heard list on Findu.com (http://www.findu.com/cgi-bin/ariss/index.cgi)

Call Messages lat lon Age (dd:hh:mm:ss)
ISS
*
. . 00:00:00:13
ISS-10 . . . 00:00:00:13
ISS-5 . . . 00:00:00:13
RS0ISS-3
*
. . 00:00:00:34
N8ROA-2
*
39.80967 -82.06767 00:00:12:07
KD8BXP
*
39.36017 -84.58550 00:00:12:37
K3AS
*
43.43583 -76.53833 00:00:12:48
KJ4WPD
*
35.16833 -79.00000 00:00:13:33
W4ZZA-1
*
34.24267 -87.67167 00:00:13:44
AC4AV
*
42.10750 -87.90667 00:00:13:53
W9QO
*
34.13600 -83.75867 00:00:15:43
AC5DI-10
*
31.50167 -95.47667 00:00:16:17
K6KMA-4
*
33.82517 -118.11517 00:00:18:00
XE2LU
*
25.62550 -100.28417 00:00:20:15
VK6CN-7 . -31.82583 115.77500 00:01:02:31
VK6CO . -31.90000 115.94033 00:01:02:41
VK6CO-2 . -31.90000 115.94033 00:01:03:07


Here is some audio from the pass:

Wednesday, August 3, 2011

Working on updating the APRS2Twitter Script

So, I am working on trying to make the script easier to setup and easier to use, some of the APIs that are in the script have changed but still work...and some other things. I also am working on correcting some of the error that have cropped up. I even want to make it so it works out side the U.S. better...right now it does work, but only partially. I have even learned a few new things, and want to add some new features. I have a working prototype for automatically sending locations to foursquare. When I say working, I mean, only if I put my lat/lon in manually. So it still needs a lot of work there, but it works.

One issue I am running into is trying to figure out if a station is moving or sitting, I know there has to be an easy way to do this, but so far I haven't found it or had the "AH HA" moment (Anyone know?)

I think one of the projects I want to do is try to directly connect to the APRS-IS system (This has and still seems very confusing to me) but I found a couple of python scripts that do it, and I am looking at how they work. I don't know python but google is my friend. :-)

I have been playing around with oAuth2 on a couple of sites (Foursquare being one of them)

I tried to get something working on Facebook - but I can't seem to get anything to work on Facebook, facebook has always confused me, not I think it is just so big, it has too many things, and the documention needs updated or something, when I tried to get a token today it's keep giving me errors, when I tried to setup my app I think it setup as an oAuth app, and not a oAuth2 app... it wouldn't take my website. SO I kind of gave up on facebook (at least for now)

So what else...IF I can get some of these oAuth2 sites working, I am thinking I will write a one time script that will setup a "configuration file" so you'll not need to edit anything.

For now thou, I think things are progressing nicely

LeRoy, KD8BXP

Tuesday, August 2, 2011

My Random Thought of the Day!

This random thought goes hand in hand with my other random thought.

I wonder if I could use my radio to make an audio blog posting? ->
Maybe setup an All Star Link, with a recorder of some type, or just keying into a blog site API.

I wonder if something like this would be allowed under the rules of amateur radio, the more I think about it, the more I wonder - it could be considered a broadcast I would think, So maybe this random thought should only be a random thought
and never be tried.