Difference between revisions of "Vayu Cape SW images and drivers"

From Yantrr Wiki
Jump to: navigation, search
(Basic steps for Using 3G (GSM/WCDMA) Modem)
(Basic steps for Using 3G (GSM/WCDMA) Modem)
Line 25: Line 25:
  
 
* Attach cape to beaglebone black and boot from sd card.  
 
* Attach cape to beaglebone black and boot from sd card.  
* Keep USB cable unattached at first. Place an enabled GSM SIM card in the SIM card slot. In case of WCDMA, the RUIM can be placed in the same SIM slot.  
+
* '''Keep USB cable unattached''' at first.  
 +
* Place an enabled GSM SIM card in the SIM card slot. In case of WCDMA, the RUIM can be placed in the same SIM slot.  
 
* After booting, turn on the modem by one of these options:
 
* After booting, turn on the modem by one of these options:
 
** Pressing switch S1 for 4 seconds and releasing, or
 
** Pressing switch S1 for 4 seconds and releasing, or

Revision as of 07:42, 24 February 2014

Vayu capes is fully supported for Debian Wheezy ARMHF (Official Page). The kernel tree is based on Robert C Nelson git tree and all the commits are based on the latest kernel. Kindly follow his wiki for detailed steps on how to compile the kernel from scratch. BBB-RobertCNelson-Main Wiki.

We have recompiled an SD Card flashable image for easy plug and play demonstration of the Vayu 2G and 3G capes. Additionally we have outlined detailed step by step compilation of this images based on BBB-RobertCNelson-Main Wiki. If you are using any other distribution other than debian, the kernel patches are listed, kindly recompile your kernel based on directed patches, enable PPS support (if your capes have GPS timing module) and you should be ready to go.

We know in world of Linux, things get a bit complicated, we have FAQ's which may help you to unblock, kindly follow these.

Ready to use Debian Wheezy downloadable image

  • To get started quickly, download image file from the link below and flash to a 4GB SD CARD.
  • This prebuilt SD card image (4GB size) already has all the required drivers and extra functions and packages to be used by the Cape:

Download Files:

  • Download these files from the dropbox:
  • The above image file has:
    • PPS support using the dtbo/dts files for initializing the device tree overlay.
    • PPS drivers, required by NTP server.
    • USB drivers , required by GSM/WCDMA modem.
    • NTP server setup ( if using GPS module) with servers set for Asia/India
    • PPPd/Wvdial tool to establish 2G and 3G connection (only Service provider data has to be updated) with sample provider files. We have included AT&T and T-Mobile wvdial conf sample files for US users.
    • Helpful scripts for operating GPIOs (under /root/bin for activating/reading pins directly).

Basic steps for Using 3G (GSM/WCDMA) Modem

  • Attach cape to beaglebone black and boot from sd card.
  • Keep USB cable unattached at first.
  • Place an enabled GSM SIM card in the SIM card slot. In case of WCDMA, the RUIM can be placed in the same SIM slot.
  • After booting, turn on the modem by one of these options:
    • Pressing switch S1 for 4 seconds and releasing, or
    • Issue the commands:
echo "low" > /sys/class/gpio/gpio45/direction
sleep 4
echo "high" > /sys/class/gpio/gpio45/direction
  • After some time, LED D4 should start blinking to indicate modem has turned on.
  • Attach usb cable between mini USB port (#16) of cape and host port of beaglebone board. Alternatively, if the USB host on cape is also populated,then the USB cable can be kept intact before Board was booted up.
  • Check that modem is visible on the USB bus by:
lsusb

Bus 001 Device 002: ID 0424:2412 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 21f5:2012
  • You can also check that ports will be assigned for the modem by :
ls /dev/ttyUSB*

/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2
  • The modem is now ready for use with pon/poff, ppp, Wvdial or any other dialer program.

Basic Steps for Using GPS

  • Using pre-built image.

In the pre-built image, the GPS device is enabled (in crontab under root) by default at bootup on the /dev/ttyO4 port. To quickly test the GPS, issue the following commands:

stty -F /dev/ttyO4 raw 19200
cat /dev/ttyO4

This should produce the text NMEA messages as received from the GPS device.

$GPRMC,140615.00,A,2834.25835,N,07720.54109,E,0.033,53.14,240214,0.00,E,D,V*70
$GPVTG,53.14,T,0.00,M,0.033,N,0.061,K,D*12
$GPGGA,140615.00,2834.25835,N,07720.54109,E,1,11,0.80,199.5,M,-36.0,M,,*70
$GPGSA,A,3,07,08,28,09,19,03,27,10,23,13,11,,1.81,0.80,1.62,1*1A
$GPGSV,4,1,15,13,72,176,32,07,53,346,48,19,52,080,38,03,40,052,39,1*69
$GPGSV,4,2,15,23,37,159,33,28,31,255,42,08,29,313,45,27,25,046,37,1*65
$GPGSV,4,3,15,09,23,312,43,11,22,135,28,10,17,260,33,16,08,049,10,1*65
$GPGSV,4,4,15,01,03,150,22,05,00,312,,40,,,38,1*6C
$GPGLL,2834.25835,N,07720.54109,E,140615.00,A,D*64
$GPZDA,140615.00,24,02,2014,-00,00*4F

For more details, see the GPS and NTP Configuration Page.

  • Using another image.

Since the GPS device is attached to the generic /dev/ttyO4 serial port, it is possible to access it without any special drivers. For this to work, the only additional step required is to enable the device tree overlay for /dev/ttyO4 (uart4) of the beaglebone black:

cd /lib/firmware
echo BB-UART4 > /sys/devices/bone_capemgr.9/slots
stty -F /dev/ttyO4 raw 19200
cat /dev/ttyO4

Basic Steps for Using PPS

For PPS support, it is essential to enable PPS drivers in the kernel. For this reason, it is important to use the pre-built kernel image or use another image verified to have PPS support built in already. Once this is done, the following steps can be executed:

  • Enable PPS pin as interrupt (already done if booting with pre-built image):
cd /lib/firmware
echo BBB_VAYU > /sys/devices/bone_capemgr.9/slots
  • Verify pps signal is activated in the kernel
ppstest /dev/pps1

Compiling the SD card image from the Scratch

This section describes how to compile the Debian image from the scratch to enable

  • PPS drivers, required by NTP server
  • USB drivers , required by WCDMA modem
  • Custom wvdial conf file to enable connections
  • Device tree overlays to enable cape
  • Helpful scripts

Kindly follow this page for the detailed outlined steps - Compiling Yantrr Vayu Drivers on Debian Wheezy

Modifying your existing kernel or other distribution

If you are having your own branch of kernel and follow some other linux distribution like Ubuntu, Angstrom, you can use following wiki to recompile the kernel to support Vayu capes. We dont officially support it, but hopefully would make it easier. Note

  • Vayu 2G cape - These are fully supported in all linux distribution with device tree and overlay support, you just need the Vayu cape overlay to configure UART's
  • Vayu 2G + GPS capes - These need PPS support for GPIO in kernel, you may need to rebuilt your kernel to enable these, the details are outlined here from make menuconfig.
  • Vayu 3G & 3G + GPS capes - These may need USB driver support in addition to GPS PPS support.

Following wiki would help you in enabling these if you have correct tools to compile your kernel.

FAQ's