LS24I/M Device (O.S.) User’s Guide

LS24I/M

Identifier: LS24I/M Document Version: 02.00 Effective Date: 11/02/2015 Document Catalog Number: LS24I-M_OS_0200 Author: Michele De Monte Technical review: Vedran Jukic Approval: Angelo Pingue

Sept, 2015 LS24I/M User guide 2 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Table of Contents

Table of Contents ...... 3 Revision History ...... 5 Preface...... 6 1. General elements ...... 7 1.1. Forwards ...... 7 1.1. Definitions ...... 8 1.2. Intended Use ...... 8 1.3. Warnings, Precautions and Notes ...... 9 1.3.1. Warnings ...... 9 1.3.2. Precautions ...... 9 1.3.3. Notes ...... 10 1.1. Labelling ...... 10 1.2. Controls and Indicators ...... 10 1.2.1. Led Indicators ...... 10 1.2.2. Audio indicators ...... 11 1.3. ServerNet’s Responsibilities ...... 11 2. LS24I/M features(*) ...... 12 3. LS24I/M Overview ...... 12 3.1. LS24I front connectors ...... 12 3.2. LS24M front connectors ...... 12 3.3. LS24I/M rear connectors ...... 13 4. Important preliminary operations ...... 13 5. Starting with LS24I/M ...... 13 6. Using LS24I/M ...... 15 6.1. ON/OFF button ...... 15 6.2. LAN ports ...... 15 6.3. Wireless communication ...... 15 6.3.1. LAN/WLAN setup parameters ...... 15 6.3.2. 3G/UMTS/GPS setup parameters ...... 16 6.4. USB host device port ...... 16 6.5. Serial ports ...... 16 3 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 7. Accessing the device ...... 18 7.1. Device access and login ...... 18 7.1.1. Device access using LAN port and SSH terminal: factory defaults ...... 18 8. LS24I/M OS use and configuration ...... 20 8.1. LS24I/M Basic configuration ...... 20 8.1.1. Network ...... 21 8.1.2. WiFi ...... 29 8.1.3. Serial COM ports ...... 40 8.2. ADC (Analog to Digital Converter) script for battery, USB power and External Power source ...... 41 8.2.1. Battery ...... 41 8.2.2. USB type B power ...... 42 8.2.3. External power source (only for LS24I) ...... 42 8.3. Light, sound and On/OFF button complete control...... 42 8.3.1. Port LED control ...... 42 8.3.2. Audio Buzzer control ...... 43 8.3.3. ON/OFF push button control ...... 43 8.4. Node.JS writing of a basic Configuration (HelloWorld) ...... 44 8.5. Configuration loading ...... 45 8.6. Configuration deleting ...... 45 8.7. Configuration Handling, Reporting, updating ...... 45 8.8. Reading and writing from MicroSD ...... 46 9. System recovery ...... 46 10. Service and disposal ...... 46 11. User manual download ...... 46

Sept, 2015 LS24I/M User guide 4 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Revision History

Version Date Changes Author 01.00 Sept,11,2015 LS24M Operating System user manual De Monte 02.00 Nov, 02,2015 Update with UL request for warnings for IT- De Monte Network devices 02.01 Nov, 18,2015 User manual download link added, minor De Monte language changes

5 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Preface

Thank you for choosing our LS24I or LS24M version device for your network controlled implementations. Setup operations was designed to allow you to start using your device in the shortest time possible.

Nevertheless, it’s fundamental for a responsible and reliable use of this device to read carefully both the Device Operating System User’s Guide and Device User’s Guide before starting and using device in both versions. This manual is intended to provide information for the proper operation with the Operative System of both LS24I and LS24M version. If no restriction is reported, it refers to both device versions; otherwise it refers to the corresponding mentioned device version.

IMPORTANT: Medical grade routing and computing device models LS24I and LS24M are: MEDICAL - GENERAL MEDICAL EQUIPMENT AS TO ELECTRICAL SHOCK, FIRE AND MECHANICAL HAZARDS ONLY IN ACCORDANCE WITH: ANSI/AAMI ES60601-1 (2005) + AMD 1 (2012), CAN/CSA-C22.2 No. 60601-1 (2014)

E477923

IMPORTANT: Before starting the configuration of your LS24I/M be sure that the battery is fully charged.

Sept, 2015 LS24I/M User guide 6 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 1. General elements

1.1. Forwards

This manual is intended to provide information for the proper operation with the Operative System of both the LS24I and the LS24M. DO NOT OPERATE THIS SYSTEM BEFORE READING CAREFULLY THESE INSTRUCTIONS. LS24I and LS24M are intended to be setup, installed, serviced and mainteined only by qualified personnel authorized by ServerNet after specific training sessions. DO NOT OPERATE THESE ACTIVITIES IF YOU DO NOT HAVE ATTENDED TO THE REQUIRED QUALIFYING TRAINING SESSIONS. LS24I and LS24M does not contain any user-serviceable parts. DO NOT REMOVE DEVICE COVER. Refer servicing to qualified and ServerNet authorized personnel only. Final user personnel must refer to third part configuration documentation to know how to operate with the device during the specific implemented running mode. For additional information or assistance about the device and its operating system please contact:

ServerNet S.r.l. Località Padriciano, 99 34149 Trieste (Italy) http://www.servernet.it e-mail: [email protected]

7 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 1.1. Definitions

ServerNet S.r.l.: in the document may be referred to herein also as ServerNet LS24I/M: indicates both device models. Warning: is provided if there is a reasonable evidence of an association of a serious personal hazard with device use. Precaution: is provided when any special care is to be exercised by the practitioner to avoid causing damage to this device or other property. Note: can be provided when extra general information is applicable. Hardware: indicates LS24I/M Operating system or OS: indicates the basic unchangeable software installed into each hardware with the basic functions of loading Configurations including set of parameters, data and instructions required to implement specific functionalities. Configuration: any third part set of device parameters and data to be loaded on the hardware to allow its fine controlling, management, data query, data collection and data transfer from/to other electronic devices and systems. 7-30V DC: refers to a power source with 7-30V DC with power of 5W or higher.

1.2. Intended Use

The LS24I and LS24M are general routing and computing devices intended for use in data query, data collection and data transfer from/to other electronic devices. LS24I/M can operate from bedside and point of care, medical devices and clinical information management systems either directly or through networks with independent bedside devices. LS24I/M support routing a computing interface with devices connected to their connectors, but do not provide by themselves data query, collection and transfer. To do this they require specific Configurations to be loaded.

