外付けUSBが頻繁にスリープする
Windows10にしてからRatocの外付けUSB RAID HDD、RS-EC32-U3Rが5分ごとにスリープとONを繰り返していたが、ついに解決した。
ネット上にいろいろやり方があるが、どれもこちらの環境ではNG。
最終的に解決至った情報は下記のサイトに記載のレジストリを書き換える方法。
http://michisugara.jp/archives/2013/windows8.1_hdd_2.html
ご参考まで。
chromeでmydocomoにログインできるようにする
かなり前からchromeでmydocomoにログインできない状況だったが、解決したのでメモ。
○原因
プライバシーに問題のあるサードパーティクッキーを受け入れないように設定しているため。
具体的には、chromeの設定-コンテンツの設定で「サードパーティのCookieとサイトデータをブロックする」にチェックしているため。
○解決法
サードパーティクッキーはブロックしたままで例外を追加する。
具体的には、chromeの設定-コンテンツの設定-例外の管理から「cfg.smt.docomo.ne.jp」を追加する。
mydocomoだけでなくニコニコ動画もそうですが、サードパーティクッキーを標準で使用するのは、プライバシーマークを与えないように規定しても良いと思う。
■追記(2014/9/10)
他にも苦労されている方がおられるようです。
DoCoMoに問い合わせても答えが返ってこなかったというのはひどいですね、、、
http://ameblo.jp/kumaneko45/entry-11839122310.html
http://chattera.blog.fc2.com/blog-entry-138.html
Google ChromeにJava(JRE6 update12)を入れる
Google ChromeでJavaアプレットを動作させる際に詰まったのでメモ。
- ブログなどではJRE6のupdate10(RC版)をインストールをするようにと書いてあるが、現時点での最新版update12でも問題なく動作する。
- コントロールパネル−Java−インターネット一時ファイルにある設定−ファイルの削除を行う
特に後者をやらないと動かない場合があるので注意。
GoogleChromeが爆速な件
遅ればせながらGoogleChromeを使ったけど、起動は速いしページの表示も速いし落ちないしで最高。ただ、今までMoonBrowserというIE系のタブブラウザを使用していたのでいくつか足りない機能があることに気づいた。
欲しい機能
- javascript,java,ActiveXなどを1ボタンでON/OFFする機能
- デフォルトOFFで、必要なサイトのみONにしたい
- ブックマークには標準の設定ができること
- 新しいタブで開く際、開いた方をActiveにしない
- いくつもリンクを開く際、元のウインドウに戻すのが手間
- 一つ上のディレクトリに移動
- 上位階層へのリンクがない場合に便利
こう考えると、タブブラウザって良くできてるなぁ…。
屋内GPS=IMES
屋外位置計測の決定版がGPSなのは疑いようがないが、屋内位置計測には意外にも決定版がない。普及を考えると特別な端末を必要とせず、基地局も少ない方が良いが、屋内は狭いため屋外よりも精度を要求されるという困難さがあるからだと思われる。
屋内位置計測の方法として、インフラが比較的整っており安価で設置がしやすい無線LANを位置推定に使用するのは昔からやられているが、元々位置計測用ではないため誤差が1〜3mと大きい。位置計測のことを少し考えているのが同じ通信規格のUWBであり、精度は数十cm程度となるが、まだインフラがまだ整っていない。また、RFIDや人感センサなどを使用したエリアへの出入りのみを計測するお手軽な方法もある。
この他に、今回記事にあった屋内で疑似GPS信号を出力するIMES方式がある。この方式は端末にGPS携帯などを流用できることが最大のメリットであり、屋内と屋外を一つの機器でシームレスに計測できる。基地局が安くなって設置が簡単になれば爆発的に普及しそうな気がする。
ただ、この場合でも携帯を持ち歩く必要があるため、宿泊施設や入浴施設、自宅なんかでも別の方法が必要になると思う。やはり決定版はないのか…。
技術名 | 手軽さ | 精度 |
---|---|---|
WiFi | ○ | △ |
UWB | × | ○ |
RFID | △ | × |
PIR | ◎ | × |
IMES | △? | ○ |
○参考URL:
ITmedia - 屋内でも“GPSケータイナビ”を実現──神戸自律移動支援プロジェクトの今(前編)
BBwatch - 日立、無線LANを誤差1〜3mで位置検索できる「日立AirLocation」
ITmedia - UWB反射波で屋内の人や物を測位 日立が新技術
ZDNet - 富士通など、UWBベースの屋内向け位置測定システムを開発--誤差17cm
La Foneraを購入〜wifi端末として使う
最も安いwifi機器は何かと調べたらFONを思い出した。早速購入して殻割りの後、ファーム入れ替え。元々は無線LANアクセスポイントだが、有線LANを使わず無線LANクライアントとして使用。これだけできて1,980円は安い!
インストールメモ
必要機器は以下の通り。
設定用WindowsPC FON2100E シリアル接続ケーブル(9-KEを流用)
FON2100EのIPは192.168.10.1である。WindowsPCの有線LANのIPは固定IPで192.168.10.2を割り振り、LANケーブルでWindowsPCとFONを接続する。
シリアルケーブル9-KEのPDCコネクタ側を切断してヘッダピンの適切な位置に接続する(詳細は参考URLを参照)。
teratermproを起動してCOMポートを開いておく。開いたCOMのbpsは9600にしておくこと。
Poor TFTP Serverを起動し、以下のopenwrtのROMイメージが入ったディレクトリを指定する。
openwrt-atheros-2.6-root.squashfs openwrt-atheros-2.6-vmlinux.lzma
ここでFONの電源を入れる。電源を入れると以下のメッセージが出る。出ない場合はケーブルやteratermの設定を見直す。
+PHY ID is xxxx:xxxx Ethernet eth0: MAC address xx:xx:xx:xx:xx:xx IP: 0.0.0.0/255.255.255.255, Gateway: 0.0.0.0 Default server: 0.0.0.0 RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version v1.3.0 - built 16:57:58, Aug 7 2006 Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Board: ap51 RAM: 0x80000000-0x81000000, [0x80040450-0x80fe1000] available FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each. == Executing boot script in 1.000 seconds - enter ^C to abort
ここですかさずCtrl+Cを押す。押せなかった場合は一度電源を切った後、再度電源を入れて繰り返す。
うまくいったらIPの設定、ROMのロード、flashのクリア、ファイルシステムの設定をして一度リセット。
RedBoot>ip_address -l 192.168.10.1/24 -h 192.168.10.2 IP: 192.168.10.1/255.255.255.0, Gateway: 0.0.0.0 Default server: 192.168.10.2 RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma Using default protocol (TFTP) Raw file loaded 0x80040800-0x801007ff, assumed entry at 0x80040800 RedBoot> fis init About to initialize [format] FLASH image system - continue (y/n)? y Initialize FLASH Image System ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7 ... Erase from 0xa8030000-0xa80f0000: ............ ... Program from 0x80040800-0x80100800 at 0xa8030000: ............ ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-2.6-root.squashfs Using default protocol (TFTP) Raw file loaded 0x80040800-0x801607ff, assumed entry at 0x80040800 RedBoot> fis create -l 0x006F0000 rootfs ... Erase from 0xa80f0000-0xa87e0000: ........................................................... Program from 0x80040800-0x80160800 at 0xa80f0000: .................. ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> reset ... Resetting.
再起動すると次のような画面が出る。
+PHY ID is xxxx:xxxx Warning: IP address 0.0.0.0 in use Ethernet eth0: MAC address xx:xx:xx:xx:xx:xx IP: 0.0.0.0/255.255.255.255, Gateway: 0.0.0.0 Default server: 0.0.0.0 RedBoot(tm) bootstrap and debug environment [ROMRAM] Non-certified release, version v1.3.0 - built 16:57:58, Aug 7 2006 Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Board: ap51 RAM: 0x80000000-0x81000000, [0x80040450-0x80fe1000] available FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each. == Executing boot script in 1.000 seconds - enter ^C to abort RedBoot> fis load -l vmlinux.bin.l7 Image loaded from 0x80041000-0x80290085 RedBoot> exec Now booting linux kernel: Base address 0x80030000 Entry 0x80041000 Cmdline : Linux version 2.6.21.5 (nbd@ds10) (gcc version 4.1.2) #2 Sun Sep 30 20:16:16 CEST 2007 CPU revision is: 00019064 Determined physical RAM map: memory: 01000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Built 1 zonelists. Total pages: 4064 Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes. Primary data cache 16kB, 4-way, linesize 16 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). PID hash table entries: 64 (order: 6, 256 bytes) Using 92.000 MHz high precision timer. Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory: 13504k/16384k available (1955k kernel code, 2880k reserved, 292k data, 116k init, 0k h ighmem) Mount-cache hash table entries: 512 NET: Registered protocol family 16 Radio config found at offset 0xf8(0x1f8) Time: MIPS clocksource has been installed. NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc. io scheduler noop registered io scheduler deadline registered (default) Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A eth0: Dropping NETIF_F_SG since no checksum feature. eth0: Atheros AR231x: xx:xx:xx:xx:xx:xx, irq 4 cmdlinepart partition parsing not available Searching for RedBoot partition table in spiflash at offset 0x7d0000 Searching for RedBoot partition table in spiflash at offset 0x7e0000 5 RedBoot partitions found on MTD device spiflash Creating 5 MTD partitions on "spiflash": 0x00000000-0x00030000 : "RedBoot" 0x00030000-0x000f0000 : "vmlinux.bin.l7" 0x000f0000-0x007e0000 : "rootfs" 0x001f0000-0x007e0000 : "rootfs_data" 0x007e0000-0x007ef000 : "FIS directory" 0x007ef000-0x007f0000 : "RedBoot config" nf_conntrack version 0.5.0 (128 buckets, 1024 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP vegas registered NET: Registered protocol family 1 NET: Registered protocol family 17 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> VFS: Mounted root (squashfs filesystem) readonly. Freeing unused kernel memory: 116k freed eth0: Configuring MAC for full duplex Warning: unable to open an initial console. Algorithmics/MIPS FPU Emulator v1.5 - preinit - jffs2 not ready yet; using ramdisk mini_fo: using base directory: / mini_fo: using storage directory: /tmp/root - init - init started: BusyBox v1.4.2 (2007-09-29 07:21:40 CEST) multi-call binary Please press Enter to activate this console. device eth0 entered promiscuous mode br-lan: port 1(eth0) entering learning state br-lan: topology change detected, propagating br-lan: port 1(eth0) entering forwarding state PPP generic driver version 2.4.2 wlan: 0.8.4.2 (svn r2568) ath_hal: module license 'Proprietary' taints kernel. ath_hal: 0.9.30.13 (AR5212, AR5312, RF2316, TX_DESC_SWAP) ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (svn r2568) ath_rate_minstrel: look around rate set to 10% ath_rate_minstrel: EWMA rolloff level set to 75% ath_rate_minstrel: max segment size in the mrr set to 6000 us wlan: mac acl policy registered ath_ahb: 0.9.4.5 (svn r2568) ath_pci: switching rfkill capability off ath_pci: switching per-packet transmit power control off wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54 Mbps wifi0: H/W encryption support: WEP AES AES_CCM TKIP wifi0: mac 11.0 phy 4.8 radio 7.0 wifi0: Use hw queue 1 for WME_AC_BE traffic wifi0: Use hw queue 0 for WME_AC_BK traffic wifi0: Use hw queue 2 for WME_AC_VI traffic wifi0: Use hw queue 3 for WME_AC_VO traffic wifi0: Use hw queue 8 for CAB traffic wifi0: Use hw queue 9 for beacons wifi0: Atheros 2315 WiSoC: mem=0xb0000000, irq=3 jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 jffs2_build_filesystem(): unlocking the mtd device... done. jffs2_build_filesystem(): erasing all blocks after the end marker...
ここでEnterキーを押す。押さないといつまで待っても画面が進まないw
BusyBox v1.4.2 (2007-09-29 07:21:40 CEST) Built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M KAMIKAZE (7.09) ----------------------------------- * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! --------------------------------------------------- root@OpenWrt:/#
これでようやくプロンプトが出るようになった。とりあえずpasswdコマンドでrootパスワードを設定しておくこと。
次はネットワークの設定。まず以下を/etc/config/networkの最後に追加する。
# client mode config interface wan option ifname ath0 option proto dhcp
次に/etc/config/wirelessを以下に変更する。
config wifi-device wifi0 option type atheros option channel auto config wifi-iface option device wifi0 option network wan option mode sta option ssid <SSIDを入れる> option encryption wep option key <16進のキーを>
最後にsshを使えるようにするため、/etc/firewall.userの下記2行のコメントを外す。
iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT iptables -A input_wan -p tcp --dport 22 -j ACCEPT
ここで、無線LANルータにwifiのMACアドレスを登録する。初歩的だがこれを忘れると接続できずにハマる。また、外部からsshするならルーターのDHCPサーバ機能で固定IPを割り振っておいた方が良い。登録できたらネットワークを再起動。
ifup -a && wifi /etc/init.d/dnsmasq restart
おまけ
GPIO(汎用I/O)のアクセスを行うためのモジュールのインストール方法。
cd /tmp wget http://fon.testbox.dk/packages/2.6.21.5/kmod-gpio_2.6.21.5-atheros-1_mips.ipk ipkg install kmod-gpio_2.6.21.5-atheros-1_mips.ipk insmod proc_gpio.ko
これでインストール完了。試しにwifiのランプを光らせてみる。
echo 1 > /proc/gpio/2_dir echo 1 > /proc/gpio/2_out
元に戻す時は以下を打ち込む。
echo 0 > /proc/gpio/2_out
おまけ2
FreeBSD5にFONの開発環境をインストールしました。20ヶ所くらいエラーが出るけど適当に修正していったら無事環境を構築完了。意外になんとかなるもんだね…。
mkdir openwrt cd openwrt svn checkout https://svn.openwrt.org/openwrt/tags/kamikaze_7.09 kamikaze cd kamikaze make menuconfig
メニュー画面では「Atheros [2.6]」と「Build the OpenWrt SDK」を選択してExitする。
make V=99
エラーが出るので適当に対処して下さいw
無事環境構築が終了したら、gccの代わりに「staging_dir_mips/bin/mips-linux-gcc」を使うことでFONで動作する実行ファイルが作れる。なお、FONに持って行くときはWebサーバ経由で持って行くのが楽。
○参考URL:
趣味のぺえじ - fonを改造
Fonまとめwiki - DD-WRT
sdkt4aの日記 - FONにOpenWrtを入れよう!
木の葉の家 - FONルータ復旧大作戦
sdkt4aの日記 - FONのGPIOを叩いてLEDとか制御するよ!
root123な毎日 - 【La Fonera】買った⇒早速OpenWRT化 【その5】
sdkt4aの日記 - OpenWrtのクロスコンパイル環境をDebianに構築してhello,worldするよ!
キャラ弁というのが話題らしい
キャラ弁とは食材で人の顔を描く弁当のことで、弁当を残す子供のために作り出したらしい。ちなみに、おかずを利用して弁当に絵を描くパターンと、海苔やチーズなどでアニメなどのキャラクターを描いたものをご飯の上に乗せておかずはそのままのパターン(海苔アートというらしい)があるみたい。
嫁の見てるクックパッドというサイトにキャラ弁(キャラおかず)が多く出てきていたが、こんなに流行っているとは思わなかった。参考URLの2つ目のサイトを見ると見事な出来映え。いったい弁当に何時間かけるんだ。
一般的にキャラ弁があまりに見事なので、それ見た外人が本物なのか、それともphotoshopで加工したものなのかを議論しているサイトまである始末。「暇な日本人が今まで何をしてきたかを見れば本物と言える」というコメントまでつけられてるけど、あんたの言う通りだよ…。というか議論している画像はむしろまだまだ凝ってない方だから。
とにもかくにも嫁がこんな弁当を作らないことだけを祈ります。会社で開けて絵が描いてあったらきっとそのまま閉めます(笑)
○参考URL:
Yahoo - 子で楽しむ「キャラ弁」 関連本は8万部突破
Yahoo!ブログ - なつかしアニメをキャラ弁で
Sankaku Complex - Strike Witches Ita-Bento(外人がオタクアニメのキャラ弁=痛弁を見て本物かどうかを議論している)