summaryrefslogtreecommitdiff
path: root/packages/gsm/files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gsm/files')
-rw-r--r--packages/gsm/files/default45
-rw-r--r--packages/gsm/files/fic-gta01/.mtn2git_empty0
-rw-r--r--packages/gsm/files/fic-gta01/default9
-rw-r--r--packages/gsm/files/fix-mlbuf.patch50
-rw-r--r--packages/gsm/files/htcuniversal/.mtn2git_empty0
-rw-r--r--packages/gsm/files/htcuniversal/default10
-rw-r--r--packages/gsm/files/magician/.mtn2git_empty0
-rw-r--r--packages/gsm/files/magician/default10
8 files changed, 40 insertions, 84 deletions
diff --git a/packages/gsm/files/default b/packages/gsm/files/default
index 161c97f5fb..43f4a2db0d 100644
--- a/packages/gsm/files/default
+++ b/packages/gsm/files/default
@@ -1,9 +1,44 @@
# gsmd This shell script configures for the gsmd init script.
-# If you must specify special options, uncomment and modify the next line
-#GSMD_OPTS="-s 115200 -F"
+. /etc/init.d/functions
-# If your GSM device needs to be powered up, uncomment and modify the next line
-#GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+case `cpuinfo_id` in
+ "GTA01", "GTA02")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+ GSM_DEV="/dev/ttySAC0"
+ ;;
+ "HTC Apache", "HTC Blueangel")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "HTC Himalaya")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS2"
+ ;;
+ "HTC Magician")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS1"
+ ;;
+ "HTC Universal")
+ GSMD_OPTS="-s 115200 -F -w 1"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "Palm Treo 650")
+ GSMD_OPTS="-s 460800 -F -w 1"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ *)
+ # Unknown board
-#GSM_DEV="/dev/ttyS1"
+ # If you must specify special options, uncomment and modify the next line
+ #GSMD_OPTS="-s 115200 -F"
+
+ # If your GSM device needs to be powered up, uncomment and modify the next line
+ #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+
+ # This should be in a common /etc/default/serial, together with
+ # BT_DEV and IR_DEV for devices that have those on a serial port
+ #GSM_DEV="/dev/ttyS1"
+ ;;
+esac
diff --git a/packages/gsm/files/fic-gta01/.mtn2git_empty b/packages/gsm/files/fic-gta01/.mtn2git_empty
deleted file mode 100644
index e69de29bb2..0000000000
--- a/packages/gsm/files/fic-gta01/.mtn2git_empty
+++ /dev/null
diff --git a/packages/gsm/files/fic-gta01/default b/packages/gsm/files/fic-gta01/default
deleted file mode 100644
index 1511376a6c..0000000000
--- a/packages/gsm/files/fic-gta01/default
+++ /dev/null
@@ -1,9 +0,0 @@
-# gsmd This shell script configures for the gsmd init script.
-
-# If you must specify special options, uncomment and modify the next line
-GSMD_OPTS="-s 115200 -F"
-
-# If your GSM device needs to be powered up, uncomment and modify the next line
-GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
-
-GSM_DEV="/dev/ttySAC0"
diff --git a/packages/gsm/files/fix-mlbuf.patch b/packages/gsm/files/fix-mlbuf.patch
deleted file mode 100644
index ed4aa2519d..0000000000
--- a/packages/gsm/files/fix-mlbuf.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Index: gsm/src/gsmd/atcmd.c
-===================================================================
---- gsm/src/gsmd/atcmd.c (revision 2745)
-+++ gsm/src/gsmd/atcmd.c (working copy)
-@@ -370,8 +370,8 @@
- if (g->mlbuf_len)
- g->mlbuf[g->mlbuf_len ++] = '\n';
- DEBUGP("Appending buf to mlbuf\n");
-- if (len > sizeof(g->mlbuf) - g->mlbuf_len)
-- len = sizeof(g->mlbuf) - g->mlbuf_len;
-+ if (len > MLPARSE_BUF_SIZE - g->mlbuf_len)
-+ len = MLPARSE_BUF_SIZE - g->mlbuf_len;
- memcpy(g->mlbuf + g->mlbuf_len, buf, len);
- g->mlbuf_len += len;
-
-@@ -470,7 +470,7 @@
- if (cr)
- len = cr - pos->cur;
- else
-- len = pos->buflen;
-+ len = pos->buflen - 1; /* assuming zero-terminated strings */
- rc = write(fd, pos->cur, len);
- if (rc == 0) {
- gsmd_log(GSMD_ERROR, "write returns 0, aborting\n");
-@@ -480,8 +480,8 @@
- fd, rc);
- return rc;
- }
-- if (cr && rc == len)
-- rc ++; /* Skip the \n */
-+ if (!cr || rc == len)
-+ rc ++; /* Skip the \n or \0 */
- pos->buflen -= rc;
- pos->cur += rc;
- write(fd, "\r", 1);
-Index: gsm/src/gsmd/gsmd.c
-===================================================================
---- gsm/src/gsmd/gsmd.c (revision 2745)
-+++ gsm/src/gsmd/gsmd.c (working copy)
-@@ -301,6 +301,10 @@
- {
- INIT_LLIST_HEAD(&g->users);
-
-+ g->mlbuf = talloc_array(gsmd_tallocs, unsigned char, MLPARSE_BUF_SIZE);
-+ if (!g->mlbuf)
-+ return -ENOMEM;
-+
- return 0;
- }
-
diff --git a/packages/gsm/files/htcuniversal/.mtn2git_empty b/packages/gsm/files/htcuniversal/.mtn2git_empty
deleted file mode 100644
index e69de29bb2..0000000000
--- a/packages/gsm/files/htcuniversal/.mtn2git_empty
+++ /dev/null
diff --git a/packages/gsm/files/htcuniversal/default b/packages/gsm/files/htcuniversal/default
deleted file mode 100644
index b09d433d1e..0000000000
--- a/packages/gsm/files/htcuniversal/default
+++ /dev/null
@@ -1,10 +0,0 @@
-# gsmd This shell script configures for the gsmd init script.
-
-GSMD_OPTS="-s 115200 -F -w 1"
-
-# If your GSM device needs to be powered up, uncomment and modify the next line
-#GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
-
-# this should be in a common /etc/default/serial, together
-# with BT_DEV, and IR_DEV
-GSM_DEV="/dev/ttyS0"
diff --git a/packages/gsm/files/magician/.mtn2git_empty b/packages/gsm/files/magician/.mtn2git_empty
deleted file mode 100644
index e69de29bb2..0000000000
--- a/packages/gsm/files/magician/.mtn2git_empty
+++ /dev/null
diff --git a/packages/gsm/files/magician/default b/packages/gsm/files/magician/default
deleted file mode 100644
index 523d0b9479..0000000000
--- a/packages/gsm/files/magician/default
+++ /dev/null
@@ -1,10 +0,0 @@
-# gsmd This shell script configures for the gsmd init script.
-
-GSMD_OPTS="-s 115200 -F"
-
-# If your GSM device needs to be powered up, uncomment and modify the next line
-#GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
-
-# this should be in a common /etc/default/serial, together
-# with BT_DEV, and IR_DEV
-GSM_DEV="/dev/ttyS1"