Porting FM In Android Along With The Application

2,035 views
Skip to first unread message

Ranganath TM

unread,
Mar 20, 2012, 3:05:52 AM3/20/12
to android...@googlegroups.com
Hi All,

I am trying to port an FM in android GB, along with my application for AWNH580(Azurewave FM hardware module), but to write an application I don't have any specific API.

please help to write an application and to port the FM module.

Thanks,
Ranga   

halli manjunatha

unread,
Mar 20, 2012, 3:07:59 PM3/20/12
to rangan...@asmaitha.com, android...@googlegroups.com
Hi Ranga,

As for I know you wont find a standard API set for FM radio in
Android, cos Google doesn't supports FM by default and so all the
vendors are using there own home brew FM framework.

One such thing is Texas Instruments FM radio solution below links give
you the details

1) driver - http://git.omapzoom.org/?p=kernel/omap.git;a=tree;f=drivers/media/radio/wl128x;h=231954bbc6a9e234cc2bfca53eb02f28b7a7d407;hb=460374248586421260dbffca91454907ff8c5ada

2) FM framework -
http://git.omapzoom.org/?p=platform/hardware/ti/wpan.git;a=tree;f=tools/FM;h=3f950c8b2e0cae5f540caabb58a7f114cc78bb8f;hb=bebfa00ede52e48e205c9c8de4012b52184a9214

Regards
Manju
Regards
Manju

> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting

--
Regards
Halli

Saravanaperumal Annamalai

unread,
Mar 21, 2012, 10:13:33 AM3/21/12
to halli...@gmail.com, rangan...@asmaitha.com, android...@googlegroups.com
Hi Ranganath,
               You might also check this link if the FM chip is Si Labs one.



Regards
Saravana
  
Saravana

halli manjunatha

unread,
Mar 21, 2012, 11:42:49 AM3/21/12
to Saravanaperumal Annamalai, rangan...@asmaitha.com, android...@googlegroups.com
Hi Ranganath,

I dont know about the AW chip but you can use the above mentioned framework for your chip with little modifications as below

Is your FM driver is a V4L2 compliant driver? if yes then you can use the complete FM package as is without much modifications

If your FM driver is not a V4L2 then you need to modify the JNI part of the FM package means you just needs to rewrite the FM/service/src/jni/JFmRxNative.cpp file for your driver

Regards
Manju
--
Regards
Halli

Ranganath TM

unread,
Mar 22, 2012, 3:20:04 AM3/22/12
to halli manjunatha, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Manju,

Can you send the path of Android FM Android application, so that I can analyze the complete flow from application layer to the kernel, And I can get better idea to implement.

Thanks,
Ranga 
--
Thanks And Regards
Ranganath T.M

halli manjunatha

unread,
Mar 22, 2012, 11:13:21 AM3/22/12
to Ranganath TM, Saravanaperumal Annamalai, android...@googlegroups.com

john118kimo

unread,
Mar 23, 2012, 11:07:20 AM3/23/12
to Ranganath TM, halli...@gmail.com, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Manju,

Could you share the SOP to build source code as SDK if available ? Thanks in advance.

Regards,
John Lee

--- 12/3/22 (四),halli manjunatha <halli...@gmail.com> 寫道:

寄件者: halli manjunatha <halli...@gmail.com>
主旨: Re: [android-porting] Porting FM In Android Along With The Application
收件者: "Ranganath TM" <rangan...@asmaitha.com>
副本: "Saravanaperumal Annamalai" <saravana...@gmail.com>, android...@googlegroups.com
日期: 2012年3月22日,四,下午11:13

>>>> > unsubscribe: android-porting+unsub...@googlegroups.com

>>>> > website: http://groups.google.com/group/android-porting
>>>>
>>>>
>>>>
>>>> --
>>>> Regards
>>>> Halli
>>>>
>>>> --
>>>> unsubscribe: android-porting+unsub...@googlegroups.com

>>>> website: http://groups.google.com/group/android-porting
>>>
>>>
>>>
>>>
>>> --
>>> Regards
>>> Saravana
>>
>>
>>
>>
>> --
>> Regards
>> Halli
>
>
>
>
> --
> Thanks And Regards
> Ranganath T.M
>



--
Regards
Halli

halli manjunatha

unread,
Mar 23, 2012, 11:44:27 AM3/23/12
to john118kimo, Ranganath TM, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Jhon,

You have to have complete Android source code to build this.

You can get the source code for Panda board from below locations

ICS FS:
http://source.android.com/source/downloading.html

Google OMAP Kernel:
https://android.googlesource.com/kernel/omap.git
Branch: origin/android-omap-panda-3.0

This code will have the FM source code by default

Regards
Manju
--
Regards
Halli

Ranganath TM

unread,
Mar 27, 2012, 6:22:58 AM3/27/12
to halli manjunatha, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Manjunatha,

