Which USB-Serial Adapter and driver for ElCap

Yes.

try
http://www.weather-display.com/downloadfiles/cronwarningemail.zip

That did it although I ended up with an unformatted email:

******WEATHER WARNING TEST !************THIS IS A TEST !******THIS IS A TEST !-----------------------------56km/h average windspeed was exceeded !-----------------------------Time of event was : 09:40 pmDate of event was : 06/04/17Current conditions : Windspeed 11.8 kmhDirection N 359

try a new .zip update of that cron program,vers 1.2, same URL as above
to fix the line formating

Well I managed to kill it.

Was trying to access one of the Control Panels when the program crashed. Now it won’t start.

I’ve tried rebooting and reinstalling but I only see the splash screen and nothing else. Here’s the error when I start up in a Terminal window:

Steves-Mac-mini:MacOS steve$ ./weatherdisplay
Exception EAccessViolation in module weatherdisplay at 0003F66F.
Access violation at address 01C5DD76, accessing address 00000378.
FastMM has detected a FreeMem call after FastMM was uninstalled.Runtime error 204 at 0001A32A

I’m guessing one of the startup files is damaged but I’m not sure which one.

Narrowed it down to a particular line in my WDISPLAY.INI file:

In the [Main screen gauges] section the line:

number main back=Darkmagenta

seemed to be causing the crash.

Once I removed that line, the program started normally.

I will see if I can fix that from happening for the next update

the latest update has the graph times working correctly again now

Looks good!

Next question:

I’m trying to download a METAR for my webpage. It used to work on my Windows box without problems but I can’t get it to work on my Mac.

When I run cronmetar in a terminal window, I get:
Steves-Mac-mini:Resources steve$ ./cronmetar
Metar download vers 1.1 21:41:05 13-4-17
Location =/Users/steve/Documents/wdisplay/
log onto noaa server…
login OK to tgftp.nws.noaa.gov
Change directory Ok to /data/observations/metar/decoded/
metar download location =/Users/steve/Documents/wdisplay/metar
number of metars to download =1
/Users/steve/Documents/wdisplay/metarCYYZ.met
metar downloading CYYZ.TXT to /Users/steve/Documents/wdisplay/metar
Steves-Mac-mini:Resources steve$

However, when I check the directory, it’s empty.

Here’s the relevant section from my wdisplayftp.ini file:

[METAR down]
remote directory=/Users/steve/Documents/wdisplay/metar
local directory=/Users/steve/Documents/wdisplay/metar

Any suggestions?

looks like its missing a trailing / on the metar download directory

No change.

remote directory=/Users/steve/Documents/wdisplay/metar/
local directory=/Users/steve/Documents/wdisplay/metar/

./cronmetar shows:

metar download location =/Users/steve/Documents/wdisplay/metar/
number of metars to download =1
/Users/steve/Documents/wdisplay/metar/CYYZ.met
metar downloading CYYZ.TXT to /Users/steve/Documents/wdisplay/metar/

I’ve also verified that I can reach the site and download the file by logging in manually.

make sure to have ticked to use ftp instead of http
in the metar download setup
I just tested and it works here

Here’s a screenshot of my settings. I have verified that Use FTP instead HTTP to download is checked.


humm
it worked OK here, when i ran cronmetar
in a terminal window

try running that again? (from the resources folder)
(I did not have ticked to use passive mode for the ftp though)
also make sure the metar directory exists

I’ve turned passive off and no change.

I know the directory is fine since I can do an ls command and see that nothing is there:

Steves-Mac-mini:Resources steve$ ./cronmetar
Metar download vers 1.1 11:03:32 15-4-17
Location =/Users/steve/Documents/wdisplay/
log onto noaa server…
login OK to tgftp.nws.noaa.gov
Change directory Ok to /data/observations/metar/decoded/
metar download location =/Users/steve/Documents/wdisplay/metar/
number of metars to download =1
/Users/steve/Documents/wdisplay/metar/CYYZ.met
metar downloading CYYZ.TXT to /Users/steve/Documents/wdisplay/metar/
Steves-Mac-mini:Resources steve$ ls -al /Users/steve/Documents/wdisplay/metar/
total 0
drwxr-xr-x 2 steve staff 68 18 Mar 17:06 .
drwxr-xr-x 34 steve staff 1156 14 Apr 09:38 …
Steves-Mac-mini:Resources steve$

I’ve tried changing the directory to my home directory but still no file is generated.

I’m curious about the wdisplayftp.ini file’s metar section:

[METAR down]
remote directory=/Users/steve/Documents/wdisplay/metar/
local directory=/Users/steve/Documents/wdisplay/metar/

I would assume that the local directory is where the metar is stored but what is the remote directory for? Typically I would assume this is the directory the metar is pulled from.

I’ve noticed that when I run cronmetar, Little Snitch shows cronmetar making a connection to the outside world. When I click the Test button on the metar page, cronftpdown runs.

If I run ./cronftpdown in a terminal window, I see this:

