8000 ESP8266 - lwip state is not renitialized on soft-reset · Issue #1896 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
ESP8266 - lwip state is not renitialized on soft-reset #1896
Closed
@wendlers

Description

@wendlers

When using bind on a lwip socket, it looks like the binding is not removed after soft-reset. Binding again to the same port is only possible after hard-reset (when calling close before the soft reset, it is unbound, but I think the socket instances should be closed on soft reset automatically).

import os
>>> os.uname()
(sysname='ESP8266', nodename='ESP8266', release='1.5.2(80914727)', version='v1.6-217-g99fc0d1-dirty on 2016-03-13', machine='ESP module with ESP8266')
>>> import lwip
>>> so = lwip.socket()
>>> so.bind(("", 80))
>>> 
PYB: soft reboot
could not find module 'boot'
>>> 
MicroPython v1.6-217-g99fc0d1-dirty on 2016-03-13; ESP module with ESP8266
Type "help()" for more information.
>>> print(so)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> import lwip
>>> so = lwip.socket()
>>> so.bind(("", 80))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: 128
>>> so.bind(("", 81))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0