在2020年使用Google Glass

After waiting ~7 years, I decided to check eBay again and finally found Google Glass bidding at ~$200. While I missed one of the auctions, I happened to find another unit bidding at $150 and selling for $200 + shipping. I immediately purchased the unit and received it in the mail two days later. I knew that some services were shut down so it was a bit of a gamble if this thing would still work but it does look like there is some hope left for the tech. This article will show how to get started developing on Google Glass using today’s software versions.

等待了大约7年后,我决定再次查看eBay,最后发现Google Glass的出价约为200美元。 当我错过一次拍卖会时,我碰巧发现另一个单元的竞标价格为$ 150,售价为$ 200 +运费。 我立即购买了该装置,并在两天后收到了邮件。 我知道某些服务已关闭,因此,如果此功能仍然可以运行,这是一场赌博,但看起来技术还存在一些希望。 本文将介绍如何使用当今的软件版本开始在Google Glass上进行开发。

最终软件更新 (Final Software Update)

When my unit arrived, I was shocked to find that this person did not factory reset the devices before sending. After learning some of the settings and input pattern, I decided to factory reset the device and start from scratch.

当我的设备到达时,我很震惊地发现此人在发送设备之前未将设备恢复出厂设置。 了解了一些设置和输入模式后,我决定将设备恢复出厂设置并从头开始。

Infrastructure for activating your Google Glass was shut down earlier this year (I think around February). When you factory reset your device (and you are running older firmware), you won’t be able to activate your device as you’ll need to either get the mobile app working or scan a QR code from Google’s website. I believe both of these options were set up to grant the Glass the ability to access your Google account. As these service were shut down, you’ll have to flash the latest firmware to ignore this startup sequence.

用于激活您的Google Glass的基础架构已于今年年初关闭(我认为大约在2月)。 当您将设备恢复出厂设置(并且正在运行较旧的固件)时,将无法激活设备,因为您需要使移动应用程序正常工作或从Google网站扫描QR码。 我相信这两个选项都是为了让Glass能够访问您的Google帐户而设置的。 由于这些服务已关闭,因此您必须刷新最新的固件才能忽略此启动顺序。

The latest firmware patch is located here: https://support.google.com/glass/answer/9649198?hl=en

最新的固件补丁位于: https : //support.google.com/glass/answer/9649198?hl=zh_CN

This is also the same set of files from this list (XE24): https://developers.google.com/glass/tools-downloads/system

此列表(XE24)中的文件也与此相同: https : //developers.google.com/glass/tools-downloads/system

Note that there is also a “rooted” bootloader that is available in the second link that isn’t available in the first. This allows you to run adb shell as root (which is useful for looking at kernel logs)

请注意,第二个链接中还有一个“ rooted”引导加载程序,而第一个链接中没有。 这允许您以root用户身份运行adb shell (这对于查看内核日志很有用)

驱动程式更新 (Driver Updates)

Note: steps copied from: https://stackoverflow.com/a/42312419

注意:步骤复制自: https : //stackoverflow.com/a/42312419

So the first step is connecting your glass to your computer (Windows/Mac/Linux). This means installing and configuring drivers. Unfortunately, I don’t have instructions for Mac/Linux but I think the process will still be similar (or the device will magically work).

因此,第一步是将玻璃板连接到计算机(Windows / Mac / Linux)。 这意味着安装和配置驱动程序。 不幸的是,我没有针对Mac / Linux的说明,但我认为该过程仍将相似(否则该设备将神奇地工作)。

The first step here is installing Android Studio (hopefully self explanatory). I am using the following:

第一步是安装Android Studio(希望可以自我解释)。 我正在使用以下内容:

Android Studio 4.0.1
Build #AI-193.6911.18.40.6626763, built on June 24, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 16
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins:

The next step is installing the Google USB driver package. Go to Tools > SDK Manager. Then, navigate to the SDK Tools tab and find the Google USB Driver.

下一步是安装Google USB驱动程序包。 转到Tools > SDK Manager 。 然后,导航至“ SDK Tools标签并找到Google USB Driver

Image for post

This should give you the following folder (replace $USER with your username):

这应该为您提供以下文件夹(将$USER替换$USER您的用户名):

C:\Users\$USER\AppData\Local\Android\Sdk\extras\google\usb_driver

Inside of this folder, you’ll find files that tell your operating system which devices are “Android.”

在此文件夹中,您会找到文件,这些文件告诉您的操作系统哪些设备是“ Android”。

Mode                LastWriteTime         Length Name
---- ------------- ------ ----
d----- 9/4/2020 9:00 PM amd64
d----- 9/4/2020 9:00 PM i386
-a---- 9/4/2020 9:00 PM 12789 androidwinusb86.cat
-a---- 9/4/2020 9:00 PM 12825 androidwinusba64.cat
-a---- 9/4/2020 9:00 PM 6957 android_winusb.inf
-a---- 9/4/2020 9:00 PM 17826 package.xml
-a---- 9/4/2020 9:00 PM 64 source.properties

Specifically, you will need to modify the android_winusb.inf file. Next is to find out what the device ID of your Google Glass is.

具体来说,您将需要修改android_winusb.inf文件。 接下来是找出您的Google Glass的设备ID。

Plug your devices into Windows. Then, open Device Manager from the start menu. Unfortunately, it is a bit hard to show a picture given I have already configured my system but it should be somewhere in this menu! The device may have the same “logo” as the Software devices option below. You may also find it under one of your Serial Bus sections as USB can be chained. After you open the properties for the device, use the Details tab and select the Hardware Ids tab. If you Google around, you’ll find other people have different IDs here and it likely has to do with manufacturing so don’t be worried if yours is different than the one I have below.

