drcoms / client-micropy Goto Github PK
View Code? Open in Web Editor NEWmicropython版
micropython版
已安装micropython
和micropython-lib
:
root@OpenWrt:~# opkg install micropython
Installing micropython (1.9.2-1f78e7a43130acfa4bedf16c1007a1b0f37c75c3-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mipsel_24kc/packages/micropython_1.9.2-1f78e7a43130acfa4bedf16c1007a1b0f37c75c3-1_mipsel_24kc.ipk
Installing libffi (3.2.1-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mipsel_24kc/packages/libffi_3.2.1-3_mipsel_24kc.ipk
Configuring libffi.
Configuring micropython.
root@OpenWrt:~# opkg install micropython-lib
Installing micropython-lib (1.9-f5fe55aaef1a39d3d56f07040c0ff9f7e841fdf7-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mipsel_24kc/packages/micropython-lib_1.9-f5fe55aaef1a39d3d56f07040c0ff9f7e841fdf7-1_mipsel_24kc.ipk
Configuring micropython-lib.
配置文件已经按drcom-generic指南写好并且放到了/etc/
中。
执行latest-wired.py
时出错:
root@OpenWrt:~# micropython latest-wired.py
Traceback (most recent call last):
File "latest-wired.py", line 7, in <module>
File "/usr/lib/micropython/re.py", line 6, in <module>
File "/usr/lib/micropython/ffilib.py", line 34, in open
File "/usr/lib/micropython/ffilib.py", line 29, in open
OSError: [Errno 2] ENOENT
Traceback (most recent call last):
File "./drcom.py", line 4, in
File "/tmp/libs/os.py", line 22, in
OSError: 2
在 drcom-generic latest-wired-python3.py 的基础上改了一个可以在 micropython 上使用的版本出来。
我把log附上,卡在最后一行那里不动了,电脑用python版的可以连上,但micropython连不上,drcom是d版的。用户名密码我和谐掉吧。。。我用的命令是"micropython latest-wired.py",latest-wired.py文件里面的#config这一段我是直接从python版latest-wired.py里面复制过来的。
以下是log的内容:
auth svr:172.19.16.2
username:***
password:***
mac:0xb827eb7b556b
[challenge] recv b'\x02\x02\x03m`}\x03\x00\x00\x00\x01\x00\xf3\x03\xe8\xf0\x00\x00\x00\x00\nj:\x92\xf0\x00\xa8\xa6\x00\x00p\xcd\xa0\xa3\x00\x00\x00\x00\xd8\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[DEBUG] challenge:
b'\x02\x02\x03m`}\x03\x00\x00\x00\x01\x00\xf3\x03\xe8\xf0\x00\x00\x00\x00\nj:\x92\xf0\x00\xa8\xa6\x00\x00p\xcd\xa0\xa3\x00\x00\x00\x00\xd8\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[challenge] challenge packet sent.
[mkpkt] b"\x03\x01\x00$\xe0P\xbaE\xf1\xb5,w/\x9b^\xbb\x84\\\xc5\xb515574016603@hnlg\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x07XwQ>\xa4\xde-:\xd25=\xcf\x88\xe5\xedy\xf3\x93m6sK\x01\nj:\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00N\xc2\xb1\xa6\x02I\xb2\xbb\x01\x00\x00\x00\x00DRCOMFUCKER\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00rrrr\nj:\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x05\x00\x00\x00\x01\x00\x00\x00(\n\x00\x00\x02\x00\x00\x00WINDIAOS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x02\x0c\xf0\xbf%\xec\x00\x00\xb8'\xeb{Uk\x00\x00\xe9\x13"
[login] send b"\x03\x01\x00$\xe0P\xbaE\xf1\xb5,w/\x9b^\xbb\x84\\\xc5\xb515574016603@hnlg\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x07XwQ>\xa4\xde-:\xd25=\xcf\x88\xe5\xedy\xf3\x93m6sK\x01\nj:\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00N\xc2\xb1\xa6\x02I\xb2\xbb\x01\x00\x00\x00\x00DRCOMFUCKER\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00rrrr\nj:\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x05\x00\x00\x00\x01\x00\x00\x00(\n\x00\x00\x02\x00\x00\x00WINDIAOS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x02\x0c\xf0\xbf%\xec\x00\x00\xb8'\xeb{Uk\x00\x00\xe9\x13"
[login] recv b'\x04\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00Drco\xac\x13\x10\x02\x97*\nj:\x92\x01\xb1\xb0\x05\x00\x03\x01\x00'
[login] packet sent.
[challenge] recv b'\x02\x02\x03m`}\x03\x00\x00\x00\x01\x00\xf3\x03\xe8\xf0\x00\x00\x00\x00\nj:\x92\xf0\x00\xa8\xa6\x00\x00p\xcd\xa0\xa3\x00\x00\x00\x00\xd8\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[DEBUG] challenge:
b'\x02\x02\x03m`}\x03\x00\x00\x00\x01\x00\xf3\x03\xe8\xf0\x00\x00\x00\x00\nj:\x92\xf0\x00\xa8\xa6\x00\x00p\xcd\xa0\xa3\x00\x00\x00\x00\xd8\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[challenge] challenge packet sent.
[mkpkt] b"\x03\x01\x00$\xe0P\xbaE\xf1\xb5,w/\x9b^\xbb\x84\\\xc5\xb515574016603@hnlg\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x07XwQ>\xa4\xde-:\xd25=\xcf\x88\xe5\xedy\xf3\x93m6sK\x01\nj:\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00N\xc2\xb1\xa6\x02I\xb2\xbb\x01\x00\x00\x00\x00DRCOMFUCKER\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00rrrr\nj:\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x05\x00\x00\x00\x01\x00\x00\x00(\n\x00\x00\x02\x00\x00\x00WINDIAOS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x02\x0c\xf0\xbf%\xec\x00\x00\xb8'\xeb{Uk\x00\x00\xe9\x13"
[login] send b"\x03\x01\x00$\xe0P\xbaE\xf1\xb5,w/\x9b^\xbb\x84\\\xc5\xb515574016603@hnlg\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x07XwQ>\xa4\xde-:\xd25=\xcf\x88\xe5\xedy\xf3\x93m6sK\x01\nj:\x92\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00N\xc2\xb1\xa6\x02I\xb2\xbb\x01\x00\x00\x00\x00DRCOMFUCKER\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00rrrr\nj:\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x05\x00\x00\x00\x01\x00\x00\x00(\n\x00\x00\x02\x00\x00\x00WINDIAOS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x02\x0c\xf0\xbf%\xec\x00\x00\xb8'\xeb{Uk\x00\x00\xe9\x13"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.