Bluetooth_MIT_AI

Bluetooth_MIT_AI Free App

Rated 2.50/5 (2) —  Free Android application by vivo

About Bluetooth_MIT_AI

◆アプリ名: Bluetooth_MIT_AI (十二星座シリーズ / 開発コード名: Capricon)

Bluetooh通信をしたい場合、MIT App Inventor ではBluetoothClient(※1)または、BluetoothServer(※2)を使用します。
無論、Bluetoohクライアントとして機能させたい場合はBluetoothClientを、Bluetoohサーバとして機能させたい場合はBluetoothServerを使用します。

今回は、BluetoothClient/BluetoothServerを利用し、Android端末間通信アプリを製造してみました。
具体的には、BluetoothクライアントかBluetoothサーバを選択し、事前にBluetoohペアリング処理をしたAndroid端末間でBluetoohコネクションを確立し、テキスト、1バイト数字、2バイト数字、4バイト数字を送受信します。
なお、Bluetoothのデータ受信にはイベント発生がありません。
従い、Clockを利用して定期的に受信データがないかチェックする等、工夫が必要です。

本アプリは内蔵メモリではなく、SDカードにインストールされます。また、本アプリは、MIT App Inventor V1.34(※3)で製造し、AppToMarket V3.2(※4)でリビルドしたノンコーディングなものです。


※1 BluetoothClientとは、文字通りBluetoothクライアントとして機能させたい場合に使用するMIT App Inventor Other Componentsの一つです。
詳細は、公式HP(http://appinventor.mit.edu/explore/content/other.html#BluetoothClient)をご参照下さい。

※2 BluetoothServerとは、文字通りBluetoothサーバとして機能させたい場合に使用するMIT App Inventor Other Componentsの一つです。
詳細は、公式HP(http://appinventor.mit.edu/explore/content/other.html#BluetoothServer)をご参照下さい。

※4 MIT App Inventor V1.34
http://appinventor.mit.edu/

※5 AppToMarketV3.2
https://code.google.com/p/apptomarket/


【ご提供サービス】
★前提条件
(1) Bluetoothクライアントとして動作させるデバイスと、Bluetoothサーバとして動作させる端末、2台のAndroid端末が必要です。また、それら2台のAndroid端末に本アプリをインストールしておく必要があります。

(2) 通信したいAndroid端末をペアリングする必要があります。

(3) 本アプリを起動する前に、通信したい端末2台のBluetooth機能をONにして下さい。


★ご提供サービス
BluetoothクライアントかBluetoothサーバを選択し、事前にBluetoohペアリング処理をしたAndroid端末間でBluetoohコネクションを確立し、以下データを送受信します。
(1) テキスト情報
(2) 符号付き1バイトの数字のバイト毎リスト(SignedBytes = -128~127)
(3) 符号付き1バイトの数字(Signed1ByteNumber = -128~127)
(4) 符号付き2バイトの数字(Signed2ByteNumber = -32,768~32,767)
(5) 符号付き4バイトの数字(Signed4ByteNumber = -2,147,483,648~2,147,483,647)
(6) 符号なし1バイトの数字のバイト毎リスト(UnsignedBytes = 0~255)
(7) 符号なし1バイトの数字(Unsigned1ByteNumber = 0~255)
(8) 符号なし2バイトの数字(Unsigned2ByteNumber = 0~65,535)
(9) 符号なし4バイトの数字(Unsigned4ByteNumber = 0~4,294,967,295)


★使用方法
以下の通りです。
(1) Bluetooth通信させたいAndroid端末を2台用意し、それぞれ本アプリを起動して下さい。
※以降、1台目をBluetoothClientとして、2台目をBluetoothServerとして動作させることを前提として記載致します。

(2) 1台目に対して、[Select Client or Server]ボタンを押し、BluetoothClientを選択して下さい。
また、2台目に対して、[Select Client or Server]ボタンを押し、BluetoothServerを選択して下さい。

(3) 1台目に対して、[Select pair device]ボタンで通信対象のAndroid端末を選択して下さい
(2台目はBluetoothServerとして動作させる為、本設定は不要です。従い、[Select pair device]ボタンは表示されません。)

(3) 2台目に対して、[Connect]ボタンを押し、1台目からのBluetooth接続要求待ち状態にして下さい。

(4) 1台目に対して、[Connect]ボタンを押し、2台目に対するBluetooth接続要求をして下さい。

(5) 1台目と2台目が無事Bluetooth接続すると、「Now Connected!」という画像が画面に表示されます。接続が失敗した場合、その旨のメッセージが画面に表示されます。

(6) 1台目と2台目がBluetooth接続した状態で、[Input data]テキストボックスに任意のメッセージを入力し、[Send data]ボタンを押すと対するAndroid端末へメッセージを送信できます。送受信したメッセージは、[Result]領域にそれぞれ表示されます。


★詳細設定
以下のパラメーターを設定変更することが可能です。
(1) 共通設定
1) 送信メソッド(SendMethod)
(a) SendText
(b) SendBytes
(c) Send1ByteNumber
(d) Send2ByteNumber
(e) Send4ByteNumber

2) 受信メソッド(ReceiveMethod)
(a) ReceiveText
(b) ReceiveSignedBytes
(c) ReceiveSigned1ByteNumber
(d) ReceiveSigned2ByteNumber
(e) ReceiveSigned4ByteNumber
(f) ReceiveUnsignedBytes
(g) ReceiveUnsigned1ByteNumber
(h) ReceiveUnsigned2ByteNumber
(i) ReceiveUnsigned4ByteNumber

(2) BluetoothClient設定
1) CharacterEncoding: UTF-8/Shift-JIS/EUC-JP
2) DelimiterByte: 0以上の整数
3) HighByteFirst: true/false。2, 4バイトの数字をbig-endian形式で送受信するか否か。
4) Secure: true/false。SSPを使用するか否か。

(3) BluetoothServer設定
(BluetoothClient設定と同様)

MIT App InventorのBluetoothClient、BluetoothServerが提供する機能を確認するお役にたてれば幸いです。


【十二星座シリーズについて】
本シリーズは、私がMIT App Inventorの APIを理解したいと考え、製造したアプリ群です。
従い、本シリーズは目的重視の為、実用的ではないかもしれません…が、どうかお許し下さい。
ただし、アプリのロジックとして、MIT App Inventor Blocks Editorの図を私のHPに公開させて頂こうと考えております。
ご参考になれば幸いです。

【ダウンロード後によくある質問】
いまのところございません。

【対応端末】
AndroidOSのバージョン2.0以上搭載の端末でご利用いただけます。
スマートフォン以外の端末(スマートTVなど)は、動作保証外です。

How to Download / Install

Download and install Bluetooth_MIT_AI version 1.0.0 on your Android device!
Downloaded 100+ times, content rating: Not rated
Android package: appinventor.ai_vivo_tokyo_jp.Bluetooth_MIT_AI, download Bluetooth_MIT_AI.apk

All Application Badges

Free
downl.
Android
2.0+
n/a
Not
rated
Android app

App History & Updates

What's Changed
Ver1.0.0 2013/06/26 ・新規作成
More downloads  Bluetooth_MIT_AI reached 100 - 500 downloads
More downloads  Bluetooth_MIT_AI reached 50 - 100 downloads

Oh snap! No comments are available for Bluetooth_MIT_AI at the moment. Be the first to leave one!

Share The Word!


Rating Distribution

RATING
2.55
2 users

5

4

3

2

1