Difference between revisions of "VAYU"

From Yantrr Wiki
Jump to: navigation, search
(Modem Ports)
(Precompiled Images)
 
(53 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Overview=
 
=Overview=
  
Yantrr VAYU series of capes provide the capability of interfacing Beaglebone black with 2G/3G connectivity. The electronics on the capes has been tested to be in compliance with strict EU standards for radiated and conducted emissions.
+
Yantrr VAYU series of capes provide the capability of interfacing Beaglebone black with 2G connectivity.
  
 
=Quick Start Guide=
 
=Quick Start Guide=
 +
[[Media:VAYU-2G Quick Start Guide.pdf|VAYU-2G Quick Start Guide [PDF]]]
  
<strong><span style="color:red">*To Be Filled*</span></strong>
+
===Headers Pinout Details===
 +
[[File:VAYU HEADER PINOUT - VAYU-2G-1.jpg| 1380px  |VAYU Header Pinout | center]]
  
 
=Getting Started=
 
=Getting Started=
Line 47: Line 49:
 
===Modem Ports===
 
===Modem Ports===
 
VAYU has a 2G modem for WAN connectivity.
 
VAYU has a 2G modem for WAN connectivity.
* '''2G Modem :''' VAYU 2GQN-x comes with Simcom SIM800 2G modem.
+
* '''2G Modem :''' VAYU 2GQN-A comes with Simcom SIM800 2G modem.
  
The 2G modem will create a serial port at:
+
The 2G modem can be accessed through the '''/dev/ttyS1''' serial port of Beaglebone black for AT commands and response:
* /dev/ttyS1   : for AT Commands
+
 
+
AT Commands to modem and response from modem can be viewed on this port
+
  
 
===Modem Control===
 
===Modem Control===
 
Please ensure that the modem is properly turned on before ppp connections can be established. If PPP connection cannot be established properly, soft reset the modem following the timing procedures for modem.
 
Please ensure that the modem is properly turned on before ppp connections can be established. If PPP connection cannot be established properly, soft reset the modem following the timing procedures for modem.
  
Modem status will be monitored by 2 LEDs, D3 and D4.
+
Modem status can be monitored by LED indicators.
 +
 
 +
====LED Indicators for modem====
 +
There are 2 LEDs for indicating the modem and network status
 +
 
 +
*''' D3 :''' STATUS
 +
**'''OFF:''' Modem is OFF
 +
**'''ON:''' Modem is ON
 +
*''' D4 :''' NETWORK
 +
** '''OFF:''' Modem is not running
 +
** '''Blinking:''' Modem is active and the blinking rate indicates the network status
 +
*** '''64mSec ON / 800mSec OFF:''' Modem not registered to the network.
 +
*** '''64mSec ON / 3000mSec OFF:''' Modem registered to the network.
 +
*** '''64mSec ON / 300mSec OFF:''' GPRS communication established.
  
*''' D3 :''' STATUS: This will glow for all time while modem is on
 
*''' D4 :''' NETWORK: This is the network indication of the modem. The blinking rate of the LED will give information about the network connection as,
 
** '''OFF:''' Modem is not running.
 
** '''64mSec ON/800mSec OFF:''' Modem is not running.
 
** '''64mSec ON/3000mSec OFF:''' Modem registered to the network.
 
** '''64mSec ON/300mSec OFF:''' GPRS communication established.
 
  
The modem can be powered ON/OFF by either using the push button switch S1 or GPIO45 and can be reset by either using the push button switch S2 or GPIO60..
+
The modem can be powered ON/OFF by either using the push button switch S1 or GPIO45 and can be reset by either using the push button switch S2 or GPIO60.
  
 
====Power OFF====
 
====Power OFF====
Line 185: Line 191:
  
 
It lists all the attempts at establishing ppp communication using the modem and IPs for the successful attempt.
 
It lists all the attempts at establishing ppp communication using the modem and IPs for the successful attempt.
 
 
Now all that is left is to route the network traffic over the gateway of ppp0 instead of eth0 so that GPRS communication is fully completed.
 
Now all that is left is to route the network traffic over the gateway of ppp0 instead of eth0 so that GPRS communication is fully completed.
 
+
* Default route setting for accessing internet of the ppp0 interface,update this file /etc/ppp/peers/wvdial as below
 +
<pre>
 +
root@Vayu:~# cat /etc/ppp/peers/wvdial
 +
noauth
 +
name wvdial
 +
usepeerdns
 +
replacedefaultroute
 +
</pre>
 
{{Box-Info | text=For more AT commands refer device specific manuals from below section.}}
 
{{Box-Info | text=For more AT commands refer device specific manuals from below section.}}
  
Line 193: Line 205:
 
All the AT commands can be executed on the serial port /dev/ttyS1 with baud rate of 115200 8N1.
 
All the AT commands can be executed on the serial port /dev/ttyS1 with baud rate of 115200 8N1.
  
* '''2G Modem (SIM800)'''<strong><span style="color:red">*To Be Filled*</span></strong>
+
* '''AT Commands Manual for SIM800''' : [http://wiki.yantrr.com/images/7/76/SIM800_Series_AT_Command_Manual_V1.10.pdf SIM800_Series_AT Command Manual_V1.10.pdf]
 
+
* '''3G Modem'''<strong><span style="color:red">*To Be Filled*</span></strong>
+
  
 
=Software Setup Guide=
 
=Software Setup Guide=
Line 201: Line 211:
 
=== Precompiled Images ===
 
=== Precompiled Images ===
 
*''' Debian '''
 
*''' Debian '''
** '''MicroSD card Image : '''  
+
** '''MicroSD card Image : ''' [http://live.yantrr.net/download.php?id=6&token=xK0Kkx6j1BGzPngyqWpIOosioyVM6j6U  VAYU-4.9-debian-9.3-2gb-20180403.img.xz]
*** <strong><span style="color:red">*To Be Filled*</span></strong>
+
 
+
 
+
{{Box-Warn | text= Following instructions are only for Users compiling Beaglebone Black's Debian Image from scratch for VAYU use.}}
+
For compiling Beaglebone Black Debian Image from scratch follow Robert C Nelson BBB [http://eewiki.net/display/linuxonarm/BeagleBone+Black Wiki] and add needed patches, install <strong><span style="color:red">*To Be Filled with Simcom Driver link*</span></strong> while compiling.
+
  
 
Detailed compilation steps updating soon.
 
Detailed compilation steps updating soon.
  
 
Also in the Debian Yantrr Image, for configuring various modules of cape at every boot up a boot_run.sh script is executed. Its content is  
 
Also in the Debian Yantrr Image, for configuring various modules of cape at every boot up a boot_run.sh script is executed. Its content is  
 
+
#!/bin/sh -e
<strong><span style="color:red">*To Be Filled*</span></strong>
+
/bin/sleep 10
 +
/bin/echo ==============================
 +
/bin/echo 'Setting pins'
 +
/root/bin/pinexp 45      # Modem ON/OFF Pin
 +
/root/bin/pinexp 60      # Modem RESET Pin
 +
/root/bin/setout 45 high  # Modem Power ON
 +
cd /lib/firmware
 +
/bin/echo BB-UART1 > /sys/devices/platform/bone_capemgr/slots  ## For VAYU's Modem Serial Port ttyS1
 +
/bin/echo 'Done with pins and devices'
 +
/sbin/ip route list exact default
 +
/bin/echo 'All done'
  
 
=Applications=
 
=Applications=
 
+
* [[Data_connection_procedure_using_PPP |Data connection procedure using PPP ]].
<strong><span style="color:red">*To Be Filled*</span></strong>
+
* [[Configuring_USB_Wireless_Devices | USB Wireless Devices]].
 +
* [[Sending_and_receiving_sms|Sending and receiving sms]]

Latest revision as of 02:25, 2 May 2022

Overview

Yantrr VAYU series of capes provide the capability of interfacing Beaglebone black with 2G connectivity.

Quick Start Guide

VAYU-2G Quick Start Guide [PDF]

Headers Pinout Details

VAYU Header Pinout

Getting Started

Setting up the system

  1. Place a SIM card in the SIM card slot on the bottom side of the cape and connect a 2G antenna to the SMA connector P3.
  2. Mount the VAYU cape on Beaglebone Black.
  3. Ensure the power jumper J1 is closed and if not, put a jumper cap on J1.
  4. Power up the full setup using a 5V DC adapter(min 2.5A) to barrel jack connector. D2 LED on the cape will glow along with LEDs on the Beaglebone black.
Note: Before powering up, ensure correct software image is loaded in Beaglebone black or VIBE/VIBE2

Before proceeding further, ensure D2 LED is glowing properly. Make sure that the adapter being used is of proper rating and has been connected properly.

Do not try to power up using USB cable alone. Always power up system with a DC adapter. Also while disconnecting power, USB cable should be removed before the DC adapter.

Accessing the System

  • Through USB

For accessing the above setup, first connect the USB cable between Beaglebone Black's USB Client port and USB Host port of Desktop/Laptop. Once it get properly connected to Desktop, a user can access the setup using predefined static IP address 192.168.7.2

On Windows : (Using Putty Client)

auto

On Linux :

ssh root@192.168.7.2

Default password is root.

  • Through Ethernet

In Yantrr Pre-compiled images, the Ethernet IP address is set to static IP 192.168.1.150. If you are using DHCP IP then Ethernet IP be should be know and the same should be used while making ssh connection.

On Windows : (Using Putty Client)


auto

On Linux :

ssh root@192.168.1.150

Default password is root.

Modem Ports

VAYU has a 2G modem for WAN connectivity.

  • 2G Modem : VAYU 2GQN-A comes with Simcom SIM800 2G modem.

The 2G modem can be accessed through the /dev/ttyS1 serial port of Beaglebone black for AT commands and response:

Modem Control

Please ensure that the modem is properly turned on before ppp connections can be established. If PPP connection cannot be established properly, soft reset the modem following the timing procedures for modem.

Modem status can be monitored by LED indicators.

LED Indicators for modem

There are 2 LEDs for indicating the modem and network status

  • D3 : STATUS
    • OFF: Modem is OFF
    • ON: Modem is ON
  • D4 : NETWORK
    • OFF: Modem is not running
    • Blinking: Modem is active and the blinking rate indicates the network status
      • 64mSec ON / 800mSec OFF: Modem not registered to the network.
      • 64mSec ON / 3000mSec OFF: Modem registered to the network.
      • 64mSec ON / 300mSec OFF: GPRS communication established.


The modem can be powered ON/OFF by either using the push button switch S1 or GPIO45 and can be reset by either using the push button switch S2 or GPIO60.

Power OFF

The modem will be turned ON normally after power is supplied. In the state of power ON, provide a low level pulse at least for 4 seconds to the ON/OFF pin of the modem to turn OFF the module by either toggling the push button switch S1 or by cycling the GPIO45 through Low-High cycle.

The default state of ON/OFF GPIO should be high.

cd /sys/class/gpio
echo 45 > export
cd gpio45
echo “high” > direction
cd /sys/class/gpio/gpio45
echo "low" > direction
sleep 4
echo "high" > direction

Power ON

In the state of Power OFF, provide a low level pulse at least for 4 seconds to the ON/OFF pin of the modem to turn ON the module by either toggling the push button switch S1 or by cycling the GPIO45 through Low-High cycle.

cd /sys/class/gpio/gpio45
echo "low" > direction
sleep 4
echo "high" > direction

Soft Reset

To soft reset the modem, cycle the modem ON/OFF pin through a Power-OFF and then Power-ON cycle. i.e.

  1. Power OFF the modem.
  2. Wait for 1-2 seconds at least.
  3. Power ON the modem.

Hard Reset

There might arise situations where modem does not seem to be responding to any commands issued on AT commands port or it cannot be turned ON/OFF. In such scenarios, issue hard reset to the modem. It can be done by either toggling switch S2 at least for 2 seconds or pulling GPIO60 low for 2 seconds and then setting it high again.

The default state of reset GPIO should be high.

cd /sys/class/gpio/
cd gpio60
echo "low" > direction
sleep 2
echo "high" > direction

In Yantrr Pre-Compiled VAYU Boot Image, for ease of user these regular commands with the GPIOs have been created as functions : pinexp, setout, setin, pinread.

pinexp 45
pinexp 60
setout 45 high
setout 60 high

Please use hard reset conservatively. Soft reset should be preferred under most conditions.

PPP connection using wvdial

Download and install Wvdial

apt-get install wvdial

Open the wvdial.conf file

$ nano /etc/wvdial.conf

Assuming that you have the USERNAME, PASSWORD and APN available for the service provider of the sim card being used, edit and make wvdial.conf file like this. Sample wvdial.conf file for AT&T and T-Mobile USA

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,"IP","www",,0,0
Password = 0
Phone = *99#
New PPPD = yes
Modem Type = Analog Modem
Stupid Mode = 1
check DNS = no
auto DNS = no
Modem = /dev/ttyS1
ISDN = 0
Username = 0
Baud = 115200

Usually for GSM Networks, Modemphone is *99# or *99***1#. Consult your network provider for exact details in case you are facing difficulties. After editing, save and exit, now run wvdial for establishing communication.

$ wvdial

If all parameters are correct and everything is working, you should see a success message from wvdial. Once PPP connection has been established, you will see a ppp0 IP.

To check the status of wvdial and find out its IP open a new shell and use either of following:

  • Run ifconfig and find ppp0 in the list of network connections.
$ ifconfig
or
$ ifconfig ppp0
  • Check the network statistics for IP and their gateways and check the Iface column for ppp0
$ netstat -arn
Kernel IP routing table 

Destination    Gateway        Genmask           Flags     MSS Window   irtt Iface
0.0.0.0        192.168.1.1    0.0.0.0           UG          0 0           0 eth0
192.168.1.0    0.0.0.0        255.255.255.0     U           0 0           0 eth0
192.168.7.0    0.0.0.0        255.255.255.252   U           0 0           0 usb0
192.200.1.21   0.0.0.0        255.255.255.255   UH          0 0           0 ppp0
  • Read the system messages as
$ cat /var/log/messages

It lists all the attempts at establishing ppp communication using the modem and IPs for the successful attempt. Now all that is left is to route the network traffic over the gateway of ppp0 instead of eth0 so that GPRS communication is fully completed.

  • Default route setting for accessing internet of the ppp0 interface,update this file /etc/ppp/peers/wvdial as below
 root@Vayu:~# cat /etc/ppp/peers/wvdial
 noauth
 name wvdial
 usepeerdns
 replacedefaultroute

For more AT commands refer device specific manuals from below section.

AT Commands Manual

All the AT commands can be executed on the serial port /dev/ttyS1 with baud rate of 115200 8N1.

Software Setup Guide

For use of VAYU with Beaglebone Black, we recommend to use pre-compiled Debian Yantrr Image. The pre-compiled Debian Yantrr Image has all the settings pre-configured for use of its various features.

Precompiled Images

Detailed compilation steps updating soon.

Also in the Debian Yantrr Image, for configuring various modules of cape at every boot up a boot_run.sh script is executed. Its content is

#!/bin/sh -e
/bin/sleep 10
/bin/echo ==============================
/bin/echo 'Setting pins'
/root/bin/pinexp 45       # Modem ON/OFF Pin
/root/bin/pinexp 60       # Modem RESET Pin
/root/bin/setout 45 high  # Modem Power ON 
cd /lib/firmware
/bin/echo BB-UART1 > /sys/devices/platform/bone_capemgr/slots   ## For VAYU's Modem Serial Port ttyS1
/bin/echo 'Done with pins and devices'
/sbin/ip route list exact default
/bin/echo 'All done'

Applications