-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wifi connected but no files listed #56
Comments
Try running |
OK, uos.listdir() shows all the remote files. |
Then there's problem somewhere in how the output is wait for or processed. There's still an open issue #48 which is related - when a program is running and it takes a while to finish, files are not listed. However, clicking the List Files button should list them. I'm packing for 2 weeks vacation so really don't have time to fix this now, but you may try to debug |
Thanks, I'll see what I can do. In the meantime: happy holidays! |
Thanks! :) |
Tried to find the cause of the missing filelist, but to no avail. |
Hi, so I'm back and will be able to look into this maybe tomorrow. There's a function responsible for clearing terminal (without looking at code I think it's |
Let me know if I can do something more to help. |
Hi, I just released new code that should solve your issue. Please let me know if it works. |
I can confirm: the new version shows the list of remote files via the Wifi connection and seems to work otherwise as before (good!) too! One remark: The use of a wifi connection looked ideal to me for the Sonoff S20s, because I wouldn't have to open the boxes for reprogramming. But it requires an active Access Point in each of the S20s. However I use the S20s as wifi stations and don't want all these APs to appear in a Wifi scan by whoever is in the neighbourhood. Therefore my application disables the AP. And the app is otherwise rather simple, so I do not expect frequent updates. |
Ok I'm glad it worked! :) About the AP thing. Yeah if you don't want those devices on your home network and neither have the AP visible, there's not much of a choice than to use UART. However, I might have a last suggestion. How about on restart you would enable the AP and then turn it off after let's say 5 minutes? I guess these devices don't have batteries so if you wanted to reprogram them later, you'd just have to plug them out, then back in and in next 5 minutes you would be able to make connection. Connecting with uPyLoader would break the main program, so the AP would remain enabled as long as you needed. This would work for Sonoff S20. For devices that are installed permanently (like wall switch) this would be a problem but I guess you could still come up with something, like hold these 2 buttons for 5 seconds to enable AP. |
Thanks for the suggestion! A period with active AP at startup seems a good idea! |
If I may still use this issue for a related problem.... |
Not really.. I guess if you know how to fix it, you could just call |
It appears there was something wrong with boot.py (I ignored the error message and everything seemed to work well regardless the message). After erase and flashing of the latest micropython no more error messages from boot.py and I was able to transfer files via Wifi (the termination of the application program with connect by uPyLoader worked too). |
It is. Does anything appear when you send simple print command? You can try to send kill with Ctrl-C (the Otherwise it would require some debugging. It's possible that autoreader (thing that periodically reads device output and prints it to terminal) was not re-enabled after listing files. Would have to look into this if your problem won't go away. |
Following your suggestion I activate an AP in my application at startup/reset and deactivate it after a few minutes. Each of the S20s uses a separate SSID (via machine.unique_id()). I make the AP active too when my application terminates due to an exception. This looks like a workable and acceptable situation. The terminal window of uPyLoader works indeed, although it appears and reacts slightly different than I was used to via UART. Entering a python statement in the lower half shows the echo and its result in the upper half. Also very useful is that I can reset the S20, thus restart the application with control-D! uPyLoader becomes more and more useful to me (and hopefully to other users!). |
"Entering a python statement in the lower half shows the echo and its result in the upper half." - should work the same for UART. Or have you been actually writing in the upper part whole time? (ouch..) If so, I need to make it more apparent that one should preferably use the lower half. The upper sends keystrokes directly to device thus doesn't allow edits before sending command and has some issues. Only thing I use the upper half for autocompletion using Tab (useful when I'm not sure about module or function name). Anyway, glad that it worked. After your final reply I'll close the issue. |
I'm typing in the lower window!
|
Huh, interesting, thanks for the report. I didn't observe the first bullet but it may be different between devices. The second might be because when device is restarting, it doesn't write anything to websocket (WiFi connection) as opposed to UART. |
Anyway, if there's anything else I can help you with, feel free to reopen or just create a new issue. |
Hi, |
I'm trying to transfer files via Wifi.
I have run webrepl_setup on an esp8266 (actually a Sonoff S20), specified Enabled at boot and given a password.
From my laptop I made a wifi connection to this esp8266: ifconfig shows as my IP: 192.168.4.3.
uPyLoader shows 'Wifi', IP 192.168.4.1 and port 8266 in the header. When hitting 'Connect' I am asked for the WebREPL password and after that uPyLoader shows as status: Connected.
The LED of the S20 shows me that the application which was running before the connection with uPyLoader is terminated (supposedly by Ctrl-C from uPyLoader), but otherwise nothing happens: no list of files in the esp8266, and no Error messages. Hitting 'List FIles' on the right half of the window blinks shortly but does nothing, also no error message. Nevertheless attempting to transfer a file gives a popup of the File Transfer widget with the progress indicator at 100%, but nothing arrived at the other end.
I read the info about Wifi and webREPL, but found no clue for this problem. What am I missing?
The text was updated successfully, but these errors were encountered: