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

api 2.2.0 talking with fmwr 2.2.0 produces error opening interface #456

Closed
vinloren opened this issue Aug 11, 2023 · 3 comments
Closed

api 2.2.0 talking with fmwr 2.2.0 produces error opening interface #456

vinloren opened this issue Aug 11, 2023 · 3 comments

Comments

@vinloren
Copy link

vinloren commented Aug 11, 2023

Got Exception: This version of meshtastic-python requires device firmware version 1.2 or later. For more information see
https://tinyurl.com/5bjsxu32 upon statement interface = meshtastic.serial_interface.SerialInterface(). Just try this:
``
import meshtastic
import meshtastic.serial_interface
from pubsub import pub

def onReceive(packet, interface): # called when a packet arrives
print(f"Received: {packet}")

def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect to the radio
# defaults to broadcast, specify a destination ID if you wish
interface.sendText("hello mesh")

pub.subscribe(onReceive, "meshtastic.receive")
pub.subscribe(onConnection, "meshtastic.connection.established")
``

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/device-firmware-2-2-0-python-api-2-2-0-error-on-meshtastic-serial-interface-serialinterface/8001/3

@GUVWAF
Copy link
Member

GUVWAF commented Aug 11, 2023

Are you sure that the imported version of meshtastic in your script is also on 2.2.0, and not only the CLI? Maybe you have multiple versions of the package on your system. Since this check was already removed from the source code here: 055da95

What does this show?

import pkg_resources
print(pkg_resources.get_distribution("meshtastic").version)

@vinloren
Copy link
Author

Sorry, it was my fault, actually meshtastic was updated to 2.2.0 on a different python ver (I have 2 versions on my PC) but the one driving my application. After updating meshtastic on the correct python version now all is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants