system call for GSM/3G tx-power

582 views
Skip to first unread message

felixad

unread,
Apr 30, 2011, 7:26:33 AM4/30/11
to android-ndk
Hello

I want to write a system call in die android source code to export the
transmission power of the GSM/3G module. My aim is to get a method
like the "getGsmSignalStrength()" but not for the received but for the
transmitted power.

I looked in the source code, but found no way. Has anybody an idea?

I know that the command "+CSQ" provides the rssi-signal strengt (from
die 3GPP standart). But there is now command in the standard to get
the transmission power.
Here I copied content from the data sheet:
http://www2.ifh.ee.ethz.ch/~fieldcom/pps-smartphone/moin.fcgi/Links%26Unterlagen?highlight=%28%5CbCyanogenMod%5Cb%29

Thanks!

Felix

Chris Stratton

unread,
Apr 30, 2011, 11:33:54 AM4/30/11
to android-ndk
If you've got an example of an existing function which runs a command
similar to the one you want, and you know the new command to the GSM
device that you want to add, then you need to copy and rename and
adjust everything related to the original function to produce the new
one.

You will need to be deploying a new system image to do this (or
hacking around on a rooted phone) - it's unfortunately not a level of
customization intended to be installable by the end user of a carrier-
marketed device. If you don't already have a build you are working
on, you might want to start with one of the community provided android
builds that try to make AOSP usable on consumer devices.

Try to test and verify the GSM command actually exists on your device
before you invest too much work in making it available to apps.

On Apr 30, 7:26 am, felixad <felix.adamc...@gmail.com> wrote:
> Hello
>
> I want to write a system call in die android source code to export the
> transmission power of the GSM/3G module. My aim is to get a method
> like the "getGsmSignalStrength()" but not for the received but for the
> transmitted power.
>
> I looked in the source code, but found no way. Has anybody an idea?
>
> I know that the command "+CSQ" provides the rssi-signal strengt (from
> die 3GPP standart). But there is now command in the standard to get
> the transmission power.
> Here I copied content from the data sheet:http://www2.ifh.ee.ethz.ch/~fieldcom/pps-smartphone/moin.fcgi/Links%2...
>
> Thanks!
>
> Felix

felixad

unread,
May 2, 2011, 6:45:19 AM5/2/11
to android-ndk
I already built my own system images. I use the cyanogenmod source
code for this.

But I don't know any GSM command to get the transmission power. I am
not sure if there exists one.

I thought I could try to read the registers which are next to the
registers for the signal strength. But I don't know how to read
special registers on the qualcomm chip e.g. MSM7200A (for the nexus
one).

Has anybody an idea how to get the transmission power?

Chris Stratton

unread,
May 2, 2011, 9:26:48 AM5/2/11
to android-ndk
On May 2, 6:45 am, felixad <felix.adamc...@gmail.com> wrote:

> But I don't know any GSM command to get the transmission power. I am
> not sure if there exists one.

When you wrote:

>But there is now command in the standard to get the transmission power.

I thought you were saying a command "now" exists in the radio that you
want to hook it up to the framework.

Did you mean to say there was "no" (known) command to do what you want
available in the radio?

felixad

unread,
May 3, 2011, 4:37:59 AM5/3/11
to android-ndk
> Did you mean to say there was "no" (known) command to do what you want
> available in the radio?
Yes. There is only a command to get the received power (+CSQ) which is
hook up in the framework in the signal strength.

I thought that the transmission power is very similar to the received
power. But there is no command which I know.

Because of this I looked in the datasheet of the qualcomm MSM7200A
chipset (link obove). I saw that there is a "TX DAC" inside the "RF
Interface". Because of this I thought it must be possible to find the
numerical value for the transmission power in a special register.

But I don't know how to connect to?

mic _

unread,
May 3, 2011, 5:10:49 AM5/3/11
to andro...@googlegroups.com
There are functions to get the current automatic gain control setting for both RX and TX on the modem side. But I have no idea if or how those can be accessed from the application processor. You'll probably have to ask an AMSS developer at Qualcomm, or someone who works with modem software at an OEM.

/Michael

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


pl

unread,
May 3, 2011, 6:00:47 AM5/3/11
to android-ndk
It would be realy nice, if some of the Android os developers or some
Qualcomm people can say something to this problem.

I am aswell interested in getting the phones transmission power!

pl

mic _

unread,
May 3, 2011, 12:55:36 PM5/3/11
to andro...@googlegroups.com
Since this is likely to be platform-dependent you might want to try registering an account at the Qualcomm support site (https://support.cdmatech.com/) and see if you can get any help there. I don't know if they allow registrations from anyone, but you could try.

/Michael


--

felixad

unread,
May 9, 2011, 1:33:21 PM5/9/11
to android-ndk
Hello

I tried to register at https://support.cdmatech.com. I requested for
the Organization Number but up to now, I didn't get any response.

But I found something new. The Radio Interface Layer (RIL). It is the
layer between Android telephony services and the radio hardware.

In this RIL exist two kinds of commands. 75 solicited request (e.g.
dial) and 17 unsolicited responses (e.g. signal strength).
Here I copied some nice slides:
http://www2.ifh.ee.ethz.ch/~fieldcom/pps-smartphone/moin.fcgi/RIL?action=AttachFile&do=view&target=android-ril-oral-prensentation-110330234835-phpapp01.pdf

Then I had a look in the code: in
~/android/system/hardware/ril/reference-ril/reference-ril.c

LINE: 1357
case RIL_REQUEST_RADIO_POWER:
requestRadioPower(data, datalen, t);
break;

With the code in
~/android/system/hardware/ril/include/telephony/ril.h

LINE: 1178
#define RIL_REQUEST_OPERATOR 22
/**
* RIL_REQUEST_RADIO_POWER
*
* Toggle radio on and off (for "airplane" mode)
* "data" is int *
* ((int *)data)[0] is > 0 for "Radio On"
* ((int *)data)[0] is == 0 for "Radio Off"

It seems that the RADIO_POWER is here an integer which contains values
which can stand for the transmission power TX.

Has anyone any experience with the RIL?

Felix

Chris Stratton

unread,
May 9, 2011, 1:47:10 PM5/9/11
to andro...@googlegroups.com
On Monday, May 9, 2011 1:33:21 PM UTC-4, felixad wrote:
 
 * Toggle radio on and off (for "airplane" mode)
 * "data" is int *
 * ((int *)data)[0] is > 0 for "Radio On"
 * ((int *)data)[0] is == 0 for "Radio Off"

It seems that the RADIO_POWER is here an integer which contains values
which can stand for the transmission power TX.

That looks to me more like it enables/disables the DC supply power to that portion of the chip and perhaps associated outboard amplifiers.  It sounds all-or-nothing rather than variable. 
 

felixad

unread,
May 9, 2011, 2:26:19 PM5/9/11
to android-ndk
> That looks to me more like it enables/disables the DC supply power to that
> portion of the chip and perhaps associated outboard amplifiers.  It sounds
> all-or-nothing rather than variable.  

Yes. It switch the transmitted power on or off. I also found a GSM
command for this. It is +CFUN (in 3GPP TS 27.007).

Then I looked in the java code. There I can check, if the phone is in
the aiplaine mode or not:

ITelephony phone =
ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
if (phone != null) {
if (phone.isRadioOn() == true)
....

Here the phone state is always only a boolean. But I thougth in the
ril.h they access to an array of integers.

herbert hu

unread,
Jun 28, 2013, 1:56:44 PM6/28/13
to andro...@googlegroups.com, felix.a...@gmail.com
Hey Felix,

did you find a android api function to get the transmission power?
It would be very nice, if you tell me, how to get the TXL from my phone in dBm.

Best regards from Germany,
hu
Reply all
Reply to author
Forward
0 new messages