Thanks for your support,

My FM driver is V4L2 complaint driver,

can you please explain me where to modify,

how can I proceed further.

Thanks,

Ranganath 

halli manjunatha

unread,
Mar 27, 2012, 11:16:25 AM3/27/12
to Ranganath TM, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Ranganath,

If your driver is V4L2 compliant then you can just use the complete
solution straight forward with minimal changes to JNI part which is at
service/src/jni/JFmRxNative.cpp for FM RX and
service/src/jni/JFmTxNative.cpp for FM TX

Regards
Manju

--
Regards
Halli

Ranganath TM

unread,
Mar 27, 2012, 11:37:36 AM3/27/12
to halli manjunatha, Saravanaperumal Annamalai, android...@googlegroups.com
Hi Manjunath,

Thanks for your time,

I am working on Snowball AP9500 processor,

I am little bit confused about the folder structure, 

can you please guide me in adding the FM Module it.

Thanks,

Ranganath.T.M

halli manjunatha

unread,
Mar 27, 2012, 6:47:18 PM3/27/12
to Ranganath TM, Saravanaperumal Annamalai, android...@googlegroups.com
Just build you FM V4L2 driver as part of the your kernel and boot the board.

Once after booting the board you will have /dev/radio0 entry for your FM radio.

Seems you need to change the /dev/radio0 permissions to "666"

you can use the kfmapp (V4L2 compliant FM test application) at below
location to validate your FM driver.
http://git.omapzoom.org/?p=platform/hardware/ti/wpan.git;a=tree;f=tools/kfmapp;h=710184f873149f05c0550253419872ad8a0cce1d;hb=d03a9f4296d7b8523ad857dcf225287ab7d51a90

So if your FM driver is fully compliant with the V4L2 specifications then,

copy the complete FM GUI solution to package/apps/ of your Android
source code and build it, this create following

1) system/lib/libfmradio.so
2) system/etc/permissions/com.ti.fm.fmradioif.xml
3) system/app/FmRxApp.apk
4) system/app/FmTxApp.apk
5) system/app/FmService.apk


Now copy these binaries to your filesystem and boot the board.

Now you can see 2 icons on your android application pane one for FM RX
and one for FM TX, just launch the FM RX icon which eventually opens
the /dev/radio0

Regards
Manju

On Tue, Mar 27, 2012 at 10:37 AM, Ranganath TM

--
Regards
Halli

Ranganath TM

unread,
Mar 30, 2012, 6:09:12 AM3/30/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

can you please tell the .mk to add kfmapp so that I can build it.


Thanks,
Ranganath.T.M    

halli manjunatha

unread,
Mar 30, 2012, 11:13:42 AM3/30/12
to Ranganath TM, android...@googlegroups.com
The above mentioned link has kfmapp.c kfmapp.h and Android.mk copy all
these things in to a folder.

In the parent folder within which this kfmapp folder is present you
have to have below line to use the Android.mk of kfmapp.

include $(call first-makefiles-under,$(call my-dir))

I think this will solve your problem.

Regards
Manju

--
Regards
Halli

Ranganath TM

unread,
Apr 2, 2012, 1:22:14 AM4/2/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

Thanks for your time,

I want to add the FMRXAPP to eclipse, 

I am not getting how to make it,

because the Android SDK does not contain any FM Api's,

please guide to resolve this issue.

Thanks,

Ranga

halli manjunatha

unread,
Apr 9, 2012, 12:53:38 PM4/9/12
to Ranganath TM, android...@googlegroups.com
Hi Ranganath,

Sorry for delayed response.

Even I never used this app on Eclipse.

But you can try it by removing the dependicies of JNI layer in FM RX
JAVA files (FM/FmRxApp/src/com/ti/fmrxapp/FmRxApp.java).

Regards
Manju

--
Regards
Halli

Ranganath TM

unread,
Apr 13, 2012, 1:07:31 AM4/13/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

Now I am able to build my driver framework and application on our board,

The device is getting opened and Firmware is downloaded,

can you tell me the command in terminal to open the FM Module and make it running,

For example to enable WIFI I am using svc wifi enable.

And also do you know how to run android command line application.

Thanks,

Ranganath.T.M  

Ranganath TM

unread,
Apr 17, 2012, 12:48:37 AM4/17/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

Do you Know In android how to do library registration,

I am getting an error library not yet registered,

For example I want register libfmradio.so where to make it,

please help in resolving these issue.

Thanks,
Ranga 

Ranganath TM

unread,
Apr 18, 2012, 11:27:38 AM4/18/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

I am able to switch on my device,

Able to set it in to RX mode,

when try to scan the frequency I am getting the following error,

vidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000VIDIOC_G_EXT_CTRLS:error!!

continously.

Thanks,

Ranga 

halli manjunatha