Sept, 2015 LS24I/M User guide 8 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Third part specific Configurations are required, must be loaded and are responsible for services such as device recognition, data query, collection, interpretation, management, transmission and reception. For more information about intended use refer to the Device User’s Guide of your device.

1.3. Warnings, Precautions and Notes

Please read and adhere to the following list of warnings, precautions, and notes.

1.3.1. Warnings

IMPORTANT. LS24I/M is an IT-Network device: connecting it to an IT-network that includes other equipment could result in previously unidentified risks to Patients, Operators or third parties. The Responsible Organization should identify, analyze, evaluate, and control these risks. Subsequent changes to the IT-network could introduce new risks and rquire additional analysis; and changes in the IT-network include:  changes in the IT-network configuration;  connection of additional items to the IT-network;  disconnecting items from the IT-network;  update of equipment connected to the IT-network;  upgrade of equipment connected to the IT-network. For information about warnings you must refer to the Device User’s Guide of your device.

1.3.2. Precautions

For information about precautions you must refer to the Device User’s Guide of your device.

9 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 1.3.3. Notes

For information about notes you must refer to the Device User’s Guide of your device.

1.1. Labelling

In the device certification labels is indicated the freezed OS release installed on the device. For more information about labelling refer to the Device User’s Guide of your device.

1.2. Controls and Indicators

LS24I/M is designed to be ON and running when connected to an external power source. That’s why connecting the device to a USB power source plugging the USB A to B power cable connectors, or plugging the power cable into the 7-30V DC power connector, the device wakes up immediately, loads the OS and the Configurations previously loaded. For more information about labelling refer to the Device User’s Guide of your device.

1.2.1. Led Indicators

For more information about led indicators with only the OS installed without any third part Configuration loaded refer to the Device User’s Guide of your device. When a third part Configuration is loaded on the LS24I/M, it is used by the OS to set all the parameters required to implement specific device functionalities. In this case, COM led indicator meanings can be completely mapped by the third part Configuration. Refer to the following chapter 8.3.1 for led control and programming. Refer to third part Configuration specific documentation from the Configuration distributor to know COM indicator mapped on hardware running mode.

Sept, 2015 LS24I/M User guide 10 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

1.2.2. Audio indicators

LS24I/M includes an audio buzzer. Sound indicator is not used in any part of OS boot and running without Configurations. Refer to the following chapter 8.3.2 for audio buzzer control and programming. Refer to third part Configuration specific documentation from the Configuration distributor to know audio buzzer indicator mapped on hardware running mode.

1.3. ServerNet’s Responsibilities

ServerNet is responsible for the LS24I/M safety, reliability and performance while the following is met:  Readjustments or repairs or maintenance are carried out by ServerNet authorized and qualified personnel  The equipment is used in accordance with instructions and intended use.

11 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 2. LS24I/M features(*)

For information about LS24I/M features refer to the Device User’s Guide of your device.

3. LS24I/M Overview

3.1. LS24I front connectors

Status LED USB B 7-30V LAN1 LAN2 USB 2.0 multi color pwr DC pwr

On/Off

3.2. LS24M front connectors

Status LED USB B LAN1 LAN2 USB 2.0 multi color pwr

On/Off

Sept, 2015 LS24I/M User guide 12 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 3.3. LS24I/M rear connectors

WiFi COM1 COM2 COM3 COM4 WiFi/BT

COM LED multi color

4. Important preliminary operations

Before starting the Configuration of your LS24I/M be sure that the battery is fully charged. Do this also if your device was inactive/configured for more than 3 months. Put it in charge with a wall power adapter and wait until the battery led will switch off (fully charged). IMPORTANT: To allow a longer life of your device battery, put in charge all your inactive devices every 3 months until battery led will switch off.

5. Starting with LS24I/M

This device is a network controlled routing and computing device: no typical I/O device operates or have meaninful use with the device (like monitor, keyboard, mouse, audio). LAN/COM/USB(host) ports are only for data exchange and/or communication purposes. Device can be remotely monitored as explained in the following session “Using LS24I/M” in chapter 6. No video signal can be received/listened directly from this kind of device.

13 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Only Status led is designed to give feedbacks while in OS loading or in running mode. Since LS24I/M generally works together with other external devices, LS24I/M is designed to be ON and running when it has USB B or 7-30V DC power source active. For more information about starting with LS24I/M refer to the Device User’s Guide of your device.

Sept, 2015 LS24I/M User guide 14 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 6. Using LS24I/M

6.1. ON/OFF button

LS24I/M ON/OFF button controls the system power state. Refer to chapter Error! Reference source not found. for details about this topic.

6.2. LAN ports

LS24I/M includes two RJ45 Ethernet ports to be used:  to remotely control your device  to integrate Ethernet devices into your data collection network  to send/receive data to/from data management external systems  to make bridges between separated LAN networks When a device is connected to the LAN port, the related led start blinking green indicating IP connectivity. If there is a connection issue, then the yellow led will either be solid or flashing.

6.3. Wireless communication

The LS24I/M can include a set of radio modules to allow different wireless communication standards. Essentially wireless communication can tipically include:  WiFi 802.11 b/g/n 150 Mbps  BT 4.0, 3.0, 2.1 + EDR

 3G/UMTS radio module (replaces WiFi Module)

6.3.1. LAN/WLAN setup parameters

Default initial LS24I/M network LAN/WLAN setup have the following parameters:  LAN1: 192.168.0.111/24 (eth0)  LAN2: 192.168.250.10/24 (eth1)

15 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M  WLAN: DHCP for open AP Both for LAN1 and for LAN2 and for WiFi MAC number structure is related to device S/N as follows: for the S/N LS24-XX-nnnn:  MAC # LAN1: AC:06:C7:YY:YY:YY  MAC # LAN2: AC:06:C7:YY:YY:YY  MAC # WLAN: AC:06:C7:YY:YY:YY

6.3.2. 3G/UMTS/GPS setup parameters

Default initial LS24I/M network 3G/UMTS/GPS setup have the following parameters:  ttyACM0: modem control  ttyACM1: data  ttyACM2: GPS data

6.4. USB host device port

LS24I/M integrates a USB (host) port to connect USB devices like webcam, microphones, barcode reader, external storage, additional network cards, wifi, BT, … From these devices system allows you to collect data, format and transmit to a specific destination using LAN or WLAN channels.

6.5. Serial ports

To collect data from serial devices, COM ports can be used. Refer to the following picture for a pinout assignement.

