自己定义一个mInstrumentation,重写 onException 方法,返回true.表示自己处理。
很多问题,只有多看源码,才知道原因,毕竟这是源码的地方报了错误。看源码,让人学到很多,
比如ActivityThread 里面,可以看到activity的生命周期。可以看到Application 的onAttch 方法什么时候被调用。
如果你没看过源码,很多问题你无从下手,可以看了源码之后,你回发现,原来很简单。
加油吧。
报错堆栈:java.lang.RuntimeException: Unable to get provider com.vivo.upgrade.library.provider.FileProvider: java.lang.ClassNotFoundException: com.vivo.upgrade.library.provider.FileProvider in loader com....
Didn‘t find class “com.blankj.utilcode.util.Utils$FileProvider4UtilCode“ on path: DexPathList[[dex f
Overview 1
Lesson 1: Gathering and Evaluating Core Information 3
Lesson 2: Using Performance Monitor 19
Lesson 3: Using SQL Profiler 35
Lesson 4: Using Index Tuning Wizard 57
Lesson 5: Using Other System Tools 67
Module 2: Tools – Exploring the Conditions
At the end of this module, you will be able to:
List the basic set of information to collect to help narrow down and identify the problem.
Explore and confirm conditions or messages presented or already known.
Describe Performance Monitor and how to use it to troubleshoot performance issues.
Analyze a Performance Monitor log to identify potential performance bottlenecks.
List DBCC commands relevant to performance troubleshooting and describe how they are used.
Analyze DBCC command output to identify potential performance bottlenecks.
List Trace Flags relevant to performance troubleshooting and describe how they are used.
Analyze Trace Flags output, if any, to identify potential performance bottlenecks.
List Profiler Events and their respective data columns relevant to performance troubleshooting and describe how they are used.
Choose and log the necessary events to troubleshoot performance issues.
Analyze Profiler Log to identify potential performance bottlenecks.
Describe the Index Tuning Wizard’s architecture.
List the command arguments for the ITWiz executable.
Discuss considerations when using the Index Tuning Wizard.
List other tools and commands relevant to performance troubleshooting
Describe what information can be collected using TList, Pviewer, Pstat, and Vmstat.
Analyze information collected using TList, Pviewer, Pstat, and Vmstat.
Explain why scripts are used to collect information.
Discuss examples of how scripts can be used.
Describe the use of Microsoft® SQL Server™ Profiler to replay trace and simulate stress.
Describe the use of OStress tool to simulate stress.
List external load simulation tools.
Lesson 1: Gathering a
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
正常启动的BT加载:
[ 3.207764] Bluetooth: HCI UART driver ver 2.2
[ 3.212725] Bluetooth: HCI H4 protocol initialized
[ 3.218045] Bluetooth: HCI BCSP protocol initialized
[ 3.223671] usbcore: registered new interface driver btusb
[ 3.229766] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[ 3.236243] Bluetooth: MSM Sleep Mode Driver Ver 1.2
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>
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
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
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
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>
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
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
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
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
# 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_ap6210.txt:system/vendor/modules/nvram_ap6210.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
直接拷贝自nvram_ap6212.txt:
R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6210.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
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
在设置→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$
经过确认:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_sdio.c
static bool
dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
uint16 devid)
bcmsdh_chipinfo(sdh, bus->sih->chip, bus->sih->chiprev);
if (!dhdsdio_chipmatch((uint16)bus->sih->chip)) {
DHD_ERROR(("%s: unsupported chip: 0xx\n",
__FUNCTION__, bus->sih->chip));
goto fail;
继续追踪:
static bool
dhdsdio_chipmatch(uint16 chipid)
if (chipid == BCM4325_CHIP_ID)
return TRUE;
if (chipid == BCM4329_CHIP_ID)
return TRUE;
if (chipid == BCM4315_CHIP_ID)
return TRUE;
if (chipid == BCM4319_CHIP_ID)
return TRUE;
if (chipid == BCM4336_CHIP_ID)
return TRUE;
if (chipid == BCM4330_CHIP_ID)
return TRUE;
if (chipid == BCM43237_CHIP_ID)
return TRUE;
if (chipid == BCM43362_CHIP_ID)
return TRUE;
if (chipid == BCM4314_CHIP_ID)
return TRUE;
if (chipid == BCM43242_CHIP_ID)
return TRUE;
if (chipid == BCM43340_CHIP_ID)
return TRUE;
if (chipid == BCM43341_CHIP_ID)
return TRUE;
if (chipid == BCM43143_CHIP_ID)
return TRUE;
if (chipid == BCM43342_CHIP_ID)
return TRUE;
if (chipid == BCM4334_CHIP_ID)
return TRUE;
if (chipid == BCM43239_CHIP_ID)
return TRUE;
if (chipid == BCM4324_CHIP_ID)
return TRUE;
if (chipid == BCM4335_CHIP_ID)
return TRUE;
if (chipid == BCM4339_CHIP_ID)
return TRUE;
if (chipid == BCM43349_CHIP_ID)
return TRUE;
if (chipid == BCM4345_CHIP_ID)
return TRUE;
if (chipid == BCM4350_CHIP_ID)
return TRUE;
if (chipid == BCM4354_CHIP_ID)
return TRUE;
if (chipid == BCM4356_CHIP_ID)
return TRUE;
if (chipid == BCM4358_CHIP_ID)
return TRUE;
if (chipid == BCM4371_CHIP_ID)
return TRUE;
if (chipid == BCM43430_CHIP_ID)
return TRUE;
if (BCM4349_CHIP(chipid))
return TRUE;
return FALSE;
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ll
总用量 40
drwxr-xr-x 7 rootroot rootroot 4096 6月 26 12:02 ./
drwx------ 6 rootroot rootroot 4096 6月 26 14:16 ../
drwxr-xr-x 10 rootroot rootroot 4096 9月 4 2014 brandy/
-rw-rw-r-- 1 rootroot rootroot 116 6月 26 12:02 .buildconfig
drwxr-xr-x 15 rootroot rootroot 4096 9月 4 2014 buildroot/
-r-xr-xr-x 1 rootroot rootroot 55 9月 4 2014 build.sh*
drwxr-xr-x 28 rootroot rootroot 4096 6月 26 14:30 linux-3.4/
drwxrwxr-x 3 rootroot rootroot 4096 6月 26 12:02 out/
-r--r--r-- 1 rootroot rootroot 232 9月 4 2014 README
drwxr-xr-x 7 rootroot rootroot 4096 6月 7 19:33 tools/
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$ ./build.sh
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun8iw5p1
INFO: platform: android
INFO: kernel: linux-3.4
INFO: board: y3
INFO: output: out/sun8iw5p1/android/y3
INFO: ----------------------------------------
INFO: build buildroot ...
external toolchain has been installed
INFO: build buildroot OK.
INFO: build kernel ...
INFO: prepare toolchain ...
Building kernel
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm/mach-sunxi/pm/standby/common.o
CC arch/arm/mach-sunxi/pm/standby/standby_clock.o
CC arch/arm/mach-sunxi/pm/standby/standby_ir.o
CC arch/arm/mach-sunxi/pm/standby/standby_key.o
CC arch/arm/mach-sunxi/pm/standby/standby_power.o
CC arch/arm/mach-sunxi/pm/standby/standby_twi.o
CC arch/arm/mach-sunxi/pm/standby/standby_usb.o
AS arch/arm/mach-sunxi/pm/standby/standby_delay.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/standby_arisc.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwmsgbox.o
CHK kernel/config_data.h
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_message_manager.o
CC arch/arm/mach-sunxi/pm/standby/./../pm_debug.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_timing.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc.o
AS arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_serial.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_printk.o
AS arch/arm/mach-sunxi/pm/standby/./../mem_divlib.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_divlibc.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_int.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_tmr.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_clk.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/standby.o
rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o
CC arch/arm/mach-sunxi/pm/standby/super/common.o
CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o
CC [M] drivers/net/wireless/bcmdhd/dhd_sdio.o
AS arch/arm/mach-sunxi/pm/standby/super/super_delay.o
CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o
CC arch/arm/mach-sunxi/pm/standby/super/super_power.o
CC arch/arm/mach-sunxi/pm/standby/super/super_cpus.o
AS arch/arm/mach-sunxi/pm/standby/super/resume/resume1.o
CC arch/arm/mach-sunxi/pm/standby/super/resume/resume_head.o
CC arch/arm/mach-sunxi/pm/standby/super/resume/resume1_c_part.o
CC arch/arm/mach-sunxi/pm/standby/../pm_debug.o
CC arch/arm/mach-sunxi/pm/standby/../mem_timing.o
CC arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc.o
AS arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/standby/../mem_cpu.o
CC arch/arm/mach-sunxi/pm/standby/../mem_serial.o
CC arch/arm/mach-sunxi/pm/standby/../mem_printk.o
CC [M] drivers/net/wireless/bcmdhd/dhd_cdc.o
CC [M] drivers/net/wireless/bcmdhd/bcmsdh_linux.o
CC [M] drivers/net/wireless/bcmdhd/dhd_common.o
AS arch/arm/mach-sunxi/pm/standby/../mem_divlib.o
CC arch/arm/mach-sunxi/pm/standby/../mem_divlibc.o
drivers/net/wireless/bcmdhd/dhd_sdio.c: In function ‘dhdsdio_chipmatch’:
drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: error: ‘BCM43430_CHIP_ID’ undeclared (first use in this function)
drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: note: each undeclared identifier is reported only once for each function it appears in
CC arch/arm/mach-sunxi/pm/standby/../mem_int.o
make[4]: *** [drivers/net/wireless/bcmdhd/dhd_sdio.o] 错误 1
make[4]: *** 正在等待未完成的任务....
CC arch/arm/mach-sunxi/pm/standby/../mem_tmr.o
CC arch/arm/mach-sunxi/pm/standby/../mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/standby/../mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/../mem_clk.o
Source file is open
Destination file is created.
Source file is open
Destination file is open.
temp value is 400.
soure_file size is 9496.
destination_file size is 0x2800.
check sum generated is 0x68D92007.
Everything is ok.
rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o
CC arch/arm/mach-sunxi/pm/mem_mapping.o
CC arch/arm/mach-sunxi/pm/mem_divlibc.o
CC arch/arm/mach-sunxi/pm/mem_cpu.o
AS arch/arm/mach-sunxi/pm/mem_cpu_asm.o
AS arch/arm/mach-sunxi/pm/mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/mem_mmu_pc.o
CC arch/arm/mach-sunxi/pm/mem_int.o
CC arch/arm/mach-sunxi/pm/mem_clk.o
CC arch/arm/mach-sunxi/pm/mem_tmr.o
CC arch/arm/mach-sunxi/pm/mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/mem_twi.o
CC arch/arm/mach-sunxi/pm/mem_gpio.o
CC arch/arm/mach-sunxi/pm/mem_sram.o
CC arch/arm/mach-sunxi/pm/mem_ccu.o
CC arch/arm/mach-sunxi/pm/mem_cci400.o
CC arch/arm/mach-sunxi/pm/mem_gtbus.o
CC arch/arm/mach-sunxi/pm/pm_debug.o
CC arch/arm/mach-sunxi/pm/mem_timing.o
CC arch/arm/mach-sunxi/pm/mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/pm.o
CC arch/arm/mach-sunxi/pm/extended_standby.o
CC arch/arm/mach-sunxi/pm/standby/super/super_power.o
CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o
CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o
AS arch/arm/mach-sunxi/pm/standby.o
AS arch/arm/mach-sunxi/pm/mem.o
LD arch/arm/mach-sunxi/pm/pm_tmp.o
LD arch/arm/mach-sunxi/pm/built-in.o
LD arch/arm/mach-sunxi/built-in.o
make[3]: *** [drivers/net/wireless/bcmdhd] 错误 2
make[2]: *** [drivers/net/wireless] 错误 2
make[1]: *** [drivers/net] 错误 2
make: *** [drivers] 错误 2
ERROR: build kernel Failed
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
21、(dhdsdio_probe_attach: unsupported chip: 0xa9a6)
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\include\bcmdevs.h
#define BCM4350_CHIP_ID 0x4350
#define BCM43430_CHIP_ID 43430 /* 43430 chipcommon chipid 0xa9a6 */
#define BCM4342_CHIP_ID 4342
可以编译通过了。
(查看属性:)
shell@astar-y3:/ $
shell@astar-y3:/ $ cd /system/vendor/modules/
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd
-rw-r--r-- root root 748856 2017-06-26 12:46 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $
Microsoft Windows [版本 6.1.7600]
C:\Users\Administrator>cd R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\n
et\wireless\bcmdhd
C:\Users\Administrator>r:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
remount succeeded
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/
1677 KB/s (748864 bytes in 0.436s)
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
继续查看属性:
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd
-rw-rw-rw- root root 748864 2017-06-26 14:34 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $ chmod 644 bcmdhd.ko
Unable to chmod bcmdhd.ko: Operation not permitted
10|shell@astar-y3:/system/vendor/modules $
(必须在su下才能够修改属性:)
shell@astar-y3:/system/vendor/modules $ su
shell@astar-y3:/system/vendor/modules # chmod 644 bcmdhd.ko
shell@astar-y3:/system/vendor/modules #
shell@astar-y3:/system/vendor/modules # sync
shell@astar-y3:/system/vendor/modules # reboot
[ 0.658241] [wifi]: select wifi: ap6210 !!
[ 0.658587] [ap6xxx]: module power name axp22_dldo1
[ 0.658601] [ap6xxx]: module power ext1 name axp22_dldo2
[ 0.658613] [ap6xxx]: module power ext2 name axp22_aldo1
[ 0.658721] [ap6xxx]: get ap6xxx wifi_power_switch failed
[ 0.658731] [ap6xxx]: ap6xxx module power set by axp.
[ 0.658930] [ap6xxx]: first time
[ 0.659285] [ap6xxx]: regulator on.
[ 0.661306] [wifi_pm]: wifi gpio init is OK !!
(重启之后,WIFI模块要想办法配置为ap6212,现阶段借用的是AP6210!)
[ 8.517657] gpio ap6xxx_wl_regon set val 1, act val 1
[ 8.623325] [ap6xxx]: sdio wifi power state: on
[ 8.628389] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.628566] =========== WLAN placed in POWER ON ========
[ 8.645459] [mmc]: sdc1 card_power_on start...
[ 8.650397] [mmc]: sdc1 power_supply is null
[ 8.655129] [mmc]: sdc1 card_power_on ok
[ 8.680031] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.690267] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.772360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.781316] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.799684] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.861971] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.872189] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.933887] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 8.941921] *******************Try sdio*******************
[ 8.948329] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.958545] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 9.027690] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 9.035325] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 9.043192] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 9.052046] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 9.145358] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 9.155486] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 9.215398] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 9.225785] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 9.285721] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 9.296049] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 9.357922] mmc1: new high speed SDIO card at address 0001
[ 9.364523] bcmsdh_register: Linux Kernel SDIO/MMC Driver
[ 9.364563] *******************sdio init ok*******************
[ 9.377203] bcm_wlan_get_oob_irq enter.
[ 9.381534] gpio [359] map to virq [7] ok
[ 9.388816] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4
[ 9.396740] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 9.404660] dhdsdio_probe: Disable prop_txstatus
[ 9.410903] wl_create_event_handler(): thread:wl_event_handler:5d started
[ 9.410914] tsk Enter, tsk = 0xddca13d8
[ 9.423788] p2p0: P2P Interface Registered
[ 9.428464] dhd_attach(): thread:dhd_watchdog_thread:5e started
[ 9.435144] dhd_attach(): thread:dhd_dpc:5f started
[ 9.440653] dhd_attach(): thread:dhd_sysioc:60 started
[ 9.447276] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33
[ 9.456558]
[ 9.456561] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 9.456565] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 9.472427] gpio ap6xxx_wl_regon set val 0, act val 0
[ 9.578054] [ap6xxx]: sdio wifi power state: off
[ 9.583186] =========== WLAN placed in RESET ========
(WIFI启动加载正常)
shell@astar-y3:/ $ lsmod
gt82x 9849 0 - Live 0x00000000
sunxi_schw 12559 0 - Live 0x00000000 (O)
cdc_ether 5099 0 - Live 0x00000000
rtl8150 9023 0 - Live 0x00000000
mcs7830 6292 0 - Live 0x00000000
qf9700 7805 0 - Live 0x00000000
asix 17150 0 - Live 0x00000000
usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000
sunxi_keyboard 3021 0 - Live 0x00000000
sw_device 13604 0 - Live 0x00000000
vfe_v4l2 445364 0 - Live 0x00000000
gc2035 12696 0 - Live 0x00000000
gc0308 10702 0 - Live 0x00000000
vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000
vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000
cci 21594 2 gc2035,gc0308, Live 0x00000000
videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000
videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000
bcmdhd 556965 0 - Live 0x00000000
leds_sunxi 1351 0 - Live 0x00000000
mali 209914 20 - Live 0x00000000 (O)
lcd 38180 0 - Live 0x00000000
disp 993096 8 mali,lcd, Live 0x00000000
nand 280622 0 - Live 0x00000000 (O)
shell@astar-y3:/ $
(bcmdhd.ko这个驱动模块加载正常:)
(BT没有打开,但是不停地打印BT超时出错,不知道是何解?)
shell@astar-y3:/ $ [ 511.880344] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 511.887326] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
由于此时WIFI出于记住上一次的状态的状态(打不开),所以需要重新刷镜像IMG,然后替换:bcmdhd.ko
shell@astar-y3:/ $
shell@astar-y3:/ $ lsmod
gt82x 9849 0 - Live 0x00000000
sunxi_schw 12559 0 - Live 0x00000000 (O)
cdc_ether 5099 0 - Live 0x00000000
rtl8150 9023 0 - Live 0x00000000
mcs7830 6292 0 - Live 0x00000000
qf9700 7805 0 - Live 0x00000000
asix 17150 0 - Live 0x00000000
usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000
sunxi_keyboard 3021 0 - Live 0x00000000
sw_device 13604 0 - Live 0x00000000
vfe_v4l2 445364 0 - Live 0x00000000
gc2035 12696 0 - Live 0x00000000
gc0308 10702 0 - Live 0x00000000
vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000
vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000
cci 21594 2 gc2035,gc0308, Live 0x00000000
videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000
videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000
bcmdhd 556965 0 - Live 0x00000000
leds_sunxi 1351 0 - Live 0x00000000
mali 209914 15 - Live 0x00000000 (O)
lcd 38180 0 - Live 0x00000000
disp 993096 8 mali,lcd, Live 0x00000000
nand 280622 0 - Live 0x00000000 (O)
shell@astar-y3:/ $
shell@astar-y3:/ $
shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant'
[ 110.025400] init: starting 'p2p_supplicant'
[ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 110.140144]
[ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 110.173523] wl_android_wifi_on in 1
[ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0
[ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1
[ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 110.286694] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 110.355684] [ap6xxx]: sdio wifi power state: on
[ 110.360930] =========== WLAN going back to live ========
[ 110.366925] sdio_reset_comm():
[ 110.370346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.380773] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 110.443029] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.454758] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 110.516097] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.530958] [mmc]: mclk 0xf1c2008c 0x80430309
[ 110.592013] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.603518] [mmc]: mclk 0xf1c2008c 0x80030009
[ 110.681418] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 110.690726] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 110.700331] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 110.712218] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 110.894520] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.904933] [mmc]: mclk 0xf1c2008c 0x80030009
[ 110.964907] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.975514] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 111.035618] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 111.046398] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 111.108547]
[ 111.108566]
[ 111.108579] dhd_bus_devreset: == WLAN ON ==
[ 111.116882] dhd_bus_devreset called when dongle is not in reset
[ 111.123683] Will call dhd_bus_start instead
[ 111.128637] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 111.140963] dhd_conf_download_config: Ignore config file /system/vendor/modules/config.txt
[ 111.151802] Final fw_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 111.158689] Final nv_path=/system/vendor/modules/nvram_ap6210.txt
[ 111.165542] Final conf_path=/system/vendor/modules/config.txt
[ 111.257577] dhdsdio_download_nvram: Open nvram file failed /system/vendor/modules/nvram_ap6210.txt
[ 111.268309] _dhdsdio_download_firmware: dongle nvram file download failed
[ 111.276022] dhd_bus_start: dhdsdio_probe_download failed. firmware = /system/vendor/modules/fw_bcm43438a0.bin nvram = /system/vendor/modules/nvram_ap6210.txt config = /system/vendor/modules/config.txt
[ 111.295979] dhd_bus_devreset: dhd_bus_start fail with -1
[ 111.304154] dhd_dev_reset: dhd_bus_devreset: -1
[ 111.309190] dhd_prot_ioctl : bus is down. we have nothing to do
[ 111.330328] dhd_bus_devreset: WLAN OFF DONE
[ 111.335225] gpio ap6xxx_wl_regon set val 0, act val 0
[ 111.472499] [ap6xxx]: sdio wifi power state: off
[ 111.477661] =========== WLAN placed in RESET ========
[ 111.483304] wl_android_wifi_on: Failed
[ 111.487473] wl_android_wifi_off in 1
[ 111.491478] wl_android_wifi_off in 2: g_wifi_on=0
[ 111.496711] wl_android_wifi_off out
[ 111.509335] init: waitpid returned pid 1211, status = 0000ff00
[ 111.516072] init: process 'p2p_supplicant', pid 1211 exited
shell@astar-y3:/ $
shell@astar-y3:/ $
24、定位问题:dhd_bus_devreset: dhd_bus_start fail with -1
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd 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$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
匹配到二进制文件 ./dhd_sdio.o
匹配到二进制文件 ./bcmdhd.o
匹配到二进制文件 ./bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd 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$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
匹配到二进制文件 ./dhd_sdio.o
匹配到二进制文件 ./bcmdhd.o
匹配到二进制文件 ./bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path);
if ((bcmerror = dhd_bus_start(dhdp)) != 0)
DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
__FUNCTION__, bcmerror));
return bcmerror;
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 dhd_bus_start . -R
./dhd_sdio.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio.c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd_sdio - 副本.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio - 副本.c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio - 副本.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd_sdio - 副本 (2).c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio - 副本 (2).c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio - 副本 (2).c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd.h:extern int dhd_bus_start(dhd_pub_t *dhdp);
./wl_android.c:/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first
./dhd_linux.c: if ((ret = dhd_bus_start(&dhd->pub)) != 0) {
./dhd_linux.c: /* dhd_prot_init has been called in dhd_bus_start or wl_android_wifi_on */
./dhd_linux.c:dhd_bus_start(dhd_pub_t *dhdp)
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
定位到这里:
dhd_bus_start(dhd_pub_t *dhdp)
/* try to download image and nvram to the dongle */
if ((dhd->pub.busstate == DHD_BUS_DOWN) &&
(fw_path[0] != '\0') && (nv_path[0] != '\0')) {
#ifdef SHOW_NVRAM_TYPE
{ /* Show nvram type in the kernel log */
int i;
for (i = 0; nv_path[i] != '\0'; ++i) {
if (nv_path[i] == '.') {
break;
DHD_ERROR(("%s: nvram_type = [%s]\n", __FUNCTION__, &nv_path[i]));
#endif /* SHOW_NVRAM_TYPE */
/* wake lock moved to dhdsdio_download_firmware */
if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
fw_path, nv_path, conf_path))) {
DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s config = %s\n",
__FUNCTION__, fw_path, nv_path, conf_path));
#ifdef DHDTHREAD
if (dhd->threads_only)
dhd_os_sdunlock(dhdp);
#endif /* DHDTHREAD */
// 2017/6/23 18:40 wenyuanbo download ap6212 fail not return error!!!!
//return -1;
return 0;
由于ap6212没有config.txt文件,下载肯定会出错,比对全志R16平台去AP6212的处理,关闭这里:
//return -1;
shell@astar-y3:/ $
shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant'
[ 110.025400] init: starting 'p2p_supplicant'
[ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 110.140144]
[ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 110.173523] wl_android_wifi_on in 1
[ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0
[ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1
[ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expire
Didn't find class "androidx.core.content.FileProvider" on path...
Didn't find class "android.support.v4.content.FileProvider" on path...
把这两个库放到 Assets\Plugins\Android\ 目录下即可。
另外,AndroidManifest.xml 文件中,
<provider android:name="android.support.v4.content.FileProvider"
<provider android:name="androidx.core.content.FileProvider"
照着第二版第一行代码敲的调用摄像头部分,因为编译器提示没有android.support.v4.content.fileprovider。就自己导了一个名字带provider的
android.provider.DocumentsProvider
报错信息如下:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.cameraalbumtest, PID: 13140
java.lang.RuntimeExcep
EurekaLog 7.5 (18-August-2016)
1)..Important: Installation layout was changed. All packages now have version suffix (e.g. EurekaLogCore240.bpl). No files are copied to \bin folder of IDE. Run-time package (EurekaLogCore) is copied to Windows\System32 folder. Refer to help for more info.
2)....Added: RAD Studio 10.1 Berlin support
3)....Added: IDE F1 help integration (on CHM-based IDEs only, i.e. XE8+)
4)....Added "--el_injectjcl", "--el_createjcl", and "--el_createdbg" command-line options for ecc32/emake to inject JEDI/JCL debug info, create .jdbg file, and create .dbg file (Microsoft debug format). Later is supported when map2dbg.exe tool is placed in \Bin folder of EurekaLog installation (separate download is required)
5)....Added: Exception2HRESULT in EAppDLL to simplify developing DLLs with "DLL" profile
6)....Added: Use ShellExecute option for mailto send method
7)....Added: "Mandatory e-mail only when sending" option
8)....Added: Exception line highlighting in disassember view in EurekaLog exception dialog and Viewer
9)....Added: Detection/logging Delphi objects in disassembly view
10)..Added: Support for multi-monitor info
11)..Added: Support for detection of Windows 10 updates
12)..Added: OS edition detection
13)..Added: "User" and "Session" columns to processes list, processes list is also sorted by session first
14)..Added: Support for showing current user processes only
15)..Added: Expanding environment variables for "Support URL"
16)..Fixed: Range-check error on systems with MBCS ACP
17)..Fixed: 64-bit shared memory manager may not work
18)..Fixed: Possible "Unit XYZ was compiled with a different version of ABC" when using packages
19)..Fixed: FastMM shared MM compatibility
20)..Fixed: Minor bugs in stack tracing (which usually affected stacks for leaks)
21)..Fixed: Rare deadlocks in multi-threaded applications
22)..Fixed: Taking screenshot of minimized window
23)..Fixed: NT service may not log all exceptions
24)..Fixed: SSL port number for Bugzilla
25)..Fixed: Disabling "Activate Exception Filters" option was ignored
26)..Fixed: Missing FTP proxy settings
27)..Fixed: IntraWeb support is updated up to 14.0.64
28)..Fixed: Retrieving some process paths in processes list
29)..Fixed: CPU view rendering in EurekaLog exception dialog and Viewer
30)..Fixed: Some issues in naming threads
31)..Fixed: Removed exported helper _462EE689226340EAA982C5E8307B3F9E function (replaced with mapped file)
32)..Changed: Descriptions of EurekaLog project options now list corresponding property names of TEurekaModuleOptions class.
33)..Changed: Default template of HTML/web dialog now includes call stack by default
34)..Changed: EurekaLog 7 now can be installed over EurekaLog 6 automatically, with no additional actions/tools
EurekaLog 7.4 (7.4.0.0), 26-January-2016
1)....Fixed: Performance issue in DLL exports debug information provider
2)....Fixed: Range-check error in Send dialog
3)....Fixed: Possible FPU control word unexpected change
4)....Fixed: JIRA sending to project with no version info
5)....Fixed: Viewer sorting affected by local region settings
6)....Fixed: Exception filters ignore settings for restart/terminate
EurekaLog 7.3 Hotfix 2 (7.3.2.0), 20-October-2015
1)....Fixed: Added workaround for codegen bug in Delphi 7 (possibly - other), bug manifests itself as wrong date-time in reports or integer overflows
2)....Fixed: Some MAPI DLLs may not be loaded correctly
3)....Fixed: Handling SEC_I_INCOMPLETE_CREDENTIALS in SSPI code (added searching client certificate)
4)....Fixed: Range-check error when closing WinAPI dialog
EurekaLog 7.3 Hotfix 1 (7.3.1.0), 2-October-2015
1)....Fixed: Long startup time on terminal services servers
EurekaLog 7.3 (7.3.0.0), 24-September-2015
1)....Added: RAD Studio 10 Seattle support
2)....Added: Performance counters for run-time (internal logging with --el_debug)
3)....Fixed: spawned by ecc32/emake processes now start with the same priority
4)....Fixed: ThreadID = 0 in StandardEurekaNotify
5)....Fixed: Dialog auto-close timer may reset without user input
6)....Fixed: Possible hang when quickly loading/unloading EurekaLog-enabled DLL
7)....Fixed: Possible hang in COM DLLs
8)....Fixed: Removed some unnecessary file system access on startup
9)....Fixed: Possible wrong font size in EurekaLog tools
10)..Fixed: Ignore timeouts from Shell_NotifyIcon
11)..Fixed: Possible failure to handle/process stack overflow exceptions
12)..Changed: VCL/CLX/FMX now will assign Application.OnException handler when low-level hooks are disabled
EurekaLog 7.2 Hotfix 6 (7.2.6.0), 14-July-2015
1)....Added: csoCaptureDelphiExceptions option
2)....Fixed: Handling of SECBUFFER_EXTRA in SSPI code
3)....Fixed: Several crashes in sending code for very old Delphi versions
4)....Fixed: Regression (from hotfix 5) crash in some IDEs
EurekaLog 7.2 Hotfix 5 (7.2.5.0), 1-July-2015
1)....Added: HKCU\Software\EurekaLab\Viewer\4.0\UI\Statuses registry key to allow status customizations in Viewer
2)....Added: "Disable hang detection under debugger" option
3)....Fixed: Wrong button caption in standalone "Steps to reproduce" dialog
4)....Fixed: Wrong passing of Boolean parameters in JSON (affects JIRA)
5)....Fixed: Wrong sorting of BugID, Count and DateTime columns in Viewer
6)....Fixed: Empty "Count" field/column is now displayed as "1" in Viewer
7)....Fixed: Generic names with "," could not be decoded in Viewer
8)....Fixed: Updated Windows 10 detection for latest builds of Windows 10
9)....Fixed: Sleep and hybernation no longer trigger false-positive "application freeze"
10)..Fixed: Wrong function codes for hooking (affects ISAPI application type)
11)..Fixed: Wrong button caption in "Steps to Reproduce" dialog
12)..Fixed: Crash when taking snapshot of some proccesses by Threads Snapshot tool
13)..Fixed: Minor improvements in leak detection
EurekaLog 7.2 Hotfix 4 (7.2.4.0), 10-June-2015
1)....Added "ECC32TradeSpeedForMemory" option - defaults to 0/False, could be changed to 1 via Custom/Manual tab. This option will switch from fast-methods to slower methods, but which take less memory. Use 0 (default) for small projects, use 1 for large projects (if ecc32 runs out of memory).
2)....Added: --el_DisableDebuggerPresent command-line option for compatibility with 3rd party debuggers (AQTime, etc.)
3)....Added: AQTime auto-detect
4)....Fixed: Performance optimizations
5)....Fixed: Windows 8+ App Menu shortcuts
6)....Fixed: Unmangling on x64
EurekaLog 7.2 Hotfix 3 (7.2.3.0), 20-May-2015
1)....Added: Support for token auth in Bugzilla (latest 4.x builds)
2)....Added: Support for API key auth in Bugzilla (5.x)
3)....Added: Support for /EL_DisableMemoryFilter command-line option
4)....Added: Asking e-mail when user switches to "details" from MS Classic without entering e-mail
5)....Fixed: Compatibility issues with older Bugzilla versions (3.x)
6)....Fixed: Passing settings between dialogs
7)....Fixed: "Ask for steps to reproduce" dialog is now DPI-aware
8)....Fixed: Silently ignore and fix invalid values in project options
EurekaLog 7.2 Hotfix 2 (7.2.2.0), 30-April-2015
1)....Fixed: Confusing message in Manage tool when using with Trial/Pro
2)....Fixed: Range check error in processes information for x64 machines (affects startup of any EurekaLog-enabled module)
3)....Fixed: Auto-detect personality by project extension if --el_mode switch is missing
4)....Fixed: More details for diagnostic sending
5)....Fixed: Wrong settings for MAP files in C++ Builder
6)....Fixed: Wrong code page was used to decode ANSI bug reports
7)....Fixed: Attaching .PAS files instead of .OBJ in C++ Builder 2006+ Pro/Trial
EurekaLog 7.2 Hotfix 1 (7.2.1.0), 3-April-2015
1)....Fixed: Wrong float-str convertion when ThousandSeparator is '.'
EurekaLog 7.2 (7.2.0.0), 1-April-2015
1)....Important: TEurekaLogV7 component was renamed to TEurekaLogEvents. Please, update your projects by renaming or recreating the component
2)....Important: File layout was changed for BDS 2006+. Delphi and C++ Builder files are now located in StudioNum folders instead of old DelphiNum and CBuilderNum folders. Update your search paths if needed
3)....Added: Major improvements in DumpAllocationsToFile function (EMemLeaks unit)
4)....Added: MemLeaksSetParentBlock, MemLeaksOwn, EurekaTryGetMem functions (EMemLeaks unit)
5)....Added: Improvements for call stack of dynarrays/strings allocations (leaks)
6)....Added: "Elem size" when reporting leaks in dynarrays
7)....Added: Streaming unpacked debug info into temporal files instead of memory - this greatly reduces run-time application memory usage at cost of slightly slower exception processing. This also reduces memory footprint for ecc32/emake
8)....Added: Showing call stacks for 2 new types of fatal memory errors
9)....Added: EMemLeaks._ReserveOutOfMemory to control reserve size of out of memory errors (default is 50 Mb)
10)..Added: "MinLeaksLimitObjs" option (EMemLeaks unit)
11)..Added: Fatal memory problem now pauses all threads in application
12)..Added: Fatal memory problem now change thread name (to simplify debugging)
13)..Added: boPauseELThreads and boDoNotPauseELServiceThread options (currently not visible in UI)
14)..Added: Support for texts collections out of default path
15)..Added: Support for relative file paths to text collections and external settings
16)..Added: Support for environment variables in project option's paths
17)..Added: Support for relative file paths and environment variables for events and various module paths
18)..Added: Logging in Manage tool
19)..Added: Windows 10 version detection
20)..Added: Stack overflow tracing
21)..Added: Major improvements in removal of recursive areas from call stack
22)..Added: Statistics collection
23)..Added: Support for uploading multiple files in JIRA
24)..Added: EResLeaks improvements (new funcs: ResourceAdd, ResourceDelete, ResourceName; support for realloc-like functions)
25)..Fixed: Added workaround for bug in JIRA 5.x
26)..Fixed: Rare EurekaLog internal error
27)..Fixed: Ignored unhandled thread exceptions (when EurekaLog is disabled) now triggers default OS processing (WER)
28)..Fixed: Irnored exceptions (via per-exception/events) now bring up default RTL handler
29)..Fixed: Format error in Viewer
30)..Fixed: Leak of EurekaLog exception information object
31)..Fixed: Wrong chaining exceptions inside GetMem/FreeMem
32)..Fixed: Memory leak after low-level unhook of function
33)..Fixed: Re-parenting after ReallocMem
34)..Fixed: Editing SMTP server options
35)..Fixed: SMTP server not using real user e-mail in FROM field
36)..Fixed: Some multi-threading crashes
37)..Fixed: Fixed crashes in Manage tool
38)..Fixed: Range-check error in Viewer
39)..Fixed: EurekaLog error dialog appearing under other windows
40)..Fixed: AV when parsing TDS (emake/C++ Builder specific)
41)..Fixed: Unable to build call stacks for other threads due to insufficient rights
42)..Fixed: Version checks for BugZilla and JIRA
43)..Fixed: Not catching out-of-module AVs when "Capture exceptions only from current module" option is checked
44)..Fixed: Checking for remaining exceptions at shutdown (C++ Builder specific, AcquireExceptionObject returns wrong info)
45)..Fixed: "get call stack of ... threads" / "suspend ... threads" options (avoid rare multithreading race conditions)
46)..Fixed: Crash when naming thread without EurekaLog thread info
47)..Fixed: Detection of immediate caller for memory funcs
48)..Fixed: Non-working Assign for options
49)..Fixed: Handling of explicitly chained exceptions
50)..Fixed: Various exception/threading fixes for MS debug provider
51)..Fixed: Processing hardware unhandled exceptions (QC #55007)
52)..Fixed: Unchecking dialog options when export/import
53)..Fixed: BSTR leak
54)..Fixed: JIRA decimal separator bug
55)..Changed: Now unhandled exceptions will be handled by EurekaLog even if EurekaLog is disabled in the thread - only global EurekaLog-enabled status is respected
56)..Changed: Viewer version now matches version of EurekaLog
57)..Changed: DeleteServiceFilesOption now always False by default
58)..Changed: Speed improvements for known memory leaks (reserved leaks)
59)..Changed: Improved logging for sending
60)..Changed: Switching to detailed mode without entering (mandatory) e-mail: now EL will not block this
61)..Changed: .ToString for exception info now uses compact stack formatter
62)..Removed: Custom field editor (replaced it with link to "Custom" page)
63)..Removed: EurekaLog 7 no longer could be installed over EurekaLog 6. Manage tool from EurekaLog 7 will no longer work with EurekaLog 6.
EurekaLog 7.1 update 1 (7.1.1.0), 19-October-2014
1)....Added: "Send in separated thread" option
2)....Added: Hang detection will now use Wait Chain Traversal (WCT) on Vista+ systems to detect deadlocks in any EurekaLog-enabled threads
3)....Added: OS install language and UI language fields in bug report
4)....Fixed: Viewer is not able to decrypt reports with generics
5)....Fixed: EVariantTypeCastError in Viewer when changing status of some bug reports
6)....Fixed: EcxInvalidDataControllerOperation in Viewer
7)....Fixed: Stack overflow at run-time for certain combination of project options
8)....Fixed: BMP re-draw bug in UI dialogs
9)....Fixed: Rogue "corrupted" error message for valid ZIPs of certain structure
10)..Fixed: Various range check errors in Viewer
11)..Fixed: Possible encoding errors for non-ASCII reports in Viewer on certain environments
12)..Fixed: Wrong count in Viewer when importing reports without proper "count" field
13)..Fixed: Duplicate reports may appear in bug report file when "Do not save duplicate errors" option is checked
14)..Fixed: False-positive detection of some virtual machines
15)..Fixed: Processing of exceptions from message handlers during message pumping cycle inside exception dialogs
16)..Fixed: Access Violation if exception dialog was terminated by exception
17)..Fixed: Hardware exceptions from unit's initialization/finalization may be unprocessed
18)..Changed: "VIEW" action for Viewer now will open ALL bug reports inside bug report file; reports will not be merged by BugID. "IMPORT" action remains the same: duplicate reports are merged, "count" is increased
19)..Changed: Charset field in bug report now shows both charset and code page
EurekaLog 7.1 (7.1.0.00), 23-September-2014
1)....Added: XE7 support
2)....Added: XE6 support
3)....Added: New DLL demo
4)....Added: Custom profiles are now shown in "Application type" combo-box
5)....Added: Non-empty "steps to reproduce" will be added to existing bug tracker issues with empty "steps to reproduce"
6)....Added: Support for custom fields in FogBugz (API version 8 and above)
7)....Added: Support for unsequenced line numbers in PDB/DBG files (--el_source switch)
8)....Fixed: XML bug report were generated wrong
9)....Fixed: Strip relocations code for Win64
10)..Fixed: EurekaLog conditional symbols removed improperly when deactivating EurekaLog
11)..Fixed: Sending reports to non-default port numbers (affects web-based methods)
12)..Fixed: SSL validation check may reject valid SSL certificate (SMTP Client/Server)
13)..Fixed: SSL errors may be not reported
14)..Fixed: Viewer did not consider empty bug reports as corrupted
15)..Fixed: "DLL" profile now can be used with packages properly
16)..Fixed: Few rare memory leaks
17)..Fixed: Possible deadlock when using MS debug info provider
18)..Fixed: C++ Builder project files was saved incorrectly (RAD Studio 2007+)
19)..Fixed: "Show restart checkbox after N errors" counts handled exceptions
20)..Fixed: IDE expert's DPR parser (added support for multi-part idents)
21)..Fixed: Rare access violation in hook code
22)..Fixed: Thread handle leaks (added _NotifyThreadGone/_CleanupFinishedThreads functions to be called manually - only when low-level hooks are not installed)
23)..Fixed: EurekaLog's installer hang
24)..Fixed: Bug in object/class validation
25)..Fixed: Bug when using TThreadEx without EurekaLog
26)..Fixed: Leaks detection may not work with certain combination of options
27)..Fixed: Deadlock in some cases when using EurekaLog threading option set to "enabled in RTL threads, disabled in Windows threads".
28)..Changed: TEurekaExceptionInfo.CallStack will be nil until exception is actually raised
29)..Changed: FogBugz and BugZilla: changed bugs identification within project (to allow two bugs exists with same BugID in different projects)
30)..Changed: Blocked manual creation/destruction of ExceptionManager class and EurekaExceptionInfo
31)..Changed: ECC32/EMAKE runs from IDE without changing priority, added ECC32PriorityClass option
32)..Improved: Minor help and text improvements
EurekaLog 7.0.07 Hotfix 2 (7.0.7.2), 11-December-2013
1)....Fixed: Delphi compiler code generation bug (Delphi 2007 and below)
2)....Fixed: Code hooks may rarely be set incorrectly (code stub relocation fails)
3)....Fixed: Win64 call stacks functions now work more similar to 32 bit call stacks
EurekaLog 7.0.07 Hotfix 1 (7.0.7.1), 2-December-2013
1)....Added: Alternative caption for e-mail input control when e-mail is mandatory
2)....Fixed: Rare range check error in WinAPI visual dialogs
3)....Fixed: Wrong error detection for OnExceptionError event
4)....Fixed: Wrong TResponce processing
5)....Fixed: Problems with encrypted call stack decoding
6)....Fixed: OnPasswordRequest event may have no effect
EurekaLog 7.0.07 (7.0.7.0), 25-November-2013
1)....Added: Ability to use Assign between call stack and TStrings
2)....Added: 64-bit disassembler
3)....Added: Support for variables and relative file paths in "Additional Files" send option
4)....Added: --el_source switch for ecc32/emake compilers
5)....Added: support for post-processing non-Embarcadero executables
6)....Added: EOTL.pas unit for better OmniThreadLibrary integration
7)....Added: RAD Studio XE5 support
8)....Added: New "Capture call stacks of EurekaLog-enabled threads" option
9)....Added: "Deferred call stacks" option for 64-bit
10)..Added: Copy report to clipboard now copies both report text and report file
11)..Added: "AttachBothXMLAndELReports" option to include both .elx and .el files into bug report
12)..Added: EMemLeaks.MemLeaksErrorsToIgnore option to exclude certain memory errors from being considered as fatal
13)..Added: Call stack with any encrypted entry will be fully encrypted now
14)..Added: Option to exclude certain memory errors from being considered as fatal (EMemLeaks.MemLeaksErrorsToIgnore)
15)..Added: New "HTTP Error Code" option for all web-based dialogs (CGI, ISAPI, etc.)
16)..Added: Support for Unicode in Simple MAPI send method (requires Windows 8 or latest Microsoft Office)
17)..Added: New value for call stack detalization option (show any addresses, including those not belonging to any executable module)
18)..Fixed: Wrong JSON escaping for strings (affects JIRA send method)
19)..Fixed: Range-check error in Viewer when viewing bug reports with high addresses
20)..Fixed: Selecting Win32 service application type is no longer resets to custom/unsupported
21)..Fixed: Possible hang when testing dialogs from EurekaLog project options dialog
22)..Fixed: Rare resetting of some options when saving .eof file
23)..Fixed: Exception pointer could be removed from call stack due to debug details filtering
24)..Fixed: Rare case when LastThreadException returned nil while there was active thread exception
25)..Fixed: Rare case when ShowLastThreadException do nothing
26)..Fixed: Improved compatibility for OmniThreadLibrary and AsyncCalls
27)..Fixed: Included fix for QC #72147
28)..Fixed: 64-bit MS Debug Info Provider (please, re-setup cache options using configuration dialog)
29)..Fixed: "Deferred call stacks" option failed to capture call stack when exception is re-raised between threads
30)..Fixed: "Deferred call stacks" option may produce cutted call stack in rare cases
31)..Fixed: Several minor call stacks improvements and optimizations
32)..Fixed: Several 64-bit Pointer Integer convertion issues
33)..Fixed: Multi-threading deadlock issue
34)..Fixed: Black screenshots in 64 bit applications
35)..Fixed: Copying to clipboard hot-key was registered globally
36)..Fixed: Shell (mailto) send method may fail (64 bit)
37)..Fixed: Possible wrong file paths for attaches in (S)MAPI send methods
38)..Fixed: Environment variables were not expanded in MAPI send method
39)..Fixed: (non-Unicode IDE) EurekaLog is not activated when application started from folder with Unicode characters
40)..Fixed: Encrypted call stacks may be encrypted partially by EurekaLog Viewer in rare cases
41)..Fixed: Crash when sending leak report with visual progress dialog (only some IDEs are affected)
42)..Fixed: ecc32/emake could not see external configuration file with the same name as project (e.g. Project1.eof for Project1.dpr)
43)..Fixed: Added missed RTL implementation for ExternalProps in Delphi 6 (affects Mantis sending)
44)..Fixed: IDE crash when switching to threads window
45)..Changed: Removed temporal solution which was used before option to defer call stack creation was introduced
46)..Changed: "Default EurekaLog state in new threads" option is changed from Boolean flag into enum. You need to re-setup this option
47)..Changed: Disable EurekaLog for thread when creating call stack or handle exception - this increases stability and performance
48)..Changed: LastException property is remove from exception manager as not thread safe. Use LastThreadException property instead
49)..Changed: Lock/Unlock from thread manager and exception manager are removed to avoid deadlocks
50)..Changed: ThreadsSnapshot tool now tries to capture call stack without injecting DLL
51)..Changed: Build events now runs with CREATE_NO_WINDOW flag (console window is hidden)
52)..Improved: More articles in help
EurekaLog 7.0.06 (7.0.6.0), 1-June-2013
1)....Added: Experimental 64 bit C++ Builder support
2)....Added: New tab in EurekaLog project options: "External tools"
3)....Added: Option to catch all IDE errors (to debug your own IDE packages)
4)....Added: Option to catch only exceptions from current module
5)....Added: Option to defer building call stack
6)....Added: RAD Studio XE4 support
7)....Added: Support for AppWave
8)....Fixed: Fixed event handlers declarations for the EurekaLog component
9)....Fixed: Infinite recursive calls when using ToString from EndReport event handler
10)..Fixed: UPX compatibility issue
11)..Fixed: Range check errors for system error codes
12)..Fixed: Rare IDE stack overflow
13)..Fixed: JIRA unit was not added automatically
14)..Fixed: EurekaLog no longer tries to check for leaks when memory manager filter is disabled
15)..Fixed: Possible deadlock on shutdown with freeze checks active
16)..Fixed: Issues with settings dialog and Win32 Service application type
17)..Fixed: ThreadSnapshot tool was not able to take snapshots of Win64 processes
18)..Fixed: WCT is disabled for leaks
19)..Fixed: TContext declarations for Win64
20)..Fixed: Check for updates now correctly sets time of last check
21)..Fixed: (Win64) Several Pointer Integer convertion errors
22)..Fixed: Internal error when exception info object was deleted while it was still used by SysUtils exception object
23)..Fixed: Semeral problems with "EurekaLog look & feel" style for EurekaLog error dialog
24)..Fixed: Using text collection resets exception filters
25)..Fixed: Rare access violation if registering event handlers is placed too early
26)..Fixed: SMTP RFC date formatting
27)..Fixed: Rare empty call stack bug
28)..Fixed: Hang detection was not working if EurekaLog was disabled in threads
29)..Fixed: AV for double-free TEncoding
30)..Changed: ecc32/emake no longer alters arguments for dcc32/make unless new options --el_add_default_options is specified
31)..Changed: Save/load options methods was moved to TEurekaModuleOptions class
32)..Changed: Saving options to EOF file now adds hidden options and removes obsolete options (only when compatibility mode is off)
33)..Changed: Compiling installed packages now silently ignores EurekaLog instead of showing "File is in use" error message
34)..Improved: More readable disk/memory sizes in bug reports
35)..Improved: More descriptive settings dialog when using external configuration
36)..Improved: ThreadSnapshot tool now aquired DEBUG priviledge for taking snapshot. This allows it to bypass security access checks when opening target process.
37)..Improved: Changed BugID default generation to include error code for OS errors and error message for DB errors
38)..Improved: Mantis API (WSDL) was updated to the latest version (1.2.14)
39)..Improved: IntraWeb compatibility (old and new versions)
40)..Improved: COM applications compatibility
41)..Improved: Build events now accept shell commands
42)..Improved: More articles in help
EurekaLog 7.0.05 (7.0.5.0), 7-February-2013
1)....Added: JIRA support
2)....Added: Virtual machine detection (new field in bug reports)
3)....Fixed: "Use Main Module options" option was loading empty options for some cases
4)....Fixed: Wrong record declarations for Simple MAPI on Win64
5)....Fixed: Performance issues with batch module options updating
6)....Fixed: Wrong leaks report with both MemLeaks/ResLeaks options active
7)....Fixed: Wrong info for nested exceptions in some cases
8)....Fixed: AV under debugger for Win64 (added support for _TExitDllException)
9)....Fixed: Wrong record declarations for process/thread info on Win64
10)..Fixed: Support for FinalBuilder on XE2/XE3 with spaces in file paths
11)..Fixed: Rare double-free of module information (ModuleInfoList)
12)..Fixed: Rare External Exception C000071C on shutdown (only under debuggger)
13)..Fixed: Added large addresses support in Viewer
14)..Fixed: Counter options in memory leaks category is now working properly
15)..Fixed: Rare range-check error in TEurekaModulesList.AddModuleFromFileName
16)..Fixed: FTP force directories dead lock
17)..Fixed: Fixed wrong index being used when clearing compatibility mode (EurekaLog project options dialog)
18)..Fixed: Default thread state do not affect main thread now
19)..Fixed: Sometimes wrong thread may be used when altering EurekaLog active state for external thread
20)..Fixed: Wrong DNS lookup on ANSI
21)..Fixed: Problems with IDE expert and projects on network paths
22)..Fixed: Added support for arguments in URLs (HTTP sending)
23)..Fixed: Possible deadlock in multithreaded applications
24)..Fixed: Problems with unicode characters in project files on non-Unicode IDEs
25)..Fixed: Infinite recursive calls when using ToString from EndReport event handler
26)..Fixed: Win64 GetCaller now returns pointer to call instruction, not return address
27)..Improved: Standalone Editor do not force save/load folder by default
28)..Improved: DLL profile now can use additional application type hooks automatically
29)..Improved: EurekaLog now able to work with read-only projects (see help for more info)
EurekaLog 7.0.04 (7.0.4.0), 2-December-2012
1)....Added: Support for nested exceptions in DLLs
2)....Fixed: Options bug in EurekaLogSendEmail function
3)....Fixed: Weird behaviour for steps to reproduce and custom fields
4)....Fixed: Installation for single personality (BDS)
5)....Fixed: Range check error in EModules
6)....Fixed: Bug in exception destroy hook
7)....Fixed: OnExceptionNotify event is no longer called for handled exceptions without option checked
8)....Fixed: DEP checks on startup no longer cause exception
9)....Fixed: Invalid declaration for MS Debug API
10)..Fixed: OLE mode change error for "Test" send button
11)..Fixed: Fixes for multiply loading of the same DLL
12)..Fixed: Removed PNG compression from icons (tools)
13)..Fixed: Range-check error in dialogs with EurekaLog style enabled
14)..Fixed: Send progress dialog may keep busy forever processing window messages (message flood from rapid application GUI updates)
15)..Fixed: Thread pausing options now work correctly
16)..Improved: New features in exception filters - marking exceptions as "expected", filtering by properties (RTTI)
17)..Improved: Recovery from memory errors without debugging memory manager
18)..Improved: Viewer's password edit now hides password with asterisks
19)..Updated: Changed names of .inc files to avoid name conflicts with other libraries
20)..Updated: Help
EurekaLog 7.0.03 (7.0.3.0), 6-October-2012
1)....Fixed: Removed some consts keywords for event handlers, so now C++ Builder can alter arguments (this change may require you to adjust your custom code)
2)....Fixed: Fallback code for false-positive results on memory probing
3)....Fixed: Range check errors in SSL/TLS implementation
4)....Fixed: "EurekaLog is not active" error message during send testing
5)....Fixed: Incorrect memory probing when DEP is off (old systems)
6)....Fixed: Installation of 64-bit BPLs
7)....Fixed: Dialog preview
8)....Fixed: Win64 fixes for XE3
9)....Fixed: Support for project groups (mixed project types)
10)..Fixed: Windows 2000 hooks compatibility
11)..Fixed: mailto double quotes escaping
12)..Fixed: Simple MAPI WOW compatibility
13)..Fixed: Simple MAPI modal issues
14)..Fixed: Various range check errors
15)..Changed: Removed minor version number from program group name
16)..Updated: Help
EurekaLog 7.0.02 hot-fix 1 (7.0.2.1), 12-September-2012
1)....Fixed: Range check error in Viewer
2)....Fixed: Bug in hooking code
EurekaLog 7.0.02 (7.0.2.0), 11-September-2012
1)....Added: Improved memory problems detection
2)....Added: Minor IDE Expert usability improvements
3)....Added: Auto-size feature for detailed error dialog
4)....Added: Workaround for QC #106935
5)....Added: Workaround for bug in InvokeRegistry (SOAP/Mantis)
6)....Fixed: Nested OS exceptions
7)....Fixed: Multiply Win64 fixes
8)....Fixed: Compatibility mode fixes
9)....Fixed: Altered behaviour of "Add BugID/Date/ComputerName" options
10)..Fixed: Blank screenshots
11)..Fixed: Check file for corruptions
12)..Fixed: Viewer is unable to decrypt certain bug reports
13)..Fixed: Internal DoNoTouch option now works for post-processing and condtionals
14)..Fixed: Possible out of memory error for "Do not store class/procedure names" option
15)..Fixed: EurekaLog did not properly install itself when there is only Delphi installed, but no C++ Builder of the same version (or visa versa)
16)..Fixed: Wrong argument for OnRaise event
17)..Fixed: Handling memory errors in initialization/finalization sections
18)..Fixed: Updating steps to reproduce and user e-mail in bug report
19)..Fixed: Proper Success/Failure for some errors during SMTP send
20)..Added: Workaround for wrong GUI fonts
21)..Added: Delphi XE3 support
22)..Added: Individual options for each exception
EurekaLog 7.0.01 (7.0.1.0), 28-June-2012
1)....Added: New "Modal window" option (MS Classic and EurekaLog dialogs)
2)....Added: New "Owned window" option (MS Classic and EurekaLog dialogs)
3)....Added: New "Catch EurekaLog IDE Expert errors" option
4)....Added: Backup memory manager to recover from critical errors
5)....Added: Alternative methods to provide additional features when memory filter is not set
6)....Fixed: Contains fixes from hotfixes 1-3
7)....Fixed: Performance improvements
8)....Fixed: Improved IDE Expert's speed, stability and compatibility with other 3rd party extensions
9)....Fixed: MS Classic dialog size adjustments for large "click here" translations
10)..Fixed: Fixed resetting few EurekaLog project options to defaults
11)..Fixed: Multiplying exception filters when options are assigned (for example: when switching to/from "Custom" page in project options)
12)..Fixed: (Compatibility mode) Fixed send options merging
13)..Fixed: Updated help
EurekaLog 7.0 hot-fix 3 (7.0.0.273), 20-June-2012
---------------------------
1)....Fixed: ERangeError in EResLeaks (THandle Integer)
2)....Fixed: C++ Builder breakpoints for large projects
3)....Fixed: Help (updates policy changed)
4)....Fixed: Text collections applying
5)....Fixed: Build events are now called for unlocked file
6)....Fixed: Proper handling of C++ Builder project options files from Delphi code (settings editor and IDE expert)
7)....Fixed: Terminate/Checked sub-option for MS Classic dialog
8)....Fixed: Confusing message for already post-processed executables
9)....Fixed: Access violation for some EurekaLog IDE menu items when no project was loaded
10)..Fixed: Invoking help for "Variables" window
11)..Fixed: EurekaLog Viewer version info
12)..Fixed: Events in components
13)..Added: Retry option for "Sorry, you must close all running IDE instances before installation"
14)..Added: Italian translation
15)..Added: Actual change log is now included into installer
16)..Added: Even more setup logging
17)..Added: New help articles (recompilation and manual installation)
EurekaLog 7.0 hot-fix 2 (7.0.0.261), 10-June-2012
---------------------------
1)....Fixed: Wrong version info reporting to IDE
2)....Added: Workaround for Delphi 2005 TListView bug
3)....Added: Workaround for possible invalid FPU state in exception handlers
4)....Added: Missed declarations for ExceptionLog (compatibility mode)
5)....Fixed: Work for unsaved projects
6)....Added: Escaping for '--' in options (confuses IDE's XML parsing)
7)....Added: Storing thread's class/name in call stack for terminated threads
8)....Added: More setup logging
9)....Fixed: Help (broken links)
10)..Added: "Upgrade to EurekaLog 7" help topic
11)..Fixed: Clean up installed files
EurekaLog 7.0 hot-fix 1 (7.0.0.256), 6-June-2012
---------------------------
1)....Fixed: Invalid Format() arguments in ELogBuilder.
EurekaLog 7.0, 1-June-2012
---------------------------
1)....Improved: Main change - EurekaLog's core was rewritten (refactored) to allow more easy modification and remove hacks.
2)....Improved: New plugin-like architecture now allows you to exclude unused code.
3)....Improved: New plugin-like architecture now allows you to easily extends EurekaLog.
4)....Improved: Greatly extended documentation.
5)....Improved: Installer is now localized.
6)....Improved: Greatly speed ups creation of minimal bug report (with most information disabled).
7)....Changed: EurekaLog's root IDE menu was relocated to under Tools and extended with new items.
8)....Added: New examples.
9)....Added: New tools (address lookup, error lookup, threads snapshot, standalone settings editor).
10)..Added: Support for DBG/PDB formats of debug information (including symbol server support and auto-downloading).
11)..Added: Support for madExcept debug information (experimental).
12)..Added: WER (Windows Error Reporting) support.
13)..Added: Full unicode support.
14)..Added: Professional and Trial editions: added source code (interface sections only)
15)..Improved: Dialogs - new options and new customization possibilities:
16)..Added: All GUI dialogs: ability to test dialog directly from configuration dialog by displaying a sample window with currently specified settings.
17)..Improved: All GUI dialogs: dialogs are DPI-awared now (auto-scale for different DPI).
18)..Added: MessageBox dialog: added detailed mode (shows a compact call stack).
19)..Added: MessageBox dialog: added ability for asking a send consent.
20)..Added: MessageBox dialog: added support to switch to "native" message box for application.
21)..Added: MS Classic dialog: added control over "user e-mail" edit's visibility.
22)..Added: MS Classic dialog: added ability to personalize dialog view with application's name and icon.
23)..Added: MS Classic dialog: added ability to show terminate/restart checkbox initially checked.
24)..Added: EurekaLog dialog: added ability to personalize dialog view with application's name and icon.
25)..Added: EurekaLog dialog: added ability to show terminate/restart checkbox initially checked.
26)..Added: EurekaLog dialog: added ability to switch back to non-detailed view.
27)..Added: WEB dialog: added new tags to customize bug report page.
28)..Improved: WEB dialog: improved support for unicode and charset.
29)..Added: New dialog type: RTL dialog.
30)..Added: New dialog type: console output.
31)..Added: New dialog type: system logging.
32)..Added: New dialog type: Windows Error Reporting.
33)..Improved: Sending - new options and new customization possibilities:
34)..Added: All send methods: added ability to setup multiply send methods.
35)..Added: All send methods: added ability to change send method order.
36)..Added: All send methods: added separate settings for each send method.
37)..Added: All send methods: ability to test send method directly from configuration dialog by sending a demo bug report.
38)..Added: SMTP client send method: added SSL support.
39)..Added: SMTP client send method: added TLS support.
40)..Added: SMTP client send method: added option for using real e-mail address.
41)..Added: SMTP server send method: added option for using real e-mail address.
42)..Added: HTTP upload send method: added support for custom backward feedback messages.
43)..Added: FTP upload send method: added creating folders on FTP (like remote ForceDirectories).
44)..Added: Mantis send method: added API support (MantisConnect, out-of-the-box since Mantis 1.1.0, available as add-on for previous versions).
45)..Added: Mantis send method: added support for custom "Count" field.
46)..Added: Mantis send method: added options for controlling duplicates.
47)..Added: Mantis send method: added support for SSL/TLS.
48)..Added: FogBugz send method: added API support (out-of-the-box since ForBugz 7, available as add-on for FogBugz 6).
49)..Added: FogBugz send method: EurekaLog will update "Occurrences" field (count of bugs).
50)..Added: FogBugz send method: EurekaLog will respect "Stop reporting" option (BugzScout's setting).
51)..Added: FogBugz send method: EurekaLog will respect "Scout message" option (BugzScout's setting).
52)..Added: FogBugz send method: EurekaLog will store client's e-mail as issue's correspondent.
53)..Added: FogBugz send method: added options for controlling duplicates.
54)..Added: FogBugz send method: added support for "Area" field.
55)..Added: FogBugz send method: added support for SSL/TLS.
56)..Added: BugZilla send method: added API support.
57)..Added: BugZilla send method: added support for custom "Count" field.
58)..Added: BugZilla send method: added options for controlling duplicates.
59)..Added: BugZilla send method: added support for SSL/TLS.
60)..Added: New send method: Shell (mailto protocol).
61)..Added: New send method: extended MAPI.
62)..Added: Support for separate code and debug info injection.
63)..Added: Ability to use custom units before EurekaLog's units.
64)..Added: Support for external configuration file in IDE expert.
65)..Added: Now EurekaLog stores only those project options which are different from defaults (to save disk space and reduce noise in project file).
66)..Added: Now EurekaLog stores project options sorted (alphabet order).
67)..Added: Separate settings for saving modules and processes lists to bug report.
68)..Added: Support for taking screenshots of multiply monitors.
69)..Added: More screenshot customization options.
70)..Added: More control over bug report's file names.
71)..Added: New environment variables.
72)..Added: Deleting .map file after compilation.
73)..Added: Support for different .dpr and .dproj file names.
74)..Improved: memory leaks detection feature - new options and new customization possibilities:
75)..Added: Ability to track memory problems without activation of leaks checking.
76)..Added: Support for sharing memory manager.
77)..Added: Support for tracking leaks in applications built with run-time packages.
78)..Added: Option to zero-fill freed memory.
79)..Added: Option to enable leaks detection only when running under debugger.
80)..Added: Option for manual activation control for leaks detection (via command-line switches).
81)..Added: Option to select stack tracing method for memory problems.
82)..Added: Option to trigger memory leak reporting only for large leaked memory's size.
83)..Added: Option to control limit of number of reported leak.
84)..Added: CheckHeap function to force check of heap's consistency.
85)..Added: DumpAllocationsToFile function to save information about allocated memory to log file.
86)..Added: Registered leaks feature.
87)..Added: Run-time control over memory leak registering.
88)..Added: New recognized leak type: String (both ANSI and Unicode are supported).
89)..Added: Memory features support for C++ Builder.
90)..Added: Resource leaks detection feature.
91)..Improved: Compilation speed increased.
92)..Added: Support for generics in debug information.
93)..Added: Chained/nested exceptions support.
94)..Added: Wait Chain Traversal support.
95)..Added: Support for named threads.
96)..Added: Additional information for threads in call stack.
97)..Improved: EurekaLog Viewer Tool:
98)..Added: Now Viewer has its own help file
99)..Added: Viewer now supports a FireBird based database on local file or remote server.
100).Added: You can have more that one user account for FireBird based database.
101).Added: Viewer now can be launched in View mode (Viewer can be configured to any DB or View mode).
102).Added: Viewer's database now supports storing files, associated with the report (you can also add and remove files manually).
103).Added: Viewer supports "Import" and "View" commands for report files.
104).Improved: Extended support for more log formats (XML, packed ELF, etc).
105).Added: Columns in report's list now can be configured (you can hide and show them).
106).Added: There are a plenty of new columns added to report's list.
107).Added: Ability of auto-download reports from e-mail account.
108).Improved: printing - now you can print the entire report (including screenshots). Old behaviour of printing just one tab (call stack only, for example) also remains.
109).Added: Viewer can now have more that one run-time instance .
110).Added: File import status dialog is now configurable (you can disable it, if you want to).
111).Added: There is a preview area for screenshots, available in reports.
112).Improved: Now Viewer is more Vista-friendly (i.e. file associations are managed in HKCU, rather that in HKLM, storing configuration in user's Application Data, etc, etc).
113).Added: Report's list now supports multi-select, so operations can be performed on many reports at time.
114).Added: There are plenty of new command line abilities, like specifying several files and new switches.
115).Improved: Bunch of minor changes and improvements.
WARNING:
--------
There are many changes in this release.
See the "Changed from the old 6.x version" help topic for further information!
EurekaLog 7 also have "EurekaLog 6 backward compatibility mode". Please, refer to help file for more information.
We also have the detailed "Upgrade guide" in our help system.
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
正常启动的BT加载:
[ 3.207764] Bluetooth: HCI UART driver ver 2.2
[ 3.212725] Bluetooth: HCI H4 protocol initialized
[ 3.218045] Bluetooth: HCI BCSP protocol initialized
[ 3.223671] usbcore: registered new interface driver btusb
[ 3.229766] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[ 3.236243] Bluetooth: MSM Sleep Mode Driver Ver 1.2
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
"wlan0"
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
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
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
R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
1800000
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
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
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
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
# 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
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
uart_rx = port:PF04
[uart1]
uart_used = 1
uart_port = 1
uart_type = 4
uart_tx = port:PG06
uart_rx = port:PG07
uart_rts = port:PG08
uart_cts = port:PG09
[uart2]
uart_used = 1
uart_type = 4
uart_tx = port:PB00
uart_rx = port:PB01
uart_rts = port:PB02
uart_cts = port:PB03
[uart3]
uart_used = 0
uart_type = 4
uart_tx = port:PH06
uart_rx = port:PH07
uart_rts = port:PH08
uart_cts = port:PH09
[uart4]
uart_used = 0
uart_port = 4
uart_type = 2
uart_tx = port:PA04
uart_rx = port:PA05
uart_rts = port:PA06
uart_cts = port:PA07
;----------------------------------------------------------------------------------
;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
ctp_wakeup = port:PL03
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
;ap6xxx_wl_regon = port:PL06
;lcd_bl_en = port:PL06
lcd_power = "axp22_dc1sw"
lcdd0 = port:PD18
lcdd1 = port:PD19
lcdd2 = port:PD20
lcdd3 = port:PD21
lcdd4 = port:PD22
lcdd5 = port:PD23
lcdd6 = port:PD24
lcdd7 = port:PD25
lcdd8 = port:PD26
lcdd9 = port:PD27
;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used = 0
pwm_positive = port:PH00
[pwm1_para]
pwm_used = 1
pwm_positive = port:PH01
;--------------------------------------------------------------------------------
;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 - ap6181 sdio wifi gpio config
;ap6xxx_wl_regon = port:PL06
;ap6xxx_wl_host_wake = port:PL07
;ap6xxx_lpo_use_apclk = 1
; 2 - ap6210 sdio wifi gpio config
ap6xxx_wl_regon = port:PL06
;ap6xxx_wl_regon = port:PD13
ap6xxx_wl_host_wake = port:PL07
ap6xxx_bt_regon = port:PL08
ap6xxx_bt_wake = port:PL10
ap6xxx_bt_host_wake = port:PL09
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
;rtl8723bs_wl_regon = port:PL06
;rtl8723bs_wl_host_wake = port:PL07
;rtl8723bs_bt_regon = port:PL08
;rtl8723bs_bt_wake = port:PL10
;rtl8723bs_bt_host_wake = port:PL09
;rtl8723bs_lpo_use_apclk = 0
; 6 - eagle sdio wifi
;esp_wl_chip_en = port:PL03
;esp_wl_rst = port:PL02
;--------------------------------------------------------------------------------
;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
在设置→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$
经过确认:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_sdio.c
static bool
dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
uint16 devid)
bcmsdh_chipinfo(sdh, bus->sih->chip, bus->sih->chiprev);
if (!dhdsdio_chipmatch((uint16)bus->sih->chip)) {
DHD_ERROR(("%s: unsupported chip: 0xx\n",
__FUNCTION__, bus->sih->chip));
goto fail;
继续追踪:
static bool
dhdsdio_chipmatch(uint16 chipid)
if (chipid == BCM4325_CHIP_ID)
return TRUE;
if (chipid == BCM4329_CHIP_ID)
return TRUE;
if (chipid == BCM4315_CHIP_ID)
return TRUE;
if (chipid == BCM4319_CHIP_ID)
return TRUE;
if (chipid == BCM4336_CHIP_ID)
return TRUE;
if (chipid == BCM4330_CHIP_ID)
return TRUE;
if (chipid == BCM43237_CHIP_ID)
return TRUE;
if (chipid == BCM43362_CHIP_ID)
return TRUE;
if (chipid == BCM4314_CHIP_ID)
return TRUE;
if (chipid == BCM43242_CHIP_ID)
return TRUE;
if (chipid == BCM43340_CHIP_ID)
return TRUE;
if (chipid == BCM43341_CHIP_ID)
return TRUE;
if (chipid == BCM43143_CHIP_ID)
return TRUE;
if (chipid == BCM43342_CHIP_ID)
return TRUE;
if (chipid == BCM4334_CHIP_ID)
return TRUE;
if (chipid == BCM43239_CHIP_ID)
return TRUE;
if (chipid == BCM4324_CHIP_ID)
return TRUE;
if (chipid == BCM4335_CHIP_ID)
return TRUE;
if (chipid == BCM4339_CHIP_ID)
return TRUE;
if (chipid == BCM43349_CHIP_ID)
return TRUE;
if (chipid == BCM4345_CHIP_ID)
return TRUE;
if (chipid == BCM4350_CHIP_ID)
return TRUE;
if (chipid == BCM4354_CHIP_ID)
return TRUE;
if (chipid == BCM4356_CHIP_ID)
return TRUE;
if (chipid == BCM4358_CHIP_ID)
return TRUE;
if (chipid == BCM4371_CHIP_ID)
return TRUE;
if (chipid == BCM43430_CHIP_ID)
return TRUE;
if (BCM4349_CHIP(chipid))
return TRUE;
return FALSE;
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ll
总用量 40
drwxr-xr-x 7 rootroot rootroot 4096 6月 26 12:02 ./
drwx------ 6 rootroot rootroot 4096 6月 26 14:16 ../
drwxr-xr-x 10 rootroot rootroot 4096 9月 4 2014 brandy/
-rw-rw-r-- 1 rootroot rootroot 116 6月 26 12:02 .buildconfig
drwxr-xr-x 15 rootroot rootroot 4096 9月 4 2014 buildroot/
-r-xr-xr-x 1 rootroot rootroot 55 9月 4 2014 build.sh*
drwxr-xr-x 28 rootroot rootroot 4096 6月 26 14:30 linux-3.4/
drwxrwxr-x 3 rootroot rootroot 4096 6月 26 12:02 out/
-r--r--r-- 1 rootroot rootroot 232 9月 4 2014 README
drwxr-xr-x 7 rootroot rootroot 4096 6月 7 19:33 tools/
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$ ./build.sh
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun8iw5p1
INFO: platform: android
INFO: kernel: linux-3.4
INFO: board: y3
INFO: output: out/sun8iw5p1/android/y3
INFO: ----------------------------------------
INFO: build buildroot ...
external toolchain has been installed
INFO: build buildroot OK.
INFO: build kernel ...
INFO: prepare toolchain ...
Building kernel
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm/mach-sunxi/pm/standby/common.o
CC arch/arm/mach-sunxi/pm/standby/standby_clock.o
CC arch/arm/mach-sunxi/pm/standby/standby_ir.o
CC arch/arm/mach-sunxi/pm/standby/standby_key.o
CC arch/arm/mach-sunxi/pm/standby/standby_power.o
CC arch/arm/mach-sunxi/pm/standby/standby_twi.o
CC arch/arm/mach-sunxi/pm/standby/standby_usb.o
AS arch/arm/mach-sunxi/pm/standby/standby_delay.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/standby_arisc.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwmsgbox.o
CHK kernel/config_data.h
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_message_manager.o
CC arch/arm/mach-sunxi/pm/standby/./../pm_debug.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_timing.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc.o
AS arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_serial.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_printk.o
AS arch/arm/mach-sunxi/pm/standby/./../mem_divlib.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_divlibc.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_int.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_tmr.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_clk.o
CC arch/arm/mach-sunxi/pm/standby/./../mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/standby.o
rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o
CC arch/arm/mach-sunxi/pm/standby/super/common.o
CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o
CC [M] drivers/net/wireless/bcmdhd/dhd_sdio.o
AS arch/arm/mach-sunxi/pm/standby/super/super_delay.o
CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o
CC arch/arm/mach-sunxi/pm/standby/super/super_power.o
CC arch/arm/mach-sunxi/pm/standby/super/super_cpus.o
AS arch/arm/mach-sunxi/pm/standby/super/resume/resume1.o
CC arch/arm/mach-sunxi/pm/standby/super/resume/resume_head.o
CC arch/arm/mach-sunxi/pm/standby/super/resume/resume1_c_part.o
CC arch/arm/mach-sunxi/pm/standby/../pm_debug.o
CC arch/arm/mach-sunxi/pm/standby/../mem_timing.o
CC arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc.o
AS arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/standby/../mem_cpu.o
CC arch/arm/mach-sunxi/pm/standby/../mem_serial.o
CC arch/arm/mach-sunxi/pm/standby/../mem_printk.o
CC [M] drivers/net/wireless/bcmdhd/dhd_cdc.o
CC [M] drivers/net/wireless/bcmdhd/bcmsdh_linux.o
CC [M] drivers/net/wireless/bcmdhd/dhd_common.o
AS arch/arm/mach-sunxi/pm/standby/../mem_divlib.o
CC arch/arm/mach-sunxi/pm/standby/../mem_divlibc.o
drivers/net/wireless/bcmdhd/dhd_sdio.c: In function ‘dhdsdio_chipmatch’:
drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: error: ‘BCM43430_CHIP_ID’ undeclared (first use in this function)
drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: note: each undeclared identifier is reported only once for each function it appears in
CC arch/arm/mach-sunxi/pm/standby/../mem_int.o
make[4]: *** [drivers/net/wireless/bcmdhd/dhd_sdio.o] 错误 1
make[4]: *** 正在等待未完成的任务....
CC arch/arm/mach-sunxi/pm/standby/../mem_tmr.o
CC arch/arm/mach-sunxi/pm/standby/../mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/standby/../mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/standby/../mem_clk.o
Source file is open
Destination file is created.
Source file is open
Destination file is open.
temp value is 400.
soure_file size is 9496.
destination_file size is 0x2800.
check sum generated is 0x68D92007.
Everything is ok.
rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o
CC arch/arm/mach-sunxi/pm/mem_mapping.o
CC arch/arm/mach-sunxi/pm/mem_divlibc.o
CC arch/arm/mach-sunxi/pm/mem_cpu.o
AS arch/arm/mach-sunxi/pm/mem_cpu_asm.o
AS arch/arm/mach-sunxi/pm/mem_mmu_pc_asm.o
CC arch/arm/mach-sunxi/pm/mem_mmu_pc.o
CC arch/arm/mach-sunxi/pm/mem_int.o
CC arch/arm/mach-sunxi/pm/mem_clk.o
CC arch/arm/mach-sunxi/pm/mem_tmr.o
CC arch/arm/mach-sunxi/pm/mem_tmstmp.o
CC arch/arm/mach-sunxi/pm/mem_twi.o
CC arch/arm/mach-sunxi/pm/mem_gpio.o
CC arch/arm/mach-sunxi/pm/mem_sram.o
CC arch/arm/mach-sunxi/pm/mem_ccu.o
CC arch/arm/mach-sunxi/pm/mem_cci400.o
CC arch/arm/mach-sunxi/pm/mem_gtbus.o
CC arch/arm/mach-sunxi/pm/pm_debug.o
CC arch/arm/mach-sunxi/pm/mem_timing.o
CC arch/arm/mach-sunxi/pm/mem_hwspinlock.o
CC arch/arm/mach-sunxi/pm/pm.o
CC arch/arm/mach-sunxi/pm/extended_standby.o
CC arch/arm/mach-sunxi/pm/standby/super/super_power.o
CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o
CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o
AS arch/arm/mach-sunxi/pm/standby.o
AS arch/arm/mach-sunxi/pm/mem.o
LD arch/arm/mach-sunxi/pm/pm_tmp.o
LD arch/arm/mach-sunxi/pm/built-in.o
LD arch/arm/mach-sunxi/built-in.o
make[3]: *** [drivers/net/wireless/bcmdhd] 错误 2
make[2]: *** [drivers/net/wireless] 错误 2
make[1]: *** [drivers/net] 错误 2
make: *** [drivers] 错误 2
ERROR: build kernel Failed
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
21、(dhdsdio_probe_attach: unsupported chip: 0xa9a6)
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\include\bcmdevs.h
#define BCM4350_CHIP_ID 0x4350
#define BCM43430_CHIP_ID 43430 /* 43430 chipcommon chipid 0xa9a6 */
#define BCM4342_CHIP_ID 4342
可以编译通过了。
(查看属性:)
shell@astar-y3:/ $
shell@astar-y3:/ $ cd /system/vendor/modules/
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd
-rw-r--r-- root root 748856 2017-06-26 12:46 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $
Microsoft Windows [版本 6.1.7600]
C:\Users\Administrator>cd R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\n
et\wireless\bcmdhd
C:\Users\Administrator>r:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
remount succeeded
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/
1677 KB/s (748864 bytes in 0.436s)
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
继续查看属性:
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd
-rw-rw-rw- root root 748864 2017-06-26 14:34 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $ chmod 644 bcmdhd.ko
Unable to chmod bcmdhd.ko: Operation not permitted
10|shell@astar-y3:/system/vendor/modules $
(必须在su下才能够修改属性:)
shell@astar-y3:/system/vendor/modules $ su
shell@astar-y3:/system/vendor/modules # chmod 644 bcmdhd.ko
shell@astar-y3:/system/vendor/modules #
shell@astar-y3:/system/vendor/modules # sync
shell@astar-y3:/system/vendor/modules # reboot
[ 0.658241] [wifi]: select wifi: ap6210 !!
[ 0.658587] [ap6xxx]: module power name axp22_dldo1
[ 0.658601] [ap6xxx]: module power ext1 name axp22_dldo2
[ 0.658613] [ap6xxx]: module power ext2 name axp22_aldo1
[ 0.658721] [ap6xxx]: get ap6xxx wifi_power_switch failed
[ 0.658731] [ap6xxx]: ap6xxx module power set by axp.
[ 0.658930] [ap6xxx]: first time
[ 0.659285] [ap6xxx]: regulator on.
[ 0.661306] [wifi_pm]: wifi gpio init is OK !!
(重启之后,WIFI模块要想办法配置为ap6212,现阶段借用的是AP6210!)
[ 8.517657] gpio ap6xxx_wl_regon set val 1, act val 1
[ 8.623325] [ap6xxx]: sdio wifi power state: on
[ 8.628389] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.628566] =========== WLAN placed in POWER ON ========
[ 8.645459] [mmc]: sdc1 card_power_on start...
[ 8.650397] [mmc]: sdc1 power_supply is null
[ 8.655129] [mmc]: sdc1 card_power_on ok
[ 8.680031] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.690267] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.772360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.781316] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.799684] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.861971] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.872189] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.933887] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 8.941921] *******************Try sdio*******************
[ 8.948329] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.958545] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 9.027690] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 9.035325] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 9.043192] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 9.052046] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 9.145358] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 9.155486] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 9.215398] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 9.225785] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 9.285721] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 9.296049] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 9.357922] mmc1: new high speed SDIO card at address 0001
[ 9.364523] bcmsdh_register: Linux Kernel SDIO/MMC Driver
[ 9.364563] *******************sdio init ok*******************
[ 9.377203] bcm_wlan_get_oob_irq enter.
[ 9.381534] gpio [359] map to virq [7] ok
[ 9.388816] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4
[ 9.396740] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 9.404660] dhdsdio_probe: Disable prop_txstatus
[ 9.410903] wl_create_event_handler(): thread:wl_event_handler:5d started
[ 9.410914] tsk Enter, tsk = 0xddca13d8
[ 9.423788] p2p0: P2P Interface Registered
[ 9.428464] dhd_attach(): thread:dhd_watchdog_thread:5e started
[ 9.435144] dhd_attach(): thread:dhd_dpc:5f started
[ 9.440653] dhd_attach(): thread:dhd_sysioc:60 started
[ 9.447276] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33
[ 9.456558]
[ 9.456561] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 9.456565] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 9.472427] gpio ap6xxx_wl_regon set val 0, act val 0
[ 9.578054] [ap6xxx]: sdio wifi power state: off
[ 9.583186] =========== WLAN placed in RESET ========
(WIFI启动加载正常)
shell@astar-y3:/ $ lsmod
gt82x 9849 0 - Live 0x00000000
sunxi_schw 12559 0 - Live 0x00000000 (O)
cdc_ether 5099 0 - Live 0x00000000
rtl8150 9023 0 - Live 0x00000000
mcs7830 6292 0 - Live 0x00000000
qf9700 7805 0 - Live 0x00000000
asix 17150 0 - Live 0x00000000
usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000
sunxi_keyboard 3021 0 - Live 0x00000000
sw_device 13604 0 - Live 0x00000000
vfe_v4l2 445364 0 - Live 0x00000000
gc2035 12696 0 - Live 0x00000000
gc0308 10702 0 - Live 0x00000000
vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000
vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000
cci 21594 2 gc2035,gc0308, Live 0x00000000
videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000
videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000
bcmdhd 556965 0 - Live 0x00000000
leds_sunxi 1351 0 - Live 0x00000000
mali 209914 20 - Live 0x00000000 (O)
lcd 38180 0 - Live 0x00000000
disp 993096 8 mali,lcd, Live 0x00000000
nand 280622 0 - Live 0x00000000 (O)
shell@astar-y3:/ $
(bcmdhd.ko这个驱动模块加载正常:)
(BT没有打开,但是不停地打印BT超时出错,不知道是何解?)
shell@astar-y3:/ $ [ 511.880344] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 511.887326] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
由于此时WIFI出于记住上一次的状态的状态(打不开),所以需要重新刷镜像IMG,然后替换:bcmdhd.ko
shell@astar-y3:/ $
shell@astar-y3:/ $ lsmod
gt82x 9849 0 - Live 0x00000000
sunxi_schw 12559 0 - Live 0x00000000 (O)
cdc_ether 5099 0 - Live 0x00000000
rtl8150 9023 0 - Live 0x00000000
mcs7830 6292 0 - Live 0x00000000
qf9700 7805 0 - Live 0x00000000
asix 17150 0 - Live 0x00000000
usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000
sunxi_keyboard 3021 0 - Live 0x00000000
sw_device 13604 0 - Live 0x00000000
vfe_v4l2 445364 0 - Live 0x00000000
gc2035 12696 0 - Live 0x00000000
gc0308 10702 0 - Live 0x00000000
vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000
vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000
cci 21594 2 gc2035,gc0308, Live 0x00000000
videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000
videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000
bcmdhd 556965 0 - Live 0x00000000
leds_sunxi 1351 0 - Live 0x00000000
mali 209914 15 - Live 0x00000000 (O)
lcd 38180 0 - Live 0x00000000
disp 993096 8 mali,lcd, Live 0x00000000
nand 280622 0 - Live 0x00000000 (O)
shell@astar-y3:/ $
shell@astar-y3:/ $
shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant'
[ 110.025400] init: starting 'p2p_supplicant'
[ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 110.140144]
[ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 110.173523] wl_android_wifi_on in 1
[ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0
[ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1
[ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 110.286694] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 110.355684] [ap6xxx]: sdio wifi power state: on
[ 110.360930] =========== WLAN going back to live ========
[ 110.366925] sdio_reset_comm():
[ 110.370346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.380773] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 110.443029] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.454758] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 110.516097] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.530958] [mmc]: mclk 0xf1c2008c 0x80430309
[ 110.592013] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.603518] [mmc]: mclk 0xf1c2008c 0x80030009
[ 110.681418] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 110.690726] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 110.700331] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 110.712218] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 110.894520] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.904933] [mmc]: mclk 0xf1c2008c 0x80030009
[ 110.964907] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 110.975514] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 111.035618] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 111.046398] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 111.108547]
[ 111.108566]
[ 111.108579] dhd_bus_devreset: == WLAN ON ==
[ 111.116882] dhd_bus_devreset called when dongle is not in reset
[ 111.123683] Will call dhd_bus_start instead
[ 111.128637] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 111.140963] dhd_conf_download_config: Ignore config file /system/vendor/modules/config.txt
[ 111.151802] Final fw_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 111.158689] Final nv_path=/system/vendor/modules/nvram_ap6210.txt
[ 111.165542] Final conf_path=/system/vendor/modules/config.txt
[ 111.257577] dhdsdio_download_nvram: Open nvram file failed /system/vendor/modules/nvram_ap6210.txt
[ 111.268309] _dhdsdio_download_firmware: dongle nvram file download failed
[ 111.276022] dhd_bus_start: dhdsdio_probe_download failed. firmware = /system/vendor/modules/fw_bcm43438a0.bin nvram = /system/vendor/modules/nvram_ap6210.txt config = /system/vendor/modules/config.txt
[ 111.295979] dhd_bus_devreset: dhd_bus_start fail with -1
[ 111.304154] dhd_dev_reset: dhd_bus_devreset: -1
[ 111.309190] dhd_prot_ioctl : bus is down. we have nothing to do
[ 111.330328] dhd_bus_devreset: WLAN OFF DONE
[ 111.335225] gpio ap6xxx_wl_regon set val 0, act val 0
[ 111.472499] [ap6xxx]: sdio wifi power state: off
[ 111.477661] =========== WLAN placed in RESET ========
[ 111.483304] wl_android_wifi_on: Failed
[ 111.487473] wl_android_wifi_off in 1
[ 111.491478] wl_android_wifi_off in 2: g_wifi_on=0
[ 111.496711] wl_android_wifi_off out
[ 111.509335] init: waitpid returned pid 1211, status = 0000ff00
[ 111.516072] init: process 'p2p_supplicant', pid 1211 exited
shell@astar-y3:/ $
shell@astar-y3:/ $
24、定位问题:dhd_bus_devreset: dhd_bus_start fail with -1
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd 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$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
匹配到二进制文件 ./dhd_sdio.o
匹配到二进制文件 ./bcmdhd.o
匹配到二进制文件 ./bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd 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$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
匹配到二进制文件 ./dhd_sdio.o
匹配到二进制文件 ./bcmdhd.o
匹配到二进制文件 ./bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path);
if ((bcmerror = dhd_bus_start(dhdp)) != 0)
DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
__FUNCTION__, bcmerror));
return bcmerror;
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 dhd_bus_start . -R
./dhd_sdio.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio.c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd_sdio - 副本.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio - 副本.c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio - 副本.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd_sdio - 副本 (2).c: if ((ret = dhd_bus_start(bus->dhd)) != 0) {
./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__));
./dhd_sdio - 副本 (2).c: DHD_ERROR(("Will call dhd_bus_start instead\n"));
./dhd_sdio - 副本 (2).c: if ((bcmerror = dhd_bus_start(dhdp)) != 0)
./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n",
./dhd.h:extern int dhd_bus_start(dhd_pub_t *dhdp);
./wl_android.c:/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first
./dhd_linux.c: if ((ret = dhd_bus_start(&dhd->pub)) != 0) {
./dhd_linux.c: /* dhd_prot_init has been called in dhd_bus_start or wl_android_wifi_on */
./dhd_linux.c:dhd_bus_start(dhd_pub_t *dhdp)
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
定位到这里:
dhd_bus_start(dhd_pub_t *dhdp)
/* try to download image and nvram to the dongle */
if ((dhd->pub.busstate == DHD_BUS_DOWN) &&
(fw_path[0] != '\0') && (nv_path[0] != '\0')) {
#ifdef SHOW_NVRAM_TYPE
{ /* Show nvram type in the kernel log */
int i;
for (i = 0; nv_path[i] != '\0'; ++i) {
if (nv_path[i] == '.') {
break;
DHD_ERROR(("%s: nvram_type = [%s]\n", __FUNCTION__, &nv_path[i]));
#endif /* SHOW_NVRAM_TYPE */
/* wake lock moved to dhdsdio_download_firmware */
if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
fw_path, nv_path, conf_path))) {
DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s config = %s\n",
__FUNCTION__, fw_path, nv_path, conf_path));
#ifdef DHDTHREAD
if (dhd->threads_only)
dhd_os_sdunlock(dhdp);
#endif /* DHDTHREAD */
// 2017/6/23 18:40 wenyuanbo download ap6212 fail not return error!!!!
//return -1;
return 0;
由于ap6212没有config.txt文件,下载肯定会出错,比对全志R16平台去AP6212的处理,关闭这里:
//return -1;
shell@astar-y3:/ $
shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant'
[ 110.025400] init: starting 'p2p_supplicant'
[ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 110.140144]
[ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04
[ 110.173523] wl_android_wifi_on in 1
[ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0
[ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1
[ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 110.286694] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 110.355684] [ap6xxx]: sdio wifi power state: on
[ 110.3
This document contains the solutions to review questions and problems for the 5th edition of Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross. These solutions are being made available to instructors ONLY. Please do NOT copy or distribute this document to others (even other instructors). Please do not post any solutions on a publicly-available Web site. We’ll be happy to provide a copy (up-to-date) of this solution manual ourselves to anyone who asks.
Acknowledgments: Over the years, several students and colleagues have helped us prepare this solutions manual. Special thanks goes to HongGang Zhang, Rakesh Kumar, Prithula Dhungel, and Vijay Annapureddy. Also thanks to all the readers who have made suggestions and corrected errors.
Chapter 1 Review Questions
There is no difference. Throughout this text, the words “host” and “end system” are used interchangeably. End systems include PCs, workstations, Web servers, mail servers, PDAs, Internet-connected game consoles, etc.
From Wikipedia: Diplomatic protocol is commonly described as a set of international courtesy rules. These well-established and time-honored rules have made it easier for nations and people to live and work together. Part of protocol has always been the acknowledgment of the hierarchical standing of all present. Protocol rules are based on the principles of civility.
Standards are important for protocols so that people can create networking systems and products that interoperate.
1. Dial-up modem over telephone line: home; 2. DSL over telephone line: home or small office; 3. Cable to HFC: home; 4. 100 Mbps switched Ethernet: enterprise; 5. Wifi (802.11): home and enterprise: 6. 3G and 4G: wide-area wireless.
HFC bandwidth is shared among the users. On the downstream channel, all packets emanate from a single source, namely, the head end. Thus, there are no collisions in the downstream channel.
In most American cities, the current possibilities include: dial-up; DSL; cable modem; fiber-to-the-home.
7. Ethernet LANs have transmission rates of 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps.
8. Today, Ethernet most commonly runs over twisted-pair copper wire. It also can run over fibers optic links.
9. Dial up modems: up to 56 Kbps, bandwidth is dedicated; ADSL: up to 24 Mbps downstream and 2.5 Mbps upstream, bandwidth is dedicated; HFC, rates up to 42.8 Mbps and upstream rates of up to 30.7 Mbps, bandwidth is shared. FTTH: 2-10Mbps upload; 10-20 Mbps download; bandwidth is not shared.
10. There are two popular wireless Internet access technologies today:
Wifi (802.11) In a wireless LAN, wireless users transmit/receive packets to/from an base station (i.e., wireless access point) within a radius of few tens of meters. The base station is typically connected to the wired Internet and thus serves to connect wireless users to the wired network.
3G and 4G wide-area wireless access networks. In these systems, packets are transmitted over the same wireless infrastructure used for cellular telephony, with the base station thus being managed by a telecommunications provider. This provides wireless access to users within a radius of tens of kilometers of the base station.
11. At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending host completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t1, it can begin to transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, the router completes transmission and the entire packet is received at the receiving host (again, no propagation delay). Thus, the end-to-end delay is L/R1 + L/R2.
12. A circuit-switched network can guarantee a certain amount of end-to-end bandwidth for the duration of a call. Most packet-switched networks today (including the Internet) cannot make any end-to-end guarantees for bandwidth. FDM requires sophisticated analog hardware to shift signal into appropriate frequency bands.
13. a) 2 users can be supported because each user requires half of the link bandwidth.
b) Since each user requires 1Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users transmit simultaneously, the bandwidth required will be 3Mbps which is more than the available bandwidth of the shared link. In this case, there will be queuing delay before the link.
c) Probability that a given user is transmitting = 0.2
d) Probability that all three users are transmitting simultaneously =
= (0.2)3 = 0.008. Since the queue grows when all the users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously) is 0.008.
14. If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (intermediary), to which they have to pay for carrying the traffic. By peering with each other directly, the two ISPs can reduce their payments to their provider ISPs. An Internet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by charging each of the the ISPs that connect to the IXP a relatively small fee, which may depend on the amount of traffic sent to or received from the IXP.
15. Google's private network connects together all its data centers, big and small. Traffic between the Google data centers passes over its private network rather than over the public Internet. Many of these data centers are located in, or close to, lower tier ISPs. Therefore, when Google delivers content to a user, it often can bypass higher tier ISPs. What motivates content providers to create these networks? First, the content provider has more control over the user experience, since it has to use few intermediary ISPs. Second, it can save money by sending less traffic into provider networks. Third, if ISPs decide to charge more money to highly profitable content providers (in countries where net neutrality doesn't apply), the content providers can avoid these extra payments.
16. The delay components are processing delays, transmission delays, propagation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are variable.
17. a) 1000 km, 1 Mbps, 100 bytes
b) 100 km, 1 Mbps, 100 bytes
18. 10msec; d/s; no; no
19. a) 500 kbps
b) 64 seconds
c) 100kbps; 320 seconds
20. End system A breaks the large file into chunks. It adds header to each chunk, thereby generating multiple packets from the file. The header in each packet includes the IP address of the destination (end system B). The packet switch uses the destination IP address in the packet to determine the outgoing link. Asking which road to take is analogous to a packet asking which outgoing link it should be forwarded on, given the packet’s destination address.
21. The maximum emission rate is 500 packets/sec and the maximum transmission rate is
350 packets/sec. The corresponding traffic intensity is 500/350 =1.43 > 1. Loss will eventually occur for each experiment; but the time when loss first occurs will be different from one experiment to the next due to the randomness in the emission process.
22. Five generic tasks are error control, flow control, segmentation and reassembly, multiplexing, and connection setup. Yes, these tasks can be duplicated at different layers. For example, error control is often provided at more than one layer.
23. The five layers in the Internet protocol stack are – from top to bottom – the application layer, the transport layer, the network layer, the link layer, and the physical layer. The principal responsibilities are outlined in Section 1.5.1.
24. Application-layer message: data which an application wants to send and passed onto the transport layer; transport-layer segment: generated by the transport layer and encapsulates application-layer message with transport layer header; network-layer datagram: encapsulates transport-layer segment with a network-layer header; link-layer frame: encapsulates network-layer datagram with a link-layer header.
25. Routers process network, link and physical layers (layers 1 through 3). (This is a little bit of a white lie, as modern routers sometimes act as firewalls or caching components, and process Transport layer as well.) Link layer switches process link and physical layers (layers 1 through2). Hosts process all five layers.
26. a) Virus
Requires some form of human interaction to spread. Classic example: E-mail viruses.
b) Worms
No user replication needed. Worm in infected host scans IP addresses and port numbers, looking for vulnerable processes to infect.
27. Creation of a botnet requires an attacker to find vulnerability in some application or system (e.g. exploiting the buffer overflow vulnerability that might exist in an application). After finding the vulnerability, the attacker needs to scan for hosts that are vulnerable. The target is basically to compromise a series of systems by exploiting that particular vulnerability. Any system that is part of the botnet can automatically scan its environment and propagate by exploiting the vulnerability. An important property of such botnets is that the originator of the botnet can remotely control and issue commands to all the nodes in the botnet. Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for example, all nodes in the botnet might be commanded by the attacker to send a TCP SYN message to the target, which might result in a TCP SYN flood attack at the target).
28. Trudy can pretend to be Bob to Alice (and vice-versa) and partially or completely modify the message(s) being sent from Bob to Alice. For example, she can easily change the phrase “Alice, I owe you $1000” to “Alice, I owe you $10,000”. Furthermore, Trudy can even drop the packets that are being sent by Bob to Alice (and vise-versa), even if the packets from Bob to Alice are encrypted.
Chapter 1 Problems
Problem 1
There is no single right answer to this question. Many protocols would do the trick. Here's a simple answer below:
Messages from ATM machine to Server
Msg name purpose
-------- -------
HELO Let server know that there is a card in the ATM machine
ATM card transmits user ID to Server
PASSWD User enters PIN, which is sent to server
BALANCE User requests balance
WITHDRAWL User asks to withdraw money
BYE user all done
Messages from Server to ATM machine (display)
Msg name purpose
-------- -------
PASSWD Ask user for PIN (password)
OK last requested operation (PASSWD, WITHDRAWL) OK
ERR last requested operation (PASSWD, WITHDRAWL) in ERROR
AMOUNT sent in response to BALANCE request
BYE user done, display welcome screen at ATM
Correct operation:
client server
HELO (userid) --------------> (check if valid userid)
<------------- PASSWD
PASSWD --------------> (check password)
<------------- AMOUNT
WITHDRAWL --------------> check if enough $ to cover withdrawl
(check if valid userid)
<------------- PASSWD
PASSWD --------------> (check password)
<------------- AMOUNT
WITHDRAWL --------------> check if enough $ to cover withdrawl
<------------- BYE
Problem 2
At time N*(L/R) the first packet has reached the destination, the second packet is stored in the last router, the third packet is stored in the next-to-last router, etc. At time N*(L/R) + L/R, the second packet has reached the destination, the third packet is stored in the last router, etc. Continuing with this logic, we see that at time N*(L/R) + (P-1)*(L/R) = (N+P-1)*(L/R) all packets have reached the destination.
Problem 3
a) A circuit-switched network would be well suited to the application, because the application involves long sessions with predictable smooth bandwidth requirements. Since the transmission rate is known and not bursty, bandwidth can be reserved for each application session without significant waste. In addition, the overhead costs of setting up and tearing down connections are amortized over the lengthy duration of a typical application session.
b) In the worst case, all the applications simultaneously transmit over one or more network links. However, since each link has sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queuing) will occur. Given such generous link capacities, the network does not need congestion control mechanisms.
Problem 4
Between the switch in the upper left and the switch in the upper right we can have 4 connections. Similarly we can have four connections between each of the 3 other pairs of adjacent switches. Thus, this network can support up to 16 connections.
We can 4 connections passing through the switch in the upper-right-hand corner and another 4 connections passing through the switch in the lower-left-hand corner, giving a total of 8 connections.
Yes. For the connections between A and C, we route two connections through B and two connections through D. For the connections between B and D, we route two connections through A and two connections through C. In this manner, there are at most 4 connections passing through any link.
Problem 5
Tollbooths are 75 km apart, and the cars propagate at 100km/hr. A tollbooth services a car at a rate of one car every 12 seconds.
a) There are ten cars. It takes 120 seconds, or 2 minutes, for the first tollbooth to service the 10 cars. Each of these cars has a propagation delay of 45 minutes (travel 75 km) before arriving at the second tollbooth. Thus, all the cars are lined up before the second tollbooth after 47 minutes. The whole process repeats itself for traveling between the second and third tollbooths. It also takes 2 minutes for the third tollbooth to service the 10 cars. Thus the total delay is 96 minutes.
b) Delay between tollbooths is 8*12 seconds plus 45 minutes, i.e., 46 minutes and 36 seconds. The total delay is twice this amount plus 8*12 seconds, i.e., 94 minutes and 48 seconds.
Problem 6
a) seconds.
b) seconds.
c) seconds.
d) The bit is just leaving Host A.
e) The first bit is in the link and has not reached Host B.
f) The first bit has reached Host B.
g) Want
Problem 7
Consider the first bit in a packet. Before this bit can be transmitted, all of the bits in the packet must be generated. This requires
sec=7msec.
The time required to transmit the packet is
sec= sec.
Propagation delay = 10 msec.
The delay until decoding is
7msec + sec + 10msec = 17.224msec
A similar analysis shows that all bits experience a delay of 17.224 msec.
Problem 8
a) 20 users can be supported.
b) .
c) .
d) .
We use the central limit theorem to approximate this probability. Let be independent random variables such that .
“21 or more users”
Problem 10
The first end system requires L/R1 to transmit the packet onto the first link; the packet propagates over the first link in d1/s1; the packet switch adds a processing delay of dproc; after receiving the entire packet, the packet switch connecting the first and the second link requires L/R2 to transmit the packet onto the second link; the packet propagates over the second link in d2/s2. Similarly, we can find the delay caused by the second switch and the third link: L/R3, dproc, and d3/s3.
Adding these five delays gives
dend-end = L/R1 + L/R2 + L/R3 + d1/s1 + d2/s2 + d3/s3+ dproc+ dproc
To answer the second question, we simply plug the values into the equation to get 6 + 6 + 6 + 20+16 + 4 + 3 + 3 = 64 msec.
Problem 11
Because bits are immediately transmitted, the packet switch does not introduce any delay; in particular, it does not introduce a transmission delay. Thus,
dend-end = L/R + d1/s1 + d2/s2+ d3/s3
For the values in Problem 10, we get 6 + 20 + 16 + 4 = 46 msec.
Problem 12
The arriving packet must first wait for the link to transmit 4.5 *1,500 bytes = 6,750 bytes or 54,000 bits. Since these bits are transmitted at 2 Mbps, the queuing delay is 27 msec. Generally, the queuing delay is (nL + (L - x))/R.
Problem 13
The queuing delay is 0 for the first transmitted packet, L/R for the second transmitted packet, and generally, (n-1)L/R for the nth transmitted packet. Thus, the average delay for the N packets is:
(L/R + 2L/R + ....... + (N-1)L/R)/N
= L/(RN) * (1 + 2 + ..... + (N-1))
= L/(RN) * N(N-1)/2
= LN(N-1)/(2RN)
= (N-1)L/(2R)
Note that here we used the well-known fact:
1 + 2 + ....... + N = N(N+1)/2
It takes seconds to transmit the packets. Thus, the buffer is empty when a each batch of packets arrive. Thus, the average delay of a packet across all batches is the average delay within one batch, i.e., (N-1)L/2R.
Problem 14
The transmission delay is . The total delay is
Let .
Total delay =
For x=0, the total delay =0; as we increase x, total delay increases, approaching infinity as x approaches 1/a.
Problem 15
Total delay .
Problem 16
The total number of packets in the system includes those in the buffer and the packet that is being transmitted. So, N=10+1.
Because , so (10+1)=a*(queuing delay + transmission delay). That is,
11=a*(0.01+1/100)=a*(0.01+0.01). Thus, a=550 packets/sec.
Problem 17
There are nodes (the source host and the routers). Let denote the processing delay at the th node. Let be the transmission rate of the th link and let
. Let be the propagation delay across the th link. Then
Let denote the average queuing delay at node . Then
Problem 18
On linux you can use the command
traceroute www.targethost.com
and in the Windows command prompt you can use
tracert www.targethost.com
In either case, you will get three delay measurements. For those three measurements you can calculate the mean and standard deviation. Repeat the experiment at different times of the day and comment on any changes.
Here is an example solution:
Traceroutes between San Diego Super Computer Center and www.poly.edu
The average (mean) of the round-trip delays at each of the three hours is 71.18 ms, 71.38 ms and 71.55 ms, respectively. The standard deviations are 0.075 ms, 0.21 ms, 0.05 ms, respectively.
In this example, the traceroutes have 12 routers in the path at each of the three hours. No, the paths didn’t change during any of the hours.
Traceroute packets passed through four ISP networks from source to destination. Yes, in this experiment the largest delays occurred at peering interfaces between adjacent ISPs.
Traceroutes from www.stella-net.net (France) to www.poly.edu (USA).
The average round-trip delays at each of the three hours are 87.09 ms, 86.35 ms and 86.48 ms, respectively. The standard deviations are 0.53 ms, 0.18 ms, 0.23 ms, respectively. In this example, there are 11 routers in the path at each of the three hours. No, the paths didn’t change during any of the hours. Traceroute packets passed three ISP networks from source to destination. Yes, in this experiment the largest delays occurred at peering interfaces between adjacent ISPs.
Problem 19
An example solution:
Traceroutes to two different cities in China from same host in United States
Five links are common in the two traceroutes. The two traceroutes diverge before reaching China
Problem 20
Throughput = min{Rs, Rc, R/M}
Problem 21
If only use one path, the max throughput is given by:
If use all paths, the max throughput is given by .
Problem 22
Probability of successfully receiving a packet is: ps= (1-p)N.
The number of transmissions needed to be performed until the packet is successfully received by the client is a geometric random variable with success probability ps. Thus, the average number of transmissions needed is given by: 1/ps . Then, the average number of re-transmissions needed is given by: 1/ps -1.
Problem 23
Let’s call the first packet A and call the second packet B.
If the bottleneck link is the first link, then packet B is queued at the first link waiting for the transmission of packet A. So the packet inter-arrival time at the destination is simply L/Rs.
If the second link is the bottleneck link and both packets are sent back to back, it must be true that the second packet arrives at the input queue of the second link before the second link finishes the transmission of the first packet. That is,
L/Rs + L/Rs + dprop = L/Rs + dprop + L/Rc
Thus, the minimum value of T is L/Rc L/Rs .
Problem 24
40 terabytes = 40 * 1012 * 8 bits. So, if using the dedicated link, it will take 40 * 1012 * 8 / (100 *106 ) =3200000 seconds = 37 days. But with FedEx overnight delivery, you can guarantee the data arrives in one day, and it should cost less than $100.
Problem 25
160,000 bits
160,000 bits
The bandwidth-delay product of a link is the maximum number of bits that can be in the link.
the width of a bit = length of link / bandwidth-delay product, so 1 bit is 125 meters long, which is longer than a football field
Problem 26
s/R=20000km, then R=s/20000km= 2.5*108/(2*107)= 12.5 bps
Problem 27
80,000,000 bits
800,000 bits, this is because that the maximum number of bits that will be in the link at any given time = min(bandwidth delay product, packet size) = 800,000 bits.
.25 meters
Problem 28
ttrans + tprop = 400 msec + 80 msec = 480 msec.
20 * (ttrans + 2 tprop) = 20*(20 msec + 80 msec) = 2 sec.
Breaking up a file takes longer to transmit because each data packet and its corresponding acknowledgement packet add their own propagation delays.
Problem 29
Recall geostationary satellite is 36,000 kilometers away from earth surface.
150 msec
1,500,000 bits
600,000,000 bits
Problem 30
Let’s suppose the passenger and his/her bags correspond to the data unit arriving to the top of the protocol stack. When the passenger checks in, his/her bags are checked, and a tag is attached to the bags and ticket. This is additional information added in the Baggage layer if Figure 1.20 that allows the Baggage layer to implement the service or separating the passengers and baggage on the sending side, and then reuniting them (hopefully!) on the destination side. When a passenger then passes through security and additional stamp is often added to his/her ticket, indicating that the passenger has passed through a security check. This information is used to ensure (e.g., by later checks for the security information) secure transfer of people.
Problem 31
Time to send message from source host to first packet switch = With store-and-forward switching, the total time to move message from source host to destination host =
Time to send 1st packet from source host to first packet switch = . . Time at which 2nd packet is received at the first switch = time at which 1st packet is received at the second switch =
Time at which 1st packet is received at the destination host = . After this, every 5msec one packet will be received; thus time at which last (800th) packet is received = . It can be seen that delay in using message segmentation is significantly less (almost 1/3rd).
Without message segmentation, if bit errors are not tolerated, if there is a single bit error, the whole message has to be retransmitted (rather than a single packet).
Without message segmentation, huge packets (containing HD videos, for example) are sent into the network. Routers have to accommodate these huge packets. Smaller packets have to queue behind enormous packets and suffer unfair delays.
Packets have to be put in sequence at the destination.
Message segmentation results in many smaller packets. Since header size is usually the same for all packets regardless of their size, with message segmentation the total amount of header bytes is more.
Problem 32
Yes, the delays in the applet correspond to the delays in the Problem 31.The propagation delays affect the overall end-to-end delays both for packet switching and message switching equally.
Problem 33
There are F/S packets. Each packet is S=80 bits. Time at which the last packet is received at the first router is sec. At this time, the first F/S-2 packets are at the destination, and the F/S-1 packet is at the second router. The last packet must then be transmitted by the first router and the second router, with each transmission taking sec. Thus delay in sending the whole file is
To calculate the value of S which leads to the minimum delay,
Problem 34
The circuit-switched telephone networks and the Internet are connected together at "gateways". When a Skype user (connected to the Internet) calls an ordinary telephone, a circuit is established between a gateway and the telephone user over the circuit switched network. The skype user's voice is sent in packets over the Internet to the gateway. At the gateway, the voice signal is reconstructed and then sent over the circuit. In the other direction, the voice signal is sent over the circuit switched network to the gateway. The gateway packetizes the voice signal and sends the voice packets to the Skype user.
Chapter 2 Review Questions
The Web: HTTP; file transfer: FTP; remote login: Telnet; e-mail: SMTP; BitTorrent file sharing: BitTorrent protocol
Network architecture refers to the organization of the communication process into layers (e.g., the five-layer Internet architecture). Application architecture, on the other hand, is designed by an application developer and dictates the broad structure of the application (e.g., client-server or P2P).
The process which initiates the communication is the client; the process that waits to be contacted is the server.
No. In a P2P file-sharing application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.
The IP address of the destination host and the port number of the socket in the destination process.
You would use UDP. With UDP, the transaction can be completed in one roundtrip time (RTT) - the client sends the transaction request into a UDP socket, and the server sends the reply back to the client's UDP socket. With TCP, a minimum of two RTTs are needed - one to set-up the TCP connection, and another for the client to send the request, and for the server to send back the reply.
One such example is remote word processing, for example, with Google docs. However, because Google docs runs over the Internet (using TCP), timing guarantees are not provided.
a) Reliable data transfer
TCP provides a reliable byte-stream between client and server but UDP does not.
b) A guarantee that a certain value for throughput will be maintained
Neither
c) A guarantee that data will be delivered within a specified amount of time
Neither
d) Confidentiality (via encryption)
Neither
SSL operates at the application layer. The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, she has to include the SSL code in the application.
A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not.
The applications associated with those protocols require that all application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not.
When the user first visits the site, the server creates a unique identification number, creates an entry in its back-end database, and returns this identification number as a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.
Web caching can bring the desired content “closer” to the user, possibly to the same LAN to which the user’s host is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.
Telnet is not available in Windows 7 by default. to make it available, go to Control Panel, Programs and Features, Turn Windows Features On or Off, Check Telnet client. To start Telnet, in Windows command prompt, issue the following command
> telnet webserverver 80
where "webserver" is some webserver. After issuing the command, you have established a TCP connection between your client telnet program and the web server. Then type in an HTTP GET message. An example is given below:
Since the index.html page in this web server was not modified since Fri, 18 May 2007 09:23:34 GMT, and the above commands were issued on Sat, 19 May 2007, the server returned "304 Not Modified". Note that the first 4 lines are the GET message and header lines inputed by the user, and the next 4 lines (starting from HTTP/1.1 304 Not Modified) is the response from the web server.
FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connection for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band.
The message is first sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3.
Received: from 65.54.246.203 (EHLO bay0-omc3-s3.bay0.hotmail.com) (65.54.246.203) by mta419.mail.mud.yahoo.com with SMTP; Sat, 19 May 2007 16:53:51 -0700
Received: from hotmail.com ([65.55.135.106]) by bay0-omc3-s3.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 19 May 2007 16:52:42 -0700
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 19 May 2007 16:52:41 -0700
Message-ID:
Received: from 65.55.135.123 by by130fd.bay130.hotmail.msn.com with HTTP; Sat, 19 May 2007 23:52:36 GMT
From: "prithula dhungel"
To: prithula@yahoo.com
Subject: Test mail
Date: Sat, 19 May 2007 23:52:36 +0000
Mime-Version: 1.0
Content-Type: Text/html; format=flowed
Return-Path: prithuladhungel@hotmail.com
Figure: A sample mail message header
Received: This header field indicates the sequence in which the SMTP servers send and receive the mail message including the respective timestamps.
In this example there are 4 “Received:” header lines. This means the mail message passed through 5 different SMTP servers before being delivered to the receiver’s mail box. The last (forth) “Received:” header indicates the mail message flow from the SMTP server of the sender to the second SMTP server in the chain of servers. The sender’s SMTP server is at address 65.55.135.123 and the second SMTP server in the chain is by130fd.bay130.hotmail.msn.com.
The third “Received:” header indicates the mail message flow from the second SMTP server in the chain to the third server, and so on.
Finally, the first “Received:” header indicates the flow of the mail messages from the forth SMTP server to the last SMTP server (i.e. the receiver’s mail server) in the chain.
Message-id: The message has been given this number BAY130-F26D9E35BF59E0D18A819AFB9310@phx.gbl (by bay0-omc3-s3.bay0.hotmail.com. Message-id is a unique string assigned by the mail system when the message is first created.
From: This indicates the email address of the sender of the mail. In the given example, the sender is “prithuladhungel@hotmail.com”
To: This field indicates the email address of the receiver of the mail. In the example, the receiver is “prithula@yahoo.com”
Subject: This gives the subject of the mail (if any specified by the sender). In the example, the subject specified by the sender is “Test mail”
Date: The date and time when the mail was sent by the sender. In the example, the sender sent the mail on 19th May 2007, at time 23:52:36 GMT.
Mime-version: MIME version used for the mail. In the example, it is 1.0.
Content-type: The type of content in the body of the mail message. In the example, it is “text/html”.
Return-Path: This specifies the email address to which the mail will be sent if the receiver of this mail wants to reply to the sender. This is also used by the sender’s mail server for bouncing back undeliverable mail messages of mailer-daemon error messages. In the example, the return path is “prithuladhungel@hotmail.com”.
With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. This poses a problem for the nomadic user, who may want to access the messages from many different machines (office PC, home PC, etc.). In the download and keep configuration, messages are not deleted after the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the stored messages from a new machine, all of non-deleted messages will be transferred to the new machine (including very old messages).
Yes an organization’s mail server and Web server can have the same alias for a host name. The MX record is used to map the mail server’s host name to its IP address.
You should be able to see the sender's IP address for a user with an .edu email address. But you will not be able to see the sender's IP address if the user uses a gmail account.
It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of Bob for Bob to send out chunks to her; this might not occur even if Alice provides chunks to Bob throughout a 30-second interval.
Recall that in BitTorrent, a peer picks a random peer and optimistically unchokes the peer for a short period of time. Therefore, Alice will eventually be optimistically unchoked by one of her neighbors, during which time she will receive chunks from that neighbor.
The overlay network in a P2P file sharing system consists of the nodes participating in the file sharing system and the logical links between the nodes. There is a logical link (an “edge” in graph theory terms) from node A to node B if there is a semi-permanent TCP connection between A and B. An overlay network does not include routers.
Mesh DHT: The advantage is in order to a route a message to the peer (with ID) that is closest to the key, only one hop is required; the disadvantage is that each peer must track all other peers in the DHT. Circular DHT: the advantage is that each peer needs to track only a few other peers; the disadvantage is that O(N) hops are needed to route a message to the peer that is closest to the key.
File Distribution
Instant Messaging
Video Streaming
Distributed Computing
With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.
For the TCP application, as soon as the client is executed, it attempts to initiate a TCP connection with the server. If the TCP server is not running, then the client will fail to make a connection. For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon execution
Chapter 2 Problems
Problem 1
Problem 2
Access control commands:
USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT.
Transfer parameter commands:
PORT, PASV, TYPE STRU, MODE.
Service commands:
RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP.
Problem 3
Application layer protocols: DNS and HTTP
Transport layer protocols: UDP for DNS; TCP for HTTP
Problem 4
The document request was http://gaia.cs.umass.edu/cs453/index.html. The Host : field indicates the server's name and /cs453/index.html indicates the file name.
The browser is running HTTP version 1.1, as indicated just before the first pair.
The browser is requesting a persistent connection, as indicated by the Connection: keep-alive.
This is a trick question. This information is not contained in an HTTP message anywhere. So there is no way to tell this from looking at the exchange of HTTP messages alone. One would need information from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this question.
Mozilla/5.0. The browser type information is needed by the server to send different versions of the same object to different types of browsers.
Problem 5
The status code of 200 and the phrase OK indicate that the server was able to locate the document successfully. The reply was provided on Tuesday, 07 Mar 2008 12:39:45 Greenwich Mean Time.
The document index.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT.
There are 3874 bytes in the document being returned.
The first five bytes of the returned document are : <!doc. The server agreed to a persistent connection, as indicated by the Connection: Keep-Alive field
Problem 6
Persistent connections are discussed in section 8 of RFC 2616 (the real goal of this question was to get you to retrieve and read an RFC). Sections 8.1.2 and 8.1.2.1 of the RFC indicate that either the client or the server can indicate to the other that it is going to close the persistent connection. It does so by including the connection-token "close" in the Connection-header field of the http request/reply.
HTTP does not provide any encryption services.
(From RFC 2616) “Clients that use persistent connections should limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.”
Yes. (From RFC 2616) “A client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.”
Problem 7
The total amount of time to get the IP address is
Once the IP address is known, elapses to set up the TCP connection and another elapses to request and receive the small object. The total response time is
Problem 8
Problem 9
The time to transmit an object of size L over a link or rate R is L/R. The average time is the average size of the object divided by R:
= (850,000 bits)/(15,000,000 bits/sec) = .0567 sec
The traffic intensity on the link is given by =(16 requests/sec)(.0567 sec/request) = 0.907. Thus, the average access delay is (.0567 sec)/(1 - .907) .6 seconds. The total average response time is therefore .6 sec + 3 sec = 3.6 sec.
The traffic intensity on the access link is reduced by 60% since the 60% of the requests are satisfied within the institutional network. Thus the average access delay is (.0567 sec)/[1 – (.4)(.907)] = .089 seconds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability .6); the average response time is .089 sec + 3 sec = 3.089 sec for cache misses (which happens 40% of the time). So the average response time is (.6)(0 sec) + (.4)(3.089 sec) = 1.24 seconds. Thus the average response time is reduced from 3.6 sec to 1.24 sec.
Problem 10
Note that each downloaded object can be completely put into one data packet. Let Tp denote the one-way propagation delay between the client and the server.
First consider parallel downloads using non-persistent connections. Parallel downloads would allow 10 connections to share the 150 bits/sec bandwidth, giving each just 15 bits/sec. Thus, the total time needed to receive all objects is given by:
(200/150+Tp + 200/150 +Tp + 200/150+Tp + 100,000/150+ Tp )
+ (200/(150/10)+Tp + 200/(150/10) +Tp + 200/(150/10)+Tp + 100,000/(150/10)+ Tp )
= 7377 + 8*Tp (seconds)
Now consider a persistent HTTP connection. The total time needed is given by:
(200/150+Tp + 200/150 +Tp + 200/150+Tp + 100,000/150+ Tp )
+ 10*(200/150+Tp + 100,000/150+ Tp )
=7351 + 24*Tp (seconds)
Assuming the speed of light is 300*106 m/sec, then Tp=10/(300*106)=0.03 microsec. Tp is therefore negligible compared with transmission delay.
Thus, we see that persistent HTTP is not significantly faster (less than 1 percent) than the non-persistent case with parallel download.
Problem 11
Yes, because Bob has more connections, he can get a larger share of the link bandwidth.
Yes, Bob still needs to perform parallel downloads; otherwise he will get less bandwidth than the other four users.
Problem 12
Server.py
from socket import *
serverPort=12000
serverSocket=socket(AF_INET,SOCK_STREAM)
serverSocket.bind(('',serverPort))
serverSocket.listen(1)
connectionSocket, addr = serverSocket.accept()
while 1:
sentence = connectionSocket.recv(1024)
print 'From Server:', sentence, '\n' serverSocket.close()
Problem 13
The MAIL FROM: in SMTP is a message from the SMTP client that identifies the sender of the mail message to the SMTP server. The From: on the mail message itself is NOT an SMTP message, but rather is just a line in the body of the mail message.
Problem 14
SMTP uses a line containing only a period to mark the end of a message body.
HTTP uses “Content-Length header field” to indicate the length of a message body.
No, HTTP cannot use the method used by SMTP, because HTTP message could be binary data, whereas in SMTP, the message body must be in 7-bit ASCII format.
Problem 15
MTA stands for Mail Transfer Agent. A host sends the message to an MTA. The message then follows a sequence of MTAs to reach the receiver’s mail reader. We see that this spam message follows a chain of MTAs. An honest MTA should report where it receives the message. Notice that in this message, “asusus-4b96 ([58.88.21.177])” does not report from where it received the email. Since we assume only the originator is dishonest, so “asusus-4b96 ([58.88.21.177])” must be the originator.
Problem 16
UIDL abbreviates “unique-ID listing”. When a POP3 client issues the UIDL command, the server responds with the unique message ID for all of the messages present in the user's mailbox. This command is useful for “download and keep”. By maintaining a file that lists the messages retrieved during earlier sessions, the client can use the UIDL command to determine which messages on the server have already been seen.
Problem 17
a) C: dele 1
C: retr 2
S: (blah blah …
S: ………..blah)
C: dele 2
C: quit
S: +OK POP3 server signing off
b) C: retr 2
S: blah blah …
S: ………..blah
C: quit
S: +OK POP3 server signing off
C: list
S: 1 498
S: 2 912
C: retr 1
S: blah …..
S: ….blah
C: retr 2
S: blah blah …
S: ………..blah
C: quit
S: +OK POP3 server signing off
Problem 18
For a given input of domain name (such as ccn.com), IP address or network administrator name, the whois database can be used to locate the corresponding registrar, whois server, DNS server, and so on.
NS4.YAHOO.COM from www.register.com; NS1.MSFT.NET from ww.register.com
Local Domain: www.mindspring.com
Web servers : www.mindspring.com
207.69.189.21, 207.69.189.22,
207.69.189.23, 207.69.189.24,
207.69.189.25, 207.69.189.26, 207.69.189.27,
207.69.189.28
Mail Servers : mx1.mindspring.com (207.69.189.217)
mx2.mindspring.com (207.69.189.218)
mx3.mindspring.com (207.69.189.219)
mx4.mindspring.com (207.69.189.220)
Name Servers: itchy.earthlink.net (207.69.188.196)
scratchy.earthlink.net (207.69.188.197)
www.yahoo.com
Web Servers: www.yahoo.com (216.109.112.135, 66.94.234.13)
Mail Servers: a.mx.mail.yahoo.com (209.191.118.103)
b.mx.mail.yahoo.com (66.196.97.250)
c.mx.mail.yahoo.com (68.142.237.182, 216.39.53.3)
d.mx.mail.yahoo.com (216.39.53.2)
e.mx.mail.yahoo.com (216.39.53.1)
f.mx.mail.yahoo.com (209.191.88.247, 68.142.202.247)
g.mx.mail.yahoo.com (209.191.88.239, 206.190.53.191)
Name Servers: ns1.yahoo.com (66.218.71.63)
ns2.yahoo.com (68.142.255.16)
ns3.yahoo.com (217.12.4.104)
ns4.yahoo.com (68.142.196.63)
ns5.yahoo.com (216.109.116.17)
ns8.yahoo.com (202.165.104.22)
ns9.yahoo.com (202.160.176.146)
www.hotmail.com
Web Servers: www.hotmail.com (64.4.33.7, 64.4.32.7)
Mail Servers: mx1.hotmail.com (65.54.245.8, 65.54.244.8, 65.54.244.136)
mx2.hotmail.com (65.54.244.40, 65.54.244.168, 65.54.245.40)
mx3.hotmail.com (65.54.244.72, 65.54.244.200, 65.54.245.72)
mx4.hotmail.com (65.54.244.232, 65.54.245.104, 65.54.244.104)
Name Servers: ns1.msft.net (207.68.160.190)
ns2.msft.net (65.54.240.126)
ns3.msft.net (213.199.161.77)
ns4.msft.net (207.46.66.126)
ns5.msft.net (65.55.238.126)
d) The yahoo web server has multiple IP addresses
www.yahoo.com (216.109.112.135, 66.94.234.13)
e) The address range for Polytechnic University: 128.238.0.0 – 128.238.255.255
f) An attacker can use the whois database and nslookup tool to determine the IP address ranges, DNS server addresses, etc., for the target institution.
By analyzing the source address of attack packets, the victim can use whois to obtain information about domain from which the attack is coming and possibly inform the administrators of the origin domain.
Problem 19
The following delegation chain is used for gaia.cs.umass.edu
a.root-servers.net
E.GTLD-SERVERS.NET
ns1.umass.edu(authoritative)
First command:
dig +norecurse @a.root-servers.net any gaia.cs.umass.edu
;; AUTHORITY SECTION:
edu. 172800 IN NS E.GTLD-SERVERS.NET.
edu. 172800 IN NS A.GTLD-SERVERS.NET.
edu. 172800 IN NS G3.NSTLD.COM.
edu. 172800 IN NS D.GTLD-SERVERS.NET.
edu. 172800 IN NS H3.NSTLD.COM.
edu. 172800 IN NS L3.NSTLD.COM.
edu. 172800 IN NS M3.NSTLD.COM.
edu. 172800 IN NS C.GTLD-SERVERS.NET.
Among all returned edu DNS servers, we send a query to the first one.
dig +norecurse @E.GTLD-SERVERS.NET any gaia.cs.umass.edu
umass.edu. 172800 IN NS ns1.umass.edu.
umass.edu. 172800 IN NS ns2.umass.edu.
umass.edu. 172800 IN NS ns3.umass.edu.
Among all three returned authoritative DNS servers, we send a query to the first one.
dig +norecurse @ns1.umass.edu any gaia.cs.umass.edu
gaia.cs.umass.edu. 21600 IN A 128.119.245.12
The answer for google.com could be:
a.root-servers.net
E.GTLD-SERVERS.NET
ns1.google.com(authoritative)
Problem 20
We can periodically take a snapshot of the DNS caches in the local DNS servers. The Web server that appears most frequently in the DNS caches is the most popular server. This is because if more users are interested in a Web server, then DNS requests for that server are more frequently sent by users. Thus, that Web server will appear in the DNS caches more frequently.
For a complete measurement study, see:
Craig E. Wills, Mikhail Mikhailov, Hao Shang
“Inferring Relative Popularity of Internet Applications by Actively Querying DNS Caches”, in IMC'03, October 2729, 2003, Miami Beach, Florida, USA
Problem 21
Yes, we can use dig to query that Web site in the local DNS server.
For example, “dig cnn.com” will return the query time for finding cnn.com. If cnn.com was just accessed a couple of seconds ago, an entry for cnn.com is cached in the local DNS cache, so the query time is 0 msec. Otherwise, the query time is large.
Problem 22
For calculating the minimum distribution time for client-server distribution, we use the following formula:
Dcs = max {NF/us, F/dmin}
Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula:
Where, F = 15 Gbits = 15 * 1024 Mbits
us = 30 Mbps
dmin = di = 2 Mbps
Note, 300Kbps = 300/1024 Mbps.
Client Server
10 100 1000
u 300 Kbps 7680 51200 512000
700 Kbps 7680 51200 512000
2 Mbps 7680 51200 512000
Peer to Peer
10 100 1000
u 300 Kbps 7680 25904 47559
700 Kbps 7680 15616 21525
2 Mbps 7680 7680 7680
Problem 23
Consider a distribution scheme in which the server sends the file to each client, in parallel, at a rate of a rate of us/N. Note that this rate is less than each of the client’s download rate, since by assumption us/N ≤ dmin. Thus each client can also receive at rate us/N. Since each client receives at rate us/N, the time for each client to receive the entire file is F/( us/N) = NF/ us. Since all the clients receive the file in NF/ us, the overall distribution time is also NF/ us.
Consider a distribution scheme in which the server sends the file to each client, in parallel, at a rate of dmin. Note that the aggregate rate, N dmin, is less than the server’s link rate us, since by assumption us/N ≥ dmin. Since each client receives at rate dmin, the time for each client to receive the entire file is F/ dmin. Since all the clients receive the file in this time, the overall distribution time is also F/ dmin.
From Section 2.6 we know that
DCS ≥ max {NF/us, F/dmin} (Equation 1)
Suppose that us/N ≤ dmin. Then from Equation 1 we have DCS ≥ NF/us . But from (a) we have DCS ≤ NF/us . Combining these two gives:
DCS = NF/us when us/N ≤ dmin. (Equation 2)
We can similarly show that:
DCS =F/dmin when us/N ≥ dmin (Equation 3).
Combining Equation 2 and Equation 3 gives the desired result.
Problem 24
Define u = u1 + u2 + ….. + uN. By assumption
us <= (us + u)/N Equation 1
Divide the file into N parts, with the ith part having size (ui/u)F. The server transmits the ith part to peer i at rate ri = (ui/u)us. Note that r1 + r2 + ….. + rN = us, so that the aggregate server rate does not exceed the link rate of the server. Also have each peer i forward the bits it receives to each of the N-1 peers at rate ri. The aggregate forwarding rate by peer i is (N-1)ri. We have
(N-1)ri = (N-1)(usui)/u = (us + u)/N Equation 2
Let ri = ui/(N-1) and
rN+1 = (us – u/(N-1))/N
In this distribution scheme, the file is broken into N+1 parts. The server sends bits from the ith part to the ith peer (i = 1, …., N) at rate ri. Each peer i forwards the bits arriving at rate ri to each of the other N-1 peers. Additionally, the server sends bits from the (N+1) st part at rate rN+1 to each of the N peers. The peers do not forward the bits from the (N+1)st part.
The aggregate send rate of the server is
r1+ …. + rN + N rN+1 = u/(N-1) + us – u/(N-1) = us
Thus, the server’s send rate does not exceed its link rate. The aggregate send rate of peer i is
(N-1)ri = ui
Thus, each peer’s send rate does not exceed its link rate.
In this distribution scheme, peer i receives bits at an aggregate rate of
Thus each peer receives the file in NF/(us+u).
(For simplicity, we neglected to specify the size of the file part for i = 1, …., N+1. We now provide that here. Let Δ = (us+u)/N be the distribution time. For i = 1, …, N, the ith file part is Fi = ri Δ bits. The (N+1)st file part is FN+1 = rN+1 Δ bits. It is straightforward to show that F1+ ….. + FN+1 = F.)
The solution to this part is similar to that of 17 (c). We know from section 2.6 that
Combining this with a) and b) gives the desired result.
Problem 25
There are N nodes in the overlay network. There are N(N-1)/2 edges.
Problem 26
Yes. His first claim is possible, as long as there are enough peers staying in the swarm for a long enough time. Bob can always receive data through optimistic unchoking by other peers.
His second claim is also true. He can run a client on each host, let each client “free-ride,” and combine the collected chunks from the different hosts into a single file. He can even write a small scheduling program to make the different hosts ask for different chunks of the file. This is actually a kind of Sybil attack in P2P networks.
Problem 27
Peer 3 learns that peer 5 has just left the system, so Peer 3 asks its first successor (Peer 4) for the identifier of its immediate successor (peer 8). Peer 3 will then make peer 8 its second successor.
Problem 28
Peer 6 would first send peer 15 a message, saying “what will be peer 6’s predecessor and successor?” This message gets forwarded through the DHT until it reaches peer 5, who realizes that it will be 6’s predecessor and that its current successor, peer 8, will become 6’s successor. Next, peer 5 sends this predecessor and successor information back to 6. Peer 6 can now join the DHT by making peer 8 its successor and by notifying peer 5 that it should change its immediate successor to 6.
Problem 29
For each key, we first calculate the distances (using d(k,p)) between itself and all peers, and then store the key in the peer that is closest to the key (that is, with smallest distance value).
Problem 30
Yes, randomly assigning keys to peers does not consider the underlying network at all, so it very likely causes mismatches.
Such mismatches may degrade the search performance. For example, consider a logical path p1 (consisting of only two logical links): ABC, where A and B are neighboring peers, and B and C are neighboring peers. Suppose that there is another logical path p2 from A to C (consisting of 3 logical links): ADEC.
It might be the case that A and B are very far away physically (and separated by many routers), and B and C are very far away physically (and separated by many routers). But it may be the case that A, D, E, and C are all very close physically (and all separated by few routers). In other words, a shorter logical path may correspond to a much longer physical path.
Problem 31
If you run TCPClient first, then the client will attempt to make a TCP connection with a non-existent server process. A TCP connection will not be made.
UDPClient doesn't establish a TCP connection with the server. Thus, everything should work fine if you first run UDPClient, then run UDPServer, and then type some input into the keyboard.
If you use different port numbers, then the client will attempt to establish a TCP connection with the wrong process or a non-existent process. Errors will occur.
Problem 32
In the original program, UDPClient does not specify a port number when it creates the socket. In this case, the code lets the underlying operating system choose a port number. With the additional line, when UDPClient is executed, a UDP socket is created with port number 5432 .
UDPServer needs to know the client port number so that it can send packets back to the correct client socket. Glancing at UDPServer, we see that the client port number is not “hard-wired” into the server code; instead, UDPServer determines the client port number by unraveling the datagram it receives from the client. Thus UDP server will work with any client port number, including 5432. UDPServer therefore does not need to be modified.
Before:
Client socket = x (chosen by OS)
Server socket = 9876
After:
Client socket = 5432
Problem 33
Yes, you can configure many browsers to open multiple simultaneous connections to a Web site. The advantage is that you will you potentially download the file faster. The disadvantage is that you may be hogging the bandwidth, thereby significantly slowing down the downloads of other users who are sharing the same physical links.
Problem 34
For an application such as remote login (telnet and ssh), a byte-stream oriented protocol is very natural since there is no notion of message boundaries in the application. When a user types a character, we simply drop the character into the TCP connection.
In other applications, we may be sending a series of messages that have inherent boundaries between them. For example, when one SMTP mail server sends another SMTP mail server several email messages back to back. Since TCP does not have a mechanism to indicate the boundaries, the application must add the indications itself, so that receiving side of the application can distinguish one message from the next. If each message were instead put into a distinct UDP segment, the receiving end would be able to distinguish the various messages without any indications added by the sending side of the application.
Problem 35
To create a web server, we need to run web server software on a host. Many vendors sell web server software. However, the most popular web server software today is Apache, which is open source and free. Over the years it has been highly optimized by the open-source community.
Problem 36
The key is the infohash, the value is an IP address that currently has the file designated by the infohash.
Chapter 3 Review Questions
Call this protocol Simple Transport Protocol (STP). At the sender side, STP accepts from the sending process a chunk of data not exceeding 1196 bytes, a destination host address, and a destination port number. STP adds a four-byte header to each chunk and puts the port number of the destination process in this header. STP then gives the destination host address and the resulting segment to the network layer. The network layer delivers the segment to STP at the destination host. STP then examines the port number in the segment, extracts the data from the segment, and passes the data to the process identified by the port number.
The segment now has two header fields: a source port field and destination port field. At the sender side, STP accepts a chunk of data not exceeding 1192 bytes, a destination host address, a source port number, and a destination port number. STP creates a segment which contains the application data, source port number, and destination port number. It then gives the segment and the destination host address to the network layer. After receiving the segment, STP at the receiving host gives the application process the application data and the source port number.
No, the transport layer does not have to do anything in the core; the transport layer “lives” in the end systems.
For sending a letter, the family member is required to give the delegate the letter itself, the address of the destination house, and the name of the recipient. The delegate clearly writes the recipient’s name on the top of the letter. The delegate then puts the letter in an envelope and writes the address of the destination house on the envelope. The delegate then gives the letter to the planet’s mail service. At the receiving side, the delegate receives the letter from the mail service, takes the letter out of the envelope, and takes note of the recipient name written at the top of the letter. The delegate then gives the letter to the family member with this name.
No, the mail service does not have to open the envelope; it only examines the address on the envelope.
Source port number y and destination port number x.
An application developer may not want its application to use TCP’s congestion control, which can throttle the application’s sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP’s congestion control. Also, some applications do not need the reliable data transfer provided by TCP.
Since most firewalls are configured to block UDP traffic, using TCP for video and voice traffic lets the traffic though the firewalls.
Yes. The application developer can put reliable data transfer into the application layer protocol. This would require a significant amount of work and debugging, however.
Yes, both segments will be directed to the same socket. For each received segment, at the socket interface, the operating system will provide the process with the IP addresses to determine the origins of the individual segments.
For each persistent connection, the Web server creates a separate “connection socket”. Each connection socket is identified with a four-tuple: (source IP address, source port number, destination IP address, destination port number). When host C receives and IP datagram, it examines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for source IP addresses. Unlike UDP, when the transport layer passes a TCP segment’s payload to the application process, it does not specify the source IP address, as this is implicitly specified by the socket identifier.
Sequence numbers are required for a receiver to find out whether an arriving packet contains new data or is a retransmission.
To handle losses in the channel. If the ACK for a transmitted packet is not received within the duration of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost. Hence, the packet is retransmitted.
A timer would still be necessary in the protocol rdt 3.0. If the round trip time is known then the only advantage will be that, the sender knows for sure that either the packet or the ACK (or NACK) for the packet has been lost, as compared to the real scenario, where the ACK (or NACK) might still be on the way to the sender, after the timer expires. However, to detect the loss, for each packet, a timer of constant duration will still be necessary at the sender.
The packet loss caused a time out after which all the five packets were retransmitted.
Loss of an ACK didn’t trigger any retransmission as Go-Back-N uses cumulative acknowledgements.
The sender was unable to send sixth packet as the send window size is fixed to 5.
When the packet was lost, the received four packets were buffered the receiver. After the timeout, sender retransmitted the lost packet and receiver delivered the buffered packets to application in correct order.
Duplicate ACK was sent by the receiver for the lost ACK.
The sender was unable to send sixth packet as the send win
XMGR RDISK and UIDE are a group of DOS device drivers for a PC system
with an 80386+ CPU and using MS DOS V5 0+ or equivalent
XMGR is a DOS driver which works as an "XMS manager" and provides up to
4 GB of XMS memory XMGR has direct support for V3 70+ UMBPCI by Uwe
Sieber After UMBPCI enables upper memory XMGR loads there and will
provide both upper and XMS memory to a DOS system XMGR uses an "I O
Catcher" with UMBPCI Disk diskette I O above 640K is trapped by XMGR
and done using a low memory area as UMBPCI "Shadow RAM" cannot do DMA
XMGR also runs with JEMM386 or MS DOS EMM386 With EMM drivers XMGR
using its B switch first boots in temporary space When upper memory
gets enabled by the EMM driver XMGR loads there with no B copies all
its boot data and takes over XMS work For a small XMS only system
XMGR can also run entirely in low memory
RDISK is a DOS RAM disk driver It creates a "fast" disk drive using
2 Megabytes to 2 GIGABYTES of XMS memory It loads as a system driver
in CONFIG SYS or it can load later in AUTOEXEC BAT or by user command
DOS can copy critical programs and data to the RAMdisk where they will
be read or written at memory speed If loaded after CONFIG SYS RDISK
files can be assigned to any free DOS drive letter using its : switch
RDISK runs with V2 0 or V3 0 XMS managers 60 MB maximum for V2 0 XMS
It uses only 656 to 752 bytes of upper memory depending on the system
and it can also load in 640K DOS memory RDISK is a simple and small
RAMdisk driver for use when resizing or other features are not needed
UIDE is a DOS "Universal IDE" caching driver It intercepts "Int 13h"
BIOS I O requests and caches data for up to 30 BIOS disks including A:
or B: diskettes and including hard disks of any size UIDE can handle
48 bit LBA or 24 bit CHS I O calls by new or old DOS systems It will
handle up to 10 "Legacy" or "Native PCI" IDE controllers UIDE "calls
the BIOS" for diskettes and intercepts I O for "Int 13h" drivers loaded
first thus UIDE caches ALL drives on a DOS system "ASPI" and other
"non Int 13h" drivers are unsupported UIDE also detects and runs up
to 8 SATA IDE and old "PIO mode" CD DVD drives It can cache CD DVD
data and directories for MUCH greater speed and it will play audio CDs
and handle "raw" trackwriter input audio and "raw" input is uncached
UIDE caches 5 Megabytes to 4 GIGABYTES of data It can set up to four
separate caches of its own "Common" User 1" "User 2" and "CD DVD"
and it also permits caching requests from user drivers to "bring along"
their OWN caches See the UIDE TXT file for full details UIDE uses
4816 bytes of upper DOS memory for 1 to 4 caches of any size All its
data or cache tables use XMS memory A "stand alone" UIDE B switch
no cache or diskettes can be used in test or diagnostic work and takes
3664 bytes of upper DOS memory If its N2 switch is given UIDE will
omit all CD DVD logic saving 1744 bytes Its "CD DVD" cache can then
become a 3rd user driver cache if needed UIDE"s H switch will load
most of the driver into "free HMA" thus using only 928 bytes of memory
832 "stand alone"
The small UHDD and UDVD2 drivers are also available for those who want
only non caching drivers or a smaller size driver set for use on "boot"
diskettes etc UHDD can cache 26 SATA IDE disks of any size on up to
10 controllers A: or B: diskettes included It now has all four UIDE
caches takes 3280 bytes for caching and it can set a 1408 byte "stand
alone" driver no cache with its B switch UHDD can put most of its
code in HMA space with its H switch taking only 832 bytes 640 "stand
alone" UDVD2 handles up to 6 SATA IDE or old PIO mode CD DVD drives
it tests up to 10 controllers on loading and takes 2000 bytes or 144
with its H switch Caching by UHDD adds 96 bytes and UDVD2 "shares"
UHDD"s I O buffer in XMS for input unsuited to UltraDMA If UHDD is
not used UDVD2 will take 128K of XMS as its buffer or it handles such
input in PIO mode if XMS is not available UHDD + UDVD2 require only
10K of disk file space and provide most UIDE features
The small RDISKON COM program can "re enable" a DOS drive used by RDISK
if a "format" command is accidentally issued to it This disables the
drive on some systems Entering RDISKON L at a DOS command prompt
where L is the desired drive letter A to Z will re enable the drive
The small CC COM "Clear Cache" program can help verify files written by
UIDE Entering CC at the DOS command prompt sends a BIOS "reset" to
all disks making UIDE flush its "Common" cache Data from the disk
NOT data still in cache can then be compared to the original output
2 NO Warranties
XMGR RDISK and UIDE are offered at no cost "as is" "use at your own
risk" and with NO warranties not even the implied warranty of FITNESS
for any particular purpose nor of MERCHANTABILITY
Driver questions and comments may be addressed to the E Mail of Johnson
Lam <johnsonlam hk@gmail com>
3 Revision Summary
19 Oct 14 UHDD now "overlaps" cache work during UltraDMA disk output
and the disk sector "gap" at I O end for greater speed
UHDD M switch deleted 256 byte binary search buffer is
now permanent Other drivers unchanged re dated only
27 Sep 14 UHDD now sets all 4 UIDE caches New UHDD M switch sets
a 512 byte binary search buffer for more speed
26 Jan 14 UIDE error handling CD DVD media changes for "stand alone"
mode is fixed UHDD offers "Common" & "CD DVD" caches
12 Jan 14 UIDE UD switch deleted many problems UIDE now offers
"User 1" and "User 2" caches "Stand alone" UHDD UDVD2
re added for use as needed
12 Dec 13 UHDD UDVD2 deleted low use UIDE N2 dismisses CD DVD
logic UIDE C switch added user caching improved
21 Nov 13 UHDD old style "stand alone" driver re added
14 Nov 13 UHDD UDVD2 "private" caches deleted unneeded and unused
25 Sep 13 BAD error fixed in UDVD2 re: locating UHDD MANY Thanks
to Japheth for his tests and exact analysis
9 Sep 13 Possible but unlikely UHDD exit errors corrected UDVD2
UIDE now use all 32 CD DVD LBA bits in caching calls
2 Sep 13 Possible UDVD2 "media change" error fixed UHDD N1 size
reduced
26 Aug 13 UHDD now has its "Common" cache and handles "private" user
driver caches UDVD2 etc can now set a private cache
28 Jul 13 UHDD UIDE binary search buffer and F switch deleted
30 Apr 13 UHDD UDVD2 can now run without XMS lower speed for tests
and FreeDOS "scripts" UDVD2 can now do "raw" input
15 Oct 12 UHDD UIDE again detect A: and B: diskettes from BIOS data
NOT from "Int 13h" calls that FAIL with an LS 120 drive
2 Aug 12 UHDD "disk only" caching driver added UDVD2 caches CD
DVD data if UHDD is also loaded UIDEJR deleted New
UD switch in UDVD2 UIDE for CD DVD directory caching
9 Jul 12 UIDE UIDEJR device select error for master + slave CD DVD
units on one IDE channel is corrected Many Thanks to
Doug Beneway for finding this error
25 Jun 12 UIDE2 deleted: Not enough added speed complex to use
17 Jun 12 UIDE UIDE2 UIDEJR A switch init of 2 "Old IDE" channels
and CD audio "Q" status data corrected Many Thanks to
Japheth for his research and audio test program
29 May 12 UIDE and UIDE2 check for diskettes via Int 13h avoid DPTE
tests if no PCI BIOS let the BIOS do I O for disks with
bad DPTE data all re: VirtualBox BUGS
24 Feb 12 UIDE UIDE2 "64K DMA boundary error" fixed may affect only
year 2000 chips or older
16 Oct 11 UIDE M switch deleted search buffer is always 512 bytes
UIDE SYS back to 7 5K UIDE S dropped UIDE2 improved
7 Oct 11 All UIDE drivers updated to avoid BIOS "DPTE" ERRORS: Bad
DPTE data for USB sticks Many Thanks to Daniel Nice
9 Sep 11 UIDE2 re added UIDE S and UIDE2 handle 6 CD DVD drives
22 Jul 11 UIDE E switch added for DOS emulators VirtualBox etc
20 May 11 UIDE S "short" UIDE added for systems with limited HMA
25 Apr 11 BAD "code mods" init error corrected for UIDE UIDEJR and
RDISK XMGR not affected
5 Dec 10 UIDE UIDEJR R15 and R63 switches added to handle old DOS
"games" Thanks Guillermo Grana Gomez
28 Nov 10 Minor updates: UIDEJR audio track number error corrected
XMGR faster in protected mode Added XMGR and UIDE Z
15 Aug 10 UIDE audio track number error corrected Thanks Nagatoshi
Uehara
10 Aug 10 UIDE binary search buffer added Using $ in CD DVD names
fixed in UIDE UIDEJR Thanks Japheth
4 Jul 10 README file update XMGR UIDE can use "Native IDE" mode
same as "Legacy" "Compatibility" for AHCI mainboards
28 Jun 10 XMGR updated for AHCI see the README sec 7 for details
10 Jun 10 UIDE now ignores "removable HARD disks" size reduced
16 Nov 09 UIDE now caches 4 GIGABYTES of data
6 Oct 09 UIDE and UIDEJR H requests HMA use "at the user"s risk"
2 Sep 09 README file updated FreeDOS users who desire full upper
memory must omit UMBPCI and load JEMM386 JEMMEX only
23 Jun 09 RDISK now a COM file RDISK : switch RDISKON program
added Corrected UIDE CD DVD handling of VDS errors
9 Jun 09 UIDE UIDEJR N3 switch added for no XMS memory Override
of D: name by UIDE$ UIDEJR$ added for no CD DVD drives
15 May 09 Added RDISK
6 May 09 Added UIDEJR
1 May 09 Fixed XMGR "Port 92h" logic error Added XMGR PA and PN
switches to control use of "Port 92h"
25 Apr 09 XMGR UIDE license and FreeDOS prohibition deleted drivers
and sources are again available to all
4 Switch Options
XMGR usually needs only its B switch if "booting" with an EMM driver
All XMGR switch options are as follows:
B Specifies "boot" mode XMGR loads in temporary memory until
upper memory is enabled Without B XMGR loads stand
alone in low memory or direct to upper memory with UMBPCI
See the CONFIG SYS examples in section 5
Mn Specifies a temporary area for loading XMGR in "boot" mode or
for UMBPCI upper memory I O before DOS posts a "workspace"
buffer Values are:
M1 64K M3 192K M5 320K M7 448K
M2 128K M4 256K M6 384K M8 512K
Without M M5 is assumed and the 320K area will be used
NOTE: DOS systems may NOT load at address 0 and may leave
temporary data anywhere in memory Mn helps to find a
"safe" area for XMGR to use M is ignored if XMGR loads
stand alone
Nnn Specifies how many XMS "Handles" can be used by DOS programs
The value nn may be 48 80 or 128 If N is omitted 48
"Handles" are used A big system doing much XMS work may
need 80 or 128 "Handles"
PA Specifies use or non use of PS 2 Port 92h logic to handle the
PN system"s "A20" line PA indicates "Always" use Port 92h
logic PN indicates "Never" use it and handle "A20" via
normal keyboard port logic If P is omitted XMGR "asks
the BIOS" if the system has Port 92h logic If not XMGR
will use normal "A20" logic NOTE: If "A20" was enabled
by DOS before XMGR loads XMGR does not handle it at all
Tn Specifies the BIOS requests to use in getting extended memory
as follows:
T0 No "E820h" nor "E801h" requests
T1 Memory list requests only Int 15h AX E820h
T2 A dual area request only Int 15h AX E801h
T3 "E820h" requests first then an "E801h" request
T can usually be omitted causing T3 to be assumed In
addition XMGR always uses an old 64 MB request to get T0
memory or if the requests denoted by T1 thru T3 are not
successful Users may need to test T1 or T2 separately
to see if their BIOS takes them A pre 1994 BIOS may not
ignore T1 thru T3 correctly and may require T0 instead
For old "QHIMEM" users T4 thru T7 may still be used and
work the same as T0 thru T3
W Specifies use of the DOS "workspace" buffer for upper memory
I O if loading with UMBPCI If W is omitted or if the
DOS system does not have proper workspace logic XMGR sets
its own buffer in low memory With PC DOS or EDR DOS W
must be omitted Without UMBPCI W is ignored
Z See Z for UIDE below
RDISK uses only S size and : drive letter switches:
Sn Specifies a desired RAM disk size in megabytes of XMS memory
Values may be any number from 2 to 2047 S1024 or more
creates a 1 to 2 GIGABYTE RAM disk If S is omitted or
invalid a 25 MB RAM disk is created by default For old
V2 0 XMS managers ROM DOS etc only S2 through S60 may
be used See section 5 below for more details
:L Specifies the DOS drive letter desired to access RDISK files
L may be any available drive letter from A to Z e g :N
assigns drive N: to all RDISK files If the drive letter
is too high or already in use RDISK will abort and users
may need "LASTDRIVE " in CONFIG SYS to set up more drives
If RDISK is loaded by CONFIG SYS or if : is omitted the
next free drive letter will be used
UIDE usually needs only a H switch to use HMA space and a S switch to
specify its cache size All UIDE switches are as follows:
A Specifies ALTERNATE addressing for "legacy IDE" controllers
The first legacy controller uses 01E8h 0168h addresses and
a second if present uses 01F0h 0170h addresses A is
only for "odd" mainboards with REVERSED addressing for the
two legacy IDE controllers Without A the first legacy
controller uses 01F0h 0170H and a second uses 01E8h 0168h
as is normal for most PC mainboards
B Requests a "basic" UltraDMA driver for disks and CDs DVDs no
caching or diskette handling This may help for tests or
diagnostics The B driver can request 128K of XMS as an
UltraDMA I O buffer and it can load in the HMA The N2
switch can be given with B to "dismiss" all CD DVD logic
Cnn Sets a separate "CD DVD" cache for higher CD DVD performance
Values for nn are the same as for the S switch and permit
up to 4 GB caches The "CD DVD" cache can be used by any
user driver devices on systems with no SATA or IDE CD DVD
drives If C is omitted data for requests addressed to
the "CD DVD" cache shall go into UIDE"s "Common" cache
D: Specifies the "device name" used by the CD DVD Redirector to
access CD DVD drives For example: D:CDROM1 D:SANYO1
etc If D: is not given or the name following a D: is
missing invalid UDVD1 is set by default If no CD DVD
drives were found UIDE$ overrides any D: name for use
with FreeDOS autoloader scripts
E Makes the driver call the BIOS for any hard disk I O request
E avoids setup trouble on some DOS emulators VirtualBox
etc that do not emulate all PC hardware logic E also
allows using hard disks on 1994 or older PCs which have no
PCI EDD BIOS E still caches disk data unlike N1 that
removes ALL disk support If B is given E is ignored
Use of E on protected mode systems JEMM386 etc may run
VERY slow Many BIOS programs omit DOS "VDS" support for
hard disks and in protected mode they must do "PIO mode"
transfers not UltraDMA If E is required a PC should
be run in real mode UMBPCI etc whenever possible
H Loads most of the driver in "free HMA" space UIDE will use
only 928 bytes of upper DOS memory 832 when B is given
H must not be used with ROM DOS which has no HMA
MS DOS kernels have ERRORS in posting free HMA space which
can give CRASHES Specifying H is "At the user"s risk"
No such crashes are noted with other DOS systems also HMA
usage by UIDE is under 4K bytes Users should still test
a PC system before H is given for any serious tasks with
these drivers
N1 Requests NO hard disk handling by the driver
N2 Requests NO CD DVD handling by the driver N2 will dismiss
all CD DVD routines and save 1744 bytes
N3 Requests no XMS memory N3 sets UIDE"s B "basic" driver
N3 requires loading in low memory or UIDE aborts N3
can LOSE much speed as misaligned or other I O not suited
to UltraDMA requires "calling the BIOS" for disks or using
"PIO mode" for CD DVD drives
N4 See Z below
Q Awaits a "data request" before doing UltraDMA disk transfers
Q is for "old" systems and may be used only if the driver
loads O K but seems unable to transfer data Q must be
OMITTED with SATA to IDE adapters from Sabrent and others
since they may not emulate "data request" from SATA disks
Q does not affect CD DVD drives
R15 Sets the driver"s XMS memory at 16 or 64 MB R15 reserves
R63 15 MB of XMS and R63 reserves 63 MB of XMS for DOS game
programs that require XMS memory below 16 or 64 MB The
drivers must be able to reserve this memory reserve their
own XMS above that and "free" the 15 63 MB XMS If not
the drivers display "XMS init error" and abort R15 or
R63 need the drivers to load after the XMS manager XMGR
HIMEMX etc so another driver cannot take any XMS first
and the reserved XMS is just beyond the HMA See section
7 below for further details
Snn Specifies the desired "Common" cache size in megabytes of XMS
memory UIDE"s "Common" cache holds data for hard disks
diskettes and CD DVD drives when C above is not given
Values for S can be 5 15 25 40 50 or any number from
80 to 4093 S1024 and up sets a 1 to 4 GIGABYTE cache
Suggested S values are
Below 128 MB memory: Use S5 S15 S25 or S40
With 128 MB memory: Use S25 S40 S50 or S80
With 256 MB memory: Use S80 up to S127
With 512 MB memory: Use S160 up to S255
With 1 GB memory: Use S320 up to S511
With 2 GB memory: Use S640 up to S1023
With 4 GB memory: Use S1280 up to S3072
Small systems may prefer S25 or S50 which set 1600 cache
blocks and are more efficient If S is omitted invalid
an 80 MB cache is set Except for 25 or 50 values below
80 are cut to 40 15 or 5 MB The drivers display "XMS
init error" and abort when not enough XMS memory is free
If so a smaller cache must be requested For older V2 0
XMS managers ROM DOS etc only S5 to S50 may be used
UX Disables all CD DVD UltraDMA even for drives that can do it
"PIO mode" then handles all CD DVD I O Except for a few
unusual drives by Sony etc which do not follow all ATAPI
"rules" UX is rarely needed UX does not affect hard
disks
Xnn Sets a separate "User 1" cache for user drivers Values for
nn are the same as for S above If X is omitted data
for requests addressed to the "User 1" cache shall go into
UIDE"s "Common" cache
Ynn Sets a separate "User 2" cache for user drivers Values for
nn are the same as for S above If Y is omitted data
for requests addressed to the "User 2" cache shall go into
UIDE"s "Common" cache
Z For XMGR UIDE UHDD limits XMS moves to 2K byte sections not
64K when in protected mode Z is unneeded for JEMM386
JEMMEX MS DOS EMM386 or real mode UMBPCI If other EMM
VCPI or DPMI drivers are used systems must be tested to
see if Z is required BAD schemes that allow not enough
interrupts during XMS moves can still be in use UIDE"s
old N4 switch works the same and can still be used The
"stand alone" UHDD ignores N4 or Z and will call the XMS
manager to do its XMS moves
UHDD usually needs only a H switch to load in HMA space also C S X
or Y switches to specify cache sizes A summary of all UHDD switches
is as follows:
A Sets ALTERNATE addressing for "Legacy" IDE controllers same
as UIDE A above Rarely necessary
B Requests a 1408 byte "stand alone" driver no caching same
as UIDE B above
Cnn Sets a "CD DVD" cache size for UDVD2 use same values as for
UIDE S above If C is omitted or invalid CD DVD data
will go in UHDD"s "Common" cache
E Makes the driver "call the BIOS" for hard disk I O requests
same as UIDE E above E dismisses UltraDMA disk logic
and saves 496 bytes
H Loads all but 832 bytes of the driver 640 with B into HMA
space See the note for UIDE H above
Q Awaits "data request" before beginning UltraDMA I O with old
controllers same as UIDE Q above Rarely necessary
R15 Reserves 15 MB or 63 MB of XMS for old DOS "game" programs
R63 same as UIDE R above Rarely necessary
Snn Sets a "Common" cache size same values as UIDE S above
Xnn Sets the "User 1" cache size same values for UIDE S above
If X is omitted invalid "User 1" data will go in UHDD"s
"Common" cache
Ynn Sets the "User 2" cache size same values for UIDE S above
If Y is omitted invalid "User 2" data will go in UHDD"s
"Common" cache
Z See Z above
UDVD2 normally needs only a H switch to use HMA space and a D: switch
to specify a driver "device name" A summary of all UDVD2 switches is
as follows:
A Sets ALTERNATE addressing for "Legacy" IDE controllers same
as UIDE A above Rarely necessary
D: Sets a "device name" used by the CD DVD Redirector to access
CD DVD drives same as UIDE D: above
H Puts all but 144 bytes of the driver in HMA space See the
note for UIDE H above
Rnn Reserves 15 MB or 63 MB of XMS for old DOS "game" programs
same as UIDE R above Rarely necessary
UX Disables CD DVD UltraDMA same as UIDE UX above Rarely
necessary
For all switches in each driver a dash may replace the slash and lower
case letters may be used if desired
5 Setup and Configuration
XMGR RDISK and UIDE are all loaded using the CONFIG SYS file Your
CONFIG SYS should have command lines similar to the following examples:
DEVICE C: DOSDVRS XMGR SYS N128 B
DEVICEHIGH C: DRIVERS RDISK COM S500
DEVICEHIGH C: SYSTEM UIDE SYS D:TOSHIBA1 S511 H
DEVICEHIGH C: USERDVRS UHDD SYS S500 C80 H
DEVICEHIGH C: MYDVRS UDVD2 SYS D:BLURAY1 H
Note that "Int 13h" BIOS drivers must be loaded first so UIDE UHDD can
intercept and cache their DOS Int 13h calls Also note that any user
drivers that call UIDE to do caching must be loaded after UIDE so they
will "find" UIDE in memory and can "link" to it This also applies if
UHDD followed by UDVD2 are used in place of UIDE See the CONFIG SYS
examples below
With V3 70+ UMBPCI and XMGR a "boot" procedure is not needed UMBPCI
loads first to enable upper memory then XMGR loads to offer it and XMS
to DOS then other drivers may load For V6 22 V7 10 MS DOS JEMM386
can also be loaded to offer extra upper memory in the "video graphics"
areas or if other JEMM386 features are desired
NOTE: FreeDOS and some other DOS variants will NOT "add up" the memory
found by both UMBPCI and JEMM386 like MS DOS does FreeDOS users who
want extra upper memory or other items must omit UMBPCI and load JEMMEX
or HIMEMX JEMM386 per their instructions or load XMGR JEMM386 as shown
in the 3rd example below
An example CONFIG SYS file using V3 70+ UMBPCI and XMGR is as follows:
SHELL C: DOS COMMAND COM C: DOS E:512 P
DEVICE C: BIN UMBPCI SYS
DEVICE C: BIN XMGR SYS W
DOS HIGH UMB
DEVICE C: BIN JEMM386 EXE I B000 B7FF X C800 EFFF NOEMS ;Optional
Int 13h drivers cached by UIDE load now
DEVICEHIGH C: BIN UIDE SYS D:CDROM1 S511 C250 H ;Or UHDD plus
; UDVD2 here
User drivers that call UIDE load now
DEVICEHIGH C: BIN RDISK COM S250 ;Optional
XMGR can be used "stand alone" on a small XMS only system It must be
the first DOS system driver to load and it must load in LOW memory as
in the following example:
SHELL C: DOS COMMAND COM C: DOS E:512 P
DEVICE C: BIN XMGR SYS
DOS HIGH
Int 13h drivers cached by UHDD load now
DEVICE C: BIN UHDD SYS S80 C15 ;Or UIDE in place
DEVICE C: BIN UDVD2 SYS ; of UHDD + UDVD2
User drivers that call UHDD load now
DEVICE C: BIN RDISK COM S20 ;Optional
With JEMM386 and XMGR XMGR loads first in "boot" mode then JEMM386
and then XMGR finally loads in upper memory JEMMEX can also be used
and if so XMGR can be omitted An example CONFIG SYS file which uses
the XMGR "boot" procedure is shown below Note that in this example
UIDE sets a 2 GIGABYTE disk cache plus a 700 Megabyte CD DVD cache
SHELL C: DOS COMMAND COM C: DOS E:512 P
DEVICE C: BIN XMGR SYS B ; B for "boot"
DOS HIGH UMB
DEVICE C: DOS JEMM386 EXE I B000 B7FF NOEMS ;Or JEMMEX here
DEVICEHIGH C: BIN XMGR SYS ;No "boot" here
Int 13h drivers cached by UIDE load now
DEVICEHIGH C: BIN UIDE SYS D:MYDVD S2047 C700 H ;Or UHDD plus
; UDVD2 here
User drivers that call UIDE load now
DEVICEHIGH C: BIN RDISK COM S500 ;Optional
After the above drivers are loaded further CONFIG SYS drivers SETVER
ANSI SYS etc can then load in any desired order
When a specific RDISK drive letter is required RDISK can now be loaded
by AUTOEXEC BAT and its : switch can specify any "free" drive letter
e g :Q assigns drive Q: for RDISK files Whenever RDISK is used
AUTOEXEC BAT should also include commands which copy all RDISK programs
and data up to the RAM disk This is required each time DOS loads as
XMS memory is LOST when a system shuts down Such copies usually take
little time
If RDISK and UIDE UHDD are used users must balance how much XMS memory
the drivers use RDISK must take no more XMS than its files may need
UIDE UHDD can take most remaining XMS for its caches Some XMS memory
must be saved for other programs needing it As an example on a 4 GB
system RDISK might use 500 MB UIDE UHDD might use 3 GB and 500 MB is
free for other programs These values can be adjusted so RDISK holds
programs and "fast" data files while UIDE UHDD cache "ordinary" files
Properly balanced use of XMS will give a VERY high speed DOS system
Please be sure to set each hard disk"s geometry correctly in your BIOS
Set it to "Auto" "LBA" or "LBA Assisted" but NOT to "None" "Normal"
"CHS" "ECHS" "User Cylinders Heads Sectors" "Revised ECHS" or "Bit
Shift" should run but are NOT preferred If a BIOS has a setting like
"UltraDMA" or "UDMA Capable" for a disk enable it
"Laptop" power saving items like a "drive spin down timeout" should run
O K but must be TESTED before use All these drivers allow 7 seconds
for a disk or CD DVD drive to spin up after being idle More DRASTIC
power saving items like a "drive SHUTDOWN timeout" may require "extra"
logic to restart the drive should be DISABLED or driver I O requests
may time out
Also be sure to use an 80 connector cable for any UltraDMA drive using
"mode 3" ATA 44 44 MB sec or higher When cabling a single drive to
an IDE channel note that you MUST use both "ends" of the cable NOT an
"end" and the middle connector This prevents ERRORS since an unused
cable end can pick up "noise" like a RADIO antenna
Be sure to enable all CD DVD drive s through the BIOS set up routines
A drive that is "disabled" may cause the BIOS to clear all its UltraDMA
flags and force the drive into "PIO mode" zero which is terribly SLOW
6 Error Reporting
XMGR and UIDE UHDD UDVD2 will return normal XMS and CD DVD error codes
as needed They are listed in the "V3 0 XMS Specification" and in the
Microsoft "MS DOS CD ROM Extensions 2 1" document Both are available
from Microsoft or from other Internet sources
UIDE and UHDD work as "BIOS drivers" and return whichever codes are set
for diskettes and hard disks handled by the BIOS For their SATA and
IDE hard disks UIDE UHDD can post the following error codes:
Code 0Fh DMA error CCh Disk is FAULTED
20h Controller busy E0h Hard I O error
AAh Disk not ready FFh XMS memory error
Many DOS programs display only "Disk Error" messages with NO code thus
disk errors may require running a diagnostic to get better information
7 Technical Notes
In all of the following notes "UIDE" also applies to UHDD or UDVD2 as
necessary
The JEMMEX or JEMM386 drivers are now recommended for use with UIDE if
using a DOS system that needs their extra upper memory DPMI VCPI logic
etc Other EMM drivers are essentially "abandoned" some with never
corrected ERRORS and they should NOT be used
The "VirtualBox" emulator as of 15 Oct 2012 does not set a "change line
available" bit in BIOS byte 0:48Fh for A: and B: diskettes UIDE will
IGNORE diskette drives without a "change line" normally 1985 or older
as they cannot declare "media changes" i e a NEW diskette was loaded
Until "VirtualBox" gets corrected UIDE will NOT run A: or B: diskettes
in such an environment
UIDE"s R15 or R63 switches DOS "game" programs are for a real mode
system using UMBPCI and XMGR Game players like real mode as it gives
more speed If protected mode JEMM386 EMM386 is desired UIDE using
a R switch must load prior to the "EMM" driver so the XMS reserved by
UIDE is just beyond the HMA If using UMBPCI XMGR UIDE and then an
EMM driver this works fine But FreeDOS users and others whose DOS
systems permit only one XMS provider i e UMBPCI cannot be used must
load XMGR HIMEMX first UIDE second into low memory upper memory isn"t
yet enabled then JEMM386 EMM386 last Using JEMMEX with UIDE and a
R switch is unrecommended JEMMEX must load first and takes some XMS
itself which pushes the reserved XMS above its intended 16 64 MB area
and a few DOS "games" programs may CRASH
UIDE shall NOT include any huge AHCI logic and will run hard disks in
"Legacy" "Compatibility" "Native IDE" mode when using AHCI controllers
If a "new" AHCI BIOS has no such settings UIDE with a E switch should
be able to call the BIOS and use its logic to handle AHCI disks NOTE
that much "DOS driver" code is now being omitted in AHCI BIOS programs
Thus UIDE should be TESTED before normal use with an AHCI mainboard
Also note that CD DVD drives are not supported by an AHCI BIOS for file
I O only for "boot" CDs On a system whose AHCI chips can be set for
"Legacy" "Compatibility" "Native IDE" mode CD DVD drives should be run
from AHCI ports using such modes On mainboards with no such settings
UIDE can run CD DVD drives only on the parallel IDE port 80 pin cable
or IDE capable "add on" cards from Promise etc that UIDE can "detect"
using normal PCI bus logic
UIDE handles only "Legacy" or "Native PCI" IDE controllers RAID only
chipsets Via VT6420 etc "port multiplier" chips and ADMA chipsets
are not currently supported AHCI is supported only through "Legacy"
"Compatiblity" or "Native IDE" controller settings or by UIDE "calling
the BIOS" as noted above To use UIDE a mainboard BIOS must set SATA
and IDE controllers to some form of "IDE" mode not RAID ADMA AHCI for
best speed If no "Legacy" "Compatibility" "Native IDE" BIOS setting
for disk controllers is provided a Sabrent converter card or similar
will let UIDE handle SATA hard disks or CD DVD drives from the parallel
port IDE controller channel using full UltraDMA speeds
Except if necessary for AHCI it is NOT RECOMMENDED for UIDE to run any
DOS disk using only the BIOS Many BIOS programs have no DOS "Virtual
DMA" logic If so when an EMM driver JEMM386 etc enables its "V86
protected mode" the BIOS can do only PIO mode transfers and LOSES much
speed If needed get SATA to IDE adapters for SATA disks as above
or get "Int 13h" disk drivers for SCSI or other disk models UIDE can
then handle such disks at full DMA speeds
XMGR loads in UMBPCI upper memory BEFORE that memory is declared to the
DOS system Memory displays using UMBPCI may not list XMGR since its
memory is not part of the DOS memory lists Such memory displays will
begin with a block having a 00A7h offset or greater if using 80 or 128
XMS "Handles" The upper memory skipped by this offset contains XMGR
The UMBPCI upper memory manager uses system "Shadow RAM" that CANNOT do
DMA Newer BIOS programs may use UltraDMA to load programs into upper
memory If this is UMBPCI "Shadow RAM" a CRASH will occur To stop
this and handle new BIOS programs users should follow these two RULES
for running UMBPCI together with XMGR and UIDE UHDD:
A The loading "order" for V3 70+ UMBPCI and XMGR shown in section 5
above MUST be used This lets the XMGR "I O Catcher" intercept
and process upper memory disk I O until UIDE UHDD loads and takes
over disk UltraDMA Old UMBPCI versions or other UMBPCI loading
schemes are NOT recommended
B When CHS I O is done MS DOS V6 22 or older every disk MUST have
valid CHS parameters Otherwise UIDE UHDD and the "I O Catcher"
let the BIOS deal with CHS I O If BIOS UltraDMA is not disabled
a similar "Shadow RAM" CRASH will occur
Some "CD ROM boot" programs handle the CD DVD as a "fake" hard disk and
provide incorrect EDD BIOS data for it In scanning for disks to use
UIDE may display "EDD BIOS error Unit ignored " then go on searching
for more UltraDMA disks Users who did NOT "boot" from CD DVD need to
see which disk was passed over and why Users who DID "boot" from CD
DVD where all SATA UltraDMA disks were found may IGNORE this message
It is caused by an ERROR in the "CD ROM boot" program NOT by a problem
with UIDE or its SATA UltraDMA disks
Some BIOS programs do not "configure" a mainboard controller if no user
drives are on it An unconfigured controller causes UIDE to display
"BAD controller" then it goes on looking for others to use If this
message is displayed users should verify that each SATA UltraDMA drive
was made "active" thru the BIOS set up logic If so "BAD controller"
says a chip was not set to both "Bus Master" and "I O Space" modes and
the BIOS should be UPDATED ">XMGR RDISK and UIDE DOS Device Drivers
1 Description
XMGR RDISK and UIDE are a group of DOS device drivers for a PC system
with an 80386+ CPU and using MS DOS V5 0+ or equivalent
XMGR is a DOS driver w [更多]
解决 fastjson 泛型报错 : java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to X
22950