unread,
Apr 18, 2012, 12:23:05 PM4/18/12
to Ranganath TM, android...@googlegroups.com
Ranganath,

Does your driver supports ioctl VIDIOC_S_HW_FREQ_SEEK? seems its not.

Thing is FM JNI calls this v4l2 ioctl when you do seek from the GUI.

Can you give me the link to your driver so that we can verify this.

If your driver is not supporting VIDIOC_S_HW_FREQ_SEEK ioctl then need
to tweek the FM JNI so that it will do SET_FREQ (for 200KHz gap
between 2 channels) and check the signal strength if signal strength
is good enough then come outt of seek else check next frequency.

Meanwhile you can check the set_freq by selecting
(menu->set_frequency-> enter the frequency desired in MHz).

Regards
Manju

On Wed, Apr 18, 2012 at 10:27 AM, Ranganath TM

--
Regards
Halli

Ranganath TM

unread,
Apr 19, 2012, 3:41:45 AM4/19/12
to halli manjunatha, android...@googlegroups.com
Hi Manjunath,

When I lunch My FM RX application it is giving me the error as "vendor registration failed".

In JNI file android_fmradio.cpp  In the below function,

// if we haven't registred the library yet do it

    if (!session_p->isRegistered) {
        session_p->vendorMethods_p = (fmradio_vendor_methods_t *)
            malloc(sizeof(*session_p->vendorMethods_p));
        if (session_p->vendorMethods_p == NULL) {
            LOGE("malloc failed\n");
            retval = FMRADIO_IO_ERROR;
            goto early_exit;
        } else if (androidFmRadioLoadFmLibrary(session_p, mode)) {
            session_p->isRegistered = true;
        } else {
            LOGE("vendor registration failed\n");
            free(session_p->vendorMethods_p);
            retval = FMRADIO_IO_ERROR;
            goto early_exit;
        }
    }

I am not getting things how to do it ,

Please help me regrading this.

Thanks,

Ranga

halli manjunatha

unread,
Apr 21, 2012, 4:32:16 PM4/21/12
to Ranganath TM, android...@googlegroups.com, anupa...@stericsson.com
Hi Ranganath,

Which FM framework you are using?.. seems this error message is not
from TI's FM framework.... and more like ST Ericsson's FM solution

Anyway this error message indicates you dont have the Vendor specific
handlers required by the framework.(like FM framework calls JNI layer
for FM turn ON but there is no link exist between FM framework and
V4L2 Fm driver to do this).

I am looping Anupam Roy who is working in this front.

Regards
Manju
--
Regards
Halli

Ranganath TM

unread,
Apr 22, 2012, 3:08:11 AM4/22/12
to halli manjunatha, android...@googlegroups.com, anupa...@stericsson.com
Hi Manju,

I had got the STE fmradio.so file now when I integrate it and trying to open the application it is giving me the following error,

E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interruvidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000pt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_vidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1vidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000493): get_interrupt: VIDIOC_G_EXT_CTRLS failed


can you please help me regrading this issue.


Thanks,
Ranganath

Ranganath TM

unread,
Apr 23, 2012, 2:30:15 AM4/23/12
to Anupam ROY, halli manjunatha, android...@googlegroups.com
Hi Anupam,

I am able to solve the JNI error now,

but now I am able to open an device and set an band to it,

In logs I am able to get the device is set EU_BAND and for 87.5 MHZ,

after that when I say scan for channels it is giving me an error,


E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interrupt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1493): get_interruvidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000pt: VIDIOC_G_EXT_CTRLS failed
E/STE_FM_Radio_CG2900( 1493): ex_vidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000poll_thread:undefined interrupt type 0
E/STE_FM_Radio_CG2900( 1vidioc_get_ext_ctrls: Id = 8001010,ext_ctrl->ctrl_class = 980000493): get_interrupt: VIDIOC_G_EXT_CTRLS failed

can you please help to solve this issue,

Thanks,

Ranga


On Mon, Apr 23, 2012 at 9:34 AM, Anupam ROY <anupa...@stericsson.com> wrote:
Hi,

 The error message indicates that the JNI layer is not able to find the vendor specific handler as already indicated by Manju.

The vendor driver is seeked run time in /system/lib on phone. To support the usage of different TX and RX chip, the search will first be done for a library libfmradio.(*)_rx.so (rx mode) / libfmradio.(*)_tx.so (tx mode), if neither is found it will try to load libfmradio.(*).so.

Therefore if you are using the STE FM Radio framework, the vendor library naming format should be of type..

libfmradio.(*)_rx.so
libfmradio.(*)_tx.so
libfmradio.(*).so

Best Regards,
Anupam
ST-Ericsson

Ranganath TM

unread,
Apr 23, 2012, 7:33:58 AM4/23/12
to Anupam ROY, halli manjunatha, android...@googlegroups.com
Hi Anupam,

yes I am using  STE vendor plugin, 

