loboris / MicroPython_ESP32_psRAM_LoBo

MicroPython for ESP32 with psRAM support
Other
822 stars 342 forks source link

SSH Module missing despite specified in menuconfig #32

Closed mkarliner closed 6 years ago

mkarliner commented 6 years ago

I've pulled the lastest, my menu config has use ssh checked, but import ssh fails. What am I doing wrong?

loboris commented 6 years ago

I've pulled the latest changes to my test directory (not with latest commits). After menuconfig and buils, the ssh module shows up.

FreeRTOS running on BOTH CORES, MicroPython task started on App Core.
Running from Factory partition starting at 0x10000, [MicroPython].

 Reset reason: Power on reset
    uPY stack: 19456 bytes
     uPY heap: 72000/5632/66368 bytes

MicroPython ESP32_LoBo_v3.1.9 - 2017-01-21 on ESP32 board with ESP32
Type "help()" for more information.
>>> help('modules')
__main__          logging           struct            urandom
_thread           machine           sys               ure
array             math              time              urequests
binascii          microWebSrv       tpcalib           uselect
builtins          microWebTemplate  ubinascii         usocket
cmath             micropython       ucollections      ussl
collections       network           uctypes           ustruct
display           os                uerrno            utime
errno             pye               uftpserver        utimeq
freesans20        random            uheapq            uzlib
functools         re                uio               writer
gc                select            ujson             ymodem
hashlib           socket            uos               zlib
heapq             ssd1306           upip
io                ssh               upip_utarfile
json              ssl               upysh
Plus any modules on the filesystem
>>> import ssh
>>> help(ssh)
object <module 'ssh'> is of type module
  __name__ -- ssh
  get -- <function>
  put -- <function>
  list -- <function>
  llist -- <function>
  mkdir -- <function>
  exec -- <function>
  options -- <function>
  TRACE_TRANS -- 2
  TRACE_KEX -- 4
  TRACE_AUTH -- 8
  TRACE_CONN -- 16
  TRACE_SCP -- 32
  TRACE_SFTP -- 64
  TRACE_ERROR -- 128
  TRACE_PUBLICKEY -- 256
  TRACE_SOCKET -- 512
  TRACE_NONE -- 0
  TRACE_ALL -- 1022
>>> 
>>> res=ssh.list('192.168.0.63/','boris','mypass')
>>> res[0]
0
>>> print(res[2])
D   388 .
D   388 ..
D   4840    dev
D   184 home
D   850 lib
D   40  lib64
D   10  media
D   256 opt
D   0   proc
D   490 root
D   1920    run
D   4756    sbin
D   0   srv
D   0   sys
D   620 tmp
D   210 usr
D   140 var
D   1304    lib32
D   54  .ssdroot
D   1366    libx32
F   932 webmin-setup.out
F   50481   _mnt2
D   2522    bin
D   616 boot
D   0   cdrom
D   6050    etc
F   739 dead.letter
D   10  writable
D   0   mnt
D   0   snap
D   0   rootfs
F   886664  tftpboot
F   1036288 core
L   33  initrd.img
L   33  initrd.img.old
L   30  vmlinuz
L   30  vmlinuz.old

>>> 

Have you run ./BUILD clean all ? Maybe you could try the fresh clone...

mkarliner commented 6 years ago

./BUILD clean all fixed it.