Charon I - SNMP I/O Thermometer - First stepsThere is a chance to program a lot of SNMP applications in C language
and our development kit „Web51 ANSI C – SNMP“ contains many examples,
which helps you to get in quickly.
|
||||||||
| Charon I DK | (Development Kit) is a simple and cheap development kit, which you can use for testing and also for a final application. It contains only a basic peripherals, it doesn’t have the shift registers. |
| Charon I&II DB | (Development Board) is a development kit, which contains direct
inputs and outputs, shift registers for external inputs/outputs,
LCD display connection and direct 1-Wire output. Charon I&II DB also contain peripherals, which are supported only by Caron II module. (second serial RS-232 link, JTAG, SERIAL FLASH up to 4 MB, ISP programming interface..). |
These two development boards might be use for testing, but finally they should be used as a final solution, especially the second one because of it’s peripherals possibilities. Anyway, the module should be used in any basic board, which contains the galvanical Ethernet separation and power supply.
The RS-232 parameters are set by SNMP, in our case from JAVA application. All the incomming data are sent es a SNMP trap.
The 1-Wire thermometers are detected automatically after power on.
The thermometers are detected after power on or during the program running so you can reconnect any 1-Wire thermometer and it will be found by the system. You have to specify, which thermometer are you going to use by the thermometer’s index in JAVA application. The thermometers are sorted by it’s ID.
Upload
SNMP firmwareYou should download the FLIP from official web pages of Atmel's company
or you should download an older, stable version Atmel FLIP 1.6.
You can find the PSEN jumper's position on the development board (Charon I&II DB on the left side- the bottom position „Forced“, Charon I DK under the LINK and POWER LEDs).
Since you have connected the PSEN jumper, switch the power supply on. Select the processor type (Device => Select => T89C51RD2) in the Flip program and open the firmware file with the HEX extension.
Set the RS-232 programming port (Settings => Communication =>
RS-232). If there was an error displayed, check the PSEN jumper position,
or check the serial cable type (3 wire, RX, TX, GND) (if you are using
Charon I&II DB, check the RESET jumper position - must be
in x51 pos. and reset the module).
Start any type of serial terminal (TeraTerm, Terminal), or we should recommend you to use our „Ethernet Converter SETUP“,which you can download from DOWNLOAD page on www.HWgroup.cz.
Set the serial port parameters to 9600 Bd 8N1, no handshake, in the Terminal application. Be sure you have connected the SETUP jumper and PSEN jumper is disconnected. Reset the module than.
| ATTENTION |
|---|
| After each firmware upload, you must make RESET all the module's SETUP parameters to default. The internal EEPROM must be initialized by this way. Otherwise, the module does not work properly. |
Make this command:
d ... load default setupAfter the setup is reinitialized, set the IP address, Gateway, Mask and „target trap adress“.
t ... enter target trap addressTarget trap adress is and address, where all the UDP packets with SNMP traps will be sent. This address is the only one, which should communicate with the module. Probably you will set your own IP address here.
If you are ysing DHCP server, or you can't remember the IP address, run the „IPconfig“ in command line – The Windows System will write DNS, IP, MASK and GATEWAY. The other properties are 0.0.0.0 = OFF (do not send any UDP packets), 255.255.255.255 = UDP broadcast.
v ... set port valueThis command defines the I/O port's value after power on. You can define for example switching off some devices after the system restart. The value is a decimal value in range 0..255
p ... switch port typeThis command changes the ports properties. The direct means the direct port access (you can have only one 8bits I/O port). The shifted property is used with the shift registers and 1-Wire thermometers. If you are using Charon I&II DB do not forget to set the version.
s ... Web51 system infoThis command displays the actual network parameters (MAC, IP, GW, MASK)
If you have finished your settings, disconnect the SETUP jumper and reset the module. There will be displayed:
EEPROM loading, preserving MAC, gettingin the serial terminal window.
We have set all the Modules parameters now. The next step is to install and application, which can communicate with the module via SNMP. You should use any SNMP client or browser, or if you are beginner or you don't want to develop your own application, you should try our JAVA app. „Thermometer“. This JAVA app. will show you all in graphics and you can use it to set up the module
You can download the last versin of JAVA Thermometer application from: http://www.dfsoft.cz/Charon/
You have to install the JAVA SDK or JRE, if you would like to work with a JAVA application. This is not a part of windows, so you can download it from the web: http://java.sun.com/products/javawebstart/download-windows.html
After that you have installed the JAVA support on your computer, you can just only click on the .jar file. You can run the application also from the previous web page.
There is a file named „charon_properties.txt“, which is used for setting up the modules parameters. The file's structure is the following:
max=50 graph_time=1 min=-20 timeout=5000 IP=192.168.6.16
The Application uses a freeware Westhawk, which is an JAVA SNMP implementation for JAVA applications.
Before you run the JAVA application, set the Charon module's IP address in the text file.
If
you haven't set the IP address in the text file correctly, the application
can't find your Charon module. You can set the IP address also in „Options
=> Host IP“ menu, together with the SNMP timeout, after witch the SW
outputs an SNMP communication error. You can also set the graph parameters
in the "Options" menu. Vyzkoušejte alarmy – Set the upper temperature limitation (the red sign) to the for instance 31°C and keep the temperature sensor in your hand. The Temperature goes up and after the alarm value is excited, the Alarm will be displayed:
04:35:07 [0] '31.13 °C' Temperature High from 192.168.6.16“
A note : If your normal temperature is for example 32 – 36 °C you might try to set the lower limitation alarm for example 15°C and a pice of ice
The advanced property is „Allowed IP address range“. It is an address range, which is used for the module's communication. The range is defined by the IP address and it's Mask as in the classical networks for the local communication resolution/gateway communication.
This menu is for setting up the RS-232 serial link on the module. The „serial timeout“ is for setting up the packet making algorithm which packets the continious data flow from the RS-232 link and sends the packets to the Ethernet network. The parameter defines the maximum space length after the last received character. After that this time is excited, the module makes a packet and sends to the network. The timeout is entered in characters. It is because of the baud rate changes. There is no need to change this timeout, if you have changed the baud rate of the RS-232 serial link.
If the Baud rate is 9600 Bd, serial timeout = 7 and there is a continious packet of 15 characters incoming, the module waits after the last character 7ms (7ms= 7 characters in 9600Bd) and than sends the whole packet of 15 characters to the Ethernet as a trap.
Note: All the parameters, which were set remotely are also
stored to the internal EEPROM, so they are available and read by the
application (using SNMP) also after the applications restart.
The described applications has no support for the LCD display connectivity or A/D converters, which are supported by the CharonI&II Development Board.
If you would like to use any other SNMP Client application, you will need a MIB table for the Charon module. You can get this table in the original ANSI C - SNMP Development System“ directory or you can download it together with the .HEX file and with the sThermometer.jar application.
If you would like to test the firmware, you can use any SNMP Client. You have to load the .MIB file into the same directory as your SNMP client was installed to. Than you have to compile this table to the list of MIB tables in your Client. After the whole installation is done well, the SNMP client will find the Web51 device and display the tree with the module’s variables.
You
can use a development kit ANSI C - SNMP Development Systém for
the x51 hardware (not only the Charon modules), which contains solved
examples, an easy MIB table generator and so on. Detailed informations
are available on http://Web51.HW.cz.
| Main page | Products | Support & Download | Pricelist | Contacts | SiteMap |