[Armadeus-commitlog] armadeus branch, master, updated. release-3.4-307-gff91d85
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-07-07 17:24:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via ff91d85ef3866ea873ac91a06b844f34c922ec10 (commit)
via 82d5fbf2a987056d6ba2c7f9b529d1a69da0df0c (commit)
from 0a19731430a420ab6daffd93ec848e7d8160ba91 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ff91d85ef3866ea873ac91a06b844f34c922ec10
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jul 7 19:03:03 2011 +0200
[TESTS] test_bluetooth.sh: hciconfig needs to be root on Host
commit 82d5fbf2a987056d6ba2c7f9b529d1a69da0df0c
Author: Julien Boibessot <jul...@ar...>
Date: Thu Jul 7 19:02:05 2011 +0200
[TESTS] Update test_gsm for APF51 usage and improve it a little while we are at it
-----------------------------------------------------------------------
Summary of changes:
target/test/test_bluetooth.sh | 2 +-
target/test/test_gsm.sh | 74 +++++++++++++++++++++++++++++++----------
2 files changed, 57 insertions(+), 19 deletions(-)
diff --git a/target/test/test_bluetooth.sh b/target/test/test_bluetooth.sh
index bb72bdb..38d292a 100755
--- a/target/test/test_bluetooth.sh
+++ b/target/test/test_bluetooth.sh
@@ -49,7 +49,7 @@ test_bluetooth()
exit_failed
fi
- ask_user "Be sure that your Host PC has its Bluetooth interface up and running (hciconfig hci0 up piscan), then press ENTER"
+ ask_user "Be sure that your Host PC has its Bluetooth interface up and running (sudo hciconfig hci0 up piscan), then press ENTER"
MY_BTADDR=`hcitool dev | grep hci0 | cut -f 3`
if [ "$MY_BTADDR" == "" ]; then
diff --git a/target/test/test_gsm.sh b/target/test/test_gsm.sh
index d7f0b29..f10a4ee 100755
--- a/target/test/test_gsm.sh
+++ b/target/test/test_gsm.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2010 The Armadeus Project
+# Copyright (C) 2010-2011 The Armadeus Project
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,17 +31,45 @@ exit_failed_gsm()
exit_failed
}
+prepare_gsm()
+{
+ if [ "$1" == "APF9328" ]; then
+ echo
+ elif [ "$1" == "APF27" ]; then
+ echo
+ elif [ "$1" == "APF51" ]; then
+ ask_user "Please powerup FPGA's bank 3 AND put Wireless jumper\nThen press ENTER"
+ load_fpga /lib/firmware/fpga/apf51_gsm_gps_firmware.bin
+ modprobe irq_ocore
+ modprobe 8250
+ modprobe board_irq_mng
+ modprobe 16750_ocore
+ # bring GSM out of reset:
+ modprobe wm831x-gpio
+ echo 245 > /sys/class/gpio/export
+ echo out > /sys/class/gpio/gpio245/direction
+ echo 1 > /sys/class/gpio/gpio245/value
+ ls -al /dev/ttyS*
+ GSM_DEVICE=/dev/ttyS0
+ GSM_SPEED=115200
+ else
+ echo "Platform not supported by this test"
+ fi
+}
+
test_gsm()
{
show_test_banner "GSM (APW)"
- ask_user "Do you have APF27 with an APW wireless extension board with GSM modem and the corresponding Linux kernel ? (Y/n)"
+ ask_user "Do you have an APF27Dev with an APW wireless extension board or an APF51Dev with a GSM/3G modem and the corresponding Linux kernel ? (Y/n)"
if [ "$response" == "n" ] || [ "$response" == "no" ]; then
- echo "Only the APW is supported by this test yet !!"
+ echo "Only APF27+APW or APF51Dev are supported by this test yet !!"
exit_failed
fi
- stty -F $GSM_DEVICE raw -echo -echoe -echok
+ execute_for_target prepare_gsm
+
+ stty -F $GSM_DEVICE raw -echo -echoe -echok $GSM_SPEED
if [ "$?" != 0 ]; then
echo "Failed to setup serial port ($GSM_DEVICE)"
exit_failed
@@ -49,6 +77,7 @@ test_gsm()
send_at_cmd ATE0 # ECHO OFF
cat $GSM_DEVICE &
+ sleep 1
echo " --- Checking MoDem is responding:"
send_at_cmd ATI3
echo " --- Constructor:"
@@ -56,22 +85,30 @@ test_gsm()
echo " --- Model:"
send_at_cmd AT+CGMM
- ask_user "Please enter your PIN code (ENTER to skip)"
- if [ "$response" == "" ]; then
- PIN_CODE=$DEFAULT_PIN_CODE
- else
- PIN_CODE=$response
- DIGITS=`echo -n "$PIN_CODE" | wc -c`
- if [ "$DIGITS" == 4 ]; then
- echo -e -n "AT+CPIN=\"$PIN_CODE\"\015" > $GSM_DEVICE
- sleep 2
- send_at_cmd "AT+CPIN?"
+ echo " --- Checking if PIN code is needed:"
+ send_at_cmd AT+CPIN?
+ ask_user "Did it tell you READY ? (N/y)"
+ if [ "$response" != "y" ]; then
+ ask_user "Please enter your PIN code (ENTER to skip)"
+ if [ "$response" == "" ]; then
+ PIN_CODE=$DEFAULT_PIN_CODE
else
- echo "Bad PIN code ($PIN_CODE)"
- exit_failed_gsm
+ PIN_CODE=$response
+ DIGITS=`echo -n "$PIN_CODE" | wc -c`
+ if [ "$DIGITS" == 4 ]; then
+ echo -e -n "AT+CPIN=\"$PIN_CODE\"\015" > $GSM_DEVICE
+ sleep 2
+ send_at_cmd "AT+CPIN?"
+ else
+ echo "Bad PIN code ($PIN_CODE)"
+ exit_failed_gsm
+ fi
fi
fi
+ echo " --- Checking signal quality (should be better than 12/99):"
+ send_at_cmd AT+CSQ
+
ask_user "Please enter a phone number, I will make it ring (default=$DEFAULT_PHONE_NUMBER)"
if [ "$response" == "" ]; then
PHONE_NUMBER=$DEFAULT_PHONE_NUMBER
@@ -84,8 +121,8 @@ test_gsm()
exit_failed_gsm
fi
killall cat
- /usr/sbin/chat ABORT 'NO CARRIER' ECHO ON '' AT OK ATD"$PHONE_NUMBER" OK > $GSM_DEVICE < $GSM_DEVICE
- sleep 5
+ /usr/sbin/chat ABORT 'NO CARRIER' ECHO ON '' AT OK ATD"$PHONE_NUMBER"\; OK > $GSM_DEVICE < $GSM_DEVICE
+ sleep 6
send_at_cmd ATH
ask_user "Did you ear it ring ? (Y/n)"
if [ "$response" == "n" ] || [ "$response" == "no" ]; then
@@ -94,6 +131,7 @@ test_gsm()
fi
echo_test_ok
+ send_at_cmd ATE1 # ECHO ON
exit 0
}
hooks/post-receive
--
armadeus
|