<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Willsowerbutts</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Willsowerbutts"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Willsowerbutts"/>
	<updated>2026-05-01T16:49:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40605</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40605"/>
		<updated>2009-01-14T11:56:59Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my {{X301}} I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the {{X301}} running the 3G device increases the power consumption by more than 10% (note: I have not tested how much more power is used if the device is not online and configured in low power mode, but it seems sensible to assume it is more than zero). I am using a UK spec {{X301}} with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions. This worked up to kernel 2.6.28; with kernels after 2.6.28 the name of the serial devices associated with the 3G device has changed from &amp;quot;/dev/ttyACM&amp;quot; to &amp;quot;/dev/ttyUSB&amp;quot;, I have noted changes required below.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but when the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using kernel 2.6.28 or later, replace &amp;quot;/dev/ttyACM0&amp;quot; with &amp;quot;/dev/ttyUSB2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values. AT&amp;amp;T will work using the APN string &amp;quot;ISP.CINGULAR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are using kernel 2.6.28 or later, replace &amp;quot;/dev/ttyACM2&amp;quot; in the script with &amp;quot;/dev/ttyUSB2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
If the system stays waiting for the device to power up forever check if you are running kernel 2.6.28 or later, you may need to adjust the device names from &amp;quot;/dev/ttyACM*&amp;quot; to &amp;quot;/dev/ttyUSB*&amp;quot; as described above.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40052</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40052"/>
		<updated>2008-11-29T20:21:29Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: /* Scripting everything */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my {{X301}} I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the {{X301}} running the 3G device increases the power consumption by more than 10% (note: I have not tested how much more power is used if the device is not online and configured in low power mode, but it seems sensible to assume it is more than zero). I am using a UK spec {{X301}} with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but when the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40051</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40051"/>
		<updated>2008-11-29T17:45:24Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: /* Scripting everything */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my {{X301}} I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the {{X301}} running the 3G device increases the power consumption by more than 10% (note: I have not tested how much more power is used if the device is in low power mode but it seems sensible to assume it is more than zero). I am using a UK spec {{X301}} with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but when the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40050</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40050"/>
		<updated>2008-11-29T17:43:04Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: /* Scripting everything */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my {{X301}} I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the {{X301}} running the 3G device increases the power consumption by more than 10% (note: I have not tested how much more power is used if the device is in low power mode but it seems sensible to assume it is more than zero). I am using a UK spec {{X301}} with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40049</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40049"/>
		<updated>2008-11-29T17:42:34Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: /* Scripting everything */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my {{{X301}}} I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the X301 running the 3G device increases the power consumption by more than 10% (note: I have not tested how much more power is used if the device is in low power mode but it seems sensible to assume it is more than zero). I am using a UK spec {{{X301}}} with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40048</id>
		<title>Ericsson F3507g Mobile Broadband Module</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Ericsson_F3507g_Mobile_Broadband_Module&amp;diff=40048"/>
		<updated>2008-11-29T17:38:29Z</updated>

		<summary type="html">&lt;p&gt;Willsowerbutts: Add a section on how to script 3G dialup including modem power control&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though Ericsson claims that their F3507g MiniPCIe WWAN/GPS card is compartible with Linux, they do not provide any information how to make this card work. Here are some basics:&lt;br /&gt;
&lt;br /&gt;
* the card will not work without inserted SIM, even the GPS function. If you want to use just GPS, any SIM would work, even if it is not attached to any active account with any GSM provider.&lt;br /&gt;
* the card provides USB interface, and is recognized by cdc_acm kernel module&lt;br /&gt;
* it registers three pseudo-TTY's, in my case /dev/ttyACM0, /dev/ttyACM1 and /dev/ttyACM2&lt;br /&gt;
* the card is controlled by sending AT-commands to one of it's pseudo-TTY's&lt;br /&gt;
* it applears that all three TTY's are identical. So, for example, we can use /dev/ttyACM0 for broadband 3G, /dev/ttyACM1 for controlling the card via AT-commands, and /dev/ttyACM2 for GPS, or in any other order.&lt;br /&gt;
&lt;br /&gt;
==Activating the card==&lt;br /&gt;
Before the card can be used, you have to activate it. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. The responce should be&lt;br /&gt;
&lt;br /&gt;
 OK&lt;br /&gt;
