Unreliable Operation: FTP, Telnet, Power, ...

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
User avatar
mbirth
Posts: 25
Joined: Mon Oct 20, 2014 1:00 pm
Location: Berlin, Germany
Contact:

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by mbirth » Mon Nov 02, 2015 3:58 pm

While we're at it: Midnight Commander also shows a strange symptom with the WiPy. FTP basically works, but after I changed to the /flash directory and press Ctrl-R (Refresh) a couple of times, the WiPy will sometimes return the contents of /flash (correct) but sometimes it returns the contents of / (wrong). However, storing and loading files always works reliably.
pyBoard v1.0 + LCD32MKv1.0 | WiPy + Expansion Board | GitHub

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by danicampora » Mon Nov 02, 2015 4:09 pm

OK, I'll test it to see what's the problem. Thanks for the report.

xyb
Posts: 7
Joined: Fri Dec 13, 2013 12:59 pm

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by xyb » Wed Nov 04, 2015 8:43 am

danicampora wrote:
2 errors detected
What's that about? Any idea what are the errors that lftp refers to?
Here is the lftp debug information:
$ lftp 192.168.6.111
lftp 192.168.6.111:~> user micro python
lftp micro@192.168.6.111:~> debug 9
lftp micro@192.168.6.111:~> mirror -R flash flash
---- Connecting to 192.168.6.111 (192.168.6.111) port 21
<--- 220 Micropython FTP Server
---> FEAT
<--- 332
---> AUTH TLS
<--- 332
---> USER micro
**** SSL_connect: unknown protocol
---- Closing control socket
---- Connecting to 192.168.6.111 (192.168.6.111) port 21
<--- 220 Micropython FTP Server
---> FEAT
<--- 332
---> USER micro
<--- 331
---> PASS python
<--- 230
---> PWD
<--- 257 /
---> MKD flash
<--- 550
---- CWD path to be sent is `~/flash'
---> CWD flash
<--- 250
---> PASV
<--- 227 (192,168,6,111,7,232)
---- Connecting data socket to (192.168.6.111) port 2024
---- Data connection established
---> LIST
<--- 150
<--- 226
---- Got EOF on data connection
---- Closing data socket
---> TYPE I
<--- 200
---> MDTM boot.py
<--- 213 20151102213652
---> MDTM cert
<--- 213 20150101000022
---> MDTM lib
<--- 213 20150101000022
---> MDTM main.py
<--- 213 20151102200722
---> MDTM setup_blynk.py
<--- 213 20151102204934
---> MDTM setup_repl.py
<--- 213 20151102181030
---> MDTM setup_time.py
<--- 213 20151102193250
---> MDTM setup_wifi.py
<--- 213 20151102213652
---> MDTM sys
<--- 213 20150101000022
---> MDTM test.py
<--- 213 20150101000040
---> MDTM wipy_info.py
<--- 213 20151102181038
---> PASV
<--- 227 (192,168,6,111,7,232)
---- Connecting data socket to (192.168.6.111) port 2024
---- Data connection established
---> ALLO 8
<--- 502
---> STOR t.py
<--- 150
---- Closing data socket
<--- 226
---> SITE UTIME 20151104081322 t.py
<--- 502
---> SITE UTIME t.py 20151104081322 20151104081322 20151104081322 UTC
<--- 502
---- CWD path to be sent is `~/flash/lib'
---> CWD
<--- 250
---> CWD flash
<--- 550
mirror: Access failed: 550 (~/flash/lib)
---> CWD lib
<--- 250
---- CWD path to be sent is `~/flash'
---> CWD
<--- 250
---> CWD flash
<--- 250
---> SITE CHMOD 644 t.py
<--- 502
New: 1 file, 0 symlinks
8 bytes transferred
To be removed: 2 directories, 1 file, 0 symlinks
4 errors detected
I think the 4 errors should be:

1. 'AUTH TLS';
2. 'MKD flash';
3. CWD to 'lib' from 'flash' dir ('cd flash/lib' works, but 'cd lib' after 'cd flash' doesn't, wired)
4. don't know...
PYBv1.0, WiPy

xyb
Posts: 7
Joined: Fri Dec 13, 2013 12:59 pm

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by xyb » Wed Nov 04, 2015 8:54 am

OK, I know why CWD failed: `cd ~/flash/lib` doesn't work
lftp micro@192.168.6.111:~> cd ~/flash
cd ok, cwd=~/flash
lftp micro@192.168.6.111:~/flash> cd ~/flash/lib
cd: Access failed: 550 (~/flash/lib)
lftp micro@192.168.6.111:~/flash> cd /flash
cd ok, cwd=/flash
lftp micro@192.168.6.111:/flash> cd /flash/lib
cd ok, cwd=/flash/lib
lftp micro@192.168.6.111:/flash/lib>
PYBv1.0, WiPy

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by danicampora » Wed Nov 04, 2015 9:18 am

OK I see, thanks. It's probably worth adding support for that.

garyq
Posts: 2
Joined: Sat Nov 07, 2015 11:53 pm

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by garyq » Sun Nov 08, 2015 12:20 am

hi
I received my WiPy on Friday and generally everything works. I used telnet for interactive Pythoning, and found most things as expected.
For the FTP transfer, I set up Filezilla as documented and it worked perfectly. e.g. I used it to transfer boot.py and main.py to my PC.

But... If I use ftp in console mode, it doesn't work as expected.
e.g.

Code: Select all

>ftp 192.168.1.1
Connected to 192.168.1.1
220 Micropython FTP Server
<enter credentials, and log in>
ftp> ls
502      
502
ftp> cd /flash
ftp> ls
502
As shown above, when I use "ls" (or "dir"), I expect to get a listing of files and directories, but I just get numbers (502).
This is odd, since Filezilla correctly shows the directories and files.

What am I doing wrong in console mode?

Thanks
Gary

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by danicampora » Sun Nov 08, 2015 9:24 am

Hi Gary,

This is in the docs. You need to set the mode to passive. After loging in, just type:

ftp> passive

Press enter, and the everything will work.

Cheers,
Daniel

garyq
Posts: 2
Joined: Sat Nov 07, 2015 11:53 pm

Re: Unreliable Operation: FTP, Telnet, Power, ...

Post by garyq » Mon Nov 09, 2015 9:25 am

hi Daniel
Yes I saw the documentation comment to use "passive"mode but I tried this before posting, and it didn't work.

I have looked further into this and found that the native Windows ftp client does not support "passive" mode. Linux clients do.

I've found WinSCP which can be used in both GUI and command line mode and that works fine.

Gary

Post Reply