Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't install the library. #85

Open
AndreyVus opened this issue Jan 17, 2024 · 2 comments
Open

I can't install the library. #85

AndreyVus opened this issue Jan 17, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@AndreyVus
Copy link

Description

MicroPython ESP32_LoBo_v3.1.0 - 2017-01-03 on WROVER with ESP32

Type "help()" for more information.

import machine
import network
import time
import upip
upip.install('github:brainelectronics/micropython-modbus')
Installing to: /lib/
Warning: pypi.python.org SSL certificate is not validated
Error installing 'github:brainelectronics/micropython-modbus': Package not found, packages may be partially installed

Reproduction steps

I have Moduino MX4 ESP32 with Com, Eth, Wlan and Lte interfaces.
Thonny:

  • Extras:
    • Interpreter: Micropython
    • Port: Profilitic USB to Serial Com8

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.sleep_ms(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

# e.g. v2.3.3
# use the following command to get the used version
import os
from umodbus import version
print('MicroPython infos:', os.uname())
print('Used micropthon-modbus version:', version.__version__))

Relevant log output

Installing to: /lib/
Warning: pypi.python.org SSL certificate is not validated
Error installing 'github:brainelectronics/micropython-modbus': Package not found, packages may be partially installed

User code

import machine
import network
import time
import upip
upip.install('github:brainelectronics/micropython-modbus')

Additional informations

No response

@beyonlo
Copy link

beyonlo commented Jan 17, 2024

@AndreyVus please, try to download the lib and copy it manually (like as mpremote) to check if works.

@brainelectronics
Copy link
Owner

@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')

@brainelectronics brainelectronics added documentation Improvements or additions to documentation question Further information is requested labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants