WiFi & Bluetooth Drivers

316 views
Skip to first unread message

Rajesh N

unread,
Sep 16, 2009, 3:29:13 AM9/16/09
to android-porting
Hi All,

  I have seen most of WiFi and BT drivers are not directly portable on android platform, Is it due to the fact android platform restricts the way of communication mechanism? I went through a video presentation from google android in youtube.com which was on power management on android ,  where the presenter emphasis on the fact how the software has to be written for better power management!

 But I don't see any problem with rest of the device drivers which are present on android , like serial port , SPI, I2C etc, does it mean such modification for drivers are necessary for WiFI and BT drivers of devices?

--
Best Regards,
Rajesh N

pavan savoy

unread,
Sep 16, 2009, 4:26:12 AM9/16/09
to android...@googlegroups.com
Rajesh,

Isn't BT driver eventually a USB/serial driver ? and Wifi eventually a
SPI/mmc driver ?
So all that logic of power management still applies, However there
would be some specific chip specific power management options, which
is very specific to the BT/Wifi chip you use and modify your drivers
accordingly.


regards,
Pavan
--
--Pavan Savoy

Rajesh N

unread,
Sep 16, 2009, 4:37:06 AM9/16/09
to android...@googlegroups.com
Pavan,

 Yes, I agree with your statement.
 But I don't see any WiFi or BT doesn't work with android ! , The same driver works with linux based UI not with android UI  !

 Can u name few issues which comes when integrating Android UI with linux device drivers?

 Best Regards,
 Rajesh

pavan savoy

unread,
Sep 16, 2009, 4:44:09 AM9/16/09
to android...@googlegroups.com
Hi,

I can comment on the BT part and a bit about Wifi part.
For BT - You should have a BlueZ driver for your BT device, be it usb
or uart transport, it should work with BlueZ in general first. If that
is taken care, then android UI will work out of the box without
any[minimal] issues.

Please specify whether what android release you are using, what's the
BT chip ? what transport ? and the exact problems that you face.

On WLAN,
The chip which I've worked with had WEXT support in its driver and the
supplicant/wifi.c integration code worked with the chip after few
minor modifications.
Here the key point is supplicant, if you can make your chip work on
normal linux via the supplicant, you should also be able to use
android UI.

regards,
Pavan
--
--Pavan Savoy

Rajesh N

unread,
Sep 16, 2009, 4:54:39 AM9/16/09
to android...@googlegroups.com
Pavan,

 We r using CSR based WiFi and BT , where WiFi is interfaced through SDIO and BT through UART.

 Thanks for the info on BT ,  I am not sure if it is a OpenBT stack BlueZ stack , One more question do linux kernel downloaded from www.kernel.org comes with OpenBT or Bluez?

  From ur below words , u said with minor modifications with WiFi code u were able to achive porting of WiFi on Android , Can I know which particular area of concern u had to change to make u r WiFi work?

 Best Regards,
Rajesh

venu

unread,
Sep 16, 2009, 5:06:01 AM9/16/09
to android...@googlegroups.com
Hi Rajesh,
 
Bluetooth is not exactly usb/serial driver. It depends on kind of bluetooth support you have. If it is an usb (which usually is the case) then it is usb driver , but it is an in built module, then it is dependent what interface the module uses. It can be serial interface or spi or any other.
 
The reason you dont see the Wifi or bluetooth activity because for bluetooth bluez stack is used which is part of Linux kernel and anriod uses 2.6.24.xxxx kernel version i believe i might be wrong. Bluetooth is handled part of bluez stack (i.e. as far as bluetooth driver/stack is concerned).
 
So  you check bluez for further information.
 
Cheers,
Venu






--
- J. Venumadhav

pavan savoy

unread,
Sep 16, 2009, 5:37:24 AM9/16/09
to android...@googlegroups.com
Rajesh,

Linux -2.6.xx comes with BlueZ [current version is BlueZ4.x .. not
sure if kernel bluez also has a version...]
wifi.c modifications because something like an sdio driver might have
to insmod-ed before doing a DRIVER_START ? or the DRIVER_START in
itself might not be supported from your driver ?

Your chip might need some firmware which needs to be downloaded
before doing an up on interface ... things like that ...


Does openBT has any kernel space components ? or is it just user-space ?
regards,
Pavan
--
--Pavan Savoy

Rajesh N

unread,
Sep 16, 2009, 6:46:06 AM9/16/09
to android...@googlegroups.com
HI,

 I think Bluez is a official Blue tooth stack from kernel.org, If it is the case then it should work without any issues, just now I checked for Bluez , it is official which mean default all kernels downloaded from kernel.org will come with bluez , so why there is a chaos in compatibility when it comes to android porting?

Rajesh

pavan savoy

unread,
Sep 16, 2009, 7:16:47 AM9/16/09
to android...@googlegroups.com
Can you specify the problem that you currently having ?
Do you see a "hci0" socket interface created once you do a BT on ?
what does your init.rc file read ? about the service hciattach ?
what does your hciconfig -a say ? does it read the right version
information from the chip ?

regards,
Pavan
--
--Pavan Savoy

Yi Sun

unread,
Sep 16, 2009, 12:27:30 PM9/16/09
to android...@googlegroups.com
On Wed, Sep 16, 2009 at 1:54 AM, Rajesh N <rajesh....@gmail.com> wrote:
Pavan,

 We r using CSR based WiFi and BT , where WiFi is interfaced through SDIO and BT through UART.

 Thanks for the info on BT ,  I am not sure if it is a OpenBT stack BlueZ stack , One more question do linux kernel downloaded from www.kernel.org comes with OpenBT or Bluez?

  From ur below words , u said with minor modifications with WiFi code u were able to achive porting of WiFi on Android , Can I know which particular area of concern u had to change to make u r WiFi work?


You can take a look at the code in android-x86.org. With it, as long as you driver is install correctly during the boot up, you wifi should work (assuming you are using wext).



--
Android-x86
http://www.android-x86.org

Howard M. Harte

unread,
Sep 18, 2009, 2:14:39 AM9/18/09
to android-porting
For WLAN, the drivers for several chipsets are included in Android,
including chips from TI, Broadcom, and CSR. The TI driver is used on
the ADP1, and the Broadcom driver is used in the Samsung i7500
(Galaxy.). For Android 1.0 and Cupcake, there were some hardcoded
assumptions in the Framework and Platform code specific to the TI
chipset. This was cleaned up and generalized in Donut to be vendor
neutral.

One way to figure things out is to use the ADP1 and build Donut for
it, and turn on more verbose logging.

There are some Android-specific IOCTLs for Wireless Extensions, and
you can find them in the Broadcom driver in src/wl/sys/wl_iw.c. You
also have to make sure you enable wireless extensions in the kernel.
The TI driver at least until Cupcake (not sure about Donut) does not
use WEXT, so it is not enabled in the kernel config for ADP1
(msm_defconfig.)

Both TI and Broadcom drivers are shipping on production phones, so I
can assure you that they work.

-Howard
Reply all
Reply to author
Forward
0 new messages