Looking into MQTT for Python I wanted to try out mosquitto (http://mosquitto.org/documentation/python/ Python | Mosquitto).
The instruction say It can be installed using "pip install paho-mqtt" which is probably the easiest way to install (rather than git cloning and calling running setup.py). However, pip doesn't come pre-installed.
Taking http://layers.openembedded.org/layerindex/recipe/25901/ OpenEmbedded Metadata Index - python-pip from Daisy branch and bitbaking it.
Installed it together with dependencies
python-2to3 python-bsddb python-curses python-db python-debugger python-doctest python-gdbm python-hotshot python-idle python-mailbox python-modules python-pip python-profile python-pydoc python-robotparser python-setuptools python-smtpd python-sqlite3-tests python-sqlite3 python-syslog python-terminal python-tests python-tkinter.
Still pip not fully functional. After bitbaking http://layers.openembedded.org/layerindex/recipe/20939/ OpenEmbedded Metadata Index - python-setuptools (only found in dora branch?!) pip now works fine on Edison:
# pip install paho-mqtt
Downloading paho-mqtt-1.0.tar.gz (40kB): 40kB downloaded
Running setup.py egg_info for package paho-mqtt
Installing collected packages: paho-mqtt
Running setup.py install for paho-mqtt
Successfully installed paho-mqtt
With that I now can successfully run Mosquitto (so far tested the sample script from https://pypi.python.org/pypi/paho-mqtt paho-mqtt 1.0 : Python Package Index)
: would it be possible to add pip to your repo?
I'd rather suggest to use a different way to install it, Not Yocto-like, which is harder in this case, but the Python-like I used it and it's really simple, especially on WW42 and later when they added necessary base python modules used by pip per my bug report.
Just use the get-pip.py from here: https://pip.pypa.io/en/latest/installing.html Installation — pip 1.5.6 documentation and it should install it for you. I don't have the board at hand right now to show the full sequence of steps, but IIRC after the packages were added, it just worked.
Yeah, that's true. It was more of an "immediate help" type of the reply that I gave It just looks to me as too much hassle to mess up with the pip recipes when it's pretty much a single command (well, two commands, you need to download the script first) anyway. But now that I think more about that, that would be nice to have - so it's on my list!
Have you ever managed to connect to an MQTT broker via port 8883, please let me know if you could assist with this issue: