<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HACKist &#187; Bluetooth</title>
	<atom:link href="https://hackist.jp/?cat=26&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://hackist.jp</link>
	<description>HACKistは日々、博報堂アイ・スタジオで挑戦している、ちょっと変わった新しい実験をお知らせしていきます。</description>
	<lastBuildDate>Wed, 30 Sep 2020 02:59:58 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.4</generator>
	<item>
		<title>大切な人とのつながりを光で感じるウェアラブルデバイス「without words」</title>
		<link>https://hackist.jp/?p=5917</link>
		<comments>https://hackist.jp/?p=5917#comments</comments>
		<pubDate>Thu, 18 Jun 2015 02:23:55 +0000</pubDate>
		<dc:creator><![CDATA[HACKist]]></dc:creator>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[DIGITAL FRAGMENTS]]></category>

		<guid isPermaLink="false">http://hackist.jp/?p=5917</guid>
		<description><![CDATA[こんにちは！エモいの大好きデザイナーの佐野（彩）です。 先日のDigital Fragmentsで展示した「without words（言葉はいらない）」というウェアラブルデバイスをご紹介させていただきます！ witho [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>こんにちは！エモいの大好きデザイナーの佐野（彩）です。</p>
<p>先日のDigital Fragmentsで展示した「without words（言葉はいらない）」というウェアラブルデバイスをご紹介させていただきます！</p>
<p><img src="http://hackist.jp/wp-content/uploads/015.jpg" alt="01" width="1000" height="699" class="alignnone size-full wp-image-6059" /></p>
<h3>without wordsとは</h3>
<p>シンプルかつエモーショナルな、コミュニケーション用ウェアラブルデバイスです。<br />
言葉を使わず、例えば遠く離れた恋人同士、家族同士など、大切な人とのつながりを光で感じることができます。</p>
<p>機能はとてもシンプル。対になっているブレスレットを身につけ、横についているスイッチを押すだけ。自分側のスイッチを押すと、相手側のブレスレットが光り、相手側のスイッチを押すと自分のブレスレットが光ります。</p>
<p><iframe width="820" height="461" src="https://www.youtube.com/embed/DDOC1qqn2Fs" frameborder="0" allowfullscreen></iframe></p>
<p>相手のことをふと思った瞬間にスイッチを押してみたり、なんとなーく連打してみたり…ちょっと押し付けがましいかもしれませんが、でも自分側のブレスが光った瞬間って、少なくとも相手は今自分のことを想っている瞬間なんだなって感じると、なんだか嬉しくなりませんか？</p>
<h3>コミュニケーションはもはや言葉がなくても成り立つのでは？</h3>
<p>昔は手紙を書いて想いをしたためていたのが、今やLINEのスタンプだけでやりとりが成立する時代。</p>
<p>そこで、もしかして皆つながりは求めているけれど、SNS疲れと言われるくらいだし、多数と連絡をとるのが面倒くさい、と感じているのでは？SNSの機能をそぎ落としていって、さらにシンプルにしていったら、どうなるだろう？？と考え、出来たのがこの作品です。</p>
<p>何か用事があるわけではないけれど、ふと相手に信号を送ったら、相手もちょうど見ていて信号が返ってきて…と、そこには気持ちも、言葉も、何も込められていない、ただのLEDの光しかないけれど、それでもそこに「つながり」はあるのではないでしょうか。</p>
<h3>どんな技術？</h3>
<p>without wordsはbluetoothで通信しています。（なので現状のプロトタイプでは20~30m範囲が限界）<br />
使っているのはこちら、<a href="http://tocos-wireless.com/jp/products/TWE-Lite-DIP/" target="_blank">超簡単！無線マイコンTWE-Lite DIP</a>（トワイライト・ディップ）です。</p>
<p>実はこれBluetoothのペアリング作業も、プログラミング開発作業もなく、今回初めて電子工作にチャレンジした私でもつくれちゃう超お手軽無線マイコンなんです。</p>
<p>今回はプロトタイプということで、20~30mが限界ですが、今後はwifiやネットワークと連携して海外にいてもやりとりできるようにしたり、アプリ連動でお互い何度信号を送り合ったかが数値化されたり、という拡張もしたいなぁと思っています！</p>
<p>ちなみに、今回使ったTWE-Liteマイコンですが、100個くらいの連携も可能だそうです。お値段もBluetoothのマイコンにしては比較的安め。今回使ってみて色々と勉強になったので、次何か作るなら複数を使うというのもありそうです。</p>
<p><img src="http://hackist.jp/wp-content/uploads/201505DIGITAL_FRAGMENTS_asahidaCamera236-1024x683.jpg" alt="201505DIGITAL_FRAGMENTS_asahidaCamera236" width="1024" height="683" class="alignnone size-large wp-image-6062" /><br />
では！</p>
<p>【Credit】<br />
制作 : 佐野彩香</p>
]]></content:encoded>
			<wfw:commentRss>https://hackist.jp/?feed=rss2&#038;p=5917</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBeaconを動かしてみた</title>
		<link>https://hackist.jp/?p=2965</link>
		<comments>https://hackist.jp/?p=2965#comments</comments>
		<pubDate>Mon, 13 Jan 2014 18:43:12 +0000</pubDate>
		<dc:creator><![CDATA[HACKist]]></dc:creator>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://hackist.jp/?p=2965</guid>
		<description><![CDATA[みなさん、こんにちは。 リアル連動大好き一階です。 &#160; アプリを起動すると周囲のBeaconを検知するアプリを作ってみました。 以下実装方法です。 １．CoreLcoationFrameworkを追加する。 ２ [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>みなさん、こんにちは。<br />
リアル連動大好き一階です。<br />
&nbsp;<br />
アプリを起動すると周囲のBeaconを検知するアプリを作ってみました。<br />
以下実装方法です。</p>
<p><span id="more-2965"></span></p>
<p>１．CoreLcoationFrameworkを追加する。<br />
２．変数を定義して</p>
<pre class="brush: objc; title: ; notranslate">
@property (nonatomic, strong) CLLocationManager* locationManager;
@property (nonatomic, strong) NSUUID* proximityUUID;
@property (nonatomic, strong) CLBeaconRegion* beaconRegion;
NSString* beaconUUID = @&quot;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&quot;;
</pre>
<p>※beaconUUIDは事前にEstimote社のサンプルプログラムを動かして取得<br />
&nbsp;<br />
３．viewDidLoadで測定開始</p>
<pre class="brush: objc; title: ; notranslate">
if ([CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]]) {
	if( _locationManager == nil ) {
		_locationManager = [CLLocationManager new];
		_locationManager.delegate = self;
	}

	_proximityUUID = [[NSUUID alloc] initWithUUIDString:beaconUUID];
	_beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:_proximityUUID identifier:@&quot;EstimoteSampleRegion&quot;];
	[_locationManager startMonitoringForRegion:_beaconRegion];
	// 最初から範囲内にいるとイベントが走らないのでここで走らせておく。
	[_locationManager startRangingBeaconsInRegion:_beaconRegion];
}
</pre>
<p>※コメントにもありますが&#8221;startMonitoringForRegion&#8221;を呼び出すとBeaconの監視を開始しますが、この時に対象Beaconが既に近くにあると発見イベントが通知されない仕様になっているので、即Beaconとの距離測定を開始しています。<br />
※<a href="http://brightechno.com/blog/archives/220">このBlog</a>によれば上記呼び出し方は誤りとのことなのですが、Blog記載の方法では検知を開始しなかったのでとりあえず修正していません。<br />
※EstimoteのBeacon全てを対象にしているのでinitWithProximityUUIDにmajorやminorを指定していません。<br />
&nbsp;<br />
４．Beacon発見/ロストイベント</p>
<pre class="brush: objc; title: ; notranslate">
- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
</pre>
<p>※Beaconが見つかると&#8221;didRangeBeacons&#8221;が、Beaconを全て見失うと&#8221;didExitRegion&#8221;が呼び出されます。<br />
※&#8221;didRangeBeacons&#8221;の(NSArray *)beaconsには、Frameworkが近いBeaconから順番にセットしてくれているので、自前で距離計算をする必要はありません。<br />
&nbsp;<br />
５．Beaconの情報に応じた処理</p>
<pre class="brush: objc; title: ; notranslate">
for (CLBeacon* clBeacon in beacons) {
	NSUUID* beaconUUID = clBeacon.proximityUUID;
	NSString *uuid= beaconUUID.UUIDString;
	NSString* proximityString = nil;
	switch (clBeacon.proximity)
	{
		case CLProximityUnknown:
			proximityString = @&quot;Unknown&quot;;
			break;
		case CLProximityImmediate:
			proximityString = @&quot;Immediate&quot;;
			break;
		case CLProximityNear:
			proximityString = @&quot;Near&quot;;
			break;
		case CLProximityFar:
			proximityString = @&quot;Far&quot;;
			break;
		default:
			break;
	}

	NSInteger major = [clBeacon.major integerValue];
	if( major == AQUABLUE_BEACON_ID ) {
		NSLog(@&quot;aquaBlue:promixity: %@&quot;, proximityString);
	} else if( major == BLUE_BEACON_ID ) {
		NSLog(@&quot;blue:promixity: %@&quot;, proximityString);
	｝else if( major == LIGHTGREEN_BEACON_ID ) {
		NSLog(@&quot;lightGreen:promixity: %@&quot;, proximityString);
	}
}
</pre>
<p>※EstimoteのBeaconは３色全てmajorの値が異なるので、majorの値を元に３色を識別しています。<br />
※majorの値は事前に端末に３色それぞれを近接させて取得しました。<br />
&nbsp;<br />
６．ログ出力</p>
<pre class="brush: objc; title: ; notranslate">
for (CLBeacon* clBeacon in beacons) {
	NSUUID* beaconUUID = clBeacon.proximityUUID;
	NSString *uuid= beaconUUID.UUIDString;
	NSString* proximityString = nil;
	switch (clBeacon.proximity)
	{
	    case CLProximityUnknown:
	        proximityString = @&quot;Unknown&quot;;
	        break;
	    case CLProximityImmediate:
	        proximityString = @&quot;Immediate&quot;;
	        break;
	    case CLProximityNear:
	        proximityString = @&quot;Near&quot;;
	        break;
	    case CLProximityFar:
	        proximityString = @&quot;Far&quot;;
	        break;
	        
	    default:
	        break;
	}
	NSMutableString* messageString = [NSMutableString string];
	[messageString appendString:proximityString];

	NSString* workString = nil;
	[messageString appendString:@&quot;/&quot;];
	[messageString appendString:@&quot;uuid:&quot;];
	[messageString appendString:uuid];
	[messageString appendString:@&quot;/&quot;];
	[messageString appendString:@&quot;major:&quot;];
	[messageString appendString:[clBeacon.major stringValue]];
	[messageString appendString:@&quot;/&quot;];
	[messageString appendString:@&quot;minor:&quot;];
	[messageString appendString:[clBeacon.minor stringValue]];
	[messageString appendString:@&quot;/&quot;];
	[messageString appendString:@&quot;accuracy:&quot;];
	workString = [NSString stringWithFormat:@&quot;%g&quot;, clBeacon.accuracy ];
	[messageString appendString:workString];
	[messageString appendString:@&quot;/&quot;];
	[messageString appendString:@&quot;rssi:&quot;];
	workString = [NSString stringWithFormat:@&quot;%ld&quot;, clBeacon.rssi ];
	[messageString appendString:workString];

	NSLog(@&quot;%@&quot;, messageString);
}
</pre>
<p>一応参考までに。<br />
&nbsp;<br />
意外と簡単に扱うことが出来ます。</p>
]]></content:encoded>
			<wfw:commentRss>https://hackist.jp/?feed=rss2&#038;p=2965</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBeaconの仕様</title>
		<link>https://hackist.jp/?p=2956</link>
		<comments>https://hackist.jp/?p=2956#comments</comments>
		<pubDate>Fri, 10 Jan 2014 06:17:27 +0000</pubDate>
		<dc:creator><![CDATA[HACKist]]></dc:creator>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://hackist.jp/?p=2956</guid>
		<description><![CDATA[みなさん、こんにちは。 リアル連動大好き一階です。 &#160; 実際に動かす前にiBeaconの仕様をおさらいしておきます。 １．iBeaconとは 　AppleがiOS7で搭載した、BluetoothLowEnerg [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>みなさん、こんにちは。<br />
リアル連動大好き一階です。<br />
&nbsp;<br />
実際に動かす前にiBeaconの仕様をおさらいしておきます。</p>
<p><span id="more-2956"></span></p>
<p>１．iBeaconとは<br />
　AppleがiOS7で搭載した、BluetoothLowEnergy規格に準拠したBeaconを利用するための技術です。<br />
　Beaconは2秒間に1回の程度の発信ならボタン電池1個で5年は軽く持つと言われているので、一度設置したら当分放っておいても大丈夫な便利デバイスです。<br />
&nbsp;<br />
２．Beaconの識別情報<br />
　Beaconは個体識別を行うために３つのパラメータを持っています。<br />
　（１）proximityUUID<br />
　　　いわゆる大区分。１つのアプリには20個まで登録可能。<br />
　（２）major<br />
　　　いわゆる中区分。大区分配下でBeaconをグループ分けする際に利用<br />
　（３）minor<br />
　　　いわゆる小区分。中区分配下でBeaconをグループ分けする際に利用。<br />
&nbsp;<br />
　重要なのは、これらの値はBeacon個体毎に個別の値を設定する必要がないということです。<br />
　とある外食産業の各店舗にBeaconを配置する際の設定方法を、利用シーンごとに書いてみます。<br />
　・店舗を識別せずに、単純にレジにだけBeaconを配置する場合<br />
　　proximityUUIDを全て同じに設定すればOK<br />
　・店舗を識別せずに、単純にレジとドリンクバーにBeaconを配置する場合<br />
　　proximityUUIDを全て同じにし、majorをレジとドリンクバーで別々に設定すればOK<br />
　・店舗を識別して、レジとドリンクバーにBeaconを配置する場合<br />
　　proximityUUIDを全て同じにし、majorの値を各店舗で別々に、minorをレジとドリンクバーで別々に設定すればOK<br />
&nbsp;<br />
　と、利用の仕方に応じてフレキシブルに設定出来ます。<br />
&nbsp;<br />
３．Beaconからの情報<br />
　Beaconを認識すると識別情報に加えて、以下３つの情報が来ます。<br />
　※認識したBeaconの情報はFramework側で自動的に近い順に並べてくれます。<br />
　（１）proximity<br />
　　　端末との距離で、近接/近い/遠い/不明の４種類で定義<br />
　（２）accuracy<br />
　　　正確さ？とりあえずは不要？<br />
　（３）rssi<br />
　　　電波受信強度。とりあえずは不要？<br />
&nbsp;<br />
　アプリケーション側はBeaconの識別情報と主にproximityの情報を利用して、来店回数を+1したり、お知らせを出したりします。</p>
]]></content:encoded>
			<wfw:commentRss>https://hackist.jp/?feed=rss2&#038;p=2956</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBeaconが届いたのでいろいろ調べてみた</title>
		<link>https://hackist.jp/?p=3072</link>
		<comments>https://hackist.jp/?p=3072#comments</comments>
		<pubDate>Wed, 08 Jan 2014 04:09:25 +0000</pubDate>
		<dc:creator><![CDATA[HACKist]]></dc:creator>
				<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://hackist.jp/?p=3072</guid>
		<description><![CDATA[みなさん、こんにちは。 リアル連動大好き一階です。 &#160; 随分前に発注したEstimote社のBeaconがやっと来ました。 ちょっと遅くなりましたが、いろいろ軽く調べた事をメモがてらつらつら書いていきます。 ま [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://shiffon.info/blog/wp-content/uploads/2013/11/iBeacon.jpg"><img class="alignnone size-medium wp-image-159" src="http://shiffon.info/blog/wp-content/uploads/2013/11/iBeacon-300x168.jpg" alt="iBeacon" width="300" height="168" /></a></p>
<p>みなさん、こんにちは。<br />
リアル連動大好き一階です。<br />
&nbsp;<br />
随分前に発注した<a href="http://estimote.com/" target="_blank">Estimote社のBeacon</a>がやっと来ました。<br />
ちょっと遅くなりましたが、いろいろ軽く調べた事をメモがてらつらつら書いていきます。</p>
<p><span id="more-3072"></span><br />
まず、使い方。<br />
パッケージには使い方などが一切入っていません。<br />
どうやって電源を入れるのか？どうやってBeaconの情報（後述）を書き換えるのか？<br />
いろいろと分かりません。</p>
<p>とりあえず電源を入れないことには始まらないので、まずは電源の調査から。<br />
いろいろこねくり回したけど分からないので、さくっと割りました！<br />
<a href="http://shiffon.info/blog/wp-content/uploads/2013/11/7740bd659c24ff11af5d89dd61c91fea.jpg"><img class="alignnone size-medium wp-image-158" src="http://shiffon.info/blog/wp-content/uploads/2013/11/7740bd659c24ff11af5d89dd61c91fea-300x168.jpg" alt="iBeacon中身" width="300" height="168" /></a><br />
電池は工場出荷時から既にセットされていてすぐ使える状態でした。<br />
OFFにしたり電池を交換するときは割って中身を取り出さないと駄目なようです。<br />
・・・試験品のくせに面倒くさい。</p>
<p>次はBeaconの情報<br />
<a href="http://estimote.com/api/index.html" target="_blank">Estimate社のHP</a>からサンプルアプリのプロジェクトがDL出来るようになっているので、落としていろいろ見てみました。<br />
BeaconはEstimoteが提供しているライブラリ（サンプルアプリのプロジェクトから取り出して利用）を組み込むことで利用可能になり、情報はESTBeaconというクラスに格納されます。</p>
<pre class="brush: objc; title: ; notranslate">
/////////////////////////////////////////////////////
// bluetooth beacon available when used with
// startEstimoteBeaconsDiscoveryForRegion:
@property (nonatomic, strong)   CBPeripheral*           peripheral;
@property (nonatomic, strong)   NSString*               macAddress;
@property (nonatomic, strong)   NSNumber*               measuredPower;
@property (nonatomic, strong)   NSNumber*               major;
@property (nonatomic, strong)   NSNumber*               minor;
@property (nonatomic, strong)   NSNumber*               rssi;

/////////////////////////////////////////////////////
// properties filled when read characteristic
@property (nonatomic, strong)   NSNumber*               power;
@property (nonatomic, strong)   NSNumber*               frequency;
@property (nonatomic, strong)   NSNumber*               batteryLevel;
@property (nonatomic, strong)   NSString*               hardwareVersion;
@property (nonatomic, strong)   NSString*               firmwareVersion;

/////////////////////////////////////////////////////
// core location properties
@property (nonatomic, strong)   CLBeacon*               ibeacon;
@property (nonatomic, readonly)   BOOL                  isConnected;
</pre>
<p>ちなみにこのクラスのメンバにCLBeaconがあったので、普通のやり方で直接扱えるのではないかと思って試してみたら、扱えました。<br />
なので、特にEstimote社のライブラリを利用しなくても動きます。</p>
<p>実際の動かし方などは次回以降で。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://hackist.jp/?feed=rss2&#038;p=3072</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
