[REQ] Bluetooth MAP Profile Support - Nexus One Android Development

I know the N1 uses Bluez as its bluetooth stack. I've also read multiple reports that supposedly Bluez supports the Message Access Profile. On top of that I've read some reports of some people stating that the Droid X has this support. Over the past few hours I've looked at the Bluez sources, linux kernel sources, bluetooth.org certifications for the N1, and the Droid X source code. I can't find any official references to this support. Anyone know if this support can be added easily so I can use the text messaging feature of my Ford Sync system? Maybe a kernel mod?

Also interested in this as my Sat-Nav uses this function. Would be good to be able to read txts on my Sat Nav.

http://developer.motorola.com/products/droidx/
Well found that the Droid X does support this according to their dev site. Would this be easy to enable since I'm assuming they both use Bluez?

Another update.. Looks as if the support is already built. http://bit.ly/bxkv3e

madj42 said:
Another update.. Looks as if the support is already built. http://bit.ly/bxkv3e
Click to expand...
Click to collapse
Is there any way to implement it In a ROM?

caveman_78 said:
Is there any way to implement it In a ROM?
Click to expand...
Click to collapse
Regarding the code above, I sent Cyanogen a twitter message. He stated he didn't know anything about it but would be willing to accept a commit from someone who did. I know the code is implementing a server interface for the MAP functionality but regarding how it works and all. I have no idea.
On a side note, I downloaded the source code for the Droid X and had a look at the BlueZ code. I didn't see anything regarding MAP support in any of the files. I found that the Droid 2 also has this support. Just for the heck of it, I went as far as ripping the BlueZ files from the Droid 2 stock ROM and replaced the N1 counterparts in CM6. Everything worked but I wasn't able to do anything MAP related.
From what I understand BlueZ does not run in kernel space but rather in user space. So under this assumption I'm guessing I don't need to look at anything in the kernel itself. Since I don't have a Droid X or Droid 2, I'm kind of lost because I don't think I can do any debugging to figure out where the code for this is.

I'll download the BlueZ source from CM6 tonight and see if I can compile this in.

madj42 said:
I'll download the BlueZ source from CM6 tonight and see if I can compile this in.
Click to expand...
Click to collapse
So I took a look a this again. I found that this doesn't apply to the bluez source but rather obexd. I downloaded the source for that and can't seem to get it to successfully merge the diff file. I tried versions .29-.33 without luck. I also took downed the git source referenced in the diff file without luck.
Here's what I get when I apply the patch:
Code:
[email protected]:/usr/src/obexd# patch -p1 <Milas_Bowman.diffpatching file Makefile.am
Hunk #1 FAILED at 56.
Hunk #2 succeeded at 66 with fuzz 1 (offset 2 lines).
1 out of 4 hunks FAILED -- saving rejects to file Makefile.am.rej
patching file configure.ac
patching file plugins/mas.c
patching file plugins/messages-dummy.c
patching file plugins/messages.h
patching file plugins/mns.c
patching file src/obex.h
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file src/obex.h.rej
patching file test/mas-client
patching file Makefile.am
Hunk #1 succeeded at 57 with fuzz 2 (offset 2 lines).
patching file client/mas.c
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 85.
Hunk #3 FAILED at 160.
Hunk #4 FAILED at 207.
Hunk #5 FAILED at 257.
Hunk #6 FAILED at 300.
Hunk #7 FAILED at 331.
Hunk #8 FAILED at 361.
Hunk #9 FAILED at 385.
Hunk #10 FAILED at 445.
Hunk #11 FAILED at 477.
Hunk #12 FAILED at 501.
Hunk #13 FAILED at 522.
Hunk #14 FAILED at 559.
Hunk #15 FAILED at 585.
Hunk #16 FAILED at 657.
Hunk #17 FAILED at 669.
Hunk #18 FAILED at 681.
Hunk #19 FAILED at 692.
Hunk #20 FAILED at 730.
Hunk #21 FAILED at 759.
Hunk #22 FAILED at 768.
Hunk #23 FAILED at 784.
23 out of 23 hunks FAILED -- saving rejects to file client/mas.c.rej
patching file client/mas.h
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED -- saving rejects to file client/mas.h.rej
patching file client/session.c
Hunk #1 FAILED at 447.
1 out of 1 hunk FAILED -- saving rejects to file client/session.c.rej
patching file doc/client-api.txt
patching file gwobex/gw-obex.h
Hunk #1 FAILED at 82.
1 out of 1 hunk FAILED -- saving rejects to file gwobex/gw-obex.h.rej
patching file src/obex.h
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file src/obex.h.rej
patching file Makefile.am
Hunk #1 succeeded at 9 with fuzz 2.
Hunk #2 FAILED at 111.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.am.rej
patching file client/session.c
Hunk #2 succeeded at 154 (offset 8 lines).
Hunk #3 succeeded at 471 (offset 26 lines).
Hunk #4 succeeded at 1353 (offset 39 lines).
patching file gwobex/gw-obex.h
patching file client/mas.c
patching file client/mas.h
I emailed the author of the diff file. Will see what he responds with.