and you are right it cannot map the valid V4L2 format,

In  the file ste_fmradio_cg2900.c and in that function get_interrupt they are passing the controls.id  has V4L2_CID_CG2900_RADIO_GET_INTERRUPT,

but in the driver file radio-cg2900.c in the function vidioc_get_ext_ctrls there is no such case,

so it is going for default case,

can you help in resolving the issue,

Thanks,

Ranganath.T.M   
On Mon, Apr 23, 2012 at 4:06 PM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

Okay, looks like it’s an event which could not be mapped to a valid V4L2 format..

 

Can you please check what kind of event you receive from FM chip once scan is completed?

 

Btw, I assume you are using STE vendor plugin?

 

BR,

-Anupam

Ranganath TM

unread,
Apr 23, 2012, 8:55:22 AM4/23/12
to Anupam ROY, halli manjunatha, android...@googlegroups.com
Hi Anupam,

PSA for the radio-cg2900.c 

Thanks,
Ranganath.T.M

On Mon, Apr 23, 2012 at 5:23 PM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

Yes Sure, can You please send me the file radio-cg2900.c? I would like to have a look into the code..

radio-cg2900.c

Ranganath TM

unread,
May 2, 2012, 5:05:22 AM5/2/12
to Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com
Hi Anupam,

Thanks for continuous support,

I am able to build the FM Module in ICS(I am locate object files of FM Module),

After creation of image and booting it,

nothing is visible in /dev,

the contents of /dev are listed below,

alarm
android_adb
ape_opp
arm_opp
ashmem
b2r2_blt
binder
block
bus
camera_flash
cg2900_core_test
cm_channel
cm_control
console
cpu_dma_latency
cpuctl
ddr_opp
device-mapper
disp0
full
graphics
hwmem
i2c-0
i2c-1
i2c-2
i2c-3
input
kmsg
log
mali
mem
mtp_usb
network_latency
network_throughput
null
oldmem
ppp
ptmx
pts
random
rfkill
rtc0
shm
snd
socket
tee
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyAMA0
ttyAMA1
ttyAMA2
ttyGS0
ttyGS1
ttyGS2
ttyGS3
tun
uinput
urandom
usb_accessory
vcs
vcs1
vcsa
vcsa1
watchdog
zero,


In the above contents of /dev I am able to see only cg2900_core_test of CG2900,

can please help to analyse why the contents of FM,BT,GPS are missing in dev.


Thanks,

Ranga 



On Tue, Apr 24, 2012 at 12:05 PM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

It seems You are using ST-Ericsson connectivity chipset(cg2900 ?). I would like to understand what is the activity that You are involved in?

Are you working on GingerBread code base(which kernel?) ? Also can You please send me the links from where You have accessed  the STE vendor driver and FM kernel driver code?

 

Looks like the code You are using is quite old..

 

Thank You very much for the clarifications!

 

BR,

-Anupam

 

From: Ranganath TM [mailto:rangan...@asmaitha.com]
Sent: Tuesday, April 24, 2012 11:28 AM
To: Anupam ROY
Cc: halli manjunatha; Shivanagouda Biradar


Subject: Re: [android-porting] Porting FM In Android Along With The Application

 

Hello Anupam ,

Thanks for your support.
The events is handled in the file
cg2900_fm_api.h ,

enum cg2900_fm_event {
    CG2900_EVENT_NO_EVENT,
    CG2900_EVENT_SEARCH_CHANNEL_FOUND,
    CG2900_EVENT_SCAN_CHANNELS_FOUND,
    CG2900_EVENT_BLOCK_SCAN_CHANNELS_FOUND,
    CG2900_EVENT_SCAN_CANCELLED
};

I am also attaching the .h file please go through the file and confirm once from your end , and let me know if any changes needed.


Thanks ,
Ranganath

On Tue, Apr 24, 2012 at 9:57 AM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

Can You please check whether you are supporting different events(Search channel found, scan channel found, scan cancelled etc)  in cg2900_fm_api.h?

 

The case “V4L2_CID_CG2900_RADIO_GET_INTERRUPT” is indeed missing, but if You don’t support the above events, this particular case would not work as it is!

Ranganath TM

unread,
May 4, 2012, 5:12:14 AM5/4/12
to Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Anupam,

As you said it's right no device is adding to /dev directory except cg2900_core_test,

but what we are not getting any hint to suspect initialization problem,

Can you please suggest me how we can debug to find out whether it is initialization problem or something else,

as per as my analysis in GB the function cg2900_UART_probe is called and cg2900_hu_open is also called,

but in case of ICS cg2900_UART_probe is getting called but not cg2900_hu_open  and the chip reset and reading of chip information done 

after this only, can you please confirm on this, and can you please help to find out how the function cg2900_hu_open is called is it any way 

related to chip initialization. 

Thanks,

Ranga

On Fri, May 4, 2012 at 2:05 PM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

Possibly the CG2900 connectivity device could not initiate properly.

 

During this initialization, various MFD device nodes are also created. All these nodes should be available in /dev folder for e.g..

 

cg2900_audio

cg2900_bt_acl

cg2900_bt_audio

 

Only after this, FM Radio kernel driver is probed and registered as platform driver.

 

For e.g FM Kernel driver will be registered as platform driver and \dev\radio0 node should get added!

Ranganath TM

unread,
May 4, 2012, 6:21:03 AM5/4/12
to Anupam ROY, Nitin DHINGRA, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Anupam,

Thanks for introducing  Nitin,

Hello Nitin,

Hope you are doing good,

I am in an impression that you are aware of the context, if not please fell free to ask,

can you please help in solving the initialization issue of CG2900.

Thanks,
Ranga

On Fri, May 4, 2012 at 3:27 PM, Anupam ROY <anupa...@stericsson.com> wrote:

Hi Ranganath,

 

I am not an expert in CG2900 initialization module.

I add Nitin who is working on this area to comment further.

Ranganath TM

unread,
May 5, 2012, 12:42:25 AM5/5/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Nitin,

Thanks for your continuous support,

the command line initialization of CG2900 worked for me,

the command is : /system/xbin/ste-cg29xx_ctrl -b 115200 -p 6 -l 23 -i /system/bin/cg2900-channel_init.sh /dev/ttyAMA0

I tried copying the command line in init.rc, but it not worked for me.  

can you  please help in solving the initialization of CG2900 at the boot time only,

i,e with out manually entering the command to initialization CG2900,

Thanks,

Ranga 


On Fri, May 4, 2012 at 4:47 PM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

Hi Ranganath,

                Cg2900_hu_open is called inside function hci_uart_set_proto(). It seems you haven’t set the correct protocol or wrong line discipline from the command line.

 

Please check the command line which you are using to initialize cg29xx, are you using this:

1)  /system/xbin/ste-cg29xx_ctrl -b 115200 -p 6 -l 23 -i /system/bin/cg2900-channel_init.sh /dev/ttyAMA0

Or

2)  /system/bin/hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow

 

Regards

Nitin

Ranganath TM

unread,
May 8, 2012, 12:03:40 AM5/8/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Nitin,

Thanks for your continuous support,

The BT on ICS  is working properly and, 

FM is also working but it's response is pretty slow,

Now I am starting to work on WIFI  module, kindly guide me if I am struck some where.

Thanks and Regards,

Ranganath.T.M
     

On Mon, May 7, 2012 at 9:27 AM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

Hi Ranganath,

Good to hear it worked.

please make an entry for ste-cg29xx_ctrl in init.rc as below:

 

service ste-cg29xx_ctrl /system/bin/logwrapper /system/xbin/ste-cg29xx_ctrl -b 115200 -p 6 -l 23 -i /system/bin/cg2900-channel_init.sh /dev/ttyAMA0

    class main

    user root

    group bluetooth net_bt_admin misc root

    oneshot

 

 

regards

nitin

Ranganath TM

unread,
May 8, 2012, 8:42:32 AM5/8/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Nitin,

I had enabled the WIFI Module,

In which it is falling to get system clock,

and giving me the below error,

platform cw1200_wlan: cw1200_clk_ctrl: Failed to get clk 'sys_clk_out': -2

Can you please help to solve the error.

Thanks,
Ranga

Ranganath TM

unread,
May 9, 2012, 3:28:23 AM5/9/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy
Hi Nitin,

Thanks for your continuous support,

For your question the answer are below,

1)      About your environment: are you using git provided by STE, which SI version (repo tag) are you using?

yes we are using git provided by STE
.

2)      Do you see file clock-cg2900.c in path /kernel/drivers/staging/cg2900, can you provide me a zip of it?

PSA for CG2900 zip file

3)      Are you getting this error even after modifying the entry in init.rc?

yes , PSA for my init.rc file.

4)      For experiment, Can you first switch on BT and keep it on and then enable WLAN, do you still see this issue?

yes I did the above experiment as you said, but still seeing the issue.


Thanks,

Ranganath.T.M
On Wed, May 9, 2012 at 11:28 AM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

Hi Ranganath,

This is strange.

For some background, Wlan requires a clock from cg2900 chip, for that purpose “sys_clk_out” is the clock which cg2900 adds for wlan to be used. For my knowledge can you tell me few things:

 

1)      About your environment: are you using git provided by STE, which SI version (repo tag) are you using?

2)      Do you see file clock-cg2900.c in path /kernel/drivers/staging/cg2900, can you provide me a zip of it?

3)      Are you getting this error even after modifying the entry in init.rc?

4)      For experiment, Can you first switch on BT and keep it on and then enable WLAN, do you still see this issue?

cg2900.tar.gz
init.rc

Ranganath TM

