Commit Graph

42 Commits

Author SHA1 Message Date
Paul Sokolovsky
7327d5f6f7 esp8266/scripts/port_diag: Add network diagnostic output. 2016-05-16 23:52:58 +03:00
Paul Sokolovsky
13a1acc7e2 esp8266/scripts/webrepl: Add start_foreground() method.
Starts WebREPL server in foreground and waits for (single) connection.
2016-05-08 20:01:15 +03:00
Noah Rosamilia
2724bd4a94 esp8266/scripts/webrepl: Add optional password argument to webrepl.start()
This commit fixes issue #2045
2016-05-07 22:45:08 +03:00
Mike Causer
13d06a83e1 esp8266/scripts/: Add fill() to NeoPixel 2016-05-07 21:15:33 +03:00
Paul Sokolovsky
8db61e5b5a esp8266/scripts/inisetup: Don't start WebREPL on boot in master branch.
It interferes with running testsuite. master branch should be optimized for
development, so any features which interfere with that, would need to be
disabled by default.
2016-05-07 20:04:45 +03:00
Paul Sokolovsky
df2b1a4758 esp8266/scripts/: Remove use of pin.PULL_NONE.
This constant is no longer part of hardware API (replaced with just None),
and is a default, so not needed in calls.
2016-05-05 23:47:37 +03:00
Paul Sokolovsky
f873a5005a esp8266/scripts/ntptime: Add simple NTP client.
.time() returns seconds since MicroPython epoch (2000-01-01 00:00UTC),
.settime() sends current system time, assuming UTC timezone.
2016-05-03 16:47:42 +03:00
Damien George
b539a61490 esp8266/scripts/neopixel.py: Swap red and green in pixel accessor. 2016-05-03 11:17:37 +01:00
Paul Sokolovsky
5e94f0b43a esp8266/scripts/inisetup: Update for nic.mac() method being gone. 2016-05-03 02:16:42 +03:00
Paul Sokolovsky
3944d3511f esp8266/scripts/inisetup: Enable WebREPL auto-start on boot. 2016-05-03 00:38:47 +03:00
Paul Sokolovsky
13d9d50fea esp8266/scripts/webrepl_setup: Reject too short passwords. 2016-05-02 18:48:32 +03:00
Paul Sokolovsky
c1d1c562f3 esp8266/scripts/webrepl: Add "first connection" mode to setup password.
If there's no port_config.py file, or it lacks WEBREPL_PASS variable,
"initial setup mode" will be entered on first WebREPLconnection. User
will be asked for password, which will be written to
port_config.WEBREPL_PASS, and system restarted to work in normal mode
with password active.
2016-04-30 20:41:09 +03:00
Paul Sokolovsky
962d5a987f esp8266/scripts/webrepl: Switch to using _webrepl object wrapper.
Handling of binary protocol is untested on esp8266 so far.
2016-04-30 20:39:35 +03:00
Paul Sokolovsky
006ffe1561 esp8266/scripts/webrepl: Connection ack prompt is now printed by modwebrepl.
After password is checked.
2016-04-30 20:38:05 +03:00
Paul Sokolovsky
6ddd9f3e2b esp8266/scripts/inisetup: Create default boot.py in filesystem.
Currently it pre-imports webrepl, but doesn't start it.
2016-04-29 20:11:48 +03:00
Paul Sokolovsky
74f413bc60 esp8266/scripts/_boot: builtins is no longer used. 2016-04-29 20:04:17 +03:00
Paul Sokolovsky
d86d65f625 esp8266/scripts: Move all of initial setup to inisetup module. 2016-04-29 20:02:59 +03:00
Damien George
8c3b5526ae esp8266/scripts/neopixel.py: Remove test function from neopixel driver.
It takes up lots of room and isn't needed.
2016-04-28 13:37:17 +01:00
Damien George
1f7cec944e esp8266/scripts/onewire.py: Simplify and improve 1-wire driver.
Changes are:
- added OneWireError exception and used where errors can occur
- renamed read/write functions to use same names as C _onewire funcs
- read_bytes is now read, write_bytes is now write
- add ability to read/write DS18B20 scratch pad
- rename start_measure to convert_temp (since that's what it does)
- rename get_temp to read_temp (consistency with other read names)
- removed test function
2016-04-28 13:33:55 +01:00
Damien George
38358a096d esp8266: Move onewire.py, neopixel.py drivers from tests/ to scripts/. 2016-04-28 12:36:45 +01:00
Paul Sokolovsky
90b2cfe644 esp8266/scripts/webrepl: Add "ws://" to "daemon started at" message.
To remind people it's not HTTP.
2016-04-26 12:47:24 +03:00
Paul Sokolovsky
237c519ac4 esp8266/scripts/flashbdev: Use all available Flash for filesystem.
All Flash sans firmware at the beginning and 16K SDK param block at the
end is used for filesystem (and that's calculated depending on the Flash
size).
2016-04-26 01:36:32 +03:00
Paul Sokolovsky
ef2ffc0e4e esp8266/scripts/webrepl: Print client address for incoming connections. 2016-04-26 01:00:28 +03:00
Paul Sokolovsky
c888831410 esp8266/scripts/webrepl: Print connection address.
Based on active network interfaces.
2016-04-26 00:59:30 +03:00
Paul Sokolovsky
4296a8dc5c esp8266/scripts/webrepl: Allow to override port. 2016-04-25 18:44:37 +03:00
Paul Sokolovsky
bd66b09512 esp8266/scripts/webrepl: Don't start on import.
Explicit .start() is required now.
2016-04-25 00:33:27 +03:00
Paul Sokolovsky
8db4f363e9 esp8266/scripts/webrepl: Convert to persistent daemon. 2016-04-25 00:31:43 +03:00
Paul Sokolovsky
7c40b15a3f esp8266/scripts/webrepl: WebREPL based on C-level websocket object. 2016-04-24 23:04:21 +03:00
Paul Sokolovsky
d422e56631 esp8266/scripts/websocket_helper: Disable debug output. 2016-04-22 18:19:54 +03:00
Paul Sokolovsky
eb40769613 esp8266/scripts/websocket_helper: Module encapsulating handshake sequences. 2016-04-22 18:18:27 +03:00
Paul Sokolovsky
cc1ef76f88 esp8266/scripts/flashbdev: Correct bootloader flash size to match real size.
Flash size as seen by vendor SDK doesn't depend on real size, but rather on
a particular value in firmware header, as put there by flash tool. That means
it's user responsibility to know what flash size a particular device has, and
specify correct parameters during flashing. That's not end user friendly
however, so we try to make it "flash and play" by detecting real size vs
from-header size mismatch, and correct the header accordingly.
2016-04-20 18:07:34 +03:00
Paul Sokolovsky
584406880c esp8266/scripts/_boot: Print notice when initial setup is executed. 2016-04-20 18:01:09 +03:00
Paul Sokolovsky
2494399a42 esp8266/scripts/flashbdev: Disable debug output/checks. 2016-04-20 00:35:46 +03:00
Paul Sokolovsky
8dcce92606 esp8266/scripts: Don't try to create filesystem on 512KB devices or less.
There's no space for it.
2016-04-18 17:14:00 +03:00
Paul Sokolovsky
3a5a35aaec esp8266/scripts/flashbdev: Use all available space in 1MB FlashROM for FS. 2016-04-18 01:23:04 +03:00
Damien George
7d2c685544 esp8266/scripts/_boot: Mount block device on "" instead of "/".
"" is the correct name of the root directory when mounting a device there
(as opposed to "/").  One can now do os.listdir('/') and open('/abc'), as
well as os.listdir() and open('abc').
2016-04-14 22:56:21 +01:00
Paul Sokolovsky
272fad6d9c esp8266/scripts/port_diag.py: Module to collect diagnostic info.
A shortcut for users to provide background diagnostic info for bug
reports.
2016-04-14 18:54:11 +03:00
Damien George
3a37426b29 esp8266/scripts/inisetup.py: Use "-" in AP ESSID instead of space. 2016-04-12 00:47:21 +03:00
Paul Sokolovsky
260b839483 esp8266/scripts/inisetup.py: Set WPA/WPA2 AP mode with a predefined password. 2016-04-12 00:46:04 +03:00
Paul Sokolovsky
40f5ecd3a8 esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-12 00:37:04 +03:00
Paul Sokolovsky
2f5935269b esp8266/scripts/main.py: Remove stale file. 2016-04-12 00:35:13 +03:00
Josef Gajdusek
bda7041294 esp8266: Add support for frozen modules 2015-05-06 22:04:20 +01:00