Page 2 of 3

Re: access via SSH?

Posted: Thu Jun 16, 2016 7:29 pm
by deshipu
Thank you, that looks good, still no idea what might be wrong.

Re: access via SSH?

Posted: Thu Jun 16, 2016 7:38 pm
by pythonista
does it matter that I use witty esp8266? :roll:

Re: access via SSH?

Posted: Thu Jun 16, 2016 7:39 pm
by deshipu
We all use ESP8266 here.

Re: access via SSH?

Posted: Thu Jun 16, 2016 8:25 pm
by pythonista
yes but maybe differnt amount of ram? i'll try to compile newer version if it exists...

Re: access via SSH?

Posted: Thu Jun 16, 2016 9:13 pm
by patvdleer
pythonista wrote:yes, tried to import it but cannot see that it binds/starts listening?

Code: Select all

dhcp client start...
Performing initial setup
Traceback (most recent call last):
  File "_boot.py", line 9, in <module>
  File "inisetup.py", line 37, in setup
  File "inisetup.py", line 9, in wifi
OSError: can't set AP config
could not open file 'boot.py' for reading
could not open file 'main.py' for reading

#4 ets_task(40100350, 3, 3fff6350, 4)
MicroPython v1.8.1-35-gdeaf071 on 2016-06-12; ESP module with ESP8266
Type "help()" for more information.
>>> ip:192.168.6.232,mask:255.255.255.0,gw:192.168.60.1
import webrepl
>>> pm open,type:2 0

I had the same issue, looks like you are missing a part of the default py files in scripts, I rebuilt the image, make clean && make and redeployed it which mixed the issue for me.

Since there is a problem with the inisetup.py file the vfs isn't setup/loaded which may explain your problems.

Re: access via SSH?

Posted: Thu Jun 16, 2016 11:02 pm
by pythonista
I have recompiled to latest esp version:

Code: Select all

MicroPython v1.8.1-55-g332545b on 2016-06-16; ESP module with ESP8266
but same problem...

Code: Select all

Traceback (most recent call last):
  File "webrepl_setup.py", line 71, in handle_conn
OSError: [Errno 19] ENODE
looking at line 71

Code: Select all

    with open("port_config.py", "w") as f:
        f.write("WEBREPL_PASS = %r\n" % passwd1.decode("ascii"))
but I cannot see port_config.py file ? maybe it is missing/"not writable"?

if I try:

Code: Select all

>>> import os
>>> os.listdir()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>> 
it looks like no file system? device is Witty Cloud (ESP12F)

Re: access via SSH?

Posted: Fri Jun 17, 2016 12:05 am
by pythonista
finally solved it! I was using :
../Library/Arduino15/packages/esp8266/tools/esptool/0.4.8/esptool

instead of:

../esp8266-micropython-vagrant/esptool/esptool.py

thnx 2 all ;)

Re: access via SSH?

Posted: Fri Jun 17, 2016 11:35 am
by jms
The SSH protocol is incredibly heavyweight, an order of magnitude more than what you would want to try running on this board.

It would be better to use a VPN to get onto the network then good old telnet.

In fact the same could be said of TLS/SSL and using external cloud services. It's much easier to talk to something on the local network without it.

Jon

Re: access via SSH?

Posted: Fri Jun 17, 2016 3:17 pm
by patvdleer
pythonista wrote: ...

Code: Select all

>>> import os
>>> os.listdir()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>> 
You should look into vfs, help(vfs) which should show you at least _boot.py

Re: access via SSH?

Posted: Fri Jun 17, 2016 8:02 pm
by pfalcon
jms wrote:
In fact the same could be said of TLS/SSL and using external cloud services. It's much easier to talk to something on the local network without it.

Jon
These are golden words and exactly mirror outlook of the maintainers (well, mine for sure). SSL/TLS is pretty tricky thing, and even big boxes have problems with it, remember or Heartbleed, or at my dayjob, we had intermittent TLS failures for last 2 months and suspected everything up to hardware failure (somewhere at the cloud provider, as customary nowadays). Turned out it's a software issue reported some 5 years ago and marked as "Wontfix": https://bugs.launchpad.net/ubuntu/+sour ... bug/795355 . So again, if "big iron" has problems with it, just imagine what problems small embedded systems have. We provide basic SSL support which works for basic things. I'm ready to go as far as possible beyond that, up to developing own TLS implementation. But before going that deep (can easily take half a year), we're going to make many useful things to be available which should work pretty well in your local network, protected by WPA.