将设备插入Windows。 然后,从开始菜单中打开Device Manager 。 不幸的是,鉴于我已经配置了系统,要显示图片有些困难,但是它应该在此菜单中! 该设备可能与下面的“ Software devices选项具有相同的“徽标”。 您也可以在Serial Bus部分之一下找到它,因为可以链接USB。 打开设备的属性后,使用“ Details选项卡并选择“ Hardware Ids选项卡。 如果您在附近使用Google,就会发现其他人在这里拥有不同的ID,这很可能与制造有关,因此请不要担心您的ID是否与下面的ID不同。

Image for post

Using this ID, you can add a new section if it doesn’t exist:

使用此ID,您可以添加一个不存在的新部分:

;Google Glass
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_01

There are two parent sections:

有两个父部分:

[Google.NTx86]
...
[Google.NTamd64]
...

I am not sure which section you need to add it under so I added mine to both. After, you should be able to search for a driver from this location:

我不确定您需要在哪一部分下添加它,因此我在两者中都添加了我的内容。 之后,您应该可以从以下位置搜索驱动程序:

Image for post

Note: you may have to disable driver checking because you are modifying a file that will change some signature when the driver is loaded on the Windows side. I was able to do this by holding shift and selecting the Reboot option in the start menu.

注意:您可能必须禁用驱动程序检查,因为您正在修改的文件会在Windows端加载驱动程序时更改某些签名。 我可以通过按住shift并在开始菜单中选择“ Reboot选项来做到这一点。

For driver selection, you can choose the Android Composite ADB Interface. I think this is used for both Fastboot and ADB tools (I think my laptop had a third Fastboot-like option which my desktop computer didn’t have).

对于驱动程序选择,您可以选择Android Composite ADB Interface。 我认为这同时用于Fastboot和ADB工具(我认为我的笔记本电脑具有第三个类似Fastboot的选项,而我的台式计算机没有)。

Image for post

Nice! Debugging mode is likely not enabled as you factory reset the device so don’t expect adb devices to work. You also likely booted the Glass up normally so you aren’t in the Fastboot menu or in “Fastboot Mode” (not sure what this is called, I guess bootloader).

真好! 当您将adb devices恢复出厂设置时,调试模式可能未启用,因此不要期望adb devices正常工作。 您也可能正常启动了Glass,因此您不在Fastboot菜单或“ Fastboot模式”下(不确定这是什么,我想是bootloader)。

To reboot into Fastboot, turn your device on. After it is off, hold the Camera button down and click the power button for a second or so. After releasing the power button, keep the Camera button held down for ten seconds or so. Your device will then boot into recovery mode and you’ll have a menu like this on your glass screen:

要重启进入Fastboot,请打开设备。 关闭电源后,按住“相机”按钮并单击电源按钮约一秒钟。 释放电源按钮后,按住相机按钮十秒钟左右。 然后,您的设备将启动到恢复模式,并且玻璃屏幕上将显示如下菜单:

You can click the Camera button to navigate to the next item in the list and long-press to select the item. Reboot into fastboot should be the second option in this list so you’ll need to click once and then hold for a few seconds after that.

您可以单击“相机”按钮导航到列表中的下一个项目,然后长按选择该项目。 Reboot into fastboot应该是该列表中的第二个选项,因此您需要单击一次,然后保持几秒钟。

