Allestimento base e accessori

Transcript

Allestimento base e accessori
Allestimento base e accessori
•
•
•
•
•
•
Un personal computer dotato di scheda di rete sul quale sia installato un sistema operativo Microsoft Windows 95/98/2000/ME/XP/NT4.0., Linux o Solaris,
Un Netmaster versione TStik,
Un alimentatore 12÷24Vcc 1A
Un cavo ethernet incrociato (per collegamento punto-punto PC <-> NetMaster), oppure
Un cavo ethernet diritto + Hub (per collegamento PC <-> Hub <-> NetMaster)
Un cavo seriale null-modem, codici Elsist: CBL054*000 + CBL057**00 (necessari solo se deve essere aggiornato il sistema operativo della CPU TStik o deve essere
cambiato l’indirizzo IP).
Quali sono le operazioni necessarie per iniziare lo sviluppo di applicazioni
Java ?
Quali sono le operazioni necessarie per il ricaricamento del Sistema
Operativo di TStik ?
Nel presente documento riportiamo gli steps necessari per poter sviluppare
applicazioni in linguaggio Java su Netmaster.
Nel presente documento riportiamo gli steps necessari per caricare il S.O. su
una scheda TStik. Ricordiamo comunque che il S.O. è già precaricato su tutti i
Netmaster rilasciati dalla nostra fabbrica, quindi queste operazioni sono necessarie unicamente in caso si debba eseguire un upgrade al S.O. od in caso di
perdita dello stesso.
a)
b)
c)
d)
f)
Installare su PC la piattaforma Java 2, Standard Edition
Installare su PC le Java Communications API
Installare su PC il sistema operativo TINI
Installare su PC le classi Java
Accedere alla scheda TINI con FTP e TELNET
Installare la piattaforma Java 2, Standard Edition (J2SE)
Scaricare dal sito internet http://java.sun.com/j2se/1.4.2/download.html l'ultima
versione del J2SE DK per la piattaforma utilizzata. Installare il software Java
lanciando l'eseguibile autoscompattante. La directory base di questa installazione (esempio C:\PROGRAMMI\JDK1.4.2) d'ora in poi la chiameremo
JAVA_HOME.
La sottodirectory JRE presente in JAVA_HOME d'ora in poi la chiameremo
JRE_HOME.
Installare le Java Communications API
Scaricare dal sito http://java.sun.com/products/javacomm/downloads/index.html
il package in formato ZIP delle Java Communications API. Scompattare il
package in una directory (esempio C:\PROGRAMMI\JAVACOMM20) che, d'ora
in poi, chiameremo COMMAPI.
Ora occorre:
Copiare il file win32com.dll dalla directory COMMAPI alla directory
%JRE_HOME%\bin.
Copiare il file comm.jar dalla directory COMMAPI alla directory
%JRE_HOME%\lib\ext.
Copiare il file javax.comm.properties dalla directory COMMAPI alla directory
%JRE_HOME%\lib.
Installare su PC il sistema operativo TINI
Scaricare dalla pagina http://www.elsist.it/WebSite/Html/Italian/Products/Software/Netsyst/ItSwNsyst.php la versione desiderata del sistema operativo TINI
(V. 1.15 o superiore), scompattare e copiare i files in una directory situata nello
stesso percorso in cui si è installato il software jdk (esempio C:\PROGRAMMI);
la directory base di questa installazione d'ora in poi la chiameremo TINI_HOME.
a)
b)
c)
d)
Installare la piattaforma Java 2, Standard Edition
Installare le Java Communications API
Installare su PC il sistema operativo TINI
Trasferire il S.O. nella scheda TStik
Trasferire il Sistema Operativo nella scheda TStik
Per eseguire questa operazione avete bisogno di un cavo null-modem (es. nostri cod. CBL054*000+CBL057**00). Collegare il cavo alla porta "A" di Netmaster e, dall'altro lato alla porta RS-232 del vostro computer. E' molto importante
verificare le connessioni del cavo, dal momento che la maggior parte dei problemi in questa fase sono ad esso relazionati.
Alimentare Netmaster. Editare il programma JavaKit.bat presente nella directory TINI_HOME con le seguenti istruzioni:
@ECHO OFF
SET JAVA_HOME=C:\PROGRAMMI\JDK1.4.2
SET TINI_HOME=C:\PROGRAMMI\Swp010b000\TINI1.15
%JAVA_HOME%\BIN\JAVA -classpath %TINI_HOME%\BIN\TINI.JAR JavaKit -400 -flash 40
Lanciare JavaKit.bat. Dal programma "JavaKit", selezionare la COM a cui è
connesso Netmaster. Assicurarsi che la velocità selezionata sia 115200 e
premere il pulsante "OPEN PORT". Agendo sul pulsante "RESET" viene forzato
un reset alla scheda TStik, questa procedura avvia il "loader" che permette il
dialogo con la scheda ed il caricamento del firmware.
Nella finestra di testo del programma JavaKit apparirà:
DS80C400 Silicon Software - Copyright (C) 2002 Maxim Integrated Products
Detailed product information available at http://www.maxim-ic.com
Welcome to the TINI DS80C400 Auto Boot Loader 1.0.1
Ora occorre trasferire il sistema operativo nella memoria FLASH. Selezionare
dal menù File la voce Load File, e caricare il file:
%TINI_HOME%\bin\tini_400.tbin
Installare su PC le classi Java
Questa operazione durerà parecchi secondi.
Scaricare dalla pagina http://www.elsist.it/WebSite/Html/Italian/Products/Software/Netsyst/ItSwNsyst.php il software Sfr040*000, scompattare e copiare in
una directory situata nello stesso percorso in cui si è installato il software jdk
(esempio C:\PROGRAMMI). Questo software contiene tutte le classi java per la
gestione delle periferiche hardware di Netmaster, è presente inoltre una serie di
esempi che illustrano lo sviluppo di applicazioni su NETMASTER.
Ora occorre azzerare completamente le memorie FLASH e RAM, utilizzando i
comandi:
B0
(cambia il banco a 0)
F0
(scrive “0” in tutto il banco, ne cancella il contenuto)
Accedere a Netmaster con FTP e TELNET
Per poter collegare Netmaster ad una rete ethernet bisogna prendere atto che il
dispositivo viene fornito con l'indirizzo di IP preconfigurato:
192.168.0.121 e subnet mask 255.255.255.0
Se questa situazione è compatibile con la vostra rete locale, sarà solamente
necessario collegare la porta ethernet di Netmaster alla rete attraverso un Hub,
e sarete pronti per la connessione tramite telnet.
Altrimenti, se vi necessita dover cambiare l'indirizzo, avete due possibilità:
a) Collegare la porta ethernet del vostro PC a Netmaster direttamente attraverso un cavo "cross", collegarsi via telnet e cambiare l'indirizzo IP con il
comando ipconfig.
b) Collegare la porta seriale RS-232 del vostro PC alla porta "A" di Netmaster
attraverso un cavo null-modem (esempio i ns cod. CBL054*000+CBL057**00),
avviare JavaKit.bat (o qualunque programma terminale settato a 115200 bps,
parity none, 8 data bit, 1 stop bit) e cambiare l'indirizzo attraverso il comando
ipconfig.
Nota: l’ipotesi a) può essere utilizzata solo se si vuole cambiare l’indirizzo
partendo da una situazione di compatibilità.
Esempio per cambiare l'indirizzo IP :
ipconfig -a 192.168.0.130 -m 255.255.255.0
Se si vuole memorizzare l’indirizzo IP nella Flash Eprom, occorre aggiungere al
comando ipconfig, l’opzione -C:
Ora occorre trasferire l'interprete comandi nella memoria FLASH. Selezionare
dal menù File la voce Load File, e caricare il file:
%TINI_HOME%\bin\slush_400.tbin
Se tutto è stato caricato la scheda TINI è pronta per eseguire la Java VM e
l'interprete di comandi slush. Digitare il comando:
E
Sul terminale dovrebbe apparire un messaggio del tipo:
----> TINI Boot <---TINI OS 1.15 - Copyright (C) 1999 - 2004 Maxim Integrated Products
API Version: 9007
=
[ slush initialization complete. ]
Hit any key to login.
Digitando un "RETURN" verrà visualizzata la versione dello slush e la richiesta
del login e della password, con un messaggio del tipo:
Welcome to slush. (Version 1.15)
TINI login:
TINI password:
Esistono due account di default: "guest" con password "guest" e "root" con
password "tini". Per avere accesso alla configurazione della scheda occorre
effettuare il login come "root". Effettuato il login apparirà il prompt dello slush
con un messaggio del tipo:
TINI />
Digitare "help" per ottenere un elenco dei comandi disponibili, utilizzando
"help+comando" si ottiene un aiuto dettagliato del comando specifico.
ipconfig -a 192.168.0.130 -m 255.255.255.0 -C
MNL109B100
Basic equipment and accessories
•
•
•
•
•
•
A PC equipped with ethernet card; on PC must be loaded one of the following operating systems: Microsoft Windows 95/98/2000/ME/XP / NT4.0., Linux or Solaris,
A Netmaster (TStik version),
A power supply device with 12÷24Vdc 1A output voltage capability,
A crossed ethernet cable (for point-to-point PC <-> NetMaster” connection only) or alternatively,
An uncrossed ethernet cable + Hub ( for PC <-> Network <-> NetMaster connection only),
A null modem serial cable, Elsist code CBL054*000+CBL057**00 (It is necessary only for upgrade the TStik operating system and/or to change Netmaster IP address).
Which are the necessary operations to begin the development of Java
applications ?
In this document we remind you the necessary steps to be able to develop
applications, in Java language, on a Netmaster:
a)
b)
c)
d)
f)
Install Java 2 Platform, Standard Edition (J2SE)
Install Java Communications APIs
Install the TINI Operating System
Install the Java Classes
Connect to Netmaster through FTP and TELNET
Which are the necessary operations to reload TStik Operating System ?
In this document we remind you the necessary steps to be able to upload the
O.S. on a TStik board. Please note that the O.S. is still loaded on all Netmaster
released by our factory, so these operations are needed only if you need to
upgrade the O.S. or in case of loosing data.
a)
b)
c)
d)
Install Java 2 Platform, Standard Edition
Install Java Communication APIs
Install the TINI Operating System
Transfer the O.S. to the Tini board
Install Java 2 Platform, Standard Edition (J2SE)
Transfer the firmware on the TStik board
Get the latest release of the Java 2 Software Development Kit for your
operating system from http://java.sun.com/j2se/1.4.2/download.html. Install
the Java 2 software. The base directory of this installation will be further
referred to as JAVA_HOME. This is the directory where you should find these
files (when a typical installation is done):
To make this operation you need a null-modem cable (i.e. our codes
CBL054*000+CBL057**00). Connect the cable to port "A" of Netmaster and the
other side of cable to the RS-232 port of your computer. It is very important to
check your cable since the majority of communication problems are related to
that. Attach power to the Netmaster. Jump to your TINI_HOME and modify the
JavaKit.bat file with this line in it.
@ECHO OFF
SET JAVA_HOME=C:\PROGRAMS\..\JDK1.4.2
SET TINI_HOME=C:\PROGRAMS\..\Swp010b000\TINI1.15
%JAVA_HOME%\bin\java -classpath %TINI_HOME%\bin\tini.jar JavaKit 400 -flash 40
The subdirectory JRE present in the JAVA_HOME directory will be further
referred to as JRE_HOME.
Install Java Communications APIs
Download the Java Communications API implementation from the site http://
java.sun.com/products/javacomm/downloads/index.html. Unzip the package
in a directory (such as C:\PROGRAMMI\JAVACOMM20). The directory where
you unzip the files will be subsequently referred as COMMAPI.
Now you will:
Copy win32com.dll from COMMAPI to your %JRE_HOME%\jre\bin directory.
Copy comm.jar from COMMAPI to your %JRE_HOME%\jre\lib\ext directory.
Copy javax.comm.properties from COMMAPI to your %JRE_HOME%\jre\lib
directory.
Install the TINI Operating System
Download from the page http://www.elsist.it/WebSite/Html/Italian/Products/
Software/Netsyst/ItSwNsyst.php the desired version of Tini OS (version 1.15
or superior), unzip and copy the files in a directory located on the same path
where the jdk package is installed. (ie C:\PROGRAMS). This directory will be
subsequently referred as TINI_HOME.
Install the Java Classes
Download from the page http://www.elsist.it/WebSite/Html/Italian/Products/
Software/Netsyst/ItSwNsyst.php the software Sfr040*000, unzip and copy the
files in a directory located on the same path where the jdk package is
installed. (ie C:\PROGRAMS). This software contains all the java classes to
manage the Netmaster I/O hardware, some examples are also available to
show how to develop applications on Netmaster.
Connect to Netmaster through FTP and TELNET
To be able to connect to the Netmaster by the Ethernet network, you must
knowledge that Netmaster is factory set to the following IP Address:
192.168.0.121 and subnet mask 255.255.255.0
If this situation is compatible with your Local Area Network, you need only to
connect the Ethernet port of Netmaster to an Hub, and you are ready to establish a telnet connection with it.
Otherwise, if you need to change the IP Address, you have two possibilities:
a) Connect your PC to Netmaster through a cross ethernet cable (point-topoint) and then connect via telnet and change the original IP Address with the
command ipconfig.
b) Connect your PC RS-232 Port to Netmaster port "A" through a null modem
cable (i.e. our codeS CBL054*000+CBL057**00), start JavaKit.bat (or any
terminal program set to 115200 bps, parity none, 8 databit, 1 stop bit) and
then change the original IP Address with the command ipconfig.
Note: the case a) may be useful if you desire to change the address starting
from a compatible situation.
Example for change the IP Address:
ipconfig -a 192.168.0.130 -m 255.255.255.0
If you need to store the IP address permanently into Flash Eprom, you must
add the option -C to the ipconfig command:
ipconfig -a 192.168.0.130 -m 255.255.255.0 -C
This runs JavaKit, the program you will use to interact with your TStik Board.
You will use JavaKit often, so a batch file saves time. Double-click the batch file
you have just created. If everything was installed properly, you should be able to
scroll through the combo box at the bottom and see the COM ports you have on
your computer.
In JavaKit, select the COM port you will be using for the serial I/O. This is
whatever COM port you have attached your adapter to on your computer. Make
sure the speed is selected as 115200. Press the OPEN PORT button. When the
RESET button becomes enabled, hit it. This sends a reset signal to the TINI
Board. The reset circuitry of the TStik Board is connected to the DTR signal of
the RS232 cable. By hitting reset, JavaKit generates a short pulse on the DTR
line so that the board is going into the power on reset internal procedure. This
procedure starts the "loader" that allows us to communicate with the board and
download the firmware.
In the text area above a prompt should appear along with the words:
DS80C400 Silicon Software - Copyright (C) 2002 Maxim Integrated Products
Detailed product information available at http://www.maxim-ic.com
Welcome to the TINI DS80C400 Auto Boot Loader 1.0.1
Now you need to transfer the OS into the TINI Flash EPROM:
From File menu select Load File and load the file:
%TINI_HOME%\bin\tini_400.tbin
This operation will take some second.
Next, clear the heap by doing the following:
B0
(changes to bank 0)
F0
(fills bank 18 with 0's, effectively erasing it)
From File menu select Load File and load the file:
%TINI_HOME%\bin\slush_400.tbin
If everything is loaded, the TStik board is ready to execute the Java VM and the
slush command interpreter. Type the command:
E
You should see output similar to:
----> TINI Boot <---TINI OS 1.15 - Copyright (C) 1999 - 2004 Maxim Integrated Products
API Version: 9007
=
[ slush initialization complete. ]
Hit any key to login.
Press "RETURN", the slush version and a login request will be prompted:
Welcome to slush. (Version 1.15)
TINI login:
TINI password:
There are two default accounts on this revision of slush, 'guest' with the
password 'guest' and 'root' with the password 'tini'. Login with the account root,
you should see the output:
TINI />
Type "help" to get help. Type "help+command" to have help on a specific command. Try "help ipconfig" for example.
MNL109B100