Any luck on this project? A bunch of people with newer car stereos would probably love to have this work on more than Motorola phones.
The ford sync system uses it for their text to talk system and pretty much only motorola phones work with it.

FireRaider said:
Any luck on this project? A bunch of people with newer car stereos would probably love to have this work on more than Motorola phones.
The ford sync system uses it for their text to talk system and pretty much only motorola phones work with it.
Click to expand...
Click to collapse
I haven't had any time to look into this lately. Earlier I tried applying the patch I posted above but I couldn't get it to apply cleanly. I gave up on that and think that applying something from the Droid X/2 ROM is probably the way to go. Since I don't have either I'm kind of stuck. I'm technical but I'm no programmer.
I'm with you though. I'd love to have this feature on my phone.

More info:
Some more code here: http://bit.ly/asj1Ce
Did some more file swapping with the Droid 2 ROM I have to see if I could get it working. After swapping all the bluez files including the sdptool I was able to do a sdptool add --channel=20 MAP. It comes back and states the MAP profile was added but when I do a sdptool browse, it doesn't list MAP. I also hooked it up to my car and it doesn't work.
The init.rc has some more information to MAP support as well:
Code:
service map /system/bin/sdptool add --channel=20 MAP
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot

I have no clue as to how to do any of the programming stuff, but I am watching this thread with interest. Surely there are others interested in the same thing.

forthcoming in Froyo?
I have the sgs vibrant, any chance froyo will include patch with bluez profile?

FireRaider said:
I have no clue as to how to do any of the programming stuff, but I am watching this thread with interest. Surely there are others interested in the same thing.
Click to expand...
Click to collapse
At least one other

jimlee29 said:
I have the sgs vibrant, any chance froyo will include patch with bluez profile?
Click to expand...
Click to collapse
I'm not sure the Vibrant includes this profile. I don't think they would include it if it's not already on the phone. I'm still looking into this but I think I've hit a dead end on this one.

Did you try to apply the kernel patch to a newer/different version of the kernel?

madj42 said:
More info:
Some more code here: http://bit.ly/asj1Ce
Did some more file swapping with the Droid 2 ROM I have to see if I could get it working. After swapping all the bluez files including the sdptool I was able to do a sdptool add --channel=20 MAP. It comes back and states the MAP profile was added but when I do a sdptool browse, it doesn't list MAP. I also hooked it up to my car and it doesn't work.
The init.rc has some more information to MAP support as well:
Code:
service map /system/bin/sdptool add --channel=20 MAP
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
Click to expand...
Click to collapse
Did you get a logcat from that try?

christiankk said:
Did you get a logcat from that try?
Click to expand...
Click to collapse
More info.. Here is a dmesg output that pertains to Bluez:
Code:
<6>[ 16.803833] Bluetooth: Core ver 2.15
<6>[ 16.804138] Bluetooth: HCI device and connection manager initialized
<6>[ 16.804351] Bluetooth: HCI socket layer initialized
<6>[ 18.237243] Bluetooth: HCI UART driver ver 2.2
<6>[ 18.237365] Bluetooth: HCI H4 protocol initialized
<6>[ 18.237487] Bluetooth: HCILL protocol initialized
<6>[ 18.247650] Bluetooth: L2CAP ver 2.14
<6>[ 18.247863] Bluetooth: L2CAP socket layer initialized
<6>[ 18.248016] Bluetooth: SCO (Voice Link) ver 0.6
<6>[ 18.248229] Bluetooth: SCO socket layer initialized
<6>[ 18.248474] Bluetooth: RFCOMM TTY layer initialized
<6>[ 18.248596] Bluetooth: RFCOMM socket layer initialized
<6>[ 18.248809] Bluetooth: RFCOMM ver 1.11
<6>[ 18.248931] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
<6>[ 18.249145] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Attached is the logcat when I run the sdptool command...