After this, your devices screen will not be on but the power light should have a very slow pulse. You can now plug the Glass device back into your PC. Windows should use the right driver and you’ll be able to run the fastboot command (this executable is located in the platform-tools folder in SDK folder above (sibling of extras/ folder).

此后,您的设备屏幕将不会打开,但是电源指示灯应具有非常慢的脉冲。 现在,您可以将Glass设备重新插入PC。 Windows应该使用正确的驱动程序,并且您将能够运行fastboot命令(此可执行文件位于上方SDK文件夹中的platform-tools文件夹中( extras/文件夹的同级文件)。

快速启动 (Fastboot Mode)

You should not see your device in ADB devices yet but you should see it in fastboot devices:

您现在应该不会在ADB设备中看到您的设备,但是应该在fastboot设备中看到它:

adb.exe devices
List of devices attachedfastboot.exe devices
015DB76E16009013 fastboot

The next step is unlocking the device:

下一步是解锁设备:

fastboot.exe oem unlock
(bootloader) Warning: Unlocking your device will void your warranty
(bootloader) and erase your personal data from the device.
(bootloader) Run "fastboot oem unlock" again to confirm.
(bootloader) Device still locked.
OKAY [ 0.023s]
Finished. Total time: 0.032s

Re-run this command to unlock it:

重新运行此命令将其解锁:

fastboot.exe oem unlock
(bootloader) Erasing personal data. This could take a while...
(bootloader) Erasing cache...
(bootloader) Erasing userdata...
(bootloader) Unlocking...
(bootloader) Device unlocked!
OKAY [ 1.113s]
Finished. Total time: 1.115s

Now, we are ready to flash the firmware supplied in the Support Post above. I initially had problems with the boot image so I skipped it and continued to the system and recovery images and the Glass seemed to work (though adb shell with root was not working at that point)

现在,我们准备刷新上述支持文章中提供的固件。 最初,我在启动映像方面遇到问题,因此我跳过了它,然后继续进行systemrecovery映像,Glass似乎可以正常工作(尽管那时带有root的adb shell不能正常工作)

fastboot.exe flash boot ..\..\..\..\..\Downloads\signed_signed-glass_1-img-5585826\boot.img
fastboot: error: Couldn't parse partition size '0x'.

After the boot image, flash the other two images: system and recovery .

引导映像之后,刷新其他两个映像: systemrecovery

If you want to flash the “rooted” boot.img, I was able to use the flash:raw command to avoid this error. This was able to

如果要刷新“根目录”的boot.img,我可以使用flash:raw命令来避免此错误。 这能够

fastboot.exe flash:raw boot C:\Users\jgens\Downloads\boot.img
Sending 'boot' (5496 KB) OKAY [ 0.238s]
Writing 'boot' OKAY [ 0.923s]
Finished. Total time: 1.183s

After you are done flashing, run fastboot.exe reboot and this should boot up the Glass normally. If everything works correctly, you should be in the Home screen of the Glass and not have the tutorial to follow anymore!

刷新完成后,运行fastboot.exe reboot ,这将正常启动Glass。 如果一切正常,您应该在Glass的主屏幕中,而不再需要教程。

Head to the Options menu (left of clock), then to Device Info and then to the end of this list. You should be able to enable Developer mode and enable Debug mode. If this works properly, you should be able to run adb devices and find your device. If this isn’t working for you, you may need to restart Windows or change the driver settings.

转到“ Options菜单(时钟左侧),然后转到“ Device Info ,再到此列表的末尾。 您应该能够启用开发人员模式并启用调试模式。 如果此方法正常运行,则您应该能够运行adb devices并找到您的设备。 如果这对您不起作用,则可能需要重新启动Windows或更改驱动程序设置。

If you install the rooted image, you should have the following:

如果安装根目录映像,则应具有以下内容:

adb.exe root
adbd is already running as root

编写程序 (Writing A Program)

Now you can at least look around your device and do whatever you would normally have done. However, you may be interested in building an application for this Glass. If so, you’ll need to use the following guide to get started building.

现在,您至少可以环顾设备,并执行通常需要执行的操作。 但是,您可能会对构建此Glass的应用程序感兴趣。 如果是这样,您将需要使用以下指南开始构建。

I initially tried a few “Hello world” programs and start apps and was met with error after error (mostly due to version conflicts). I am not up-to-date with the latest Android development but I did find some of the older guides for Glass that used Eclipse and did not use Gradle for building. I didn’t really find this acceptable so I tried finding an example that did use Gradle. I ended up finding the Timer example though I mostly referenced its files and setup and never successfully imported and built it with Android Studio:

最初,我尝试了一些“ Hello world”程序并启动了应用程序,但接连出现错误(主要是由于版本冲突)。 我不是最新的Android开发人员,但是我确实找到了一些使用Eclipse而不使用Gradle进行构建的Glass的旧指南。 我真的不觉得这可以接受,所以我尝试找到一个确实使用Gradle的示例。 我最终找到了Timer示例,尽管我主要参考了它的文件和设置,但从未成功使用Android Studio导入和构建它:

The first thing to do is install the Glass Development Kit Preview Package. Use the SDK Manager and uncheck the “Hide Obsolete Packages” and check the “Show Package Details” buttons. This should let you install the Development Kit.

首先要做的是安装Glass Development Kit预览包。 使用SDK Manager,然后取消选中“隐藏过时的软件包”并选中“显示软件包详细信息”按钮。 这应该可以让您安装开发套件。

Image for post

After, create a new project with No Activity. For Minimum SDK, I used API 19: Android KitKat.

之后,创建一个没有活动的新项目。 对于最低SDK,我使用了API 19:Android KitKat。

This should give you the following: an unbuildable Android App configuration with zero source code files (nothing in test2). You can also see my Glass Device was picked up automatically.

这将为您提供以下内容:带有零源代码文件(test2中没有任何内容)的不可构建的Android App配置。 您还可以看到我的Glass设备已自动拿起。

Image for post

You’ll need to start with an Activity. This can just be a Java class that extends Activity :

您需要从活动开始。 这只能是扩展Activity的Java类:

package com.example.test2;
import android.app.Activity;
public class TestClass extends Activity {}

Now, update the Launch Options to use this Activity:

现在,更新启动选项以使用此活动:

Image for post

You should then have the second error:

然后,您应该有第二个错误:

Image for post
<activity
android:name="com.example.test2.TestClass"
android:label="@string/app_name"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
</activity>

After adding the above activity inside of the <application>...</application> , you should be able to “Run” the application.

<application>...</application>添加上述活动后,您应该能够“运行”该应用程序。

This shouldn’t do anything yet as you haven’t added any code but it does give you a good check point to start building. From here, you can start copying bits from other projects (like parts from AndroidManifest.xml) or just follow some of the guides.

由于您尚未添加任何代码,因此此操作不应执行任何操作,但它确实为您提供了良好的开始构建检查点。 从这里开始,您可以开始从其他项目(如AndroidManifest.xml的部分)中复制位,或者仅遵循一些指南。

Here are a few other notes I made along the way from other non-successful approaches:

这是我在其他不成功的方法中所做的一些其他说明:

  • One project’s gradle file has http instead of https

    一个项目的gradle文件使用http而不是https

  • One project was using gradle 1.0 but Android Studio needs to use 2.6 . You will need to use 2.6 and check the version of the other dependencies to get anything working.

    一个项目使用gradle 1.0但Android Studio需要使用2.6 。 您将需要使用2.6并检查其他依赖项的版本才能使一切正常运行。

  • You may also need to comment out most of build.gradle (so any sort of JUnit or appcompat configuration)

    您可能还需要注释掉大部分build.gradle(因此,任何类型的JUnit或appcompat配置)

你好,世界 (Hello World)

I started by copying bits of other guides. I have three activities that you can learn by example:

我从复制其他指南开始。 我通过示例可以学习三个活动:

  • CardActivity (hello world)

    CardActivity(您好,世界)
  • MenuActvity (showing how menu’s work)

    MenuActvity(显示菜单的工作方式)
  • FindThePriceActivity (would have sent http call to eBay with picture taken from device)

    FindThePriceActivity(将通过设备拍摄的图片发送到http:// eBay的http呼叫)

修复Wifi (Fixing the Wifi)

Unfortunately, I am not able to get WiFi working on my device. I did look at the kernel log and it looks like the driver doesn’t start quite right. I am pretty sure the root error is the si_attach failed but I don’t know what this means and wasn’t able to debug even after looking through the glass source code:

不幸的是,我无法在设备上使用WiFi。 我确实查看了内核日志,看起来驱动程序启动不正确。 我很确定根本错误是si_attach failed但是我不知道这是什么意思,即使在浏览了玻璃源代码之后也无法调试:

dmesg log:

dmesg日志:

<4>[    7.886322] found wifi platform device bcm4329_wlan
<4>[    7.891754] Power-up adapter 'DHD generic adapter'
<4>[    7.897216] wifi_platform_set_power = 1
<6>[    7.901428] tuna_wifi_power: 1
<4>[    8.412933] wifi_platform_bus_enumerate device present 1
<6>[    8.418914] tuna_wifi_set_carddetect: 1
<4>[    8.423522] tuna_wifi_set_carddetect: Nobody to notify
<4>[    9.830322] dhdsdio_probe_attach: si_attach failed!
<4>[    9.835876] dhdsdio_probe: dhdsdio_probe_attach failed
<4>[    9.842834] bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
<4>[   11.351745] duty_cycle_apply_cooling: not throttling
<4>[   11.357360] duty_cycle_apply_cooling: not throttling
<4>[   21.850433] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
<4>[   21.859130] wifi_platform_set_power = 0
<6>[   21.863525] tuna_wifi_power: 0
<6>[   22.026092] twl6030_charger twl6030_charger: capacity=86% raw_capacity=86% status=02 voltage_uV=4101000 current_uA=-118000 temperature_cC=289 qpassed_mAh=65522 state=C
HARGING
<4>[   22.186157] wifi_platform_bus_enumerate device present 0
<6>[   22.191833] tuna_wifi_set_carddetect: 0
<4>[   22.195983] tuna_wifi_set_carddetect: Nobody to notify
<4>[   22.201507] bcm4329_wlan: probe of bcm4329_wlan failed with error -62
<4>[   22.208679] found wifi platform device bcm4329_wlan
<4>[   22.213928] unregister wifi platform drivers

I could try recompiling kernel, possibly swapping the android driver with linux broadcom driver though I have no idea if that is possible or if I would hit even more error.

我可以尝试重新编译内核,可能将android驱动程序与linux broadcom驱动程序交换,尽管我不知道这是否可行或是否会遇到更多错误。

The only other option I could find was at least finding a way to forward traffic through ADB (communication is bidirectional after all!). There is a neat command called adb reverse which behaves like adb forward and would allow connections on the Android device to connect to something listening on your PC (like a proxy server!). However, this did not work and I wasn’t able to figure out the error message even with ADB_TRACE=all set.

我唯一能找到的其他选择至少是找到一种通过ADB转发流量的方法(通信毕竟是双向的!)。 有一个名为adb reverse的简洁命令,其行为类似于adb forward ,并允许Android设备上的连接连接到PC上正在侦听的内容(例如代理服务器!)。 但是,这不起作用,即使设置了ADB_TRACE=all ,我也无法弄清错误消息。

结论 (Conclusion)

All in all, I would say that I enjoyed my time with the Glass. Without WiFi working, I don’t know that I will see much use for this device unless apps are self-contained. I was thinking of building some fitness tracker to use the gyroscope to display number of push-ups/pull-ups.

总而言之,我想说我很喜欢和Glass在一起。 如果无法使用WiFi,除非应用程序是独立的,否则我不知道我会在此设备上看到很多用途。 我当时正在考虑构建一些健身追踪器,以使用陀螺仪显示俯卧撑/俯卧撑的数量。

I also think that the tech behind imaging will need to be different (surely why this was discontinued). The following image shows how the lens reflects the image onto your retina using a curved surface rather than the “block” used by the Glass. I think that these devices will need to be fitted per-customer which will drive cost way up and will not allow them to be re-sold quite as easily. My Glass device definitely has out-of-focus text near the edge of the surface and is somewhat difficult to use (depends on app and text placement).

我还认为,成像背后的技术将需要有所不同(当然,为什么要停止这种技术)。 下图显示了镜头如何使用曲面而不是Glass使用的“块”将图像反射到视网膜上。 我认为这些设备将需要根据客户进行安装,这将使成本不断上升,并且不允许它们很容易地重新出售。 我的Glass设备肯定在表面边缘附近有模糊的文本,并且使用起来有些困难(取决于应用程序和文本的位置)。

Picture of lens reflection: https://www.kguttag.com/wp-content/uploads/2018/10/North-Focals-feature-image-001.jpg

镜头反射的图片: https : //www.kguttag.com/wp-content/uploads/2018/10/North-Focals-feature-image-001.jpg

Thank you for reading! I would love to see another device that just focuses on notifications and reading simple content (like tweets/news) so that the device can be kept small and light and hopefully not overheat. Until then, we wait!

感谢您的阅读! 我希望看到另一台仅关注通知和阅读简单内容(例如推文/新闻)的设备,以便使该设备小巧轻便,并且希望不会过热。 在那之前,我们等待!

翻译自: https://medium.com/@jeffzzq/using-google-glass-in-2020-5f0a01188e6e

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
调通sina33下的AP6212A0版本的BT 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.0 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16的parrotv1.1的官方SDK(Android4.4.2) 1、打开AP6212的BT,关闭rtl8723bs的BT: [ 3.141273] Bluetooth: HCI UART driver ver 2.2 [ 3.146210] Bluetooth: HCI H4 protocol initialized [ 3.151563] Bluetooth: HCI BCSP protocol initialized [ 3.157154] usbcore: registered new interface driver btusb [ 3.163282] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.169599] Bluetooth: BlueSleep Mode Driver Ver 1.1 [ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] Bluetooth: RFCOMM ver 1.11 [ 3.968340] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol multicast [ 3.995242] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 4.001921] L2TP core driver, V2.0 [ 4.005706] PPPoL2TP kernel driver, V2.0 [ 4.010070] L2TP IP encapsulation support (L2TPv3) [ 4.015468] L2TP netlink interface [ 4.019264] L2TP ethernet pseudowire support (L2TPv3) [ 4.023860] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 4.023929] [mmc]: mclk 0xf1c20090 0xc100000b [ 4.040272] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.048780] ThumbEE CPU extension supported. [ 4.053550] Registering SWP/SWPB emulation handler [ 4.059269] [rfkill]: rfkill set power 1 [ 4.063652] gpio ap6xxx_bt_regon set val 0, act val 0 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ ll rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. evb 1. maple 2. redwood 3. y2 4. y3 Choice: 4 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make ARCH=arm menuconfig [*] Networking support ---> <*> Bluetooth subsystem support ---> Bluetooth device drivers ---> < > Broadcom Bluetooth Low Power Manager Support <*> Realtek Bluesleep driver support 修改为: <*> Broadcom Bluetooth Low Power Manager Support < > An inverter between bt hostwake pin and cpu (NEW) < > Realtek Bluesleep driver support 2、(这个不修改:) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent tetherable Wifi interfaces. If the device doesn't want to support tethering over Wifi this should be empty. An example would be "softap.*" --> <string-array translatable="false" name="config_tether_wifi_regexs"> <item>"wlan0"</item> </string-array> <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6210/device-bcm.mk) $(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg.mk) # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-y3/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini #add gms features #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.hardware.faketouch.xml:system/etc/permissions/android.hardware.faketouch.xml \ # frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ # frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml # 3G Data Card Packages #PRODUCT_PACKAGES += \ # u3gmonitor \ # chat \ # rild \ # pppd # 3G Data Card Configuration Flie #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/ip-down:system/etc/ppp/ip-down \ # device/softwinner/polaris-common/rild/ip-up:system/etc/ppp/ip-up \ # device/softwinner/polaris-common/rild/3g_dongle.cfg:system/etc/3g_dongle.cfg \ # device/softwinner/polaris-common/rild/usb_modeswitch:system/bin/usb_modeswitch \ # device/softwinner/polaris-common/rild/call-pppd:system/xbin/call-pppd \ # device/softwinner/polaris-common/rild/usb_modeswitch.sh:system/xbin/usb_modeswitch.sh \ # device/softwinner/polaris-common/rild/apns-conf_sdk.xml:system/etc/apns-conf.xml \ # device/softwinner/polaris-common/rild/libsoftwinner-ril.so:system/lib/libsoftwinner-ril.so #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/init.3gdongle.rc:root/init.sunxi.3gdongle.rc # 3G Data Card usb modeswitch File #PRODUCT_COPY_FILES += \ # $(call find-copy-subdir-files,*,device/softwinner/polaris-common/rild/usb_modeswitch.d,system/etc/usb_modeswitch.d) PRODUCT_PROPERTY_OVERRIDES += \ ro.sw.embeded.telephony = false PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.language=zh \ persist.sys.country=CN PRODUCT_PACKAGES += Bluetooth #PRODUCT_PROPERTY_OVERRIDES += \ # ro.product.8723b_bt.used=true #GPS Feature #PRODUCT_PACKAGES += gps.polaris #BOARD_USES_GPS_TYPE := simulator #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/tools/logger.sh:system/bin/logger.sh PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 ro.udisk.lable=Polaris \ ro.font.scale=1.0 \ ro.hwa.force=false \ rw.logger=0 \ ro.sys.bootfast=true \ debug.hwc.showfps=0 \ debug.hwui.render_dirty_regions=false #ro.sys.storage_type = emulated \ #for gms #PRODUCT_PROPERTY_OVERRIDES += \ # ro.sys.mutedrm=true \ # ro.adb.secure=1 PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 \ ro.product.firmware=v2.0 $(call inherit-product-if-exists, device/softwinner/astar-y3/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-y3/overlay PRODUCT_CHARACTERISTICS := tablet # Overrides PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi large PRODUCT_AAPT_PREF_CONFIG := xhdpi PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_y3 PRODUCT_DEVICE := astar-y3 PRODUCT_MODEL := QUAD-CORE A33 y3 PRODUCT_MANUFACTURER := softwinner #include device/softwinner/polaris-common/prebuild/google/products/gms_base.mk 4、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration #BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl SW_BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu #SW_BOARD_USR_WIFI := rtl8723au #BOARD_WLAN_DEVICE := rtl8723au #SW_BOARD_USR_WIFI := rtl8723bs #BOARD_WLAN_DEVICE := rtl8723bs endif # 1.2 broadcom wifi support BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" #SW_BOARD_USR_WIFI := AP6181 #SW_BOARD_USR_WIFI := AP6210 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40181a2.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40181a2_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40181a2_apsta.bin" # 2017/6/21 15:11 wenyuanbo configure ap6212 use ap6210 SW_BOARD_USR_WIFI := AP6212 WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm43438a0.bin" WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm43438a0_p2p.bin" WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm43438a0_apsta.bin" #SW_BOARD_USR_WIFI := AP6330 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40183b2_ag.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40183b2_ag_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40183b2_ag_apsta.bin" endif #1.3 eag wifi config #BOARD_WIFI_VENDOR := eagle ifeq ($(BOARD_WIFI_VENDOR), eagle) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_eagle BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_eagle SW_BOARD_USR_WIFI := esp8089 BOARD_WLAN_DEVICE := esp8089 endif # 2. Bluetooth Configuration # make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6210 SW_BOARD_HAVE_BLUETOOTH_NAME := ap6212 #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6330 #BOARD_HAVE_BLUETOOTH_RTK := true #BLUETOOTH_HCI_USE_RTK_H5 := true #SW_BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs 5、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\init.sun8i.rc on early-fs mount_all /fstab.sun8i setprop ro.crypto.fuse_sdcard true insmod /system/vendor/modules/disp.ko insmod /system/vendor/modules/lcd.ko insmod /system/vendor/modules/mali.ko insmod /system/vendor/modules/leds-sunxi.ko insmod /system/vendor/modules/bcmdhd.ko insmod /system/vendor/modules/bcm_btlpm.ko #2G or 3G init.rc # import init.sunxi.3gdongle.rc ## 1. realtek & eagle wifi service ## 1.1 realtek & eagle wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 1.2 realtek & eagle wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -e/data/misc/wifi/entropy.bin -N \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -g@android:wpa_wlan0 # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # 2. broadcom wifi service # 2.1 broadcom wifi station and softap service wpa_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 2.2 broadcom wifi sta p2p concurrent service service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets -N \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -I/system/etc/wifi/p2p_supplicant_overlay.conf \ -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 6、(不需要修改) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\ueventd.sun8i.rc 7、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml <integer name="def_screen_off_timeout">1800000</integer> <bool name="def_lockscreen_disabled">true</bool> 8、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\services\java\com\android\server\BatteryService.java // private static final boolean DEBUG = false; private static final boolean DEBUG = true; private void sendIntentLocked() { // Pack up the values and broadcast them to everyone final Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_REPLACE_PENDING); int icon = getIconLocked(mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_STATUS, mBatteryProps.batteryStatus); intent.putExtra(BatteryManager.EXTRA_HEALTH, mBatteryProps.batteryHealth); intent.putExtra(BatteryManager.EXTRA_PRESENT, mBatteryProps.batteryPresent); //intent.putExtra(BatteryManager.EXTRA_LEVEL, mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_LEVEL, 100); intent.putExtra(BatteryManager.EXTRA_SCALE, BATTERY_SCALE); intent.putExtra(BatteryManager.EXTRA_ICON_SMALL, icon); intent.putExtra(BatteryManager.EXTRA_PLUGGED, mPlugType); //intent.putExtra(BatteryManager.EXTRA_VOLTAGE, mBatteryProps.batteryVoltage); intent.putExtra(BatteryManager.EXTRA_VOLTAGE, 4200); intent.putExtra(BatteryManager.EXTRA_TEMPERATURE, mBatteryProps.batteryTemperature); intent.putExtra(BatteryManager.EXTRA_TECHNOLOGY, mBatteryProps.batteryTechnology); intent.putExtra(BatteryManager.EXTRA_INVALID_CHARGER, mInvalidCharger); if (DEBUG) { Slog.d(TAG, "2016/12/05 10:41 wenyuanbo **** Sending ACTION_BATTERY_CHANGED. level:" + mBatteryProps.batteryLevel + ", scale:" + BATTERY_SCALE + ", status:" + mBatteryProps.batteryStatus + ", health:" + mBatteryProps.batteryHealth + ", present:" + mBatteryProps.batteryPresent + ", voltage: " + mBatteryProps.batteryVoltage + ", temperature: " + mBatteryProps.batteryTemperature + ", technology: " + mBatteryProps.batteryTechnology + ", AC powered:" + mBatteryProps.chargerAcOnline + ", USB powered:" + mBatteryProps.chargerUsbOnline + ", Wireless powered:" + mBatteryProps.chargerWirelessOnline + ", icon:" + icon + ", invalid charger:" + mInvalidCharger); } mHandler.post(new Runnable() { @Override public void run() { ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL); } }); } 9、(直接拷贝同目录下的ap6210:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := bt_vendor.conf LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/bluetooth LOCAL_MODULE_TAGS := eng LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\bt_vendor.conf # UART device port where Bluetooth controller is attached UartPort = /dev/ttyS1 # Firmware patch file location FwPatchFilePath = /system/vendor/modules/ # Firmware Name FwPatchFileName = bcm43438a0.hcd 10、新增:vnd_astar-y3-ap6212.txt,直接拷贝:vnd_astar-y2-ap6210.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y3-ap6212.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y2-ap6210.txt BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1" FW_PATCHFILE_LOCATION = "/system/vendor/modules/" LPM_IDLE_TIMEOUT_MULTIPLE = 5 UART_TARGET_BAUD_RATE = 1500000 BT_WAKE_VIA_PROC = TRUE #LPM_SLEEP_MODE = FALSE BTVND_DBG = TRUE BTHW_DBG = TRUE VNDUSERIAL_DBG = TRUE UPIO_DBG = TRUE 11、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\src\userial_vendor.c //#ifdef USE_AP6210_BT_MODULE #if defined(USE_AP6210_BT_MODULE) || defined(USE_AP6212_BT_MODULE) /* PATCH for AP6210. Will detect CTS(module side) to select transport mode*/ ALOGE("userial vendor open: USE AP6210 BT MODULE."); usleep(100000); close(vnd_userial.fd); if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) { ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); return -1; } #endif //USE_AP6210_BT_MODULE 12、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\Android.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) LOCAL_CFLAGS += -DUSE_AP6210_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) LOCAL_CFLAGS += -DUSE_AP6212_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6330) include $(LOCAL_PATH)/conf/softwinner/ap6330/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) include $(LOCAL_PATH)/conf/softwinner/ap6210/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) include $(LOCAL_PATH)/conf/softwinner/ap6212/Android.mk endif 13、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\vnd_buildcfg.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6210.txt,$(basename $(TARGET_DEVICE)))) endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6212.txt,$(basename $(TARGET_DEVICE)))) endif 14、(这些AP6212的WIFI的bin文件和BT的hcd文件来自全志R16的SDK,当然也可以找正基原厂/代理商索取:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\bcm43438a0.hcd (根据ap6210修改:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\device-bcm.mk # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ######################## -include hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk PRODUCT_COPY_FILES += \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0.bin:system/vendor/modules/fw_bcm43438a0.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_apsta.bin:system/vendor/modules/fw_bcm43438a0_apsta.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_p2p.bin:system/vendor/modules/fw_bcm43438a0_p2p.bin \ hardware/broadcom/wlan/firmware/ap6212/nvram_ap6212.txt:system/vendor/modules/nvram_ap6212.txt \ hardware/broadcom/wlan/firmware/ap6212/bcm43438a0.hcd:system/vendor/modules/bcm43438a0.hcd #hardware/broadcom/wlan/firmware/ap6212/config.txt:system/vendor/modules/config.txt ######################## R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_apsta.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_p2p.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6212.txt 15、(可选修改:) R:\wyb\ap6212a0_a33_sc3817r\android\packages\apps\Camera2\src\com\android\camera\CameraActivity.java private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_BATTERY_CHANGED.equals(action)) { int Level = intent.getIntExtra("level", 0); int Scale = intent.getIntExtra("scale", 100); Log.w(TAG, "2016/11/29 19:54 &&&& wenyuanbo battery Level" + Level); /* *Logic: *1.the battery level is lower then 5%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, give a dialog, press it and finish the activity. *5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity. * *by fuqiang. */ if(Level < 5) { Runnable runnable_close_camera = new Runnable() { @Override public void run() { //close the camera. // CameraActivity.this.finish(); } }; Log.w(TAG, "2016/11/29 18:20 **** wenyuanbo battery Level" + Level); showLocationDialog(); } /* *Logic: *1.the battery level is lhigher then 5% and lower than 15%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.whether in camera or in videocamera, make sure that the flash mode is supported. *5.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user. *6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog. *7.the dialog is only given once for each camera activity starting. * *by fuqiang. */ else if(Level < 16) { //close the flash mode. /* if (mIsLowBatteryDialogShown == false) { mRotateDialog.showAlertDialog( getString(R.string.warning), getString(R.string.low_battery_15), null, null, getString(R.string.close), null); mIsLowBatteryDialogShown = true; } */ } } } }; 16、(可选:) R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg bootdelay=3 loglevel=8 17、 R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex [power_sply] dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo1_vol = 3300 aldo2_vol = 2500 aldo3_vol = 3000 dldo1_vol = 3300 dldo2_vol = 3300 dldo3_vol = 2800 ;gpio0_vol = 2800 ldoio0_vol = 2800 ;---------------------------------------------------------------------------------- ;uart configuration ;uart_used = uart x enable ;uart_type = 2:2 wire,4:4 wire,8:8 wire, full function ;---------------------------------------------------------------------------------- [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PF02<3><1><default><default> uart_rx = port:PF04<3><1><default><default> [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00<2><1><default><default> uart_rx = port:PB01<2><1><default><default> uart_rts = port:PB02<2><1><default><default> uart_cts = port:PB03<2><1><default><default> [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06<3><1><default><default> uart_rx = port:PH07<3><1><default><default> uart_rts = port:PH08<3><1><default><default> uart_cts = port:PH09<3><1><default><default> [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> uart_rts = port:PA06<2><1><default><default> uart_cts = port:PA07<2><1><default><default> ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;ctp_twi_id : twi controller ID ;ctp_twi_addr : I2C slave address, 7bit ;ctp_screen_max_x/_y : resolution of touch panel ;ctp_revert_x/_y_flag : whether need to revert x/y ;ctp_exchange_x_y_flag: whether need to exchange the value of x and y ;ctp_int_port : port for tp's interrupt signal ;ctp_wakeup : port for wakeup tp ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gt82x" ctp_twi_id = 0 ctp_twi_addr = 0x5d ctp_screen_max_x = 1280 ctp_screen_max_y = 800 ctp_revert_x_flag = 1 ctp_revert_y_flag = 1 ctp_exchange_x_y_flag = 1 ctp_int_port = port:PL04<4><default><default><default> ctp_wakeup = port:PL03<1><default><default><1> ctp_power_ldo = ctp_power_ldo_vol = ctp_power_io = ;-------------------------------------------------------------------------------- ; CTP automatic detection configuration ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused ;Module name postposition 1 said detection, 0 means no detection. ;-------------------------------------------------------------------------------- [ctp_list_para] ctp_det_used = 1 ft5x_ts = 1 gt82x = 1 gslX680 = 1 gslX680new = 0 gt9xx_ts = 1 gt9xxf_ts = 0 tu_ts = 0 gt818_ts = 1 zet622x = 1 aw5306_ts = 1 icn83xx_ts = 0 [lcd0_para] lcd_used = 1 lcd_driver_name = "default_lcd" lcd_if = 3 lcd_x = 1280 lcd_y = 800 lcd_width = 150 lcd_height = 94 lcd_dclk_freq = 71 lcd_pwm_used = 1 lcd_pwm_ch = 0 lcd_pwm_freq = 50000 lcd_pwm_pol = 1 lcd_hbp = 20 lcd_ht = 1418 lcd_hspw = 10 lcd_vbp = 10 lcd_vt = 830 lcd_vspw = 5 lcd_lvds_if = 0 lcd_lvds_colordepth = 1 lcd_lvds_mode = 0 lcd_frm = 1 lcd_gamma_en = 0 lcd_bright_curve_en = 0 lcd_cmap_en = 0 deu_mode = 0 lcdgamma4iep = 22 smart_color = 90 lcd_bl_en = port:PD13<1><0><default><1> ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;lcd_bl_en = port:PL06<1><0><default><1> lcd_power = "axp22_dc1sw" lcdd0 = port:PD18<3><0><default><default> lcdd1 = port:PD19<3><0><default><default> lcdd2 = port:PD20<3><0><default><default> lcdd3 = port:PD21<3><0><default><default> lcdd4 = port:PD22<3><0><default><default> lcdd5 = port:PD23<3><0><default><default> lcdd6 = port:PD24<3><0><default><default> lcdd7 = port:PD25<3><0><default><default> lcdd8 = port:PD26<3><0><default><default> lcdd9 = port:PD27<3><0><default><default> ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00<2><0><default><default> [pwm1_para] pwm_used = 1 pwm_positive = port:PH01<2><0><default><default> ;-------------------------------------------------------------------------------- ;wifi configuration ;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 ;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2 ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0) ;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt), ; 3 - rtl8188eu, 4- rtl8723au(wifi+bt), ; 5 - rtl8723bs, 6- esp8089 ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wifi_mod_sel = 2 wifi_power = "axp22_dldo1" wifi_power_ext1 = "axp22_dldo2" wifi_power_ext2 = "axp22_aldo1" wifi_power_switch = ;wifi_power_switch = port:power0<1><0><default><0> ; 1 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_regon = port:PD13<1><default><default><0> ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ap6xxx_bt_regon = port:PL08<1><default><default><0> ap6xxx_bt_wake = port:PL10<1><default><default><0> ap6xxx_bt_host_wake = port:PL09<4><default><default><0> ap6xxx_lpo_use_apclk = 1 ; 3 - rtl8188eu usb wifi gpio conifg ; 4 - rtl8723au usb wifi + bt ; 5 - rtl8723bs sdio wifi + bt ;rtl8723bs_chip_en = port:PL11<1><default><default><0> ;rtl8723bs_wl_regon = port:PL06<1><default><default><0> ;rtl8723bs_wl_host_wake = port:PL07<4><default><default><0> ;rtl8723bs_bt_regon = port:PL08<1><default><default><0> ;rtl8723bs_bt_wake = port:PL10<1><default><default><0> ;rtl8723bs_bt_host_wake = port:PL09<4><default><default><0> ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03<1><default><default><0> ;esp_wl_rst = port:PL02<1><default><default><0> ;-------------------------------------------------------------------------------- ;blue tooth ;bt_used ---- blue tooth used (0- no used, 1- used) ;bt_uard_id ---- uart index ;-------------------------------------------------------------------------------- [bt_para] bt_used = 1 bt_uart_id = 1 power_start = 3 pmu_temp_enable = 0 18、 刷机之后,BT可以用。 传输4.5MB的JPG图片大概需要2分钟。 WIFI: 在设置→WLAN(打开之后): shell@astar-y3:/ $ shell@astar-y3:/ $ [ 469.609956] init: computing context for service '/system/bin/wpa_supplicant' [ 469.618386] init: starting 'p2p_supplicant' [ 469.625739] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 469.673379] init: waitpid returned pid 2065, status = 0000ff00 [ 469.679923] init: process 'p2p_supplicant', pid 2065 exited [ 476.197334] sndpcm_unmute,line:1099 [ 451.464755] CPU1: Booted secondary processor [ 478.459403] CPU1: shutdown [ 478.462947] [hotplug]: cpu(0) try to kill cpu(1) [ 478.468478] [hotplug]: cpu1 is killed! . shell@astar-y3:/ $ 分析启动的log: [ 17.526849] gpio ap6xxx_wl_regon set val 1, act val 1 [ 17.632508] [ap6xxx]: sdio wifi power state: on [ 17.637576] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.637751] =========== WLAN placed in POWER ON ======== [ 17.654651] [mmc]: sdc1 card_power_on start... [ 17.659576] [mmc]: sdc1 power_supply is null [ 17.664322] [mmc]: sdc1 card_power_on ok [ 17.680039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.690275] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.772361] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.781309] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.799714] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.862032] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.872262] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.933953] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !! [ 17.941997] *******************Try sdio******************* [ 17.948400] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.958630] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.027775] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 18.035416] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.043087] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.051920] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 18.145287] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.155436] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.215346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.225736] [mmc]: mclk 0xf1c2008c 0x8100000b [ 18.285675] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 18.296021] [mmc]: mclk 0xf1c2008c 0x8140030b [ 18.357915] mmc1: new high speed SDIO card at address 0001 [ 18.364532] bcmsdh_register: Linux Kernel SDIO/MMC Driver [ 18.364575] *******************sdio init ok******************* [ 18.377207] bcm_wlan_get_oob_irq enter. [ 18.381537] gpio [359] map to virq [7] ok [ 18.388851] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 18.396019] dhdsdio_probe_attach: unsupported chip: 0xa9a6 [ 18.402155] dhdsdio_probe: dhdsdio_probe_attach failed [ 18.407899] bcmsdh_probe: device attach failed [ 18.412981] [ 18.412984] Dongle Host Driver, version 1.88.45.3 (r420671) [ 18.412989] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 12:06:39 [ 18.428835] dhd_module_init: sdio_register_driver timeout or error [ 18.435928] gpio ap6xxx_wl_regon set val 0, act val 0 [ 18.541549] [ap6xxx]: sdio wifi power state: off [ 18.546679] =========== WLAN placed in POWER OFF ======== [ 18.546915] mmc1: card 0001 removed [ 18.546995] [mmc]: mmc not poweroff notifiy [ 18.547007] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 18.547160] [mmc]: sdc1 card_power_off start... [ 18.547166] [mmc]: sdc1 power_supply is null [ 18.547173] [mmc]: sdc1 card_power_off ok [ 18.631655] init: command 'insmod' r=-1 [ 18.636066] init: command 'insmod' r=-1 [ 18.658010] fs_mgr: swapon failed for /dev/block/zram0 [ 18.663804] init: command 'swapon_all' r=-1 [ 18.668504] init: processing action 0x58e70 (console_init) [ 18.675396] init: width = 1280 [ 18.678788] init: height = 800 [ 18.682224] init: s.st_size = 3145728 [ 18.686308] init: logo match failed!fbsize = 4096000 [ 18.718811] init: command 'console_init' r=0 [ 18.723628] init: processing action 0x55bf0 (fs) [ 18.730640] init: command 'mkdir' r=-2 [ 18.741901] init: command 'insmod' r=0 [ 18.752227] init: command 'insmod' r=0 [ 18.756491] init: command 'insmod' r=-1 [ 18.771211] init: command 'insmod' r=0 [ 18.779731] init: command 'insmod' r=0 [ 18.791739] init: command 'insmod' r=0 [ 18.803941] init: command 'insmod' r=0 [ 18.816178] init: command 'insmod' r=0 19、查找:(dhdsdio_probe_attach: unsupported chip: 0xa9a6) rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "unsupported chip" . -R ./dhd_sdio.c: DHD_ERROR(("%s: unsupported chip: 0xx\n", ./sbutils.c: SI_ERROR(("sb_chip2numcores: unsupported chip 0x%x\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko 匹配到二进制文件 ./sbutils.o rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值