Page 1 of 1

webrepl on PYBv1.0

Posted: Wed Mar 21, 2018 3:03 am
by Meekdai
Hello everyone, I want to use webrepl on PYBv1.0, but I didn't find help at http://docs.micropython.org/en/latest/p ... ea=default

Through the forum, I found that 'uos.dupterm()' seems to help me 。
Here is my code:

Code: Select all

import pyb
import network
import uos

nic = network.WIZNET5K(pyb.SPI(1), pyb.Pin.board.X5, pyb.Pin.board.X4)
nic.ifconfig(('192.168.1.40', '255.255.255.0', '192.168.1.18', '8.8.8.8'))
print(nic.ifconfig())

import usocket as socket
addr = socket.getaddrinfo('192.168.1.18', 6000)[0][-1]
s = socket.socket()
s.connect(addr)
s.send(b'HELLO WORLD\r\n')
uos.dupterm(s)
Error on REPL :

Code: Select all

MicroPython v1.9.3 on 2018-03-19; PYBv1.0 with STM32F405RG
dupterm: Exception in write() method, deactivating: AttributeError: 'socket' object has no attribute 'write'
Is that means I can't use webrepl on PYBv1.0 ?

I'm sorry I have very poor English

Re: webrepl on PYBv1.0

Posted: Mon Mar 26, 2018 1:08 am
by Meekdai
No one to help answer it? :(

Re: webrepl on PYBv1.0

Posted: Mon Mar 26, 2018 6:26 am
by pythoncoder
The WebREPL was written specifically for the ESP8266. As far as I know nobody has ported it to Pyboard wired Ethernet.

Re: webrepl on PYBv1.0

Posted: Tue Mar 27, 2018 1:55 am
by Meekdai
pythoncoder wrote:
Mon Mar 26, 2018 6:26 am
The WebREPL was written specifically for the ESP8266. As far as I know nobody has ported it to Pyboard wired Ethernet.
I think WebREPL is very useful. Is it difficult to transplant WebREPL to Pyboard ?

Re: webrepl on PYBv1.0

Posted: Tue Mar 27, 2018 8:00 am
by OutoftheBOTS_
I used webrepl when I was using the ESP8266 but then changed up to the ESP32 and very much missed not having webrepl and couldn't understand why no one had ported it across to the ESP32 but then I discovered people have made repl over telnet and file editing/transfer with FTP which made webrepl obsolete.

Re: webrepl on PYBv1.0

Posted: Wed Mar 28, 2018 6:38 am
by Meekdai
To solve this problem, I replaced W5500 with CH9121, because CH9121 is UART interface.

Code: Select all

uart = UART(4)
uart.init(baudrate=115200, bits=8, parity=None, stop=1)
uos.dupterm(uart)