unread,
May 10, 2012, 3:02:28 PM5/10/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej
Hi Nitin,

Thanks for support,

please find the in-line comments

Thanks,
Ranganath

On Thu, May 10, 2012 at 10:52 AM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

Hi Ranganath,

There could be multiple reasons for this:

1)      There are 2 wlan modules, one is umac and the other is open mac. It could be that some wrong binary has gone for wlan. Can you tell me how you do make for the complete system? And do you separately build kernel?

                       yes we will make complete system, please find below make command we use for build,
                   
                      source build/envsetup.sh && lunch ste_u8500-eng && make -j18 STE_USE_MOD_APE=1 FLASHKIT_ENABLE_                          MODEMINFILELIST=false COPS_ENABLE_SILENT_REBOOT_SUPPORT=false
                       

a.       To verify umac or openmac module inside the flashed image; goto /system/lib/modules/3.0.8+/kernel/net and do an “ls”. Give the name of the directory that is displayed.

                                Its a openmac, pls find the below log..

                               # cd /system/lib/modules/3.0.8+/kernel/net
                               # ls
                               compat-wireless-openmac

b.      To check the compilation flag, open file: vendor/st-ericsson/u8500/BoardConfig.mk and check flag WLAN_ENABLE_OPEN_MAC_SOLUTION, whether this is true of false.

          It is True 

2)      You may require to do some debugging by putting printks:

a.       file: clock-cg2900.c, function: cg2900_core_probe – this will confirm that clock is added by cg2900. And verify these prints during bootup.

                                Please find the log attached 

b.      Similarly, put prints inside file: kernel/arch/arm/mach-ux500/board-mop500-wlan.c function: cw1200_clk_ctrl and inside condition “if(enable)” – this will verify some wrong functionality of calling twice might not have happened.

                     Please find the log attached

Please do these and let me know.

 

Regards

Nitin

 

From: Ranganath TM [mailto:rangan...@asmaitha.com]

Sent: Tuesday, May 08, 2012 6:13 PM
wifilogs.txt

Ranganath TM

unread,
May 21, 2012, 4:11:53 PM5/21/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej
Hi Nitin,

Thanks for support,

Now I am able download the firmware for wifi,

and the chip is up,

but while scanning I am getting the below errors,

 ieee80211 phy0: Timeout waiting for scan complete notification.
 ieee80211 phy0: Missed interrupt?
 ieee80211 phy0: Missed interrupt? 

PSA for logs,

please help in resolving the issue.

Thanks and Regards,

Ranganath.T.M
 


On Fri, May 11, 2012 at 9:24 AM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

Hi Ranganath,

                I don’t see that error anymore and I can see that wlan request completed successfully, it seems wlan got the clock (check the highlighted part below). Is wlan working now?

 

#insmod cw1200_wlan.ko

 

[  260.808807] **AWT** Enter cw1200_sdio_init

[  260.814727] **AWT** cw1200_clk_ctrl

[  260.819335] cg2900-core cg2900-core.0: cg2900_open

[  260.824157] cg2900-core cg2900-core.0: H:4 channel opened

[  260.829620] **AWT** Enter cw1200_sdio_on

[  260.956939] **AWT** Enter cw1200_detect_card

[  260.961334] **AWT** Exit cw1200_detect_card

[  260.965545] **AWT** Exit cw1200_sdio_on

wififirmware.txt

Ranganath TM

unread,
May 22, 2012, 2:06:58 AM5/22/12
to Nitin DHINGRA, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej
HI Nitin,

can you please help in solving the below issue,

ADDRCONF(NETDEV_UP): wlan0: link is not ready.


Thanks and Regards,

Ranganath.T.M

Ranganath TM

unread,
May 22, 2012, 4:29:05 AM5/22/12
to Nitin DHINGRA, Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej
Hi Nitin,

Thanks so much for your support,

 Ajit,

Hope your doing well,

I am assuming that you are aware of current issue,

I am facing the below issue when I am trying to enable WIFI,

ADDRCONF(NETDEV_UP): wlan0: link is not ready,

I am suspecting the issue would be in WPA_Supplicant,

can you please help me in resolving the issue,

PSA for logs,

Thanks And Regards,
Ranganath.T.M 

 

On Tue, May 22, 2012 at 12:44 PM, Nitin DHINGRA <nitin....@stericsson.com> wrote:

+ Ajit Pal

wififirmware.txt

Ranganath TM

unread,
May 23, 2012, 1:33:37 AM5/23/12
to Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej, Nitin DHINGRA
Hi Ajit,

Thanks for your support,

I am able to enable the wifi,

When I say scan I am getting the below errors,

