CM7 with Bluetooth possible without a kernel rebuild? - Kindle Fire Android Development

I've spent a lot of time the last week or so on trying to figure out if it's possible to enable bluetooth on whistlestop's CM7 without having to rebuild the kernel. I've made some progress - if it's possible - or I've just wasted a lot of my time and learned a little about Linux and Android if it's impossible.
Where I am now:
Thanks to whistlestop's guide, I have a working build of CM7 for Kindle. I've got a Kindle running CM7 but have been unsuccessful in loading btwilink.ko via insmod so far. Dmesg shows several unknown symbols which I think may be related to not having st_drv.ko loaded first. insmod fails in init_module with "No such file or directory". I do not currently have a st_drv.ko built for 2.6.35.7+ but I haven't really tried to find it yet.
uim-sysfs seems key but I'm not sure where it comes in - if I load it and it loads the drivers or vice-versa.
What I have found:
Device driver info for a WiLink solution in Android: http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution
btwilink built for 2.6.35.7+ ARM: http://www.angstrom-distribution.or...le-btwilink_2.6.35.7-r113c_omap4430_panda.ipk
Source for uim-sysfs: https://github.com/CyanogenMod/android_device_bn_encore/tree/gingerbread/uim-sysfs
Firmware: https://gforge.ti.com/gf/download/f....1-P2-Pandroid-1.0-Linux-x86-Installmentioned
Interesting thread that may or may not apply here discussing loading btwilink.ko: http://e2e.ti.com/support/low_power_rf/f/307/t/115891.aspx
Questions:
How different are kernel versions 2.6.35.7 and 2.6.35.7+? The "+" tacked on doesn't comply with the kernel version numbering scheme I read up on. Is this just an android thing, a CM7 thing or a TI/OMAP thing?
I am assuming that a driver built on the same architecture and for the same kernel version should work even if the kernel and driver didn't happen to be built together. Is this a safe assumption?
Is the kernel in whistlestop's CM7 derived from a CM7 for a device which has bluetooth? (ie. was it built with bluetooth enabled?) I don't know how to tell conclusively...
Even if it's not possible to load the drivers via insmod, might it be possible to tweak a working CM7 build tree with the drivers, firmware and some editing to get the drivers to load at boot? I've been assuming that if it's possible to use these drivers in a build tree, it should be possible to just load them post-boot since either way I didn't build them.
Is building the linux kernel for Android difficult? I've been avoiding even starting down that road, thinking that this would work with the drivers loaded via insmod - am I spending a lot of time avoiding something relatively easy?
Is this a lost cause without building the kernel? If so, why? I'm leaning towards the answer to this question being yes based on the first link here. It sounds like there may be some config options set and structures or entry points defined at kernel build time that, if not done, will make it impossible for the kernel to load and/or communicate with the drivers.

Good luck on the bluetooth.

im pretty sure the kindle fire has no bluetooth

symbiiote said:
im pretty sure the kindle fire has no bluetooth
Click to expand...
Click to collapse
It does have bluetooth. It just was not activated on the stock rom.

If there will be no way to activate the bluetooth, im going to smash my kindle so hard, its gonna wish it's not even made.

Hardware question
I appreciate the effort you are putting forth, I would really enjoy using my BT headphones w/pandora on my Kindle. Are you sure that the bluetooth on the chip is even enabled? It wouldn't surprise me if they disabled the connection on the die when they made the chips (licensing fees/fair competition/etc.) As a community we may need a hardware expert to pull a device apart and check connectivity across the paths before anything on the software end is even explorable.
Not trying to be a downer, just a thought. Please prove me wrong with your efforts

biglama said:
I appreciate the effort you are putting forth, I would really enjoy using my BT headphones w/pandora on my Kindle. Are you sure that the bluetooth on the chip is even enabled? It wouldn't surprise me if they disabled the connection on the die when they made the chips (licensing fees/fair competition/etc.) As a community we may need a hardware expert to pull a device apart and check connectivity across the paths before anything on the software end is even explorable.
Not trying to be a downer, just a thought. Please prove me wrong with your efforts
Click to expand...
Click to collapse
that has been done. There is discussion in the CM7 ROM thread about bluetooth with links to teardown. Whistlestop CM7 developer thread.
http://forum.xda-developers.com/showthread.php?t=1390773
Discussion on bluetooth in CM7 thread.
http://forum.xda-developers.com/showthread.php?p=20283669&highlight=bluetooth+teardown#post20283669
Here is the teardown:
http://www.ifixit.com/Teardown/Amazon-Kindle-Fire-Teardown/7099/1
Using Tapatalk on a Kindle Fire w CM7 ROM

