2013年5月30日 星期四

關於bluetooth active connection

How many ACTIVE bluetooth connections can the iPhone 4 support at one time?

       Am wondering just how many ACTIVE connections my iPhone 4 can support at one time?  I've got my iPhone paired via bluetooth to my car radio...alllowing to answer calls handsfree, as well as listen to my music through the radio.  I'm thinking about purchasing the iPhone radar detector, made by Cobra, which will also utilize a live bluetooth connection.  Is iPhone limited to only one live connection at a time, or can I have more?


Pretty sure bluetooth protocol itself is limited to one active connection by design.  So not a limitation of iPhone but the protocol.

2013年5月28日 星期二

關於 android envsetup.sh的使用注意事項

envsetup.sh用來協助設定android的編譯環境。使用該script一定要在android/目錄之下:

user:productXXX/android$  source build/envsetup.sh
( 列出類似以下訊息代表envsetup.sh執行成功,否則失敗)
including  device/magiclab/xxx/vendorsetup.sh
including  device/magiclab/yyy/vendorsetup.sh
  ...
user:productXXX/androidlunch
(如果不在android/目錄下執行lunch指令,在選擇編譯設定後,會出現"Couldn't locate the top of the tree. Try setting Top."錯誤)
        1.  full-eng
        2.  full_x86-eng
        ...

2013年5月20日 星期一

telnet tera term設定

1.Windows XP端先安裝adb usb driver,adb driver需要
   root權限,android要編譯成engineer版。

2.連接Windows XP端至android tablet,並且正確辨識。
   1.第一次插入USB線時顯示提示"新硬體安裝時出現問題",
     拔出USB線再插一次未出現提示,就可以使用了,不解...

   2.第一次插入USB線時顯示提示"新硬體安裝時出現問題",
     到裝置管理員,選擇MTP右鍵"更新驅動程式",選擇"從
     清單或特定位置安裝" > "不要搜尋,我將選擇要安裝的
     驅動程式,選擇Android Adb interface安裝。也可以解決
     問題。

3.在system/core/rootdir/init.rc中加入telnet開機啟動
   service telnetd /system/xbin/telnetd  -l  /system/bin/sh
           class core
           oneshot


4.執行cmd到adb的目錄中執行adb  forward  tcp:65432  tcp:23

5.執行tera term,Host=127.0.0.1 ,  Service:telnet,  tcp  port# 23
   然後按"OK"。

2013年5月8日 星期三

Ubuntu gnome與terminal混用小小發現


指令:
gnome-open [directory]
用途:
可以直接在terminal模式下以圖形介面資料夾打開路徑為[directory]的資料夾

指令:
gnome-search-tool --start --named=[搜尋的字串]
用途:
可以在圖形介面直接搜尋[搜尋的字串]的檔案

2013年5月7日 星期二

安裝PyBluez

[Unbuntu]
1.先裝bluez
sudo  apt-get  install  bluez
2.裝python
sudo  apt-get  install  python
3.裝python開發套件  python-dev :不然編譯會出現"Python.h : no such file or directory
sudo  apt-get  install  python-dev
4.裝Bluez開發函式庫  libbluetooth-dev :不然編譯會出現"bluez/btmodule.h.h: fatal error: bluetooth/bluetooth.h: No such file or directory,另外,gcc編譯時-lbluetooth也需要該函式庫
sudo  apt-get  install  libbluetooth-dev
5.裝PyBluez
python setup.py install


[Windows]
1.裝PyBluez: 有對應windows平台的python .msi安裝檔可以下載使用 
2.python-dev已經整合在.msi安裝檔裡面
    "The concept of "python-dev package" is a Debian concept which doesn't
        apply to Windows. The standard installation on Windows provides the
        header and library files that you need for interfacing with C.

        Don't put things where your C compiler can find them; do a standard
        no-frills install of Python2.4 using the .msi installer and tell your C
        compiler where the goodies are.

        E.g. using the MinGW32 gcc, you'd need things like:

        gcc -I\python24\include -lpython24 -L\python24\libs
        [first is "i".upper(), second is "L".lower()]


 

2013年5月2日 星期四

sdptool browse local

sdptool browse local可以查詢本地bluetooth支援的服務


sdptool browse local   (O)
sdptool browse hci0    (X) Failed to connect to SDP server on 00:00:00:00:00:00: Host is down
sdptool browse [hci0 bd addr]   (X) Failed to connect to SDP server on [hci0 bd addr]: No route to host

sdptool get hci0和sdptool get local倒是可以通用。

am start

http://stackoverflow.com/questions/5494764/how-to-run-a-specific-android-app-using-terminal

android activity啟動