madj42 said:
More info.. Here is a dmesg output that pertains to Bluez:
Code:
<6>[ 16.803833] Bluetooth: Core ver 2.15
<6>[ 16.804138] Bluetooth: HCI device and connection manager initialized
<6>[ 16.804351] Bluetooth: HCI socket layer initialized
<6>[ 18.237243] Bluetooth: HCI UART driver ver 2.2
<6>[ 18.237365] Bluetooth: HCI H4 protocol initialized
<6>[ 18.237487] Bluetooth: HCILL protocol initialized
<6>[ 18.247650] Bluetooth: L2CAP ver 2.14
<6>[ 18.247863] Bluetooth: L2CAP socket layer initialized
<6>[ 18.248016] Bluetooth: SCO (Voice Link) ver 0.6
<6>[ 18.248229] Bluetooth: SCO socket layer initialized
<6>[ 18.248474] Bluetooth: RFCOMM TTY layer initialized
<6>[ 18.248596] Bluetooth: RFCOMM socket layer initialized
<6>[ 18.248809] Bluetooth: RFCOMM ver 1.11
<6>[ 18.248931] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
<6>[ 18.249145] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Attached is the logcat when I run the sdptool command...
Click to expand...
Click to collapse
Thanks, not much to go after in there :/
I'll see if I have time on the weekend to have a go at it.
Did the author of the kernel patch ever get back to you?
Also, have you seen this page? http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq

Did you ever try to apply the patch manually (using the .rej files)?
I am trying now to see where it takes me.

Related

[Q] BCM4329 and wlan.ko for Renesas EV tablets