wow guess you learn something every day. Well in that case i wanna use Bluetooth o.o
Sent from my LG-VM670 using XDA App

Let me set things straight.
-There is bluetooth hardware in the Fire. The WiFi module has bluetooth, WiFi, and FM radio on the same chip.
-The module needs additional connections to the CPU above and beyond what's needed for WiFi to make BT or FM work.
-The module does not need another antenna for bluetooth. There is a second chip in the module that multiplexes the one antenna for WiFi and BT.
-You will not be able to just build the drivers and make them work without knowing where the connections are located. If they exist at all.
-There are two sets of connections needed to the CPU. The first is a high speed serial channel. Because of the choices made by Amazon for other UARTs on the Fire, this must be ttyO2. The second is an enable signal to turn power to the BT subsystem on and off. This could go to one of dozens of signals, and would need to be probed for.
-The module is a BGA package, and many of the connections are done through blind vias. In English, that means that the connections between the chips cna only be seen if you desolder them. This would mostly destroy the Fire, but would allow existence and location of those connections to be confirmed.

Related

USB Tether doesn't work in Linux - Auto USB0 not recognized

I have a rooted Epic 4G running Random Thunderhawk with the EH17 Modem and Nubernel, which is based on 2.6.35.7.
My problem is that my phone DOES NOT tether through USB on any Linux machine. The wired tether works fine on Windows 7, and WiFi tether works universally on any computer. After running netcfg on my phone I see the USB0 connection active, but when I plug in my phone on a Linux machine, nothing happens. For the sake of clarity, I'll just focus on my laptop running a fresh install of Xubuntu 11.10. When I run ifconfig on my laptop, USB0 isn't there. Only Eth0, lo, and WLAN.
Could someone help me out? Am I missing something?
BTW - I'm using the pre-installed wired tether app which is Wired Tether v1.4
Anyone have suggestions? I would really like to tether using 4G, but having the 4G and WiFi radios on simultaneously consumes too much power and makes my phone crash after an hour of use. I'd appreciate any help getting my USB/Wired tether working again for my Linux machines.
It's a known bug in the USB gadget stack for all SGS GB ROMs. The problem is that the RNDIS interface is reporting interface descriptors numbers (4 & 5 if I recall) that don't actually match the actual interfaces used (0 & 1). Even though it's redundant information, Linux pays attention to these values and chokes when they don't match. Windows appears to ignore them entirely.
I've thought about fixing it, but it requires changing the gadget API a bit and, well, I haven't got around to it. I personally use a much simpler kernel patch that exposes the RNDIS interface when "USB Debugging" is enabled, forcing it to use the correct interfaces. I haven't included this patch in a compiled kernel though since I'm not certain if the presence of an additional interfaces breaks adb on Windows.
Sorry that's not a perfect answer. I may try to revisit the issue and fix the original bug when I have a bit more time.
mkasick said:
It's a known bug in the USB gadget stack for all SGS GB ROMs. The problem is that the RNDIS interface is reporting interface descriptors numbers (4 & 5 if I recall) that don't actually match the actual interfaces used (0 & 1). Even though it's redundant information, Linux pays attention to these values and chokes when they don't match. Windows appears to ignore them entirely.
I've thought about fixing it, but it requires changing the gadget API a bit and, well, I haven't got around to it. I personally use a much simpler kernel patch that exposes the RNDIS interface when "USB Debugging" is enabled, forcing it to use the correct interfaces. I haven't included this patch in a compiled kernel though since I'm not certain if the presence of an additional interfaces breaks adb on Windows.
Sorry that's not a perfect answer. I may try to revisit the issue and fix the original bug when I have a bit more time.
Click to expand...
Click to collapse
Thanks for the help. I was unaware of the bug. I'll downgrade to a Froyo-based ROM until the GB bugs are worked out on the Epic.
An alternative to tethering...
http://code.google.com/p/proxoid/
Just run the host application and install the android app... works pretty well.
When I run ifconfig -a on my phone from adb shell, while it is plugged into a windows machine with usb debugging active, I cannot see usb0. Why would usb0 be missing?

i need to fix my samsung s3 drivers. blutooth specifically.

