access via SSH?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

access via SSH?

Post by pythonista » Mon Jun 13, 2016 8:30 pm

Is it possible to connect remotely over wifi (using SSH) to my ESP8266 running Micropython? 8-)

torwag
Posts: 217
Joined: Fri Dec 13, 2013 9:25 am

Re: access via SSH?

Post by torwag » Mon Jun 13, 2016 8:43 pm

No, that would require to run an ssh server on the esp8266. For the ssh server it would need some more dependencies, it would need a shell and it would need some sort of underlyimg OS to manage all this in some way. etc. Micropython is not an OS (yet ;) ). Thus it is unlikely that something like ssh will ever work. If you work with micropython you need to think about bare metal microcontrollers which execute a single python program.

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Mon Jun 13, 2016 8:47 pm

understand totally, but I am so delighted with MicroPython that I think that remote access is the only thing missing for total happiness :))

at least telnet (if openssl is too complicated for now) would be nice... (and enable to thinker with micropython without wires...)

markxr
Posts: 62
Joined: Wed Jun 01, 2016 3:41 pm

Re: access via SSH?

Post by markxr » Mon Jun 13, 2016 9:52 pm

Telnet is probably do-able with the current infrastructure in Micropython. The existing remote shell is not too different from telnet.

torwag
Posts: 217
Joined: Fri Dec 13, 2013 9:25 am

Re: access via SSH?

Post by torwag » Mon Jun 13, 2016 10:20 pm

do you know about webrepl?

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Mon Jun 13, 2016 11:09 pm

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

User avatar
deshipu
Posts: 1354
Joined: Thu May 28, 2015 5:54 pm

Re: access via SSH?

Post by deshipu » Tue Jun 14, 2016 9:36 am

you need webrepl.start()

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Wed Jun 15, 2016 10:11 pm

Thank you, work like a charm...

connects via web client, but it always ask for a password setup (first time setup)...

any idea why it don't save settings?

here is message from console while connecting via web script...

Code: Select all

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

User avatar
deshipu
Posts: 1354
Joined: Thu May 28, 2015 5:54 pm

Re: access via SSH?

Post by deshipu » Thu Jun 16, 2016 8:13 am

Can you run "import port_diag" on your board and paste here the results?

pythonista
Posts: 16
Joined: Sun Jun 12, 2016 4:51 pm

Re: access via SSH?

Post by pythonista » Thu Jun 16, 2016 6:21 pm

yes, here is it:

Code: Select all

>>> import port_diag
FlashROM:
Flash ID: 1640e0 (Vendor: e0 Device: 4016)
Flash bootloader data:
Byte @2: 00
Byte @3: 40 (Flash size: 4MB Flash freq: 40MHZ)

Networking:
STA ifconfig: ('192.168.60.232', '255.255.255.0', '192.168.60.1', '192.168.60.1')
AP ifconfig: ('0.0.0.0', '0.0.0.0', '0.0.0.0', '192.168.60.1')
Free WiFi driver buffers of type:
0: 8
1: 0
2: 8
3: 4
4: 7
lwIP PCBs:
Active PCB states:
Listen PCB states:
TIME-WAIT PCB states:
>>> 

Post Reply