micropython / micropython/micropython
esp32: Using umqtt blocks access to webrepl
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22.1k
- Forks
- 9k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 16
Description
I'm using a ESP32-WROOM32 flashed with esp32-20181229-v1.9.4-762-gfa50047bb.bin.
When using umqtt in main.py with:
c = MQTTClient('relay-board-esp32', 'example.com')
c.set_callback(sub_cb)
c.connect()
c.subscribe('POWER')
try:
while True:
c.wait_msg()
finally:
c.disconnect()
and webrepl in boot.py with:
import time
import network
import webrepl
nic = network.WLAN(network.STA_IF)
nic.active(True)
nic.connect('wifi', 'password')
while not nic.isconnected():
time.sleep(1)
print('Connected to WiFi!')
print(nic.ifconfig())
webrepl.start()
no further connections via webrepl are possible.
Is this intended? Is there a solution or work around?
I thought the webrepl is listening in the background for new connections, but as soon as I run umqtt, webrepl does not accept new connections any more.
Does this mean no simultaneous access to webrepl and mqtt subscriptions is possible?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the setup using main.py with umqtt and boot.py with webrepl on an ESP32, starting with the shown c.wait_msg() loop and webrepl.start() entry points. Check whether simultaneous MQTT subscriptions and webrepl connections are supported; done means either both connections work or the limitation and workaround are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100