Sept, 2015 LS24I/M User guide 16 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Connect the RJ45 serial cable to one of the 4 ports. A corresponding COM led turns on red until the system recognizes the device and loads the correct driver for data acquisition. IMPORTANT. COM use is managed by third part Configurations that can be installed on the hardware. If device has only OS installed, the COM led can only turn red. Refer to third part Configuration specific documentation from the Configuration distributor to know COM indicator map on running mode.

17 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 7. Accessing the device

7.1. Device access and login

You can access the device using:  LAN1 port or  LAN2 port or  USB B port only for test purposes following the related device test WIF. To access and setup your LS24I/M using any LAN port you need:

 a LAN cable (optional: not provided by ServerNet)  SSH terminal software intalled on your PC (for example Putty) To access and test your LS24I/M using USB B port you need to follow the related WIF.

7.1.1. Device access using LAN port and SSH terminal: factory defaults

Connect an Ethernet cable into any LAN port. Connect then the other connector to your network switch or to your PC Ethernet port. Of course, this can be made if your Ethernet/PC are set-up on the same subnetwork of the box. Open your terminal software (for example Putty), connect using SSH to default IPs:  if you’re using the LAN1 port: 192.168.0.111/255.255.255.0  if you’re using the LAN2 port: 192.168.250.10/255.255.255.0 using the following default login parameters:  Username: root  : sn.ls24 The username/password specs could and should be different in specific installations, threfore assure you get the right login credentials from your system administrator. A console setup will be shown.

Sept, 2015 LS24I/M User guide 18 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

19 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 8. LS24I/M OS use and configuration

This part of the user guide allows you to perform:  Basic configuration for: o Network o WiFi o Serial COM ports  ADC script for: o Battery o USB o External power source  Complete control of: o Port led o Buzzer o ON/OFF push button  Node.JS writing of a basic Configuration (HelloWorld)  Configuration loading  Configuration deleting  Reading and writing from MicroSD For any other information requirement you can refer to the standard documentation available on the internet and also on the ServerNet download web site: http://www.servernet.it/web/support

8.1. LS24I/M Basic configuration

After the secure login trough SSH port and protocol (default LAN1 is 192.168.0.111/255.255.255.0 and default LAN2 is 192.168.250.10/255.255.255.0), with the default UN: root, and default PW: sn.ls24 (or eventually different if specific for your installation: ask to your system administrator), the LS24 can be setup and programmed according to similar LINUX distributions from adequate configuration files, following standard LINUX guidelines and rules. Some of that basic and extended configuration might be available trough additional Configuration packages available from your system administrator, witch in turn had obtained them from ServerNet Sept, 2015 LS24I/M User guide 20 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Configuration Library. Those Configuration might use User Friendly, Web or Central Configuration utilities and the use of each is usually carefully selected, documented and distributed trough your organisation network. In the following paragraphs only the basic configuration will be explained and documented.

8.1.1. Network

All network basic configuration: IP, MASK, Default Gateway, DHCP and similar, for all Network Interfaces, such as LAN1, LAN2, WiFi, USB CDC Client, optional USB Wired or Wireles networks, PPP, Tunneling, VPN has to be configured trough the

/etc/network/interfaces

Configuration file. Following the samle of the configuratin file:

# Configure Loopback

auto lo iface lo inet loopback

auto eth0 iface eth0 inet dhcp

auto eth1 iface eth1 inet static address 192.168.0.90 netmask 255.255.255.0 gateway 192.168.0.1

auto usb0 iface usb0 inet static address 192.168.80.2 netmask 255.255.255.0

21 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M An example of the ‘interface’ documentation is provided here for reference, but the user should look for ‘man interface’ documentation for linux distribution:

/etc/network/interfaces contains network interface configuration information for the ifup(8) and ifdown(8) commands. This is where you configure how your system is connected to the network.

Lines starting with ‘#’ are ignored. Note that end-of-line comments are NOT supported, comments must be on a line of their own.

A line may be extended across multiple lines by making the last character a backslash.

The file consists of zero or more "iface", "mapping", "auto" and "allow-" stanzas. Here is an example.

auto lo eth0 allow-hotplug eth1

iface lo inet loopback

mapping eth0 script /usr/local/sbin/map-scheme map HOME eth0-home map WORK eth0-work

iface eth0-home inet static address 192.168.1.1 netmask 255.255.255.0 up flush-mail

iface eth0-work inet dhcp

iface eth1 inet dhcp

Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) Physical interface names should follow the word "auto" on the same line. There can be multiple "auto" stanzas. ifup brings the named interfaces up in the order listed.

Lines beginning with "allow-" are used to identify interfaces that should be brought up automatically by various subsytems. This may be done using a command such as "ifup --allow=hotplug eth0 eth1", which will only bring up eth0 or eth1 if it is listed in an "allow-hotplug" line. Note that "allow-auto" and "auto" are synonyms.

Stanzas beginning with the word "mapping" are used to determine how a logical interface name is chosen for a physical interface that is to be brought up. The first line of a mapping stanza consists of the word "mapping" followed by a pattern in shell glob syntax. Each mapping stanza must contain a script definition. The named script is run with the physical interface name as its argument and with the contents of all following "map" lines (without the leading "map") in the stanza provided to it on its standard input. The script must print a string on Sept, 2015 LS24I/M User guide 22 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M its standard output before exiting. See /usr/share/doc/ifupdown/examples for examples of what the script must print.

Mapping a name consists of searching the remaining mapping patterns and running the script corresponding to the first match; the script outputs the name to which the original is mapped.

ifup is normally given a physical interface name as its first non-option argument. ifup also uses this name as the initial logical name for the interface unless it is accompanied by a suffix of the form =LOGICAL, in which case ifup chooses LOGICAL as the initial logical name for the interface. It then maps this name, possibly more than once according to successive mapping specifications, until no further mappings are possible. If the resulting name is the name of some defined logical interface then ifup attempts to bring up the physical interface as that logical interface. Otherwise ifup exits with an error.

Stanzas defining logical interfaces start with a line consisting of the word "iface" followed by the name of the logical interface. In simple configurations without mapping stanzas this name should simply be the name of the physical interface to which it is to be applied. (The default mapping script is, in effect, the echo command.) The interface name is followed by the name of the address family that the interface uses. This will be "inet" for TCP/IP networking, but there is also some support for IPX networking ("ipx"), and IPv6 networking ("inet6"). Following that is the name of the method used to configure the interface.

Additional options can be given on subsequent lines in the stanza. Which options are available depends on the family and method, as described below. Additional options can be made available by other Debian packages. For example, the wireless-tools package makes available a number of options prefixed with "wireless-" which can be used to configure the interface using iwconfig(8). (See wireless(7) for details.)

