webrepl on PYBv1.0

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
Meekdai
Posts: 45
Joined: Mon Jan 29, 2018 12:45 pm

webrepl on PYBv1.0

Post by Meekdai » Wed Mar 21, 2018 3:03 am

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
Last edited by Meekdai on Mon Mar 26, 2018 2:05 am, edited 3 times in total.

User avatar
Meekdai
Posts: 45
Joined: Mon Jan 29, 2018 12:45 pm

Re: webrepl on PYBv1.0

Post by Meekdai » Mon Mar 26, 2018 1:08 am

No one to help answer it? :(

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: webrepl on PYBv1.0

Post by pythoncoder » 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.
Peter Hinch
Index to my micropython libraries.

User avatar
Meekdai
Posts: 45
Joined: Mon Jan 29, 2018 12:45 pm

Re: webrepl on PYBv1.0

Post by Meekdai » Tue Mar 27, 2018 1:55 am

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 ?

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: webrepl on PYBv1.0

Post by OutoftheBOTS_ » Tue Mar 27, 2018 8:00 am

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.

User avatar
Meekdai
Posts: 45
Joined: Mon Jan 29, 2018 12:45 pm

Re: webrepl on PYBv1.0

Post by Meekdai » Wed Mar 28, 2018 6:38 am

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)

Post Reply