User Tools

Site Tools


doc:appunti:hardware:freerunner_debian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:hardware:freerunner_debian [2011/10/29 23:51] – [The FSO DBus interface] niccolodoc:appunti:hardware:freerunner_debian [2011/11/01 14:28] – [WiFi broken in openmoko-panel-plugin] niccolo
Line 129: Line 129:
     * **fso-deviced-openmoko**     * **fso-deviced-openmoko**
         * **fso-deviced**         * **fso-deviced**
 +    * **fso-gsmd-openmoko**
 +      * **fso-gsmd**
   * **mdbus2**   * **mdbus2**
   * **fsoraw**   * **fsoraw**
Line 162: Line 164:
 </code> </code>
  
 +==== fso-gsmd ====
 +
 +The configuration file is:
 +
 +  * **''/etc/freesmartphone/conf/<platform>/fsogsmd.conf''** or
 +  * **''/etc/freesmartphone/conf/default/fsogsmd.conf''**
 +
 +Man page says: //The daemon will be started automatically by DBus, once a request is send to it//; actually the daemon is started just after ''fsodeviced'' is started.
 +
 +The ''fsogsmd'' implementation is capable of **{{.:freerunner:0710-720.zip|GSM 07.10 Multiplexing}}** using the library ''libgsm0710mux'', so installing the **fso-abyss** or the previous **fso-gsm0710muxd** packages is not required.
 ===== The Devices ===== ===== The Devices =====
  
Line 175: Line 187:
 ==== GSM/GPRS ==== ==== GSM/GPRS ====
  