[  181.208801] ieee80211 phy0: Timeout waiting for scan complete notification.
[  182.209045] ieee80211 phy0: Missed interrupt?
[  183.208770] ieee80211 phy0: Missed interrupt?
[  184.209045] ieee80211 phy0: Missed interrupt?
[  185.209075] ieee80211 phy0: Missed interrupt?
[  186.209075] ieee80211 phy0: Missed interrupt?
[  187.209136] ieee80211 phy0: Missed interrupt?

can you please help in solving the issue,

Thanks and Regards,
Ranganath.T.M

Ranganath TM

unread,
May 23, 2012, 2:28:53 AM5/23/12
to Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej, Nitin DHINGRA, Shivendra AGRAWAL, Srivatsan MURALIDHARAN, Shivaprasad Imdapur
Hi Ajit,

Thanks for your continuous support,

I am sending the complete logs, also I am presenting my analysis based on the logs after hitting the logcat,

1) I am not seeing an logs regarding wifi device obtaining IP address,

2)below is the logcat observation,

D/wpa_supplicant( 2319): Command received: DRIVER SCAN-ACTIVE
D/wpa_supplicant( 2319): Command received: SCAN
D/wpa_supplicant( 2319): Connection failed on socket /dev/socket
[  253.129180] ieee80211 phy0: Missed interrupt?
D/wpa_supplicant( 2319): WPS: Building WPS IE for Probe Request
D/wpa_supplicant( 2319): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant( 2319): WPS:  * Request Type
D/wpa_supplicant( 2319): WPS:  * Config Methods (2388)
D/wpa_supplicant( 2319): WPS:  * UUID-E
D/wpa_supplicant( 2319): WPS:  * Primary Device Type
D/wpa_supplicant( 2319): WPS:  * RF Bands (1)
D/wpa_supplicant( 2319): WPS:  * Association State
D/wpa_supplicant( 2319): WPS:  * Configuration Error (0)
D/wpa_supplicant( 2319): WPS:  * Device Password ID (0)
D/wpa_supplicant( 2319): WPS:  * Manufacturer
D/wpa_supplicant( 2319): WPS:  * Model Name
D/wpa_supplicant( 2319): WPS:  * Model Number
D/wpa_supplicant( 2319): WPS:  * Device Name
D/wpa_supplicant( 2319): WPS:  * Version2 (0x20)
D/wpa_supplicant( 2319): P2P: * P2P IE header
D/wpa_supplicant( 2319): P2P: * Capability dev=23 group=00
D/wpa_supplicant( 2319): P2P: * Listen Channel: Regulatory Class 81 Channel 1
D/wpa_supplicant( 2319): nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
W/wpa_supplicant( 2319): wlan0: Failed to initiate AP scan
D/wpa_supplicant( 2319): Command received: DRIVER SCAN-PASSIVE

psa for logs,

Thanks And Regards,

Ranganath.T.M 





On Wed, May 23, 2012 at 11:05 AM, Ajit Pal SINGH <ajitpa...@stericsson.com> wrote:

Hi Ranganath,

 

I am adding Shivendra to help you further on this.

Bye the way can you please attached more logs (the complete console logs)

 

Regards
Ajitpal Singh

wifinewfirmware.txt

Ranganath TM

unread,
May 23, 2012, 5:44:03 AM5/23/12
to Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej, Nitin DHINGRA, Shivendra AGRAWAL, Srivatsan MURALIDHARAN, Shivaprasad Imdapur
Hi Ajit,

Thanks for your continuous support,

Its falling to get the at_core,  you can observe from the below logs,

D/wpa_supplicant( 1550): Connection failed on socket /dev/socket/at_core, retrying.. (No such file or directory),

when I boot the device I am not able to see at_core at,  /dev/socket/ 

can you help in solving the issue.

Thanks and Regards,
Ranganath.T.M

Ranganath TM

unread,
May 23, 2012, 7:46:39 AM5/23/12
to Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej, Nitin DHINGRA, Shivendra AGRAWAL, Srivatsan MURALIDHARAN, Shivaprasad Imdapur
Hi Ajit,

I am seeing something strange when I turn on the wifi,

please look at the below back trace logs,

