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

aws_publish IPPROTO_SEC type error #42

Open
StevenSOConnell opened this issue May 29, 2020 · 4 comments
Open

aws_publish IPPROTO_SEC type error #42

StevenSOConnell opened this issue May 29, 2020 · 4 comments

Comments

@StevenSOConnell
Copy link

Using the aws_publish example with umqtt installed on XBC KTE-M/NB-IoT modem firmware 11415 with L0.0.00.00.05.08 installed. When I run the example I get:

File "", line 58, in
File "", line 47, in publish_test
File "/flash/lib/umqtt/simple.py", line 61, in connect
TypeError: must use IPPROTO_SEC

What does this mean? MicroPython version 3.4.0.

In the Digi MicroPython Programming Guide PDF page 135 it says:

  • You can only wrap a socket created with protocol IPPROTO_SEC. Python3 uses IPPROTO_TCP

Does this mean this example will not run on my setup using Python 3?

@mikewadsten
Copy link
Contributor

mikewadsten commented May 29, 2020

Hi @StevenSOConnell ,

Based on that error message, it looks like you might not be using the umqtt library from this repository (https://github.com/digidotcom/xbee-micropython/tree/master/lib/umqtt). The error coming from line 61 is a sign you are using the umqtt library from micropython-lib: https://github.com/micropython/micropython-lib/blob/master/umqtt.simple/umqtt/simple.py#L61

We would recommend using the Digi XBee MicroPython PyCharm Plugin to run these samples and develop MicroPython applications for the XBee. http://cms.digi.com/resources/documentation/digidocs/90002219/#container/cont_pycharm.htm . Running this sample using our PyCharm plugin will automatically use the correct version of umqtt for the XBee.

@StevenSOConnell
Copy link
Author

StevenSOConnell commented May 29, 2020 via email

@mikewadsten
Copy link
Contributor

@StevenSOConnell What if you use the 11413 firmware?

Also try formatting the XBee filesystem and retesting on 11415. It's possible the micropython-lib umqtt library was still there and was used when you tried it in PyCharm the second time.

@StevenSOConnell
Copy link
Author

StevenSOConnell commented Jun 1, 2020 via email

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

2 participants