Open2300 - Support Question 2006x 02x 17x 124307

How to run open2300 on a Mac OSX 10.3

Question

I have a WS2300 and I would like to use it on a Mac working under OS X 10.3.9 but I am not skilled in Unix practice. So I would like to know : 1. Out of the open2300.conf file (in /usr/local/etc/), in which directories do I put the different other files of open2300? 2. When connected to WS2300, how to make open2300 work? is there some particular file to click on or something else to do? Thanks in advance.

Environment

Open2300 version: 1.10
Libraries: mysql
Server OS: Mac OS X 10.3

-- MichelLeBerre - 17 Feb 2006

Answer

I am not familiar with Mac OS.

So maybe other can add more info. You can also try the MailingList.

Open2300 is distributed as source files for Linux. And as both sources and binary for Windows.

Mac OS is a UNIX variant so if it can be made to work it is the Linux sources code that will work.

So you need to put the files in any directory and you need to compile the code. So you must have gcc installed on your Mac.

Once the program is compiled you can place it anywhere.

-- KennethLavrsen - 17 Feb 2006

As Kenneth says, Mac OS is a Unix variant and can be made to work with the Linux source. You mentioned clicking on a file - that is currently out of the question as it will require a programming effort to build a clickable user interface and I at least have no time to put into that. I do hope to have enough free time after my local tax season ends to set up a binary installer for the G4 systems with 10.3.9 and 10.4.x, and later perhaps for the Intel Mac systems, but in the meantime I can give you a rough guide to the installation process. However, you need some level of comfort with Terminal.app and the Unix underpinnings of the operating system. If that intimidates you, read no further.

The first thing is that you need to be able to connect the Mac to your base station. I use a USB-serial interface - I have a couple from different manufacturers, but they are both based on the PL-2303 chip and use the same driver, setting up the port as 'USBSerial'. You need this info for the .conf file, so check the documentation of your interface, or if the documentation isn't that exact, use the Terminal application and read the directory - ls /dev should give you the information you need, and in my case it shows tty.usbserial after I install the USB-Serial interface. Change the settings in the .conf file according to your needs - I changed SERIAL_DEVICE to /dev/tty.usbserial and TIMEZONE to -5. You also may want to change the units and set up for Citizen Weather or Weather Underground, but that's an option you can change later after you've tested the setup. I copied the open2300.conf file to the /etc directory but the other directories suggested in the makefile work equally well.

The code in Open2300 almost works on a Mac, except that the Mac will hang when it tries to open the port - it's looking for signals which aren't there - so in order to get it to work you have to patch the code. Basically the only thing I changed for the first go-round was to use a non-blocking open in open_weatherstation -- see the NonBlockingOpen patch elsewhere on the site. I also took out the win2300 references in the makefile. I did my changes using BBEdit, but any plain text editor will do. I started the terminal, navigated to the Open2300 folder, and ran make. I'm not sure if I ran make install the first time through, but I don't see why that would be a problem. These days I compile in a separate directory and manually move the binaries to the location I'm using - /usr/local/bin/weather - but make install should move the binaries to /usr/local/bin if you don't change anything else in the makefile.

Once you've run make install and the WS2300 is hooked up you should be able to run /usr/local/bin/fetch2300 from the Terminal and get results back. It may take several seconds to complete as fetch2300 gets quite a bit of data. Assuming it works you can then go ahead with building a web site, installing mySQL or postgres if you want a database (I just use a log file at the moment). Kenneth's code is very readable, so you can build additional commands based on his code if you know C. Kenneth also includes a sample web page, but you'll want to change it so it meets your own needs more closely.

All the above is fairly sketchy, but I hope it helps.

-- PeterTattersall - 08 Mar 2006
Topic revision: r3 - 08 Mar 2006, PeterTattersall
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.