Options are usually indented for clarity (as in the example above) but are not required to be.

IFACE OPTIONS The following "command" options are available for every family and method. Each of these options can be given multiple times in a single stanza, in which case the commands are executed in the order in which they appear in the stanza. (You can ensure a command never fails by suffixing "|| true".)

pre-up command Run command before bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface as configured, prints an error message, and exits with status 0. This behavior may change in the future.

up command

post-up command Run command after bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface as configured (even though it has really been configured), prints an error message, and exits with status 0. This behavior may 23 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M change in the future.

down command

pre-down command Run command before taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured (even though it has not really been deconfigured), and exits with status 0. This behavior may change in the future.

post-down command Run command after taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured, and exits with status 0. This behavior may change in the future.

There exists for each of the above mentioned options a directory /etc/network/if-

All of these commands have access to the following environment variables.

IFACE physical name of the interface being processed

LOGICAL logical name of the interface being processed

ADDRFAM address family of the interface

METHOD method of the interface (e.g., static)

MODE start if run from ifup, stop if run from ifdown

PHASE as per MODE, but with finer granularity, distinguishing the pre- up, post-up, pre-down and post-down phases.

VERBOSITY indicates whether --verbose was used; set to 1 if so, 0 if not.

PATH the command search path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Additionally, all options given in an interface definition stanza are exported to the environment in upper case with "IF_" prepended and with hyphens converted to underscores and non-alphanumeric characters discarded.

INET ADDRESS FAMILY This section documents the methods available in the inet address family.

The loopback Method This method may be used to define the IPv4 loopback interface.

Options

(No options)

Sept, 2015 LS24I/M User guide 24 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M The static Method This method may be used to define ethernet interfaces with statically allocated IPv4 addresses.

Options

address address Address (dotted quad) required

netmask netmask Netmask (dotted quad) required

broadcast broadcast_address Broadcast address (dotted quad)

network network_address Network address (dotted quad) required for 2.0.x kernels

metric metric Routing metric for default gateway (integer)

gateway address Default gateway (dotted quad)

pointopoint address Address of other end point (dotted quad). Note the spelling of "point-to".

media type Medium type, driver dependent

hwaddress class address Hardware Address. class is one of ether, ax25, ARCnet or netrom. address is dependent on the above choice.

mtu size MTU size

The manual Method This method may be used to define interfaces for which no configuration is done by default. Such interfaces can be configured manually by means of up and down commands or /etc/network/if-*.d scripts.

Options

(No options)

The dhcp Method This method may be used to obtain an address via DHCP with any of the tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their order of precedence.) If you have a complicated DHCP setup you should note that some of these clients use their own configuration files and do not obtain their configuration information via ifup.

Options

hostname hostname Hostname to be requested (pump, dhcpcd, udhcpc)

leasehours leasehours Preferred lease time in hours (pump) 25 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

leasetime leasetime Preferred lease time in seconds (dhcpcd)

vendor vendor Vendor class identifier (dhcpcd)

client client Client identifier (dhcpcd, udhcpc)

hwaddress class address Hardware Address. class is one of ether, ax25, ARCnet or netrom. address is dependent on this choice.

The bootp Method This method may be used to obtain an address via bootp.

Options

bootfile file Tell the server to use file as the bootfile.

server address Use the IP address address to communicate with the server.

hwaddr addr Use addr as the hardware address instead of whatever it really is.

The ppp Method This method uses pon/poff to configure a PPP interface. See those commands for details.

Options

provider name Use name as the provider (from /etc/ppp/peers).

The wvdial Method This method uses wvdial to configure a PPP interface. See that command for more details.

Options

provider name Use name as the provider (from /etc/ppp/peers).

The ipv4ll Method This method uses avahi-autoipd to configure an interface with an IPv4 Link-Layer address (169.254.0.0/16 family). This method is also known as "APIPA" or "IPAC", and often colloquially referred to as "Zeroconf address".

Options

(No options)

IPX ADDRESS FAMILY This section documents the methods available in the ipx address family.

Sept, 2015 LS24I/M User guide 26 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M The static Method This method may be used to setup an IPX interface. It requires the ipx_interface command.

Options

frame type type of ethernet frames to use (e.g. 802.2)

netnum id Network number

The dynamic Method This method may be used to setup an IPX interface dynamically.

Options

frame type type of ethernet frames to use (e.g. 802.2)

INET6 ADDRESS FAMILY This section documents the methods available in the inet6 address family.

The loopback Method This method may be used to define the IPv6 loopback interface.

Options

(No options)

The static Method This method may be used to define interfaces with statically assigned IPv6 addresses.

Options

address address Address (colon delimited) required

netmask mask Netmask (number of bits, eg 64) required

gateway address Default gateway (colon delimited)

media type Medium type, driver dependent

hwaddress class address Hardware Address. class is one of ether, ax25, ARCnet or netrom. address is dependent on this choice.

mtu size MTU size

The manual Method This method may be used to define interfaces for which no configuration is done by default. Such interfaces can be configured manually by means of up and down commands or /etc/network/if-*.d scripts.

27 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M Options

(No options)

The v4tunnel Method This method may be used to setup an IPv6-over-IPv4 tunnel. It requires the ip command from the iproute package.

Options

address address Address (colon delimited)

netmask mask Netmask (number of bits, eg 64)

endpoint address Address of other tunnel endpoint (IPv4 dotted quad) required

local address Address of the local endpoint (IPv4 dotted quad)

gateway address Default gateway (colon delimited)

ttl time TTL setting

KNOWN BUGS/LIMITATIONS The ifup and ifdown programs work with so-called "physical" interface names. These names are assigned to hardware by the kernel. Unfortunately it can happen that the kernel assigns different physical interface names to the same hardware at different times; for example, what was called "eth0" last time you booted is now called "eth1" and vice versa. This creates a problem if you want to configure the interfaces appropriately. A way to deal with this problem is to use mapping scripts that choose logical interface names according to the properties of the interface hardware. See the get-mac-address.sh script in the examples directory for an example of such a mapping script. See also Debian bug #101728.

It is not currently possible to divide up /etc/network/interfaces into multiple files. A feature that would make this possible is some sort of inclusion directive. No such feature exists in the current ifupdown program. For more information see Debian bug #159884.

Sept, 2015 LS24I/M User guide 28 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 8.1.2. WiFi

Additional to the WiFi STATIC setting that might be part of the /etc/network/interfaces (the example shows PART of the possible WiFi STATIC configuration)

