honeylab's blog

各種ハードウェアの改造、主にファミコンミニなどをやってます(ました)

ロボット掃除機 ECOVACS DEEBOT R95

非常に段取りの悪い仕事のしりぬぐい(自分含む)のせいでここ数日ろくにファミコンいじってないわ。

そんな中でロボット掃除機を嫁が買ってくれたので毎日いじっています。

 

www.ecovacs-japan.com

 

なんと部屋をレーザーでスキャンしてマッピングして
効率的に掃除してくれます。

これすごいランダム掃除のやつ買わなくてまじでよかった。

しかもスマホから操作できるし(ルータ超えてネットからもいけます)

f:id:honeylab:20170227005147p:plain

エリアとして自分で認識して(ちょっと区切りがいまいちかな)
エリアごと掃除を指示できたり

f:id:honeylab:20170227005151p:plain

 

バーチャルボーダーはアプリから指定できます。
すげぇ。未来感。

f:id:honeylab:20170227005154p:plain

 

ミニマルやルンバ、このメーカの下位機種と迷ったんですが
WiFiスマホアプリ対応のはこれしかなかったんで一択になりました。

あと、一言言っときますが

 

これはハックしませんよ(今度こそ本当に嫁が怒る)

 

ところで、これ「DEEBOT」に名前を付けると「デーボ」かぁ…ってなったんだけど…

 

f:id:honeylab:20170227005647p:plain

 

 

f:id:honeylab:20170227005616p:plain

 

デーボ…

うん、よく働いてくれそうだね!
我が家、ねこ3匹いるので割と毛が大変なことになっていたのですが、
この子のおかげで今後超快適に暮らせそうです。

www.youtube.com

 

 

 

 

 

 

Work NESC as USB-Ether gadget (USB Device mode ) (need kernel recompile...)

I have succeed to use NESC as usb-ethernet-gadget.
This make us enable to transfer file and communitaion by TCP/IP.
We will able transfer any files without wondering kernel ramdisk size.

 

This is kernel xconfig.

 f:id:honeylab:20170221033430p:plain

 

Clover presense is Nintendo USB Device driver for 500mA current sink.

This driver is included Nintendo Linux sources with KConfig and enabled in default kernel.

Check RNDIS driver ( and other )

 

Write some script.

f:id:honeylab:20170221034117p:plain

 

 

f:id:honeylab:20170221034039p:plain

In NESC , rndis0 enabled .

 

Connect USB Cable to Windows ( on linux failed....) (and boot from SD card )

then RNDIS device shown

Set IP

 f:id:honeylab:20170221035648p:plain

 

 

Let's ping from windows to NESC over USB RNDIS Driver... 

f:id:honeylab:20170221035703p:plain

ping arrived!

 

 And from NESC console to Windows...

f:id:honeylab:20170221035219p:plain

 

Success!

 

But the kernel is on SD Card yet...
Because Mali driver won't work after switch_root to /newroot.
I think some kernel compile option or any are wrong...

How to enable NESC's microUSB connector as Host

First, I have already explain why NESC don't work as USB host below.

honeylab.hatenablog.jp

 

So,I must use tweak to usb controller work only host mode.

I have test change linux kernel config as 'host only' , but it cause link error in modules.
Some driver file must need otg support configuration.

f:id:honeylab:20170218012644p:plain

So I had left this configuration "otg support".

 

While searching same hack,I found this contents.

USB OTG as an Extra USB Host in Allwinner A10, A20 etc | dmsherazi

so,I have edit script.fex (it has dumped from NESC boot image script.bin decompiled).
as USB controller work as only HOST.
And re-compile Linux kernel with some drivers.

It was succeeded,but currentry , It need some soldering for power line .
In near future , it will no need , I hope.

 

 The working bootlog and console is below.

https://bitbucket.org/!api/2.0/snippets/hiromitu/Ge8eB/700c9641d13bfa0e0548f170b83dd582323d36a1/files/nesc_usb%20boot%20log

 

There are some devices message recognized on my custom kernel.

  • a USB-PS Gamepad converter  will use with /dev/input/js0
  • USB-Serial Converter FT232R will make /dev/ttyUSB0
  • IO DATA USB Flash Driver 32GB has uses with fdisk
  • PCI GU-1000Air USB-Ethernet Converter will make eth0 and ping packet to 8.8.8.8 !!

 

And, more devices will work on NESC as a usual Linux.

 

My NESC development envrionment is boot from SD Card.
Linux kernel has re-compiled from Nintendo OSS resource with some re-configure.

This project goal is what new Linux kernel and some drivers will  written to flash area.
I will adjust and learn hard.

 

To write flash :

  • remake boot.img with linux kernel reconfigured and drivers.
  • overwrite script.bin on boot area

I think I will use hakchi custom for update kernel.

.. or Someone who not me , will make it soon.

Why Nintendo Classic Mini does not recognize Flash Drive or USB GamePad ?

f:id:honeylab:20170216170501p:plain

↑これがUSB周りの拡大写真です。

VCC INはL?を通って供給され、D+/D- は並行してR16に渡されています。
しかし、USB OTG ID ピンはR16につながっていません。
よって、USB HOSTとして自動的に認識されることはなく、
少なくとも、上記の部分に部品を追加するか、
Linux側を工夫して、強制的にHOSTモードに入るようにするしかないと考えています。
以下は、olimexのA33ボードの回路図ですが、

f:id:honeylab:20170216170910p:plain

 

f:id:honeylab:20170216171028p:plain

3.0Vにプルアップしておくことと、
USB-DETをR16に接続すること(A33では243Ω経由、しかも1%精度指定)が鍵なのではないかと思います。



尚、このIDがNESCでどこにつながっているかというのは

f:id:honeylab:20170216170713p:plain

内層に接続されてしまっていて、見た目からは判断できませんでした。
もしかすると、olimexのA33と同じようにPB3に接続されているかもしれません。
ちょっとfexでどうなってるか見てくるか。

解析メモ

newroot内のlibEGL.soのコンパイルオプション?

BUILD=RELEASE ARCH=arch_011_udd PLATFORM=default_7a TRACE=0 THREAD= GEOM=mali_gp_geometry_common CORES=MALI400 USING_MALI400=1 TARGET_CORE_REVISION=0x0101 TOPLEVEL_REPO_URL=1c2c9ed REVISION=1c2c9ed CHANGED_REVISION=1c2c9ed REPO_URL=heads/master BUILD_DATE=2016蟷エ 06譛・28譌・ 譏滓悄莠・10:25:01 CST CHANGE_DATE=2016-03-02 10:43:05 +0800 TARGET_TOOLCHAIN=arm-linux-gcc HOST_TOOLCHAIN=gcc TARGET_TOOLCHAIN_VERSION= HOST_TOOLCHAIN_VERSION=gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2)  TARGET_SYSTEM=gcc-arm-linux HOST_SYSTEM=gcc-x86_64-linux CPPFLAGS= CUSTOMER=internal VARIANT=mali400-gles11-gles20-linux-dma_buf-rgb_is_xrgb-no_Werror HOSTLIB=direct INSTRUMENTED=FALSE USING_MRI=FALSE MALI_TEST_API= UDD_OS=linux

 

busyboxのバージョン

(busybox 1.24.1, 2016-08-30 12:01:55 CEST)

 

部品の型番

USBのそば「7C」 6pin

MN1D6

RS H

D3=P27