[  303.268981] WARNING: at /home/shivanagouda/Documents/sourceroot/kernel/net/compat-wireless-openmac/drivers/staging/cw1200/scan.c:335 cw1200_scan_timeout+0xf0/0x124 )
[  303.269042] Modules linked in: cw1200_wlan cw1200_core
[  303.269165] [<c006c6bc>] (unwind_backtrace+0x0/0x148) from [<c062c8c4>] (dump_stack+0x20/0x24)
[  303.269256] [<c062c8c4>] (dump_stack+0x20/0x24) from [<c00957c4>] (warn_slowpath_common+0x5c/0x74)
[  303.269348] [<c00957c4>] (warn_slowpath_common+0x5c/0x74) from [<c0095808>] (warn_slowpath_null+0x2c/0x34)
[  303.269531] [<c0095808>] (warn_slowpath_null+0x2c/0x34) from [<bf0103a4>] (cw1200_scan_timeout+0xf0/0x124 [cw1200_core])
[  303.269714] [<bf0103a4>] (cw1200_scan_timeout+0xf0/0x124 [cw1200_core]) from [<c00b0874>] (process_one_work+0x144/0x4b8)
[  303.269805] [<c00b0874>] (process_one_work+0x144/0x4b8) from [<c00b0f8c>] (worker_thread+0x198/0x468)
[  303.269866] [<c00b0f8c>] (worker_thread+0x198/0x468) from [<c00b7cdc>] (kthread+0x98/0xa0)
[  303.269958] [<c00b7cdc>] (kthread+0x98/0xa0) from [<c00650f4>] (kernel_thread_exit+0x0/0x8)
[  303.270019] ---[ end trace 18455faa000ce520 ]---
[  303.270141] ------------[ cut here ]------------
[  303.270263] WARNING: at /home/shivanagouda/Documents/sourceroot/kernel/net/compat-wireless-openmac/drivers/staging/cw1200/bh.c:113 cw1200_bh_wakeup+0x68/0x70 [cw120)
[  303.270324] Modules linked in: cw1200_wlan cw1200_core
[  303.270416] [<c006c6bc>] (unwind_backtrace+0x0/0x148) from [<c062c8c4>] (dump_stack+0x20/0x24)
[  303.270507] [<c062c8c4>] (dump_stack+0x20/0x24) from [<c00957c4>] (warn_slowpath_common+0x5c/0x74)
[  303.270568] [<c00957c4>] (warn_slowpath_common+0x5c/0x74) from [<c0095808>] (warn_slowpath_null+0x2c/0x34)
[  303.270721] [<c0095808>] (warn_slowpath_null+0x2c/0x34) from [<bf005610>] (cw1200_bh_wakeup+0x68/0x70 [cw1200_core])
[  303.270935] [<bf005610>] (cw1200_bh_wakeup+0x68/0x70 [cw1200_core]) from [<bf0083e4>] (wsm_cmd_send+0x8c/0x2f4 [cw1200_core])
[  303.271148] [<bf0083e4>] (wsm_cmd_send+0x8c/0x2f4 [cw1200_core]) from [<bf00a674>] (wsm_write_mib+0xd0/0x148 [cw1200_core])
[  303.271392] [<bf00a674>] (wsm_write_mib+0xd0/0x148 [cw1200_core]) from [<bf00ce04>] (cw1200_config+0x11c/0x52c [cw1200_core])
[  303.271575] [<bf00ce04>] (cw1200_config+0x11c/0x52c [cw1200_core]) from [<c05dcdac>] (ieee80211_hw_config+0x12c/0x194)
[  303.271667] [<c05dcdac>] (ieee80211_hw_config+0x12c/0x194) from [<c05eb900>] (ieee80211_recalc_idle+0x50/0x54)
[  303.271759] [<c05eb900>] (ieee80211_recalc_idle+0x50/0x54) from [<c05e1590>] (__ieee80211_scan_completed+0x124/0x1e4)
[  303.271850] [<c05e1590>] (__ieee80211_scan_completed+0x124/0x1e4) from [<c05e1e54>] (ieee80211_scan_work+0x3e0/0x548)
[  303.271942] [<c05e1e54>] (ieee80211_scan_work+0x3e0/0x548) from [<c00b0874>] (process_one_work+0x144/0x4b8)
[  303.272033] [<c00b0874>] (process_one_work+0x144/0x4b8) from [<c00b0f8c>] (worker_thread+0x198/0x468)
[  303.272094] [<c00b0f8c>] (worker_thread+0x198/0x468) from [<c00b7cdc>] (kthread+0x98/0xa0)
[  303.272155] [<c00b7cdc>] (kthread+0x98/0xa0) from [<c00650f4>] (kernel_thread_exit+0x0/0x8)
[  303.272216] ---[ end trace 18455faa000ce521 ]---
[  303.272247] ------------[ cut here ]------------
[  303.272369] WARNING: at /home/shivanagouda/Documents/sourceroot/kernel/net/compat-wireless-openmac/drivers/staging/cw1200/sta.c:430 cw1200_config+0x494/0x52c [cw120)

can you please help in solving the issue.

Thanks and Regards,
Ranganath.T.M 

Ranganath TM

unread,
May 23, 2012, 11:49:23 PM5/23/12
to Ajit Pal SINGH, Anupam ROY, Shivanagouda Biradar, android...@googlegroups.com, OSL Reddy, Raghavendra Rangrej, Nitin DHINGRA, Shivendra AGRAWAL, Srivatsan MURALIDHARAN, Shivaprasad Imdapur
Hi Ajit,

can you please help in solving the issue, which I mentioned in last mail.

Thanks and Regards,
Ranganath.T.M
Reply all
Reply to author
Forward
0 new messages