i have a galaxy s3 L710 that i think needs Bluetooth drivers. i accidentally deleted Bluetooth share and lost my beloved Bluetooth capabilities. i am also getting a "touchwiz" "not working error". i was working from a list however, i get going a little too fast. could you help me with this problem? Samsung will not. i worked on command line computers for years, working with dos among other operating systems. i know these phones run on Linux so i don't get what the big deal is about reloading the drivers. am i wrong in that assumption? i can always buy a Bluetooth transmitter however i am obsessed with using my phone. dumb but losing Bluetooth on a Samsung is a crime. you lose a lot of functionality.
thank you very much
pgellen
XDA Visitor said:
i have a galaxy s3 L710 that i think needs Bluetooth drivers. i accidentally deleted Bluetooth share and lost my beloved Bluetooth capabilities. i am also getting a "touchwiz" "not working error". i was working from a list however, i get going a little too fast. could you help me with this problem? Samsung will not. i worked on command line computers for years, working with dos among other operating systems. i know these phones run on Linux so i don't get what the big deal is about reloading the drivers. am i wrong in that assumption? i can always buy a Bluetooth transmitter however i am obsessed with using my phone. dumb but losing Bluetooth on a Samsung is a crime. you lose a lot of functionality.
thank you very much
pgellen
Click to expand...
Click to collapse
Hello, and thank you for using XDA Assist!
A small misconception. Low-level stuff, either hard-coded into the kernel, or (I think rare for Android) in a module would be the "drivers". You would be unable to delete those without rewriting the kernel (and if that was the case, you would have worse problems).
Sounds like you deleted something userland, like an APK that TouchWiz relies on for Bluetooth purpose.
A parallel on a GNU/Linux PC is removing the Xorg package and then losing the GUI. Video drivers are intact, but a very important framework is missing.
You can either find a version of the Bluetooth Share app and put it back in it's place (easiest, if you can find the file), or you can Odin back to stock (takes more work, but easier in theory to find files).
At any rate, I am connecting this thread to the forum your device experts are found:
> Sprint Samsung Galaxy S III > Sprint Galaxy S III Q&A, Help & Troubleshooting
Please note, to respond to replies, you will need to register for an XDA account.
Hope this helps, and good luck!

Solved: Joying - Mirrorlink Stopped Working After Flash

Hey guys, I have searched high and low for a solution to this problem but have come up empty so far. I just got a joying head unit and everything, including the easy connected app, seemed to work without issue. I decided well since I had the headunit running next to my pc that I would flash Malaysk's custom rom before installing it. After that, I reinstalled the app from various sources including the oem app but none of them seem to allow me to connect my same exact devices anymore.
Why is this important for me? I had planned on controlling a tablet in the back seat for my son who is still to young to put on show without trouble. Essentially, this would allow me to never have to reach back there to help him out.
I have read, from joying, that it would no longer work after flashing new firmware but that seemed to not be the case from some things I had read here (please correct me if I am wrong on that). Tried different cables and ports but no luck. I did read that a license might need to be carried over but not sure what that entails as I can find ZERO info on this easy connected app/problem. I hope that this is a very simple fix and that I did not jump the gun again for the chance to flash a new device (its addicting and I blame XDA for my problems...).
I did try and find some other apps that might allow me to do the same thing. RemoDroid seemed promising but didn't function. Most other ones are meant for controlling from a pc or browser and just weren't useful for the task at hand. I am open to solid suggestions. I use all Android devices and avoid the Apple juice. Any insight you guys can offer will help a tired Dad out. Thanks!
Edit: Solved-ish
The easy connect app seems to function now intermittently. Not sure there was a specific thing that I did to fix it. Seems to work when I launch easy connect app right after booting up and nothing else. Messing with other apps seems to cause a problem for my devices. Also, switching between my devices(phone and tablet) may also have been causing a problem, not sure yet. I suppose I'll just keep trying to make it work reliably until I break it again.
On the previous version of the easy connect app, you were able to disable Drive Mode from launching. Not so on the newer version with Android WiFi. If anyone has a solution to that I would appreciate it as the Drive Mode app is useless for my needs.
Note 4 - USB - works great. I have yet to try over wifi
Note 10.1 N8013(lollipop rom) - USB/Wifi - works great (disable smooth mode, remote device screen cannot be turned on with easy connect "Home" button)
http://forum.xda-developers.com/and...1024x600-rk3188-joying-try-uploading-t3262030
I tried several different apk's but they all have similar results and end with a connection failure.
I haven't yet tried going back to stock firmware so that might be worth trying. I installed the headunit in my car so I'm not as willing to keep flashin it as I have to park down the street from my house.
So not sure what magic I used but I was able to get it working for a moment and then it stopped again. USB and Wifi android mirroring were working so I know my current firmware/setup is functional!! Once I got it working I started configuring some other apps and when I went to run it again it wasn't connecting. I guess I'll just keep messing with it until I can figure out what got it working again.
With the newer version of the easy connected app, I can no longer disable launching of drive mode on connect. Is there a way to disable that option with the 1.4 version?
Hi.
Is it possible mirror in wifi with android?
Can you explain the way?
Inviato dal mio SM-G920F utilizzando Tapatalk

