2015/09/21

シクロクロスのタイヤ (Schwalbe Marathon)

ほとんど通勤でしか乗らないので、セミスリックのタイヤ(Continental Cyclocross Speed 700x35C)を付けていたけれども、週末サイクリングを再開したら連続して3回もパンクしたので、タイヤを変えてみることにした。

ちなみにパンクの原因は木の枝についていたと思われるトゲ。未舗装のちょっと荒れた道も問題なく走ることができるので油断していた。長さ5-6mmで細いけれどもかなり固いとげが刺さって、きれいな丸い穴がチューブに開いていた。
枝にトゲが付いているのは季節的な問題かもしれないし、しばらくコースを変えてもいいんだけど、連続パンクの気分を変えるためにもタイヤを新調することにした。

左からシクロクロス、セミスリック、ツーリング。
買ってきたのは、Schwalbe Marathon Original Wire Bead Tyre 700x32C。(オンラインショップではそういう名前になっていたけど、Schwalbeのサイトを見ているとMarathon HS 420というみたい。)
 カテゴリ的には、シクロクロスのタイヤではなくてツーリング用のタイヤになる。そういえば、昔乗っていたブリヂストンのロードマンに付けていたタイヤがこんな感じだったような。

左の写真には写っていないけれど両サイドには白いラインで反射材が塗られている。ナイトライドはしないし、あと数週間でdaylight saving timeになるので、路上での効果のほどは半年先まで分らないけれども。

指でつまんでみると、Continentalのセミスリックは明らかに薄いペラペラな感じで、Schwalbeは商品説明にあった通り、何かつまっているというか、多層になっているのが感じられる。

最初に乗った時の感想は、軽い! 硬い! ブロックタイヤをセミスリックに変えた時も速くなったけれども、それよりももっと軽い感じで走れる。Continentalのは5-6気圧の高めの空気圧にしてもやわらかい感じの乗り心地だったけど、このSchwalbeのは4気圧強くらいでも路面のゴツゴツ感が伝わってくるような硬い感じになった。

タイヤを替えてから2週間ほど乗っているけれども、とりあえず通勤時にパンクはしていないし、週末サイクリングでも同じをコースを走って木の枝をパキパキ折りながら走ってもパンクはしていない。ということで、とりあえず満足。

でも、まったり走るにはContinentalのタイヤはちょうどよい感じだったので、Schwalbeの同じMarathonの35Cがちょっと気になる。

2015/09/03

Intel Edison as a Bluetooth low energy (BLE) peripheral

I have had the chance to play with Intel Edison recently. The goal is to make Intel Edison act as a BLE peripheral. There are nice articles about it and I followed instructions in those pages. But there were some small problems to achieve my goal.


First of all, I flash Edison with the latest firmware; Intel Edison® Board Firmware Software Release 2.1 (edison-image-ww25.5-15.zip). Or uname -a shows
Linux Edison3 3.10.17-poky-edison+ #1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015 i686 GNU/Linux
Or /etc/version says
weekly-159
Your Edison might behave differently if different version is running.

To make long story short,


Basic settings including wifi network

# configure-edison --setup


Install software using opkg

Edit /etc/opkg/base-feeds.conf file.
# vi /etc/opkg/base-feeds.conf

Add following lines.
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

Install systemd-dev and bluez5-dev.
# opkg install systemd-dev
# opkg install bluez5-dev

Install software using npm

# npm -g install async
# npm install noble
# npm install bleno

Enable Bluetooth device

Disable bluetooth daemon (bluetoothd). You need run it only once.
# systemctl disable bluetooth

You have to run these commands every time after boot.
# rfkill unblock bluetooth
# hciconfig hci0 up

Run sample program (echo)

Start node process.
# cd node_moduels/bleno/examples/echo
# node main.js

While a node process is running, open other terminal and down/up hci0 device.
# hciconfig hci0 down
# hciconfig hci0 up

Now, try to connect from other BLE supported device, such as a smartphone. There should be a BLE peripheral named 'echo'. I use an Android application, "BLE scanner". With this app, you can read and write data to/from BLE device, that is quite handy.

Problems


Network interface, usb0

After running configure-edison command, there are two network interfaces; usb0 and wlan0. But I could not connect to Edison using ssh via wifi because the routing table is looks like below.
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.2.253   0.0.0.0         UG        0 0          0 usb0
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 usb0
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0

I do not need usb0. So disable it.
# ifconfig usb0 down

It deletes default gateway too, so add it again.
# route add default gw default-gateway-IP-address
In my case,
# route add default gw 192.168.2.253

Or you can permanently change usb0's IP address by editing the following file.
# vi /etc/systemd/network/usb0.network


Installing Bleno

When installing Bleno, it installs bluetooth-hci-socket module too. But it requires libudev.h and there is no such file in Edison as default. Thus it failed to install Bleno.
The header file is included in systemd-dev package. And so you need to install it before installing Bleno.

Running Bleno

Before disable bluetoothd, it advertises a name using a host name. If you name your Edison board "my_edison", you will see "my_edison" bluetooth device from other device. After disable bluetoothd (or kill bluetoothd process), the board still advertises using a bluetooth chip name? In my case, "BCM43340B0 37.4 MHz WLBGA_iTR Intel Edison-0122-N".
I am not an expert of Bluetooth and so I do not know a proper solution. But I found the workaround of it. To let Bleno process advertise correctly, hci0 interface needs to be down and up again while Bleno process is running. And so Bleno process can advertise its own name.