&lt;br /&gt;
You can do it with any terminal terminal program like &amp;quot;minicom&amp;quot;, or using &amp;quot;cu&amp;quot; in &amp;quot;expect&amp;quot; script as [http://redmonk.com/sogrady/2008/09/24/apone/ here]. But we are not done yet. If you SIM is protected by a PIN-code, we may have to unlock it. This is done by sending&lt;br /&gt;
&lt;br /&gt;
 AT+CPIN=&amp;quot;YOUR-PIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. If your SIM is not protected by a PIN-code, or it is configured not to require one on connecting to the network, the last command is not necessary. Anyway, your card is not active until it responds with&lt;br /&gt;
&lt;br /&gt;
 +PACSP0&lt;br /&gt;
&lt;br /&gt;
Don't try to do anything until you see it.&lt;br /&gt;
&lt;br /&gt;
==Turning the card off==&lt;br /&gt;
To put the card into energy-saving mode (this is the default), you can send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=4&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. To remove all power from the card, send&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=0&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Be carefull with the last command. It turns the card completely off, and it will no longer accept any AT-commands before the hard reset (which can be done either by rebooting the computer, or physically removing the power from the card).&lt;br /&gt;
&lt;br /&gt;
==Using the card as a wireless modem==&lt;br /&gt;
Once the card is active, we can use it to connect to 3G network in the same way as any GPRS modem. For example to connect to AT&amp;amp;T Wireless network, your wvdial.conf would have to be something like this&lt;br /&gt;
&lt;br /&gt;
 [Dialer att]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;proxy&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
==Using the card as GPSr==&lt;br /&gt;
Once the card is active, we can use it to get GPS info via NMEA protocol. First, you have to configure the a few NMEA options. It is done by sending &lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Here&lt;br /&gt;
&lt;br /&gt;
*X can be 0 (NMEA stream turned off) or 1 (NMEA stream turned on)&lt;br /&gt;
*Y can be an integer form 1 to 60, and sets the frequency of how often the card emits the NMEA sentences&lt;br /&gt;
*Z can be 0 (DGPS is turned off) or 1 (DGPS is turned on)&lt;br /&gt;
&lt;br /&gt;
so, to configure the GPSr to update every 5 seconds, and turn DGPS on, you would send&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=1,5,1&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Once the GPSr is configured, we can get the NMEA stream on /dev/ttyACM2 by sending&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSNPD&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM2. Once you do that, /dev/ttyACM2 will no longer accept any new AT-commands. But you still can change the the behavior of the NMEA stream by sending the appropriate&lt;br /&gt;
&lt;br /&gt;
 AT*E2GPSCTL=X,Y,Z&lt;br /&gt;
&lt;br /&gt;
to /dev/ttyACM1. Now you can read the NMEA stream by saying&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyACM2&lt;br /&gt;
&lt;br /&gt;
or better yet, start gpsd interface on /dev/ttyACM2.&lt;br /&gt;
&lt;br /&gt;
==Other thoughts==&lt;br /&gt;
While &amp;quot;AT+CFUN=*&amp;quot; and &amp;quot;AT+CPIN=*&amp;quot; are pretty standard commands for wireless modems and are well-documented (e.g. [http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf here] and [http://www.gsm-modem.de/gsm-modem-faq.html here]), it appears that the commands &amp;quot;AT*E2GPSCTL&amp;quot; and &amp;quot;AT*E2GPSNPD&amp;quot; are unique for Ericsson F3507g card. All credit for discovering them goes to N Z who left a comment in this [http://redmonk.com/sogrady/2008/09/24/apone/ thread]. I imagine one could find them via a USB sniffer on a working Windows machine (or a Linux machine with Windows running in a virtual machine). Another way to get them it to try to look for &amp;quot;gps&amp;quot; string in Windows drivers. What is interesting, is that F3507g supports few other AT-commands with &amp;quot;GPS&amp;quot; substring (you can get all supported AT-commands by sending &amp;quot;AT*&amp;quot; to /dev/ttyACM1 after activating it with &amp;quot;AT+CFUN=1&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Scripting everything==&lt;br /&gt;
&lt;br /&gt;
On my X301 I have a simple script to power up and initialise the 3G device, dial out with wvdial and then power everything down again when I've finished online. This is worth doing because on the X301 running the 3G device increases the power consumption by more than 10%. I am using a UK spec X301 with the supplied Vodafone SIM card. I needed to activate the SIM card on the Vodafone web site before this would work.&lt;br /&gt;
&lt;br /&gt;
This script works fine on Debian but may require changes for other distributions.&lt;br /&gt;
&lt;br /&gt;
First you need to install the &amp;quot;ppp&amp;quot;, &amp;quot;sysfsutils&amp;quot; and &amp;quot;wvdial&amp;quot; packages with&lt;br /&gt;
&lt;br /&gt;
 apt-get install ppp wvdial sysfsutils&lt;br /&gt;
&lt;br /&gt;
I use sysfsutils to completely power off the 3G WWAN device on boot, in order to save power. I also power off the bluetooth, disable the white LED in the power button, and instruct the kernel to use the &amp;quot;noop&amp;quot; scheduler for the SSD. Edit /etc/sysfs.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 block/sda/queue/scheduler = noop&lt;br /&gt;
 devices/platform/thinkpad_acpi/bluetooth_enable = 0&lt;br /&gt;
 devices/platform/thinkpad_acpi/wwan_enable = 0&lt;br /&gt;
 class/leds/tpacpi::power/brightness = 0&lt;br /&gt;
&lt;br /&gt;
These will now be applied on boot, but the laptop wakes from sleep the BIOS seems to undo some of these settings, so create a script named &amp;quot;/etc/pm/sleep.d/sysfsutils&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 case $1 in&lt;br /&gt;
     (hibernate|suspend)&lt;br /&gt;
         ;;&lt;br /&gt;
     (thaw|resume)&lt;br /&gt;
         /etc/init.d/sysfsutils start&lt;br /&gt;
         ;;&lt;br /&gt;
     *)  echo &amp;quot;somebody is calling me totally wrong.&amp;quot;&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
Don't forget to &amp;quot;chmod a+x /etc/pm/sleep.d/sysfsutils&amp;quot;. This script will be called when the laptop wakes up and it will power-off the 3G WWAN device again.&lt;br /&gt;
&lt;br /&gt;
Now we need to set up &amp;quot;wvdial&amp;quot; to work with the 3G WWAN device. Edit /etc/wvdial.conf to look like this:&lt;br /&gt;
&lt;br /&gt;
 [Dialer 3G]&lt;br /&gt;
 Modem = /dev/ttyACM0&lt;br /&gt;
 Init1 = AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;Internet&amp;quot;&lt;br /&gt;
 Stupid mode = 1&lt;br /&gt;
 phone= *99#&lt;br /&gt;
 Username = *&lt;br /&gt;
 Password = *&lt;br /&gt;
&lt;br /&gt;
If you are using a SIM from a mobile provider other than Vodafone UK you may need to change the access point name (APN) in the Init1 string. I found that Vodafone UK uses the APN &amp;quot;Internet&amp;quot; and T-mobile use the APN &amp;quot;general.t-mobile.uk&amp;quot;, presumably other providers also use different APN values.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/ppp/peers/wvdial to look like this:&lt;br /&gt;
&lt;br /&gt;
 noauth&lt;br /&gt;
 name wvdial&lt;br /&gt;
 usepeerdns&lt;br /&gt;
 noccp&lt;br /&gt;
 novj&lt;br /&gt;
 novjccomp&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;quot;/usr/local/bin/3g-dialup&amp;quot; containing the following:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 WWANDEVICE=/dev/ttyACM2 &lt;br /&gt;
 &lt;br /&gt;
 ## Check we have appropriate permissions&lt;br /&gt;
 if [ `whoami` != &amp;quot;root&amp;quot; ]; then&lt;br /&gt;
     echo Run this script as root&lt;br /&gt;
     exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Enable the WWAN hardware&lt;br /&gt;
 echo -n &amp;quot;Powering up WWAN device ..&amp;quot;&lt;br /&gt;
 echo 1 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ ! -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Initialising WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=1&amp;quot; &amp;quot;+PACSP0&amp;quot; &amp;quot;AT&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Starting PPP -- hit Ctrl+C when finished&amp;quot;&lt;br /&gt;
 /usr/bin/wvdial 3G&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Shutting down WWAN modem ...&amp;quot;&lt;br /&gt;
 /usr/sbin/chat -v &amp;quot;&amp;quot; &amp;quot;AT+CFUN=4&amp;quot; &amp;quot;OK&amp;quot; &amp;gt; $WWANDEVICE &amp;lt; $WWANDEVICE&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Disable the WWAN hardware, save power&lt;br /&gt;
 echo -n &amp;quot;Powering down WWAN device ..&amp;quot;&lt;br /&gt;
 echo 0 &amp;gt; /sys/devices/platform/thinkpad_acpi/wwan_enable&lt;br /&gt;
 while [ -c $WWANDEVICE ]; do sleep 0.5; echo -n &amp;quot;.&amp;quot;; done&lt;br /&gt;
 echo &amp;quot; OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You'll need to make this script executable with &amp;quot;chmod a+x /usr/local/bin/3g-dialup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now I can fire up a 3G connection trivially with &amp;quot;sudo 3g-dialup&amp;quot; in an xterm. Once pppd has acquired an IP address you can use the Internet. Once you're finished simply hit Ctrl+C in the xterm and it will close the PPP session and power down the modem again. It's probably a good idea to shut down the connection in this way before you put the laptop to sleep.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
*{{X200}}&lt;br /&gt;
*{{X301}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Willsowerbutts</name></author>
		
	</entry>
</feed>