Use ethernet port on Fire TV to bring wireless access to non-wifi device?

I have a 1st generation XBox that only has an Ethernet port. Is there a way to connect it to the Fire TV to get it access to my network through WiFi?
When Ethernet port is plugged in it disables wifi connectivity. after that a bunch more work making wifi the default gateway with routing... if it is possible. . prolly worth your time to just spend the $30 on an adapter for it or install dd-wrt on an old router you have laying around. . I had a similar request where I wanted to know if my firetv can double as a coffee maker but no-one has solved where to put the k-cup.
Its not so much the device in this case that is unfit for the purpose (well - unless it is, as described above.. ) - it is, that the minds that are interested in and forming around solving those problems are working on much better (reputation) and wider known projects - AND the devices they support cost anywhere from 10-30 bucks used already. So dont tell them why you bought a Fire TV instead.
I know that current "technophiles" see the world as app based solutions that will come to them if they ask around often enough - but really, we already are at the minimal knowledge and minimal cost stage - and they are in essence complaining about convenience.
I have a problem - and see the solution in this one ethernet port another device I bought already has. Let the internet work out the rest, I am waiting for my app - its already rooted, how hard could it be.
And thats not how this works.
First of - why should they be working on an app based solution? A functionality layer if you will - if they dont have control over the entire ecosystem and networking, I heard has something to do with security. Sometimes. And with devices that have to work longterm - quite unlike the little plastic box that currently sits under your TV. And that today is rooted but tomorrow might not be - because, well its not yours to decide. Entirely.
dd-wrt and openwrt are what you are looking for - but that was already mentioned by the person posting before me.
I'm just here to explain why the "asking for a service" mindset ultimately breaks, when it comes to open source movements. Especially when your demands get more and more specific. ("I have bought a...")
I can say all this, because I currently use ddwrt to service some of my needs and it works perfectly well, creating all kinds of synergies I actually actively use - many of which actually are real enablers for owners of Android based Kodi boxes.
Well - then again, it might actually work already... (Turn off WLAN in the gui, then enable it via the shell (maybe that way both can be set active at the same time) and start configuring iptables).
http://forum.xda-developers.com/showthread.php?t=444004
But understand that this would be very much a hack. So usability, interfaces, security concerns are not on the forefront of peoples minds. Also - have fun configuring ports that way (ftp mostly I suppose.. ) - if you dont want everything to be open.
Google and 2 minutes - btw.
When you read through the thread you start to recognize - that what you are actually looking for is implementation and support (Hence dd-wrt or openwrt). Also - it becomes very clear why this probably never will become an app (needs root, needs to install a new library (think of stuff only busybox does as a core function on android - this has to be vetted not to cause unexpected problems), still only circumvents Androids core functions (either ethernet OR wlan), isnt fully featured, and most of all - most technically inclined people who actually need the functionality simply buy into the dd-wrt or openwrt ecosystem and its all there already).
So to break it down to a few sentences - if you get a person willing to establish a very specific function for his/her own purpose against prior design on an open source OS, you are golden. But, you wont get them by randomly asking around for help on an internet forum. And dont expect to get entire featuresets or usability options alongside it. If you want those - and you do - go with the communities that are known for solving those problems and buy into the devices/ecosystems they use. 10-30 USD should be well worth it.
But if you are in a hacking state of mind - go for it and make those devices work like you want them to.

Question Getting Android to Use Linux-USB Ethernet/RNDIS Gadget

Hello All,
I'm new to this forum, so I'm not really sure if this should be general, dev, or just a technical question. Also I'm a software dev, but am not too familiar with android other than lightly using Android Studio for app dev.
Basically my problem comes down to this. I use a custom OpenWrt device as an ethernet dongle for my laptops by loading the g_ether driver. I would like to do this for an android phone as well. Right now I'm trying the s20 and s22 (pretty sure whatever solution I come to will work for both); however, when I plug my dongle in, the phone will see the dongle with all the correct device descriptors and all that, but will not connect and attempt to get an IP.
My current guess is that the phone just doesn't have the right drivers on there (cdc_ether or cdc_subset), or that it is not loading them.
Thus far I've tried poking around with termux, but have not gotten too far. I was hoping this community may be able to help me figure out how to get the phone to use the dongle.
Lastly, would really rather not root the phone unless completely necessary.
Thank you all for any advice!

Categories

Resources