This page refers to my QST article in the October 2017 issue. All updates will be posted here.
Click on the tabs below for more information.
News highlights. See the complete version history in the Download tab, below.
http://Your-HamClock-IP/set_sattle?name=abc&t1=line1&t2=line2Like all the server commands, you can send this with most browsers or with curl or wget from the command line.
hamclock-fb0-smallMakefile target for RPi's with 7" screens
• How do I build the ESP8266 software?
Do not use newer versions, these are the versions I have tested extensively.
If you need help with libraries in general try
If the options you see do not look exactly like mine do these steps:
Again, do not use a newer version, this is the version I know and trust.
• How do I build the Raspberry Pi Desktop or fb0 software?
See the Desktop tab, on the right.
• How does the DX Cluster feature work?
filter1 reject not by_zone 3,4,5 filter2 reject not on hf/cw filter3 reject on hf/rtty filter4 reject on hf/ssb filter5 reject info ft8
Starting with Version 2.44, you can connect an Elecraft KX3 to an ESP Huzzah or RPi HamClock so when you tap a DX Cluster spot the frequency is assigned to transmit VFO A. I think this will work with all Elecraft radios that have CAT control but this is the only radio I have to test and I do not know how to make the other cables.
To make the connection, build a cable as follows:
DISCLAIMER: Do this at your own risk, I take no responsibility for anything.
• Can I make different sizes beyond those in the Makefile?
Not easily. Each size requires its own custom fonts, symbols, maps and solar images in order to take full advantage of the higher resolutions. Otherwise, these would be very chunky if they were just multiples of the base images. Plus, if the aspect ratio changes, the layout would need to be rebalanced. This is why all sizes are multiples of 2 of the base size in order to maintain the same layout proportions.
• Why can I click on the DE or DX grid square and sometimes get a second value?
Because displaying location only to a whole degree, or any finite precision, can be ambiguous. Suppose you use the Setup screen to enter location 40N and 100.1W. This is in grid square DN90. But this location will be rounded to 40N 100W for display and this location is in grid square EN00. Just looking at the rounded HamClock display values you can't tell what the original location is, so HamClock gives you the choice of selecting the grid according to your intended usage.
The reason this happens is because grid squares increase from west to east, starting at 180W, and the major longitude grid boundaries are on even integral values. Thus 100W is in one grid and 100.1W is in a different grid. This becomes easier to see when using signed notation. You might expect moving from -100 to -100.1 to stay in the same grid but it doesn't because it is more westward and crosses the boundary at -100. But there is no ambiguity going from -101 to -101.1 because these are both near the center of the same grid, DN90. There is also no grid change going from the eastern longitude of positive 100 to 100.1 because the numeric increase is eastward and both locations are in the same grid, ON00.
The exact same thing happens with latitudes except they grow northwards from 90S and grid boundaries are on every integral line.
In addition to being set from the Setup screen, fractional coordinates can also result when setting location with other methods as well, such as IP Geolocation, gpsd or the remote web socket interface -- in all cases the full precision is maintained internally but only displayed to whole degrees. However, if you set a location by tapping the map or tapping the coordinate values to increment or decrement them then HamClock discards any fractional coordinate values so these methods never lead to a grid square ambiguity.
• Occasionally you mention web interface to the HamClock, what is this?
It allows you to remotely control your HamClock over a network using a browser or command line tool such as curl or wget. This is possible because HamClock responds to its network IP address on port 80, the default for http web servers. To try the following examples, you will need a computer on the same network as your HamClock. We will use curl but the same URLs will work in your browser as well (although some browsers are getting more paranoid about accessing a web site with http and you may be asked to trust the site).
Start by querying HamClock for a list of all its commands as follows:
You must change the example address to the IP your HamClock displays periodically just below your call sign. Note the good practice of surrounding the URL with apostrophes to insure it is not interpreted with shell metacharacters. The output will be a list of all supported commands. As of version 2.38, this list is as follows:
|/get_capture.bmp||Save screen as bmp file|
|/get_satellite||Report current satellite position, if one is defined|
|/get_sensors||Generate list of sensor values, if one is attached|
|/get_stats||Report some basic HamClock operational statistics|
|/help||Print list of available commands|
|/set_display?on/off||Set display brightness|
|/set_newde?lat=X&lng=Y||Define a new DE location using latitude/longitude|
|/set_newdegrid?AB12||Define a new DE location using its maidenhead grid square|
|/set_newdx?lat=X&long=Y||Define a new DX location using latitude/longitude|
|/set_newdxgrid?AB12||Define a new DX location using its maidenhead grid square|
|/set_satname?abc||Select the active satellite by name, name must be in the predefined list|
|/set_sattle?name=abc&t1=line1&t2=line2||Define the active satellite by using its TLE values|
|/set_time?ISO=YYYY-MM-DDTHH:MM:SS||Set UTC to the given time|
|/set_time?Now||Set UTC from network|
|/set_time?unix=s||Set UTC to the given UNIX time|
|/set_touch?x=X&y=Y||Act as if touched at the given screen coordinates, scaled to 800 x 480|
For example, turn the display brightness down:
and back up:
Set a new DE location:
Save the current display to a file named hcscreen.bmp:
curl 'http://192.168.7.101/get_capture.bmp' > hcscreen.bmp
• Holding the padlock does not restart ESP, what's going on?
For some unknown reason, this feature does not work the first time you try it after flashing the ESP Huzzah via USB from your computer. Use the reset button on Huzzah once then the padlock will work from then on. This issue does not occur if the Huzzah was reflashed remotely.
• How do I shut off HamClock on the RPi fb0?
Log in and kill the process with the following command:
sudo pkill 'hamclock.*'
If running HamClock and you want to shutdown the whole RPi, hold the padlock for 3 seconds then choose Shutdown.
• How do I safely power off my RPi?
• My question is not here, where can I get help?
Send me a polite note at firstname.lastname@example.org.
To use a 9" ER-TFTM090-2 from buydisplay.com:
Select these options during purchase:
This is the wiring list:
EP = ESP Huzzah BM = BME280 sensor PC = photo cell DP = display EP_SCL BM_SCK EP_SDA BM_SDI EP_3V BM_VIN EP_GND BM_GND EP_ADC PC_1, 330k EP_GND PC_2 EP_3V 330k EP_SCK DP_8 EP_MO DP_7 EP_MI DP_6 EP_2 DP_5 EP_16 DP_11 EP_USB DP_3, 4, 37, 38 EP_GND DP_1, 2, 13, 31, 39, 40
The display stand from Adafruit can be made to work with a little ingenuity but is not perfect for the LCD. Send suggestions for better ideas and I will post here.
If you find your display idea works better if the cable exits from the top, there is an option in the Setup screen that allows you to flip the display upside down.
Here is how I built my first two prototypes:
I am being asked more and more often how HamClock compares to the Geochron 4K. I do not have a Geochron but from its literature I can think of the following display functions HamClock offers that Geochron does not:
Conversely, Geochron can do things HamClock can not. These items are certainly interesting but to me they do not seem specifically useful to the typical amateur radio operator:
If I have misrepresented Geochron in any way, please let me know and I will correct immediately.
HamClock may also be built for Raspberry Pi, macOS, linux, FreeBSD or any other UNIX-like system in two ways:
HamClock may be built in the following sizes. If the display is larger, HamClock will center itself within a black background.
Operation of HamClock on these platforms is exactly the same as the ESP8266 version with the following exceptions:
• To give it a try on your GUI desktop, follow these steps:
curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip unzip ESPHamClock.zip cd ESPHamClock make -j 4 hamclock sudo ./hamclock
makecommand above will build HamClock at 800x480 pixels for X11. Type
make helpfor a list of other sizes and desktop environments available.
mkdir -p HamClock.app/Contents/MacOS cp hamclock HamClock.app/Contents/MacOS open HamClock.app
• To try it on an RPi using a dedicated HDMI or DSI 7" display, follow these steps:
Note: the following instructions use ssh for a reason, do not try to use the RPi display for these commands. The HamClock must have the fb0 display all to itself.
sudo raspi-configone time and set the following options:
curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip unzip ESPHamClock.zip cd ESPHamClock make -j 3 hamclock-fb0 sudo ./hamclock-fb0
makecommand above will build HamClock at 1600x960 pixels for RPi HDMI. If you want the smaller size 800x480 for the DSI 7" touch screen, change the make target to
make helpfor a list of other sizes and desktop environments available.
sudo bash -c "echo 0 > /sys/class/graphics/fbcon/cursor_blink"
~/.rpihamclock_eeprom. Removing this file and restarting HamClock will reset it back to all default values.
• If you want to use the Bosch BME280 environment sensor on RPi, follow these steps:
Pin 1 BME Vin Pin 3 BME SDI Pin 5 BME SCK Pin 9 BME GND
sudo apt-get install i2c-tools
sudo raspi-configand set the following options:
Interface Options: I2C: enabled
sudo i2cdetect -y 1you should see 77 in lower right corner of matrix; then
sudo i2cdump -y 1 0x77 byou should see a matrix of numbers, NOT XX
• To start
hamclock-fb0 automatically when the system boots,
consider using crontab.
@reboot cd ESPHamClock; sudo ./hamclock-fb0 > /dev/null 2>&1
hamclock-fb0therein. Adjust as necessary to match your configuration.
/dev/nullto a file name of your choice.
man 5 crontab