… auto wlan0 iface wlan inet static address 192.168.6.123 netmask 255.255.255.0 gateway 192.168.6.1 …

The WiFi SSID, security, Certificates and Configuration are configured in:

/etc/wpa_supplicant.conf

29 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

ap_scan=1

network={ key_mgmt=NONE }

network={ ssid="PEAPTEST" scan_ssid=1 key_mgmt=IEEE8021X eap=PEAP identity="USER5" proto=WPA pairwise=TKIP group=TKIP password="PASSWORD1234" ca_cert="blob://certcablob" phase1="peaplabel=0" phase2="auth=MSCHAPV2" }

blob-base64-certcablob={ MIIDYzCCAkugAwIBAgIJAOlytnlU+3+LMA0GCSqGSIb3DQEBCwUAMEgxCzAJBgNV BAYTAlVTMQswCQYDVQQIDAJQQTEPMA0GA1UEBwwGUGhpbGx5MQ4wDAYDVQQKDAVO dXZvbjELMAkGA1UEAwwCQ0EwHhcNMTUwNjAzMDcyNjA1WhcNMjUwNTMxMDcyNjA1 WjBIMQswCQYDVQQGEwJVUzELMAkGA1UECAwCUEExDzANBgNVBAcMBlBoaWxseTEO MAwGA1UECgwFTnV2b24xCzAJBgNVBAMMAkNBMIIBIjANBgkqhkiG9w0BAQEFAAOC AQ8AMIIBCgKCAQEA1s6vvqVXe/C5XMZl6RjNxK87fSfN/4QbWoQ7WNnHOcuCbt8g 8++kASZUIDDYsznzx7nn+Cvm0Z0+1c72Ptk5/xyf8lplr2//UIQAvq96vjCtIE7B 8OsiMlYX2wbq0PLxG93c2DKSaRvR8Ky7thm0F0x4n6rZRK16kqTB3kqE8CJ3XKzF Sh/E+bz8RNJX0wryN3+O2b/YGaJPqD9R+LIFLdLUIrorrP6fIsKfzRogk60mTZFH RlnKkw6tpNcI59rTe/jvJgq8htA9qjSzU7Q1EQw8hzYbANtFYV+lIw9Dm7ADwdpM mi3lCA6JZdlA5EYenLl2uiqfG56mro7XmIFqEQIDAQABo1AwTjAdBgNVHQ4EFgQU YGS0T8GpgRZZ8wmY3WGwtURZk+kwHwYDVR0jBBgwFoAUYGS0T8GpgRZZ8wmY3WGw tURZk+kwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAYPFKFjKpfCMf 1o3wLR3j80KRf/3u2CBoKjTMIEi79wojwYxBfmfxIXL4CKkveqLwPkg3LJs5aAin YffpC3AWOkzC78wmB86YnUs+T01FnzfbHysMR45Om4PtvpXNOHinVQ3zdfyg3hwO WlOE2ayDH+eklxRyjQZUnZNWvtriXEkAjT9vH6rIrS+5pZveWAkggRNgWndNDRYn ukTqgNsAZJe8I+i1DI/VwCaIERpaMIPffRHMHXLzl8X1/WUTQcGId067ZtHOF/F/ qg82ZeAPXH6+w6w6l5+An/FIZRE86IZ5c7n3MoTpqrirRtd8WSNGhMlAbCPlVSvi qh/gO/l8tw== }

An example of wpa_suplicant.conf and wpa_suplicant documentation is provided here for reference, and the user should check the linux

Sept, 2015 LS24I/M User guide 30 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M documentation for wpa_suplicant and wpa_suplicant.conf for more informations:

NAME wpa_supplicant.conf - configuration file for wpa_supplicant

OVERVIEW wpa_supplicant is configured using a text file that lists all accepted networks and security policies, including pre-shared keys. See the example configuration file, probably in /usr/share/doc/wpa_supplicant/, for detailed information about the configuration format and supported fields.

On Debian systems example configuration files are located at /usr/share/doc/wpasupplicant/examples/. Use /usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.template as a starting point for a custom configuration file.

All file paths in this configuration file should use full (absolute, not relative to working directory) path in order to allow working directory to be changed. This can happen if wpa_supplicant is run in the background.

Changes to configuration file can be reloaded be sending SIGHUP signal to wpa_supplicant (’killall -HUP wpa_supplicant’). Similarly, reloading can be triggered with the ’wpa_cli reconfigure’ command.

Configuration file can include one or more network blocks, e.g., one for each used SSID. wpa_supplicant will automatically select the best network based on the order of network blocks in the configuration file, network security level (WPA/WPA2 is preferred), and signal strength.

QUICK EXAMPLES 1. WPA-Personal (PSK) as home network and WPA-Enterprise with EAP-TLS as work network.

# allow frontend (e.g., wpa_cli) to be used by all users in ’wheel’ group ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel # # home network; allow all valid ciphers network={ ssid="home" scan_ssid=1 key_mgmt=WPA-PSK psk="very secret " } # # work network; use EAP-TLS with WPA; allow only CCMP and TKIP ciphers network={ ssid="work" scan_ssid=1 key_mgmt=WPA-EAP pairwise=CCMP TKIP group=CCMP TKIP eap=TLS 31 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M identity="[email protected]" ca_cert="/etc/cert/ca.pem" client_cert="/etc/cert/user.pem" private_key="/etc/cert/user.prv" private_key_passwd="password" }

2. WPA-RADIUS/EAP-PEAP/MSCHAPv2 with RADIUS servers that use old peaplabel (e.g., Funk Odyssey and SBR, Meetinghouse Aegis, Interlink RAD-Series)

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ ssid="example" scan_ssid=1 key_mgmt=WPA-EAP eap=PEAP identity="[email protected]" password="foobar" ca_cert="/etc/cert/ca.pem" phase1="peaplabel=0" phase2="auth=MSCHAPV2" }

3. EAP-TTLS/EAP-MD5-Challenge configuration with anonymous identity for the unencrypted use. Real identity is sent only within an encrypted TLS tunnel.

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ ssid="example" scan_ssid=1 key_mgmt=WPA-EAP eap=TTLS identity="[email protected]" anonymous_identity="[email protected]" password="foobar" ca_cert="/etc/cert/ca.pem" phase2="auth=MD5" }

4. IEEE 802.1X (i.e., no WPA) with dynamic WEP keys (require both unicast and broadcast); use EAP-TLS for authentication

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ ssid="1x-test" scan_ssid=1 key_mgmt=IEEE8021X eap=TLS identity="[email protected]" ca_cert="/etc/cert/ca.pem" client_cert="/etc/cert/user.pem" private_key="/etc/cert/user.prv" private_key_passwd="password" eapol_flags=3 }

