Next revision | Previous revisionNext revisionBoth sides next revision |
tips_and_tricks [2012/02/13 20:53] – created paulf | tips_and_tricks [2013/02/01 21:31] – [Wireless connectivity without NetworkManager] add APN specification paulf |
---|
====== Tips and tricks ====== | ====== Tips and tricks ====== |
| ===== Gordan's blog ===== |
| Plenty of inspirational tricks including screen upgrade, overclocking, installing additional internal storage and more can be found at http://www.altechnative.net/tag/ac100/. |
| |
| ===== Optimising power consumption ===== |
| [[https://gitorious.org/powertop-for-arm|PowerTOP for ARM]] might provide more relevant information than the version from the distribution's repositories. |
| |
===== Lid and jack insertion events ===== | ===== Lid and jack insertion events ===== |
You can use a lightweight https://github.com/gandro/input-event-daemon, it should listen on ''/dev/input/event4'' for ''LID:0'' and ''LID:1'' events. | You can use a lightweight https://github.com/gandro/input-event-daemon, it should listen on ''/dev/input/event4'' for ''LID:0'' and ''LID:1'' events. |
| |
===== Wireless performance ===== | ===== Wireless performance ===== |
* [[http://linuxwireless.org/en/users/Download|compat-wireless]] provides newer wireless drivers that work better but wireless extensions will not be enabled until the kernel is compiled with support for some old pre-mac80211 driver (to select ''CONFIG_WIRELESS_EXT''). | * [[http://linuxwireless.org/en/users/Download|compat-wireless]] provides newer wireless drivers that work better but wireless extensions (only needed for some specific programs using this deprecated interface, e.g. [[http://www.aircrack-ng.org/|aircrack-ng]]) will not be enabled until the kernel is compiled with support for some old pre-mac80211 driver (to select ''CONFIG_WIRELESS_EXT''). |
* ''iw dev wlan0 set power_save off'' to improve interactivity when a power-saving compatible AP is used | * ''iw dev wlan0 set power_save off'' to improve interactivity when a power-saving compatible AP is used |
| |
| ===== Wireless connectivity without NetworkManager ===== |
| Place this in ''/etc/network/interfaces'' (on a Debian-like system) to have automatic wifi roaming controllable with wpa_cli and support for the GSM/UMTS modem: |
| <code> |
| # interfaces(5) file used by ifup(8) and ifdown(8) |
| auto lo |
| iface lo inet loopback |
| |
| allow-hotplug wlan0 |
| iface wlan0 inet manual |
| wpa-driver nl80211 |
| wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf |
| |
| iface default inet dhcp |
| |
| iface home inet dhcp |
| |
| iface wwan0 inet dhcp |
| pre-up stty -F /dev/ttyACM1 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 2> /dev/null || \ |
| stty -F /dev/ttyACM1 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 |
| pre-up chat -v TIMEOUT 30 "" \ |
| AT OK \ |
| AT+CGREG=1 OK \ |
| AT+CFUN=1 "+CGREG: 1"-AT+CFUN=1-"+CGREG: 1" \ |
| "" ABORT ERROR "" \ |
| AT*ENAPDBG=1 OK \ |
| 'AT+CGDCONT=1,"IP","internet.beeline.ru"' OK \ |
| "AT*ENAP=1,1" "*ENAPDBG: 1,1"-"AT*ENAP=1,1"-"*ENAPDBG: 1,1" < /dev/ttyACM1 > /dev/ttyACM1 || \ |
| ! chat -v "" AT*E2RESET < /dev/ttyACM1 > /dev/ttyACM1 |
| post-down chat -v "" AT+CFUN=4 OK < /dev/ttyACM1 > /dev/ttyACM1 |
| </code> |
| |
| This assumes your card has PIN disabled, if it's not, you should be able to add ''AT+CPIN="abcde"'' command where appropriate. If you hot-swap the SIM card you might need to issue the ''AT*E2RESET'' command manually (or do ''ifup wwan0'' twice). The modem supports messaging via SMS and USSD requests, e.g. this works with Beeline to see the amount of money left: |
| <code> |
| #!/bin/sh |
| /usr/sbin/chat -vs "" "AT+CUSD=1,\"*102#\",15" "OK" < /dev/ttyACM1 > /dev/ttyACM1 |
| </code> |