I'm trying to see if the Kernel image built out of this sources:
https://github.com/ffxx68/EVBSP-Kernel
can safely replace the one found in the latest 2.2 stock release (which is 0908) for this device.
Before simply having a "blind" test, replacing the uImage found in the zip with mine, recalc the MD5 and give it a try flashing to tablet, I'd like to match the correct module drivers first.
These are the drivers found in the stock firmware, in the android-fs /lib/modules:
-rw-r--r-- 1 1000 1000 5282033 Aug 24 04:16 8192cu.ko
-rw-r--r-- 1 1000 1000 255881 Dec 15 09:22 em_ave.ko
-rw-r--r-- 1 1000 1000 249144 Dec 15 09:24 fw_bcm4329.bin
-rw-r--r-- 1 1000 1000 206144 Dec 15 09:25 inter_dsp.ko
-rw-r--r-- 1 1000 1000 1315 Aug 24 04:16 nvram.txt
-rw-r--r-- 1 1000 1000 2887102 Aug 24 04:16 pvrsrvkm.ko
-rw-r--r-- 1 1000 1000 1747051 Aug 24 04:16 wlan.ko
Out of these, only em_ave.ko and inter_dsp.ko were re-built along with the kernel.
Googling around, I managed to figure out the following:
8192cu.ko is for the Realtek RTL8192C WiFi chipset, which we don't have on our board... I wonder why it's there.
pvrsrvkm.ko is for the PowerVRSGX530 built-in graphic coprocessor. Can be reused as is, I think.
wlan.ko is the WiFi module driver, which I'm worried the most about. I'm not sure if I can leave the stock one, or if I should find a way to rebuild it, as I can use the firmware of bcm4329 (the actual wireless chipset) coming with the Kernel.
One thing I don't understand is that my build produced also this .ko:
drivers/net/wireless/bcm4329/dhd.ko
which should be our wlan.ko, but filename and size are very different!
Someone who can shed some light on this?
Thanks a lot
Version comparison is like below.
From my tablet's dmesg, I get Dongle and BCM4329 FW version both set to "4.218.248.6":
<4>Dongle Host Driver, version 4.218.248.6
<4>mmc2: queuing unknown CIS tuple 0x80 (50 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (4 bytes)
<6>request_suspend_state: wakeup (3->0) at 37369186598 (2011-12-16 14:16:05.741250002 UTC)
<4>mmc2: queuing unknown CIS tuple 0x02 (1 bytes)
<6>mmc2: new SDIO card at address 0001
<4>DHD: dongle ram size is set to 294912(orig 294912)
<4>Firmware version = wl0: Sep 15 2010 14:23:11 version 4.218.248.6
<4>wlan0: Broadcom Dongle Host Driver mac=cc:52:af:2b:22:66
While the kernel module source has this:
bcm4329/include/epivers.h:#define EPI_VERSION_STR "4.218.248.23"
While I can assume the file is just renamed to wlan.ko during installation, can this explain such a huge difference in the resulting .ko size?
dhd.ko (from kernel build) is 241513
wlan.ko (from stock tablet fw) is 1747051
PS - as the original kernel totally missed the bcm4329 support (probably done for a different board version), I grabbed it from https://github.com/pershoot/gtab-2632
I've made some (little) progress with respect to this issue.
I've re-compiled the bcm4329 as a module under a different kernel source (from CyanogenMod; same version 2.6.35 as the one I already have onboard).
I then moved the recompiled module and firmware onto the device, simply renaming it (I back up the original ones first!):
Code:
> adb push dhd.ko /lib/modules/wlan.ko
3066 KB/s (290474 bytes in 0.092s)
> adb push fw_bcm4329.bin /lib/modules/fw_bcm4329.bin
2948 KB/s (249144 bytes in 0.082s)
But, when I'm restarting the module I get these:
Code:
<4>dhd: Unknown symbol __raw_spin_lock_init (err 0)
<4>dhd: Unknown symbol kmem_cache_alloc_notrace (err 0)
<4>dhd: Unknown symbol __gnu_mcount_nc (err 0)
<4>dhd: Unknown symbol __gpio_set_value (err 0)
<4>dhd: Unknown symbol __tracepoint_kmalloc (err 0)
<4>dhd: Unknown symbol kmalloc_caches (err 0)
Any idea?
Is it possible the original wlan.ko (which is much larger) has been statically linked to some libraries that are not found in the stock firmware?
Changing a few .config values (apart from version, the CyanogenMod kernel is evidently different from my device one) I managed to clear up all errors, except this:
Code:
<4>dhd: Unknown symbol __gpio_set_value (err 0)
The Linux Cross Reference at http://lxr.free-elec..._gpio_set_value helped me a lot finding where those symbols are found, so that I could fix the corresponding CONFIG.
E.g. __gpio_set_value is in the drivers/gpio/gpiolib.c so I guess CONFIG_GPIOLIB is the one to disable. Infact I'm struggling to find which option this correspond to, in "make menuconfig"...
I need the kernel just as an "environment" where the BCM4329 driver compiles, so I'm not worried about breaking Kernel functionalities, as far as it can compile modules.
There has been some progress with respect to my trials I repoerted above, and now the project has gone Open Source.
The quesiton about how to integrate the BCM4329 remains open, and I still hope someone with greater experience than mine can contribute to the discussion which I've started here:
https://groups.google.com/forum/#!topic/renesas-emev-osp/QTTlwhF9qRk

[Q] How to compile atrix wifi drivers?

I am building an Atrix CM7 image with a kernel based on faux123's github kernel-MB860. That kernel builds and works fine. The wifi drivers however, are not working. I have also cloned faux123's atrix-wifi-dev project and built the dhd module by:
Code:
cd open-src/src/dhd/linux
make ANDROID_BUILD_TOP=~/projects/android/system LINUXSRCDIR=~/projects/android/kernel-MB860 BCM_INSTALLDIR=~/projects/android/system/device/motorola/olympus/modules CROSS_COMPILE=$CCOMPILER dhd-cdc-sdstd
I get "Error" from the enable wifi option in network settings. I tried insmod'ing the dhd.ko from the adb shell:
Code:
insmod /system/lib/modules/dhd.ko firmware_path=/system/etc/wl/sdio-ag-cdc-full11n-minioctl-roml-pno-wme-aoe-pktfilter-keepalive.bin nvram_path=/system/etc/wl/nvram.txt
insmod: init_module '/system/lib/modules/dhd.ko' failed (Invalid argument)
dmesg shows:
<4>[ 310.662019] Dongle Host Driver, version 4.218.248.31
<4>[ 310.662023] Compiled in /home/bricea/projects/android/atrix-wifi-module/open-src/src/dhd/linux/../.. on Feb 16 2012 at 11:30:24
<7>[ 310.972212] mmc1: queuing CIS tuple 0x91 length 3
<6>[ 310.972246] mmc1: new SDIO card at address 0001
<4>[ 322.653577] dhd_module_init: sdio_register_driver timeout
Am I building this correctly? Has anyone successfully rebuilt the kernel and dhd driver?
Did you ever figure this out?
Did you (or anyone) figure out how to build the wifi module for CM7? Where do you get the source?
I have successfully built both the kernel and the filesystem, but have not been able to get the wifi module built.
Okay, so apparently this is some sort of secret because I had no luck finding the proper way to build the driver module.
Well, I finally got tired of trying the same thing ('make dhd-cdc-sdstd') over and over only to get nowhere. I went into the makefile and looked around at what kind of options it had for building the module. Turns out there are about 2 dozen different options.
The default option is 'dhd-cdc-sdmmc-oob-gpl' and what it will build if you just type 'make' in the proper folder. Finding that it was probably just as likely as any other option, I did that.
It WORKED!
So the proper command is 'make dhd-cdc-sdmmc-oob-gpl' or just 'make'.
I hope no one minds me digging up an older thread, but I thought I might share if anyone else wanted to try cooking their own kernel. I flailed around with this issue for two days trying desperately to find the answer before I finally figured it out.

[Q] wifi module problem with faux123 kernel-MB860

I am trying an experiment with my Atrix in which I need to be able to build the kernel and have a working wifi module. I have successfully built the faux123's kernel-MB860 (thanks very much!).
I then downloaded faux123's atrix-wifi-module in order to get wifi working. I have built the module, and pushed it to /system/lib/modules. However, wifi doesn't work. Under settings, it just displays "error". dmesg doesn't show nearly as much as a kernel packaged by faux123. Here is my output:
Code:
<4>[ 24.504982] sdhci_tegra_wlan_detect Detecting WLAN
<4>[ 24.504998] mot_wifi_set_carddetect: Nobody to notify
<4>[ 24.507937]
<4>[ 24.507940] Dongle Host Driver, version 4.218.248.31
<4>[ 24.507944] Compiled in /home/kenny/android/atrix-wifi-module/open-src/src/dhd/linux/../.. on Apr 17 2012 at 06:54:15
<6>[ 24.724025] request_suspend_state: wakeup (3->0) at 13492036210 (2012-04-21 19:25:46.351491984 UTC)
<6>[ 24.725196] lm3532_brightness_set: lcd-backlight, 0x4c(76), webtop=0
<7>[ 25.088713] mmc1: queuing CIS tuple 0x91 length 3
<6>[ 25.088824] mmc1: new SDIO card at address 0001
<6>[ 25.534772] usb_ether_get_stats
Whereas, dmesg from a kernel/module packaged by faux123 displays:
Code:
[ 49.811365] sdhci_tegra_wlan_detect Detecting WLAN
[ 49.811403] mot_wifi_set_carddetect: Nobody to notify
[ 49.812815]
[ 49.812818] Dongle Host Driver, version 4.218.248.31
[ 49.812822] Compiled in /home/paul/Froyo/system/vendor/bcm/wlan/osrc/open-src/src/dhd/linux/../.. on Dec 17 2011 at 19:58:57
[ 50.108317] mmc1: queuing CIS tuple 0x91 length 3
[ 50.108350] mmc1: new SDIO card at address 0001
[ 50.136595] alloc static buf at e9980000!
[ 50.136975] F1 signature read @0x18000000=0x9934329
[ 50.139716] DHD: dongle ram size is set to 294912(orig 294912)
[ 50.143537] wl_iw_attach thr:6d0 started
[ 50.143598] wl_iw_bt_init thr:6d1 started
[ 50.143655] dhd_attach thr:6d2 started
[ 50.143706] dhd_attach thr:6d3 started
[ 50.143749] dhd_attach thr:6d4 started
[ 50.191722] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 50.273753] wifi_get_mac_addr
[ 50.274700] Firmware version = wl0: May 6 2011 13:09:01 version 4.218.248.31
[ 50.442416] eth0: Broadcom Dongle Host Driver mac=40:fc:89:13:a8:83
If I try to do a insmod, I get an invalid argument message.
Code:
# insmod /system/lib/modules/dhd.ko
insmod: init_module '/system/lib/modules/dhd.ko' failed (Invalid argument)
Can someone suggest what I might be missing or doing wrong?
as far as i've researched this problem, it's hardware related. i get the same error (and an accompanying reboot) every time i try to toggle wifi.
http://forum.xda-developers.com/showthread.php?t=1205775
if you have any more success please let me know.
dLo GSR said:
as far as i've researched this problem, it's hardware related.
Click to expand...
Click to collapse
I'm not convinced it is hardware related (other than maybe having the wrong driver), since wifi works great using a true faux123 kernel/module.
I suspect my problem has something to do with how I compiled module or other files that I need to put on the phone.
How did you build it? A little more background might help
Build process ... it works!?!?
First, the good news...the module now works. But I don't understand what I may have done differently this time other than do the builds consecutively.
I retrieved the source:
Code:
$ cd ~/android/faux123-olympus-cm7-kernel
$ git clone https://github.com/faux123/kernel-MB860.git
$ cd ~/android
$ git clone https://github.com/faux123/atrix-wifi-module.git
Then I built:
Code:
$ cd ~/android/faux123-olympus-cm7-kernel/kernel-MB860
$ make ARCH=arm tegra_olympus_cm7_defconfig
$ make ARCH=arm CROSS_COMPILE=/home/kenny/tools/arm-2011.09/bin/arm-none-eabi- -j1
$ cd ../../atrix-wifi-module/open-src/src/dhd/linux/
$ export LINUXSRCDIR=/home/kenny/android/faux123-olympus-cm7-kernel/kernel-MB860
$ make ARCH=arm CROSS_COMPILE=~/tools/arm-2011.09/bin/arm-none-eabi- -j1
$ adb push /home/kenny/android/faux123-olympus-cm7-kernel/kernel-MB860/vendor/bcm/wlan/osrc/open-src/src/dhd/linux/dhd.ko /system/lib/modules/dhd.ko
I had kernel built a few days before I had found the wifi module source. I then tried building the wifi module and pushing the module as shown above.
Since then (over last week or so), I have tried a number of things, including copying files (/etc/firmware/wifi/*) from another phone which has a faux123 kernel. Are these files required? Are there steps in here that I missed?

Archos 101 g9 8gb & Huawei modem E173u-1[No driver found]

Hi, I am having issues with a Huawei modem E173u-1 on my tablet Archos 101 g9 8gb
driver not found.
Can you help me, pls?
USB_ModeSwitch log from Wed Apr 09 17:50:44 PKT 2014
Raw args from udev: 1-1/1-1:1.0
Using top device dir /sys/bus/usb/devices/1-1
----------------
USB values from sysfs:
manufacturer HUAWEI
product HUAWEI Mobile
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /data/data/de.draisberghof.pppwidget/app_tmp/12d1.14fe
! matched. Reading config data
devList 1:
config: TargetVendor set to 12d1
config: TargetProduct set to 1506
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Logger is: /system/bin/log
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 2 -v 12d1 -p 14fe -f $cB
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.4 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x14fe
TargetVendor= 0x12d1
TargetProduct= 0x1506
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 001/002 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 12d1:14fe
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Could not reset endpoint (probably harmless): -34
Resetting message endpoint 0x01
Could not reset endpoint (probably harmless): -6
Device is gone, skipping any further commands
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
Waiting for device file system (1 sec.) ...
Waiting for device file system (2 sec.) ...
Waiting for device file system (3 sec.) ...
Waiting for device file system (4 sec.) ...
Waiting for device file system (5 sec.) ...
Waiting for device file system (6 sec.) ...
Waiting for device file system (7 sec.) ...
Reading attributes ...
Mode switch has completed
Mode switching was successful, found 12d1:1506 (HUAWEI: HUAWEI Mobile)
Device class of first interface is ff
Now checking for bound driver ...
No driver has bound to interface 0 yet
Module loader is /sbin/insmod
Trying to find and install main driver module "option"
Trying to find module "option"
Loading support module /lib/modules/usb_wwan.ko
Error: insmod: cannot insert '/lib/modules/usb_wwan.ko': Invalid module format (-1): Exec
format error
Loading main driver module "option"
Error: insmod: cannot insert '/lib/modules/option.ko': Invalid module format (-1): Exec
format error
Falling back to "usbserial"
Module "usb_serial" not found, can't do more here
Driver binding seems to have failed
All done, exiting
please answer!!!
i'm solved the problem by replacing the nucleus

Q: KERNEL DTS for Cyclone x2 (mygica ATV1200?) (stvmx Meson6_G02ref) wifi_power

Hi
I have an old Cyclone x2 box that I was trying to use as an audio streamer, but the android version on it was so flakey and running spotify on the box was dubious to say the least. I saw a libreelec build for g02ref here https://forum.libreelec.tv/thread/1...f-g18ref-th2-prima-pm-6001-vs-ip166-vs-ip015/ and thought I'd give that a go, but it doesn't power on the usb wifi card, so no wifi.
I tried building my own custom kernel based on the patches found in that thread but (after much pain and headscratching to figure out how to get from AML's DTD files to a uimage file with dtb included) I eventually ended up with a kernel that boots but still won't power on the wifi.
The kernel outputs
[ [email protected]] wifi_dev_probe
[ [email protected]] wifi_dt : interrupt_pin=GPIOX_11
[ [email protected]] wifi_dt : irq_num=null
[ [email protected]] wifi_dt : irq_trigger_type=GPIO_IRQ_HIGH
[ [email protected]] wifi_dt : power_on_pin=GPIOC_7
[ [email protected]] interrupt_pin=52, irq_num=4, irq_trigger_type=0, power_on_pin=112,clock_32k_pin=53​
which matches the entry in the DTD but the DTD suggests it's for a broadcom chip and I have the rtl8192cu.
I enabled gpio_sysfs and wrote a script to skip through setting all the values manually but got nowhere, that may have been because some of the gpio pins are marked as not-exportable (I got messages like
pinmux-m6 pinmux: pin-125 (amlogic:gpio:125) status -22
sh: write error: Invalid argument
aml_sdio.0 is using the pin CARD_5 as pinmux
pinmux-m6 pinmux: request() failed for pin 126
pinmux-m6 pinmux: pin-126 (amlogic:gpio:126) status -22
sh: write error: Invalid argument
sh: write error: Device or resource busy
sh: write error: Device or resource busy
uart_ao is using the pin GPIOAO_0 as pinmux​
for quite a lot of them) or it may be that there's something else I need to do.
One thing I spotted is that an old working mxlinux kernel I did manage to boot writes
set pinmux c0820b00​to the console, and the wifi card appears in the list when the USB powers up there; does that give a hint?
Does anyone know which GPIO pin is actually used for wifi_power by these box? Or alternatively does anyone have a DTS or DTD file for stvmx? The atv1200 dts in the kernel sources doesn't have any info on wifi pins
I tried extracting a DTB from the mxlinux image but none of the tools I can find that claim to do that were able to find one
Thanks
Edit: I should clarify that the reason I want to run this version and not one of the older (and working) openelec builds is because of librespot - being able to DLNA-stream as well as use as a spotify streamer is the ultimate goal)
Is this your wifi module? https://www.aliexpress.com/item/32646318856.html
or are you trying to use an external USB WiFi dongle?, as it appear to be a USB module, im not sure it would have a gpio pin to switch on/off (thought that was handled with software) but im still learning alot and im very probably wrong

Categories

Resources