-Shuld upgrade the GSM modem firmware? Look at this page about **[[http://wiki.openmoko.org/wiki/GSM/Flashing|flashing]]**.+=== Upgrading the modem firmware ===
  
-FIXME Check the new **fso-abyss** package which superseed fso-gsm0710muxd, chek what are the proper packages to install:+I don't need to upgrade the GSM modem firmware (see **[[http://wiki.openmoko.org/wiki/GSM/Flashing|flashing]]**) because Moko11 is the latest version available. Checked with **''minicom''** (''/dev/ttySAC0'', 115200 8N1):
  
-  * [[http://packages.debian.org/sid/fso-gsmd|fso-gsmd]] +<code> 
-  * [[http://packages.debian.org/sid/fso-abyss|fso-abyss]] +AT+CGMR 
-  * [[http://packages.debian.org/sid/fso-gsm0710muxd|fso-gsm0710muxd]]++CGMR"GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko11" 
 +</code>
  
-FSO provides a nice multiplexing of GSM/GPRS. Different aplications can talk to the GSM modem concurrently and place GSM calls while running a GPRS internet connection (bandwidth will be the bottleneck!). The GSM multiplexing is handled by the **fso-gsm0710muxd** package.+=== TCP/IP connection (GPRS===
  
-Clicking on the GSM icon on the panel should allow to start/stop a GPRS connection. Unfortunately **I got several problems maging GPRS calls**, may be simply related to the AT commands used in diallingI was lazy on debugging, so I resorted on self-made scripts and the traditional **''pon''**/**''poff''** commands. Here it is my ''gprs-on'' script:+The TCP/IP connection is called GSM PDP (Packet Data Protocol) and it is handled by the FSO stack, the package providing this interface is **fso-gsmd**. The ''fsogsmd'' daemon actually uses **''pppd''** to make the connection and to create the ''ppp0'' interface.
  
-<code bash+''pppd'' is called with some default options (search ''ppp_options'' into the source files), which don't work with the ISP provider I know. Fortunately we can override the options in **''/etc/freesmartphone/conf/GTA02/fsogsmd.conf''** 
-#!/bin/sh + 
-# Don't use GSM multiplexer, talk directlty to the modem+<file
-killall gsm0710muxd +Conseder also the options ktune;proxyarp for tethering. 
-om gsm power 1 +ppp_options = debug;115200;nodetach;modem;crtscts;hide-password;noauth;noipdefault;defaultroute;replacedefaultroute;usepeerdns;noproxyarp 
-poff -a +</file> 
-pon+ 
 +=== Missing ppp2fsogsmd.so === 
 + 
 +There was the [[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647078|bug 647078]] which caused this error in ''/var/log/fsogsmd.log'': 
 + 
 +<code> 
 +[INFO]  PdpPppMux <>: PDP Context Status now FREE_SMARTPHONE_GSM_CONTEXT_STATUS_OUTGOING 
 +[INFO]  PdpPppMux <>: PDP Context Status now FREE_SMARTPHONE_GSM_CONTEXT_STATUS_RELEASED 
 +[WARN]  PdpPppMux <>: PPP quit immediately; check options and permissions. 
 +</code> 
 + 
 +I had to make this symlink: 
 + 
 +<code> 
 +/usr/lib/cornucopia -> /usr/lib/arm-linux-gnueabi/cornucopia/
 </code> </code>
  
Line 200: Line 227:
 This is the service provided by the package **fso-gsmd** and the low-level driver **fso-gsmd-openmoko**, which are from FSO Cornucopia implementation. This is the service provided by the package **fso-gsmd** and the low-level driver **fso-gsmd-openmoko**, which are from FSO Cornucopia implementation.
  
-Making a TCP/IP connection uses the Packet Data Protocol interface. First of all enter the APN, login and password:+Making a TCP/IP connection uses the Packet Data Protocol interface. This is an example of DBus chat, using **''mdbus2''** in interactive mode. 
 + 
 +  - The GSM modem gets powered-on with ''RequestResource''
 +  - Register on the GSM network. 
 +  - APN, login and password are entered. 
 +  - Check PDP status and start the connection.
  
 <code> <code>
-mdbus2 -s org.freesmartphone.ogsmd \ +mdbus2 -s -i 
-    /org/freesmartphone/GSM/Device \ +MDBUS2> org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.RequestResource GSM 
-    org.freesmartphone.GSM.PDP.SetCredentials internet.wind wind wind+MDBUS2> org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.Network.Register 
 +MDBUS2> org.freesmartphone.ogsmd  /org/freesmartphone/GSM/Device org.freesmartphone.GSM.PDP.SetCredentials internet.wind wind wind 
 +MDBUS2> org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.PDP.GetContextStatus 
 +("released",{}) 
 +MDBUS2> org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.PDP.ActivateContext 
 +MDBUS2> org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.PDP.GetContextStatus 
 +("active",{}) 
 +MDBUS2> org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.PDP.DeactivateContext
 </code> </code>
  
-Then check the connection statusplace a call and terminate it:+FIXME: exiting ''mdbus2'' (with Ctrl-D)the GSM device is released (and the power turned off), but ''pppd'' is not terminated, it remains running and consumes the log file.
  
-<code> +=== Other notes ===
-mdbus2 -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \ +
-    org.freesmartphone.GSM.PDP.GetContextStatus +
-("released",{})+
  
-... org.freesmartphone.GSM.PDP.ActivateContext +FIXME The following is old stuff, superceeded by FSO Cornucopia implementation. 
-... org.freesmartphone.GSM.PDP.DeactivateContext+ 
 +FSO provides a nice multiplexing of GSM/GPRSDifferent aplications can talk to the GSM modem concurrently and place GSM calls while running a GPRS internet connection (bandwidth will be the bottleneck!)The GSM multiplexing is handled by the **fso-gsm0710muxd** package
 + 
 +Clicking on the GSM icon on the panel should allow to start/stop a GPRS connectionUnfortunately **I got several problems maging GPRS calls**, may be simply related to the AT commands used in diallingI was lazy on debugging, so I resorted on self-made scripts and the traditional **''pon''**/**''poff''** commandsHere it is my ''gprs-on'' script: 
 + 
 +<code bash> 
 +#!/bin/sh 
 +# Don't use GSM multiplexer, talk directlty to the modem. 
 +killall gsm0710muxd 
 +om gsm power 1 
 +poff -a 
 +pon
 </code> </code>
  
-The data connection involves running pppd? 
 ==== Battery ==== ==== Battery ====
  
Line 441: Line 487:
 ==== WiFi broken in openmoko-panel-plugin ==== ==== WiFi broken in openmoko-panel-plugin ====
  
-The **fso-deviced-openmoko** should be patched because the sysfs path to control the WiFi power changed in kernel 2.6.34. See **[[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647003|Debian bug #647003]]**.+The **fso-deviced-openmoko** before 0.9.5+git20110805-2 has a bug (the WiFi power sysfs path changed in kernel 2.6.34), see **[[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647003|Debian bug #647003]]**.
  
 Also **''openmoko-panel-plugin''** must be patched to use the new FSO DBus interface. I will release that patched version soon. Also **''openmoko-panel-plugin''** must be patched to use the new FSO DBus interface. I will release that patched version soon.
Line 621: Line 667:
 Idle status is one of the following: **''busy''**, **''idle''**, **''idle_dim''**, **''idle_prelock''**, **''lock''** and **''suspend''**. To prevent the device entering a state, set its timeout to **''-1''** (see the note below). If a state is disabled, the subsequent states are never reached. Idle status is one of the following: **''busy''**, **''idle''**, **''idle_dim''**, **''idle_prelock''**, **''lock''** and **''suspend''**. To prevent the device entering a state, set its timeout to **''-1''** (see the note below). If a state is disabled, the subsequent states are never reached.
  
-**NOTE**: to set a timeout of **''-1''** you cannot use the command line because **''-1''** is interpreted as an option. Use this trick:+**NOTE**: to set a timeout of **''-1''** you cannot use the command line because **''-1''** is interpreted as an option. We can use the interactive mode of ''mdbus2'' (terminate with Ctrl-D): 
 + 
 +<code> 
 +mdbus2 -s -i 
 +MDBUS2> org.freesmartphone.odeviced /org/freesmartphone/Device/IdleNotifier/0 org.freesmartphone.Device.IdleNotifier.SetTimeout idle -1 
 +</code> 
 + 
 +If you want to use it into a script, just make this:
  
 <code bash> <code bash>
 +#!/bin/sh
 BUS='org.freesmartphone.odeviced' BUS='org.freesmartphone.odeviced'
 IDLE_SERVICE='/org/freesmartphone/Device/IdleNotifier/0' IDLE_SERVICE='/org/freesmartphone/Device/IdleNotifier/0'
doc/appunti/hardware/freerunner_debian.txt · Last modified: 2011/11/01 16:23 by niccolo