Steves-Mac-mini:Resources steve$ ./cronftpdown
Noaa FTP download 11:27:43 15-4-17
login OK to tgftp.nws.noaa.gov
Change directory Ok to /data/forecasts/state/oh/
Local dir =/Users/steve/Documents/wdisplay/

If I check ftplogfull.txt, I see this:

Steves-Mac-mini:Resources steve$ more ~/Documents/wdisplay/ftplogfull.txt
Noaa FTP download 11:27:43 15-4-17
login OK to tgftp.nws.noaa.gov
Steves-Mac-mini:Resources steve$

Which program actually goes out and gets the metar, cronftpdown or cronmetar? Seems like cronftpdown is the one.

cronmetar

the test button on the metar download should be running that
( I will check on that)

the following shows that it has worked
if the file does not exist, it points to a permission problem?

Steves-Mac-mini:Resources steve$ ./cronmetar Metar download vers 1.1 11:03:32 15-4-17 Location =/Users/steve/Documents/wdisplay/ log onto noaa server... login OK to tgftp.nws.noaa.gov Change directory Ok to /data/observations/metar/decoded/ metar download location =/Users/steve/Documents/wdisplay/metar/ number of metars to download =1 /Users/steve/Documents/wdisplay/metar/CYYZ.met metar downloading CYYZ.TXT to /Users/steve/Documents/wdisplay/metar/

My weather display.app package and it’s contents are set to run as root:admin with directory permissions of 775.

My ~/Documents/wdisplay directory is owned by root:admin and has directory permissions of 775.

I even tried running cronmetar as a super user with no change.

I’m pretty sure the test button on the METAR page is running cronftpdown.

I did a capture of the traffic with Little Snitch and I’ll post that after. Running cronmetar from a terminal window seems to fail in the download of the metar file.

I’ll have to find a Wireshark viewer as the file is a .pcap file but here’s a messy paste with the binary included:

I have tested here
CYYZ.TXT
to download
and set the directory to the metar directory
and running ./cronmetar

works
a file, called cyyz.met exists in the selected metar directory

I will fix the test button running the wrong cron program for the next update

Here’s a cleaned up session which shows the ftp session between the noaa server and cronmetar running on my machine.

Steves-Mac-mini:Documents steve$ tcpdump -r “cronmetar - 2017-04-15 at 4.34 PM.pcap” | less
17:00:10.278980 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1052:1088, ack 88, win 65535, length 36: FTP: 350 Restart position accepted (1).
17:00:10.278980 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], ack 1088, win 65535, length 0
17:00:10.281458 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], seq 88:96, ack 1088, win 65535, length 8: FTP: REST 0
17:00:10.281458 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], ack 96, win 65535, length 0
17:00:10.353912 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1088:1124, ack 96, win 65535, length 36: FTP: 350 Restart position accepted (0).
17:00:10.353912 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], ack 1124, win 65535, length 0
17:00:10.355272 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], seq 96:135, ack 1124, win 65535, length 39: FTP: CWD /data/observations/metar/decoded/
17:00:10.355272 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], ack 135, win 65535, length 0
17:00:10.428872 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1124:1161, ack 135, win 65535, length 37: FTP: 250 Directory successfully changed.
17:00:10.428872 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], ack 1161, win 65535, length 0
17:00:10.799827 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], seq 135:163, ack 1161, win 65535, length 28: FTP: EPRT |1|192.168.0.2|62421|
17:00:10.799827 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], ack 163, win 65535, length 0
17:00:10.872828 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1161:1185, ack 163, win 65535, length 24: FTP: 550 Permission denied.
17:00:10.872828 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], ack 1185, win 65535, length 0
17:00:10.878185 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], seq 163:189, ack 1185, win 65535, length 26: FTP: PORT 192,168,0,2,243,213
17:00:10.878185 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], ack 189, win 65535, length 0
17:00:10.948965 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1185:1209, ack 189, win 65535, length 24: FTP: 550 Permission denied.
17:00:10.948965 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], ack 1209, win 65535, length 0
17:00:10.950690 IP 0.0.199.62.10974 > 140.172.138.79.ftp: Flags [.], seq 189:195, ack 1209, win 65535, length 6: FTP: QUIT
17:00:10.950690 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], ack 195, win 65535, length 0
17:00:11.026148 IP 140.172.138.79.ftp > 0.0.199.62.10974: Flags [.], seq 1209:1223, ack 195, win 65535, length 14: FTP: 221 Goodbye.

You can see that for some reason, the EPRT and PORT commands are rejected by the FTP server at NOAA.

I took a look at the cronftpdown process as well and it fails at the same point as well.

I’ll take a look at the permissoins again.

I am able to manually ftp to the site and grab the file without any problems. Not sure why cronmetar and cronftpdown both fail.

I’ve given up on getting this to work. Checked my directory permissions and I can’t find any problems. Not sure what is going on. Wireshark shows the port command is failing everytime.

I’m curious as to what cronmetar actually does. Does it just download the current metar report as a text file into the metar directory?

I’ve written a shell script which will download the current metar report into the metar directory and I can easily schedule that with a cron job.

Is there anything else needed to be done with this text file once it’s downloaded into the metar directory?