Area SX srl - Informatica e Microelettronica
0
Back to: Home Page Articles Microcontrollers Linux Embedded How to enable the 3G and Wi-Fi connectivity on the SXPi

How to enable the 3G and Wi-Fi connectivity on the SXPi

Publication Date: 26-02-2015 | Versione Italiana  | English Version

In this article we will see how to configure the Linux box SXPi to access a Wi-Fi network and make a data connection over 3G network.

Description

In this article we will see, step by step, how to enable and configure the Wi-Fi and 3GSXPi.
The Linux box is equipped with a Telit HE910-EUG modem 3.5G generation, compliant with the standard GSM/GPRS (850/900/1800/1900MHz), UMTS/ HSPA(850/900/2100MHz), which we will see how to configure to make a data connection.
To enable Wi-Fi connectivity on SXPi, you need to mount a USB-WiFi optional converter.
Further details about the SXPi are available by reading the article: SXPi not just a Linux Box

Hardware Requirements

o test all the functions described in the present article, you need the following hardware:

Wi-Fi connection

The SXPi is not natively equipped with a Wi-Fi interface, it is therefore necessary to connect a (optional) Wi-Fi adapter on the USB port located on the Ethernet side of the Linux box.



The complete list of the compatible Wi-Fi adapters is available at the following URL:
http://elinux.org/RPi_USB_Wi-Fi_Adapters
Once connected the USB-WiFi dongle, you can control via SSH or serial console the correct recognition of the Wi-Fi device checking the file /var/log/messages with the command:

tail -f /var/log/messages



To allow the Linux system accessing a Wi-Fi wireless network, you need to proceed with the following steps.
On console:

sxpi@raspberrypi ~ $sudo vim /etc/network/interfaces

and enter the following instructions, if not present:

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


On the contrary, if you want to assign a static IP address to the Wi-Fi interface, the instructions to set are the following:

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet static
address 192.168.0.XXX
netmask 255.255.255.0
gateway 192.168.0.XXX


Of course the items address, netmask and gateway must be compatible with your own Wi-Fi LAN.
If the Wi-Fi network to which you want to connect the SXPi it is protected, for example, with WPA2 encryption, you must edit the file wpa_supplicant.conf in the following way:

sxpi@raspberrypi ~ $ sudo vim /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="www.areasx.com"
key_mgmt=WPA-PSK
scan_ssid=1
proto=RSN
pairwise=CCMP TKIP
group=CCMP TKIP
psk="password" }


and enter the SSID name of Wi-Fi network and the protection password (psk).
Restart the Linux box:

sxpi@raspberrypi ~ $ sudo reboot

The correct working of the Wi-Fi link can be checked with the following commands:

sxpi@raspberrypi ~ $ sudo iwconfig wlan0



sxpi@raspberrypi ~ $ sudo ifconfig wlan0

Data connection on 3G network

As previously said, the SXPi is equipped with Telit H910, a 3.5 generation modem that is able to perform data connections with speed up to 14.4 Mbit/s where allowed by the chosen Mobile Operator and network.
By default setup, the modem on SXPi is turned off.
Before you start the boot procedure of the modem, you must connect the GSM/UMTS antenna to the SMA male connector and plug a SIM card with PIN disabled and qualified for data connection.



To turn on the modem, you need to keep high for about 5sec the GPIO line 22 (pin 15) of the ARM 11 processor.
This operation can be carried out automatically creating a bash script (eg: start-modem) with the following code:

echo 22 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio22/direction

echo 18 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio18/direction

ST=`cat /sys/class/gpio/gpio18/value`
if [ "$ST"=="0" ]; then
  echo 1 > /sys/class/gpio/gpio22/value
  sleep 5.0
  echo 0 > /sys/class/gpio/gpio22/value
fi

echo 22 > /sys/class/gpio/unexport
echo 18 > /sys/class/gpio/unexport


To turn the modem on every boot, the script must be inserted into the file /etc/rc.local. The correct ignition of the modem is shown by the yellow LED placed on top of the SXPi.
With the modem turned on, now we can go forward to the configuration of the ppp software daemon, needed to establish a data connection over GPRS/UMTS network.
To install the ppp software deamon, you must type the following command on console:

sxpi@raspberrypi ~ $ sudo apt-get install ppp



Once the installation is completed, then you have to edit the pap file:

pi@raspberrypi ~ $ sudo vim /etc/chatscripts/pap

And enter:

TIMEOUT 60
ABORT BUSY
ABORT VOICE
ABORT "ERROR"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
"" ATZ
OK AT+CGDCONT=1,"IP","apn.operator","0.0.0.0",0,0
OK ATD*99***1#
CONNECT ""

In place of the entry "apn.operator", you must enter the APN address of your Mobile Operator (eg. TIM: ibox.tim.it VODAFONE: mobile.vodafone.it H3G: tre.it).
To force the modem in operating on 3G network, also set in your pap the command: OK AT+WS46=22

Edit the file provider:

sxpi@raspberrypi ~ $ sudo vim /etc/ppp/peers/provider

and enter and/or modify the entries:

user "@"
...
...
# Serial device to which the modem is connected.
/dev/ttyACM0

# Speed of the serial line.
460800
...

...
# Use this connection as the default route.
defaultroute
replacedefaultroute

At this, you can: establish the data connection ppp on 3G network with the pon command:

sxpi@raspberrypi ~ $ sudo pon

stop the connection with the poff command:

sxpi@raspberrypi ~ $ sudo poff

Any eventual error is shown by chacking the system log:

tail -f /var/log/messages



The correct routing of the Internet data can be displayed with the commands route and a ping towards a public server.



Related articles

SXPi not just a Linux Box
Programmare in Python il Gatetel EzMOTO
Trasformare la SXPi in un mini server LAMP

Download

Download Documentation: Manuale_SXPi.pdf
Download Documentation: Telit_HE910_UE910_AT_Commands_Reference_Guide_r5.pdf
Download Documentation: GT-HE910_EUD_B_Product_Description.pdf


Segnala questo articolo: 





Publication Date: 26-02-2015Hits: 22219
I marchi citati sono propriet� dei titolari dei relativi diritti. Le caratteristiche tecniche e i prezzi riportati sono indicativi e soggetti a variazioni senza preavviso. Le foto non hanno valore contrattuale. Nonostante accurate verifiche, il presente documento pu� contenere prezzi o specifiche errati. Area SX si scusa in anticipo e si impegna ad evitare tali imprecisioni.

 Area SX store
In this section you can buy directly the products described in this article
SXPI2_3G;SXPI_3G;SXPI_BASE;AMM.90;AMM.575;USB-WiFi-150N;SXPI_3G_KIT;SXPI3_3G
All prices are indicated in Euros without shipping costs and VAT (where applicable). The prices are for single unit.
DescriptionCodeUnit Price
Read more info on this productAntenna con base magnetica per moduli GSM/GPRS con SMA/M
Antenna con base magnetica per moduli GSM/GPRS Quadri Band 850/900/1800/1900 MHz, con
cavo coassiale 3mt e connessione SMA Maschio.
  • Impedenza: 50 Ohms
  • Polarizzazione: verticale
  • Guadagno: 2.2 dBi Max
  • VSWR: <1.5:1
  • Cavo: RG174
  • Lunghezza cavo: 2.5mt
  • Temperatura operativa: da -40°C a +85°C

Questa antenna è compatibile con i seguenti prodotti: .
  • EZ863-GPS
  • EZ10-GPS
  • Telit GT863-PY


Prodotto compliant RoHs
AMM.575€ 8.00
Read more info on this productRead more info on this product
Read more info on this productAntenna a 90° per moduli GSM/GPRS con SMA/M
Antenna a 90° per moduli GSM/GPRS Quadri Band 850/900/1800/1900 MHz, con connessione SMA Maschio.

Questa antenna è compatibile con i seguenti prodotti: .
  • EZ863-GPS
  • EZ10-GPS
  • Telit GT863-PY


Prodotto compliant RoHs
AMM.90€ 5.00
Read more info on this productRead more info on this product
Read more info on this productSXPi Linux Box
Linux box based on Raspberry PI.
Main features SXPi:
  • ARM11 700MHz processor with 512MB SDRAM (Raspberry Pi Model B+) and SD with operating system
  • Ethernet RJ45 10/100Mbps interface
  • 2 USB 2.0 TYPE A interfaces
  • 2 RS232 interfaces
  • RS485 interface
  • 2 digital photo-coupler inputs (Vin max 24V DC)
  • 2 open collector outputs (max current 500mA)
  • Power supply from 9V to 18V AC/CC
  • GSM/UMTS Antenna
  • Average power consumption: 130mA
  • Dimensions: 97x105x38mm
  • Weight: 150g
  • Protection class: IP40
  • Operating temperature: da 0°C a +70°C
  • Operating humidity: 5% - 85%

Included a preinstalled 16Gbyte SD card with Raspbian operating system


Prodotto compliant RoHs
SXPI_BASE
Call +39.06.99.33.02.57 for information and price of this product

Questo prodotto richiede un contatto diretto

Chiamare lo (+39)06.99.33.02.57 oppure inviare una email ad [email protected] per ulteriori informazioni
Read more info on this productRead more info on this product
 
Read more info on this productSXPi Linux Box with 3G modem
Raspberry PI Linux box with 3G GSM/UMTS modem.
Main features:
  • ARM11 processor with 512Mb SDRAM (Raspberry Pi Model B+) and SD with operating system
  • Telit HE910-EUD GSM Modem: 850/900/1800/1900MHz, UMTS/HSPA+: 850/900/2100MHz
  • Ethernet RJ45 10/100Mbps interface
  • 2 USB 2.0 TYPE A interfaces
  • 2 RS232 interfaces
  • RS485 interface
  • 2 digital optocoupled inputs
  • 2 open collector outputs
  • Power supply from 9V to 18V AC/CC
  • GSM/UMTS Antenna
  • Average power consumption: 180mA
  • Dimensions: 97x105x38mm
  • Weight: 170g
  • Operating temperature: da 0°C a +70°C
  • Operating humidity: 5% - 85%

Includes a preinstalled 16 Gbyte SD card with Raspbian operating system and GSM antenna


Prodotto compliant RoHs
SXPI_3G
Call +39.06.99.33.02.57 for information and price of this product

Questo prodotto richiede un contatto diretto

Chiamare lo (+39)06.99.33.02.57 oppure inviare una email ad [email protected] per ulteriori informazioni
Read more info on this productRead more info on this product
 
Read more info on this productDevelopment kit SXPi2 Linux Box with modem 3G
Development kit Linux box based on Raspberry PI 2 with 3G GSM/UMTS modem.
Main features SXPi:
  • Cortex-A7 da 900MHz quad-core processor with 1GB RAM (Raspberry Pi 2 Model B) and SD with operating system
  • Telit HE910-EUD GSM Modem: 850/900/1800/1900MHz, UMTS/HSPA+: 850/900/2100MHz
  • Ethernet RJ45 10/100Mbps interface
  • 2 USB 2.0 TYPE A interfaces
  • 2 RS232 interfaces
  • RS485 interface
  • 2 digital photo-coupler inputs (Vin max 24V DC)
  • 2 open collector outputs (max current 500mA)
  • Power supply from 9V to 18V AC/CC
  • GSM/UMTS Antenna
  • Average power consumption: 180mA
  • Dimensions: 97x105x38mm
  • Weight: 170g
  • Operating temperature: da 0°C a +70°C
  • Operating humidity: 5% - 85%

