Open AndreyVus opened 7 months ago
@AndreyVus please, try to download the lib and copy it manually (like as mpremote) to check if works.
@AndreyVus you used upip
but the mip
install URL. Please use
import mip
mip.install('github:brainelectronics/micropython-modbus')
On Micropython systems with version 1.19.1 or older you can use upip
import upip
upip.install('micropython-modbus')
Description
MicroPython ESP32_LoBo_v3.1.0 - 2017-01-03 on WROVER with ESP32
Type "help()" for more information.
Reproduction steps
I have Moduino MX4 ESP32 with Com, Eth, Wlan and Lte interfaces. Thonny:
boot.py: import network import time import machine import socket
def ethInit(): eth = network.LAN(mdc = machine.Pin(33), mdio = machine.Pin(18), power = None, phy_type = network.PHY_LAN8720, phy_addr = 0) eth.active(1) print("ETH ",end='') for i in range(10): print(".",end='') time.sleepms(500) if eth.isconnected(): for in range(30): time.sleep_ms(200) ifc = eth.ifconfig() print(ifc) if ifc[0] != "0.0.0.0" and ifc[3] != "0.0.0.0": print(' connected') return True break eth.active(0) print(' disconnected') return False def netTest(): s = socket.socket() ai = socket.getaddrinfo("google.com", 80) print("Address infos:", ai) addr = ai[0][-1] print("Connecting address:", addr) s.connect(addr) print("Connected. Sending request...") s.send(b"GET / HTTP/1.0\r\n\r\n") print("Sent OK, wating for answer...") rec = s.recv(10) print("Received: rec", rec) s.close() return rec == b'HTTP/1.1 2' try: if ethInit(): print(netTest()) except Exception as e: print(e)
install-modbus.py: import machine import network import time import upip upip.install('github:brainelectronics/micropython-modbus')
MicroPython version
ESP32_LoBo_v3.1.0 - 2017-01-03 on WROVER with ESP32
MicroPython board
other
MicroPython Modbus version
Relevant log output
User code
Additional informations
No response