Allestimento base e accessori

annuncio pubblicitario
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.,
Un Netmaster versione SNAP,
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 SNAP o deve essere
cambiato l’indirizzo IP).
Quali sono le operazioni necessarie per iniziare lo sviluppo di applicazioni
Java su Netmaster SNAP ?
Quali sono le operazioni necessarie per il ricaricamento del Sistema
Operativo di SNAP ?
Nel presente documento riportiamo gli steps necessari per poter sviluppare
applicazioni in linguaggio Java su Netmaster II (versione SNAP).
a) Installare su PC la piattaforma Java 2, Standard Edition.
b) Installare su PC il Sistema Operativo SNAP.
c) Installare su PC le classi Java.
d) Accedere a Netmaster con FTP e TELNET.
Nel presente documento riportiamo gli steps necessari per caricare il S.O. su
una scheda SNAP. 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.
Installare la piattaforma Java 2, Standard Edition (J2SE)
a) Installare su PC il Sistema Operativo SNAP (vedere la Faq054 per i dettagli).
b) Trasferire il sistema operativo nella scheda SNAP.
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.
Trasferire il sistema operativo nella scheda SNAP.
La sottodirectory JRE presente in JAVA_HOME d'ora in poi la chiameremo
JRE_HOME.
Su PC lanciare bin\SnapDev.exe.
Installare su PC il sistema operativo SNAP
Scaricare dalla pagina Software Netsyst la versione desiderata del sistema
operativo SNAP (V. 1.0.0rc3 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 SNAP_HOME.
Installare su PC le classi Java
Scaricare dalla pagina Software Netsyst 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.
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 uncavo null-modem (esempio il ns cod. CBL054*000+CBL057**00),
avviare snapdev.exe (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:
ipconfig -a 192.168.0.130 -m 255.255.255.0 -C
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.
Alimentare Netmaster.
Settare la porta seriale:
Selezionare il menù File->Settings e selezionare la porta collegata a Netmaster,
assicurarsi che la velocità selezionata sia 115200bps (assicurarsi che nessun
altro programma stia usando la porta selezionata, altrimenti chiuderlo).
Il campo Transfer directory può essere lasciato com'è.
Aprire la porta seriale:
Selezionare il menù File->Open Port, Se l'apertura avviene correttamente lo
sfondo della finestra diventa bianca, in caso contrario rimane grigio e compare
un messaggio di errore.
Resettare il modulo SNAP:
Selezionare il menù File->Reset. Snapdev avvierà un applicativo, questa operazione richiede una decina di secondi durante i quali viene visualizzata un barra
di avanzamento. Se nessun modulo SNAP viene trovato, il programma andrà in
timeout dopo 30 secondi. Se il programma dovesse andare in timeout, provare
chiudendo e riaprendo la porta seriale ed a resettare nuovamente.
A questo punto potrebbe apparire un messaggio del tipo:
Error initializing filesystem: -32
SNAP loader v 0.0.1 (Build date: Dec 02 2002 13:50:44)
$
Nota: La linea Error initializing filesystem: -32 viene visualizzata
solo se la Flash non è formattata.
Al prompt "$" è possibile, digitando il comando "H<CR>", avere la visualizzazione dei comandi disponibili.
Tutti i comandi sono case insensitive, e solo il primo carattere di ogni linea è
interpretato come tale.
Nei casi in cui sono attesi un yes o no, questi sono trattati come case sensitive.
Formattare la Flash:
Prima di procedere al caricamento di qualsiasi programma, è necessario
formattare la memoria Flash. Si effettua ciò digitando il comando "F<CR>".
(Qualunque risposta eccetto "yes" (case sensitive), abortirà la procedura). La
procedura dura circa 10 secondi.
Download della configurazione base:
Digitare "L<CR>" al prompt, apparirà un dialog box. Selezionare il package
bin/baseconfig.snp. La configurazione base è necessaria solo la prima volta (o
quando la Flash è stata formattata). La configurazione base può essere
ricaricata anche in caso di dimenticanza della propria password o in caso di
sistema sconfigurato, e non più raggiungibile attraverso la connessione ethernet
o seriale. Il completamento della procedura richiede circa 5 secondi.
Download del Sistema Operativo:
Digitare "L<CR>" al prompt, apparirà nuovamente un dialog box. Selezionare la
versione di firmware SNAP da caricare (un file chiamato bin/snapRevX.snp,
dove 'X' corrisponde alla revisione hardware del modulo SNAP installato(1)). I
tempi per il completamento della procedura sono:
Download: 90 s
Calcolo Checksum: 20 s
Trasferimento in Flash: 90 s
Il sistema è ora pronto.
Uscire dallo SNAP loader digitando "R<CR>" al prompt.
Il sistema eseguirà un reboot, e verrà emesso un prompt di login dopo circa 10
secondi. Ora sarà possibile loggarsi nel modulo SNAP usando i parametri:
user: root
password: snap
(1) La revisione hardware(A, B o C) è stampigliata sulla SNAP PCB.
MNL124A100
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.,
A Netmaster (SNAP 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 SNAP operating system and/or to change Netmaster IP address).
Which are the necessary operations to begin the development of Java
applications on Netmaster SNAP ?
In this document we remind you the necessary steps to be able to develop
applications, in Java language, on a Netmaster II (SNAP version):
a) Install Java 2 Platform, Standard Edition (J2SE).
b) Install the SNAP Operating System.
c) Install the Java Classes.
d) Connect to Netmaster through FTP and TELNET.
Install Java 2 Platform, Standard Edition (J2SE)
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):
The subdirectory JRE present in the JAVA_HOME directory will be further
referred to as JRE_HOME.
Install the SNAP Operating System
Download from the page Software Netsyst the desired version of SNAP OS
(version 1.0.0rc3 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 SNAP_HOME.
Install the Java Classes
Which are the necessary operations to reload SNAP Operating System ?
In this document we remind you the necessary steps to be able to upload the
O.S. on a SNAP 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) Install the SNAP Operating System.
b) Transfer the O.S. to the SNAP board.
Transfer the firmware on the SNAP board
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.
Power on the Netmaster.
On the PC launch the bin\SnapDev.exe.
Set up the serial port:
Open File->Settings and choose the serial port that is connected to the
motherboard. The baud rate should be set to 115200 (make sure that no other
programs are accessing the serial port, these must be terminated, else snapdev
will be denied access to the serial port).
The Transfer directory setting can be left as it is at this stage.
Open the serial port:
Open the serial port by selecting File->Open Port. If the open is successful the
background of snapdev should turn white. If the open fails, the background will
stay gray and a popup window with an error message will occur.
Download from the page Software Netsyst 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.
Reset the SNAP module:
Select File->Reset. Snapdev should start loading an application, this takes
about 10 seconds, a progress bar is shown at the bottom of the dialog box when
the program is downloaded. If no SNAP module is available , snapdev will
timeout after 30 seconds.
Connect to Netmaster through FTP and TELNET
If the timeout is reached several times, try closing and reopen the serial port,
and then try resetting again.
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:
A line similar to the one below should appear:
192.168.0.121 and subnet mask 255.255.255.0.
Error initializing filesystem: -32
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.
SNAP loader v 0.0.1 (Build date: Dec 02 2002 13:50:44)
Otherwise, if you need to change the IP Address, you have two possibilities:
$
Note: The line Error initializing filesystem: -32 will only occur if the flash is
unformatted, and is normal at the first install.
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.
At the '$' prompt try entering "H<CR>", and all available commands are shown.
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 snapdev.exe (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.
In the cases where a yes or no is expected these are parsed as case sensitive.
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.
All commands are case insensitive, and it is only the first character on each line
that is interpreted as a command.
Format the Flash:
Before any software can be loaded on the flash, it must be formatted. The flash
is formatted by entering "F<CR>". (Any answer except "yes" (case sensitive),
will abort the format procedure). The format will take about 10 seconds.
Download the basic configuration:
Enter "L<CR>" at the prompt, and a dialog box should appear. Select the
bin/baseconfig.snp package The base configuration is only needed the first time
(or when the flash has been formatted). The baseconfig package can be
downloaded again if you forget your password, or the system is misconfigured
so it isn't possible to connect to it by ethernet or serial. When the download is
done, you will see one line per file that is updated. The whole update procedure
takes about 5 seconds.
Download the Operating System:
Enter "L<CR>" at the prompt, and the dialog box should appear again. Select
the version of the SNAP firmware you would like to run, a file named bin/
snapRevX.snp, where 'X' corresponds to the hardware revision identified (1).
The file is found in the bin directory. The timing values for this package are:
Download: 90 s
Checksum calculation: 20 s
Transfer to flash: 90 s
The system is now set up.
Exit the SNAP loader by entering "R<CR>" at the prompt.
The system will then reboot, and you will get the login prompt after about 10
seconds. You may now login on the SNAP board. Use the following settings:
user: root
password: snap
(1) The revision hardware(A, B o C) is printed on SNAP PCB.
MNL124A100
Scarica