Sept, 2015 LS24I/M User guide 32 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 5. Catch all example that allows more or less all configuration modes. The configuration options are used based on what security policy is used in the selected SSID. This is mostly for testing and is not recommended for normal use.

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ ssid="example" scan_ssid=1 key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE pairwise=CCMP TKIP group=CCMP TKIP WEP104 WEP40 psk="very secret passphrase" eap=TTLS PEAP TLS identity="[email protected]" password="foobar" ca_cert="/etc/cert/ca.pem" client_cert="/etc/cert/user.pem" private_key="/etc/cert/user.prv" private_key_passwd="password" phase1="peaplabel=0" ca_cert2="/etc/cert/ca2.pem" client_cert2="/etc/cer/user.pem" private_key2="/etc/cer/user.prv" private_key2_passwd="password" }

6. Authentication for wired Ethernet. This can be used with

ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel ap_scan=0 network={ key_mgmt=IEEE8021X eap=MD5 identity="user" password="password" eapol_flags=0 }

CERTIFICATES Some EAP authentication methods require use of certificates. EAP-TLS uses both server side and client certificates whereas EAP-PEAP and EAP- TTLS only require the server side certificate. When client certificate is used, a matching private key file has to also be included in configuration. If the private key uses a passphrase, this has to be configured in wpa_supplicant.conf ("private_key_passwd").

wpa_supplicant supports X.509 certificates in PEM and DER formats. User certificate and private key can be included in the same file.

If the user certificate and private key is received in PKCS#12/PFX format, they need to be converted to suitable PEM/DER format for wpa_supplicant. This can be done, e.g., with following commands:

# convert client certificate and private key to PEM format openssl pkcs12 -in example.pfx -out user.pem -clcerts # convert CA certificate (if included in PFX file) to PEM format openssl pkcs12 -in example.pfx -out ca.pem -cacerts -nokeys

33 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

NAME wpa_supplicant - Wi-Fi Protected Access client and IEEE 802.1X supplicant

SYNOPSIS wpa_supplicant [ -BddehLqqvw ] [ -iifname ] [ -cconfig file ] [ -Ddriver ] [ -PPID_file ]

OVERVIEW Wireless networks do not require physical access to the network equipment in the same way as wired networks. This makes it easier for unauthorized users to passively monitor a network and capture all transmitted frames. In addition, unauthorized use of the network is much easier. In many cases, this can happen even without user’s explicit knowledge since the wireless LAN adapter may have been configured to automatically join any available network.

Link-layer encryption can be used to provide a layer of security for wireless networks. The original wireless LAN standard, IEEE 802.11, included a simple encryption mechanism, WEP. However, that proved to be flawed in many areas and network protected with WEP cannot be consider secure. IEEE 802.1X authentication and frequently changed dynamic WEP keys can be used to improve the network security, but even that has inherited security issues due to the use of WEP for encryption. Wi-Fi Protected Access and IEEE 802.11i amendment to the wireless LAN standard introduce a much improvement mechanism for securing wireless networks. IEEE 802.11i enabled networks that are using CCMP (encryption mechanism based on strong cryptographic algorithm AES) can finally be called secure used for applications which require efficient protection against unauthorized access.

wpa_supplicant is an implementation of the WPA Supplicant component, i.e., the part that runs in the client stations. It implements WPA key negotiation with a WPA Authenticator and EAP authentication with Authentication Server. In addition, it controls the roaming and IEEE 802.11 authentication/association of the wireless LAN driver.

wpa_supplicant is designed to be a "daemon" program that runs in the background and acts as the backend component controlling the wireless connection. wpa_supplicant supports separate frontend programs and an example text-based frontend, wpa_cli, is included with wpa_supplicant.

Before wpa_supplicant can do its work, the network interface must be available. That means that the physical device must be present and enabled, and the driver for the device must have be loaded. Note, however, that the ’-w’ option of the wpa_supplicant daemon instructs the daemon to continue running and to wait for the interface to become available. Without the ’-w’ option, the daemon will exit immediately if the device is not already available.

After wpa_supplicant has configured the network device, higher level configuration such as DHCP may proceed. There are a variety of ways to integrate wpa_supplicant into a machine’s networking scripts, a few of which are described in sections below.

The following steps are used when associating with an AP using WPA:

· wpa_supplicant requests the kernel driver to scan neighboring BSSes

Sept, 2015 LS24I/M User guide 34 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M · wpa_supplicant selects a BSS based on its configuration

· wpa_supplicant requests the kernel driver to associate with the chosen BSS

· If WPA-EAP: integrated IEEE 802.1X Supplicant or external completes EAP authentication with the authentication server (proxied by the Authenticator in the AP)

· If WPA-EAP: master key is received from the IEEE 802.1X Supplicant

· If WPA-PSK: wpa_supplicant uses PSK as the master session key

· wpa_supplicant completes WPA 4-Way Handshake and Group Key Handshake with the Authenticator (AP)

· wpa_supplicant configures encryption keys for unicast and broadcast

· normal data packets can be transmitted and received

SUPPORTED FEATURES Supported WPA/IEEE 802.11i features:

· WPA-PSK ("WPA-Personal")

· WPA with EAP (e.g., with RADIUS authentication server) ("WPA- Enterprise") Following authentication methods are supported with an integrate IEEE 802.1X Supplicant:

· EAP-TLS

· EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1)

· EAP-PEAP/TLS (both PEAPv0 and PEAPv1)

· EAP-PEAP/GTC (both PEAPv0 and PEAPv1)

· EAP-PEAP/OTP (both PEAPv0 and PEAPv1)

· EAP-PEAP/MD5-Challenge (both PEAPv0 and PEAPv1)

· EAP-TTLS/EAP-MD5-Challenge

· EAP-TTLS/EAP-GTC

· EAP-TTLS/EAP-OTP

· EAP-TTLS/EAP-MSCHAPv2

· EAP-TTLS/EAP-TLS

· EAP-TTLS/MSCHAPv2

· EAP-TTLS/MSCHAP

· EAP-TTLS/PAP

· EAP-TTLS/CHAP

· EAP-SIM

35 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M · EAP-AKA

· EAP-PSK

· EAP-PAX

· LEAP (note: requires special support from the driver for IEEE 802.11 authentication)

· (following methods are supported, but since they do not generate keying material, they cannot be used with WPA or IEEE 802.1X WEP keying)

· EAP-MD5-Challenge

· EAP-MSCHAPv2

· EAP-GTC

· EAP-OTP

· key management for CCMP, TKIP, WEP104, WEP40

· RSN/WPA2 (IEEE 802.11i)

· pre-authentication

· PMKSA caching

AVAILABLE DRIVERS The available drivers to specify with the -D option are:

hostap (default) Host AP driver (Intersil Prism2/2.5/3). (this can also be used with Linuxant DriverLoader).

hermes Agere Systems Inc. driver (Hermes-I/Hermes-II).

madwifi MADWIFI 802.11 support (Atheros, etc.).

atmel ATMEL AT76C5XXx (USB, PCMCIA).

wext Linux wireless extensions (generic).

ndiswrapper Linux ndiswrapper.

broadcom Broadcom wl.o driver.

ipw Intel ipw2100/2200 driver.

wired wpa_supplicant wired Ethernet driver

bsd BSD 802.11 support (Atheros, etc.).

ndis Windows NDIS driver.

COMMAND LINE OPTIONS -B Run daemon in the background.

Sept, 2015 LS24I/M User guide 36 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M -i ifname Interface to listen on.

- filename Path to configuration file.

-P PID_file Path to PID file.

-C ctrl_interface Path to ctrl_interface socket (only used if -c is not).

-g global ctrl_interface Path to global ctrl_interface socket.

-D driver Driver to use. See the available options below.

-d Increase debugging verbosity (-dd even more).

-K Include keys (, etc.) in debug output.

-t Include timestamp in debug messages.

-e Use external IEEE 802.1X Supplicant (e.g., xsupplicant) (this disables the internal Supplicant).

-h Help. Show a usage message.

-L Show license (GPL and BSD).

-q Decrease debugging verbosity (-qq even less).

-v Show version.

-w wait for interface to be added, if needed. normally, wpa_supplicant will exit if the interface is not there yet.

-N Start describing new interface.

EXAMPLES In most common cases, wpa_supplicant is started with:

wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iwlan0

This makes the process fork into background and wait for the wlan0 interface if it is not available at startup time.

The easiest way to debug problems, and to get debug log for bug reports, is to start wpa_supplicant on foreground with debugging enabled:

wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d

wpa_supplicant can control multiple interfaces (radios) either by running one process for each interface separately or by running just one process and list of options at command line. Each interface is separated with -N argument. As an example, following command would start wpa_supplicant for two interfaces:

wpa_supplicant \ 37 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M -c wpa1.conf -i wlan0 -D hostap -N \ -c wpa2.conf -i ath0 -D madwifi

OS REQUIREMENTS Current hardware/software requirements:

· Linux kernel 2.4.x or 2.6.x with Linux Wireless Extensions v15 or newer

· FreeBSD 6-CURRENT

· with WinPcap (at least WinXP, may work with other versions)

SUPPORTED DRIVERS Host AP driver for Prism2/2.5/3 (development snapshot/v0.2.x) (http://hostap.epitest.fi/) Driver needs to be set in Managed mode (’iwconfig wlan0 mode managed’). Please note that station firmware version needs to be 1.7.0 or newer to work in WPA mode.

Linuxant DriverLoader (http://www.linuxant.com/driverloader/) with Windows NDIS driver for your wlan card supporting WPA.

Agere Systems Inc. Linux Driver (http://www.agere.com/support/drivers/) Please note that the driver interface file (driver_hermes.c) and hardware specific include files are not included in the wpa_supplicant distribution. You will need to copy these from the source package of the Agere driver.

madwifi driver for cards based on Atheros chip set (ar521x) (http://sourceforge.net/projects/madwifi/) Please note that you will need to modify the wpa_supplicant .config file to use the correct path for the madwifi driver root directory (CFLAGS += -I../madwifi/wpa line in example defconfig).

ATMEL AT76C5XXx driver for USB and PCMCIA cards (http://atmelwlandriver.sourceforge.net/).

Linux ndiswrapper (http://ndiswrapper.sourceforge.net/) with Windows NDIS driver.

Broadcom wl.o driver This is a generic Linux driver for Broadcom IEEE 802.11a/g cards. However, it is proprietary driver that is not publicly available except for couple of exceptions, mainly Broadcom-based APs/wireless routers that use Linux. The driver binary can be downloaded, e.g., from Linksys support site (http://www.linksys.com/support/gpl.asp) for Linksys WRT54G. The GPL tarball includes cross-compiler and the needed header file, wlioctl.h, for compiling wpa_supplicant. This driver support in wpa_supplicant is expected to work also with other devices based on Broadcom driver (assuming the driver includes client mode support).

Intel ipw2100 driver (http://sourceforge.net/projects/ipw2100/)

Intel ipw2200 driver (http://sourceforge.net/projects/ipw2200/) Sept, 2015 LS24I/M User guide 38 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

Linux wireless extensions In theory, any driver that supports Linux wireless extensions can be used with IEEE 802.1X (i.e., not WPA) when using ap_scan=0 option in configuration file.

Wired Ethernet drivers Use ap_scan=0.

BSD net80211 layer (e.g., Atheros driver) At the moment, this is for FreeBSD 6-CURRENT branch.

Windows NDIS The current Windows port requires WinPcap (http://winpcap.polito.it/). See README-Windows.txt for more information.

wpa_supplicant was designed to be portable for different drivers and operating systems. Hopefully, support for more wlan cards and OSes will be added in the future. See developer.txt for more information about the design of wpa_supplicant and porting to other drivers. One main goal is to add full WPA/WPA2 support to Linux wireless extensions to allow new drivers to be supported without having to implement new driver-specific interface code in wpa_supplicant.

ARCHITECTURE The wpa_supplicant system consists of the following components:

wpa_supplicant.conf the configuration file describing all networks that the user wants the computer to connect to.

wpa_supplicant the program that directly interacts with the network interface.

wpa_cli the client program that provides a high-level interface to the functionality of the daemon.

wpa_passphrase a utility needed to construct wpa_supplicant.conf files that include encrypted passwords.

QUICK START First, make a configuration file, e.g. /etc/wpa_supplicant.conf, that describes the networks you are interested in. See wpa_supplicant.conf(5) for details.

Once the configuration is ready, you can test whether the configuration works by running wpa_supplicant with following command to start it on foreground with debugging enabled:

wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d

Assuming everything goes fine, you can start using following command to start wpa_supplicant on background without debugging:

wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B

Please note that if you included more than one driver interface in the build time configuration (.config), you may need to specify which 39 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M interface to use by including -D option on the command line.

INTERFACE TO PCMCIA-CS/CARDMRG For example, following small changes to pcmcia-cs scripts can be used to enable WPA support:

Add MODE="Managed" and WPA="y" to the network scheme in /etc/pcmcia/wireless.opts.

Add the following block to the end of ’start’ action handler in /etc/pcmcia/wireless:

if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then /usr/local/bin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf - i$DEVICE fi

Add the following block to the end of ’stop’ action handler (may need to be separated from other actions) in /etc/pcmcia/wireless:

if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then killall wpa_supplicant fi

This will make cardmgr start wpa_supplicant when the card is plugged in. wpa_supplicant will wait until the interface is set up--either when a static IP address is configured or when DHCP client is started--and will then negotiate keys with the AP.

SEE ALSO wpa_background(8) wpa_supplicant.conf(5) wpa_cli(8) wpa_passphrase(8)

8.1.3. Serial COM ports

Four Serial Com Ports are available for Serial I/O according to RS232D standards. Those are:

/dev/ttyS1 /dev/ttyS2 /dev/ttyS3 /dev/ttyS4

Standard LINUX Serial Programing tecniques should be used to access, setup, send and receive data from and to those ports. Also standard linux stty comand can be used to setup the port for desired use.

Sept, 2015 LS24I/M User guide 40 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M A sample script to copy to and from COM2 and COM3 at 9600 baud, and keep the record in 2to3.hex and 3to2.hex:

#!/bin/sh stty -ixon -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 9600 -F /dev/ttyS2 stty -ixon -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 9600 -F /dev/ttyS3

cat /dev/ttyS2|tee 2to3.hex > /dev/ttyS3 & cat /dev/ttyS3|tee 3to2.hex > /dev/ttyS2 &

8.2. ADC (Analog to Digital Converter) script for battery, USB power and External Power source

8.2.1. Battery

The following command will provide the ADC reading for the measured battery voltage. Please contact ServerNet for more details about the readings interpretation. Servernet is constalntly keeping a record of past per minute readings that will be used to finetunre the battery charging times and batery usage.

cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw

41 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 8.2.2. USB type B power

USB power voltage measure reading is used to understand and take adequate action on power supply. The following command will provide the RAW value of voltage present on the USB power.

/sys/bus/iio/devices/iio\:device0/in_voltage2_raw

8.2.3. External power source (only for LS24I)

Optional External power Suply, Present Only on the LS24I model, can be read with the following command:

cat /sys/bus/iio/devices/iio\:device0/in_voltage2_raw

8.3. Light, sound and On/OFF button complete control

8.3.1. Port LED control

Four Com Pot LEDs are controlled by the I2C register. The following script will turn All red, green and blue LED on all ports continously:

Sept, 2015 LS24I/M User guide 42 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

i2cset -y 0 0x20 0x06 0x11 i2cset -y 0 0x20 0x07 0x11

while [ 1 ]; do i2cset -y 0 0x20 0x02 0xDD i2cset -y 0 0x20 0x03 0xDD sleep 1 i2cset -y 0 0x20 0x02 0xBB i2cset -y 0 0x20 0x03 0xBB sleep 1 i2cset -y 0 0x20 0x02 0x77 i2cset -y 0 0x20 0x03 0x77 sleep 1 i2cset -y 0 0x20 0x02 0xFF i2cset -y 0 0x20 0x03 0xFF sleep 1 done

8.3.2. Audio Buzzer control

Similar to LEDs, the buzzer is also controlled by the same i2c controller, the following script will turn the buzer at aprox 1 kHz for 1 sec

#!/bin/sh register=`i2cget -y 0 0x3E 0x1e` dregister=$(($register)) newvalue=$(($dregister|92)) eval "i2cset -y 0 0x3E 0x1e $newvalue" sleep 1 eval "i2cset -y 0 0x3E 0x1e $register"

8.3.3. ON/OFF push button control

On/Off pushbutton is mapped to the basic ON/OFF functionality of the device, but eventually can be programmed to perform aditional actions. A half second push to the button will trigger the gracefull shutdown of the system, while the 4 second continous hold on the button will remove the

43 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M power from the system up to the next puch event (power on) or to the next power on on the USB.

8.4. Node.JS writing of a basic Configuration (HelloWorld)

NodeJS is prsent as pasrt of the OS, and NodeJSthe service can be run any time. The following example (saved in app.js file) will enable the box to reply to any HTTP rewuest on the port 3000 and reply wih the Hello World! Text.

var express = require('express'); var app = express();

app.get('/', function (req, res) { res.send('Hello World!'); });

var server = app.listen(3000, function () { var host = server.address().address; var port = server.address().port;

console.log('Example app listening at http://%s:%s', host, port); });

Run the app with the following command.

node app.js

Then, load http://localhost:3000/ in a browser to see the output.

Sept, 2015 LS24I/M User guide 44 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 8.5. Configuration loading

Configuration can be loaded in different ways, and usually is handled by one of the configuration packages provoded by the system andominstrator for your organization. Manual load of configuration from a file (provided trough USB key or copied to the FileSystem of the device) is the following:

opkg-cl install CONFIGURATION_FILE.opk

8.6. Configuration deleting

Most of the Configuration loading/unloading is comonly done by the Configuration Manager – another Configuration package tailored for the device use case, aniway the following command wil unload a specific package:

opkg-cl remove CONFIGURATION_NAME

8.7. Configuration Handling, Reporting, updating

The user should check the use of the opkg-cl from the linux documentation or from the build in help of the command itself:

opkg-cl –help

45 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M 8.8. Reading and writing from MicroSD

MicroSD is mounted at the boot proccess and avaliable as a standard filesystem from the folowing mounting point:

/media/sd-mmcblk0p1

9. System recovery

In case of OS corruption, LS24I/M design allows full system recovery by using a downloadable recovery image. For recovery instructions please refer to: http://www.servernet.it/web/support

10. Service and disposal

For any information about service and disposal of your device refer to the Device user Guide of your LS24I/M.

11. User manual download

You can find this manual together with the OS user manual at: www.servernet.it/download/ LS24IM_HW_UserManual.pdf LS24IM_OS_UserManual.pdf

Sept, 2015 LS24I/M User guide 46 Copyright ServerNet S.r.l. 2015, All Rights Reserved LS24I/M

ServerNet S.r.l. Località Padriciano, 99 34149 Trieste (Italy) LS24I/M User guide Copyright ServerNet S.r.l. 2015, All Rights Reserved

47 LS24I/M User guide Sept, 2015 Copyright ServerNet S.r.l. 2015, All Rights Reserved