The development kit includes:
  • Power adapter 220V AC - 12V DC
  • RS232 Console cable
  • Dongle USB Wi-Fi
  • 2 x Cables with Micro Fit 6 pins connector
  • Preinstalled 16Gbyte SD card with Raspbian operating system
  • GSM/UMTS Antenna


Prodotto compliant RoHs
SXPI2_3G_KIT
Call +39.06.99.33.02.57 for information and price of this product

Questo prodotto richiede un contatto diretto

Chiamare lo (+39)06.99.33.02.57 oppure inviare una email ad [email protected] per ulteriori informazioni
Read more info on this productRead more info on this product
 
Read more info on this productSXPi2 Linux Box with modem 3G
Linux box based on Raspberry PI 2 with 3G GSM/UMTS modem.
Main features:
  • ARM Cortex-A53 900MHz quad-core processor with 1GB SDRAM (Raspberry Pi 2 Model B) and SD with operating system
  • Telit HE910-EUD GSM Modem: 850/900/1800/1900MHz, UMTS/HSPA+: 850/900/2100MHz
  • Ethernet RJ45 10/100Mbps interface
  • 2 USB 2.0 TYPE A interfaces
  • 2 RS232 interfaces
  • RS485 interface
  • 2 digital photo-coupler inputs (Vin max 24V DC)
  • 2 open collector outputs (max current 500mA)
  • Power supply from 9V to 18V AC/CC
  • GSM/UMTS Antenna
  • Average power consumption: 190mA
  • Dimensions: 97x105x38mm
  • Weight: 170g
  • Operating temperature: da 0�C a +70�C
  • Operating humidity: 5% - 85%

Includes a preinstalled 8Gbyte SD card with Raspbian operating system and GSM antenna


Prodotto compliant RoHs
SXPI2_3G
Call +39.06.99.33.02.57 for information and price of this product

Questo prodotto richiede un contatto diretto

Chiamare lo (+39)06.99.33.02.57 oppure inviare una email ad [email protected] per ulteriori informazioni
Read more info on this productRead more info on this product
 
Read more info on this productSXPi3 Linux Box with modem 3G
Linux box based on Raspberry PI 3 with 3G GSM/UMTS modem.
Main features:
  • Broadcom BCM2837B0, Cortex-A53 64 bit a 1,4 GHz processor with 1GB SDRAM (Raspberry Pi 2 Model B) and SD with operating system
  • Telit HE910-EUD GSM Modem: 850/900/1800/1900MHz, UMTS/HSPA+: 850/900/2100MHz
  • Ethernet RJ45 10/100/1000Mbps interface
  • Wireless LAN IEEE 802.11.b/g/n/ac 2,4 e 5 Ghz with integrated antenna
  • Bluetooth 4.2 BLE with integrated antenna
  • 2 USB 2.0 TYPE A interfaces
  • 2 RS232 interfaces
  • RS485 interface
  • 2 digital photo-coupler inputs (Vin max 24V DC)
  • 2 open collector outputs (max current 500mA)
  • Power supply from 9V to 18V AC/CC
  • GSM/UMTS Antenna
  • Average power consumption: 190mA
  • Dimensions: 97x105x38mm
  • Weight: 170g
  • Operating temperature: da 0°C a +70°C
  • Operating humidity: 5% - 85%

Includes a preinstalled 16GByte SD card with Raspbian Stretch Lite operating system and GSM antenna


Prodotto compliant RoHs
SXPI3_3G
Call +39.06.99.33.02.57 for information and price of this product

Questo prodotto richiede un contatto diretto

Chiamare lo (+39)06.99.33.02.57 oppure inviare una email ad [email protected] per ulteriori informazioni
Read more info on this productRead more info on this product
 

Resellers Social Contacts Conditions
Area SX s.r.l
Via Stefano Longanesi 25
00146 Roma

Tel: +39.06.99.33.02.57
Fax: +39.06.62.20.27.85
P.IVA 06491151004
Terms of sale
Warranty conditions
Resellers Conditions