![]() |
2011-02-10
, 01:07
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#2
|
The Following User Says Thank You to xur17 For This Useful Post: | ||
![]() |
2011-02-21
, 04:54
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#3
|
![]() |
2011-02-21
, 09:14
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#4
|
I started playing with this some more. I got a simple python client that I can send messages to working.
What is the best way to secure my mosquito server so random people can't publish to it?
![]() |
2011-02-25
, 07:36
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#5
|
![]() |
2011-02-26
, 18:11
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#6
|
ImportError: No module named mosquitto
![]() |
2011-02-26
, 18:21
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#7
|
Doesn't libmosquitto provide the mosquitto library for python (so I can use import mosquitto in my program)?
I can't get that to work for me. It is giving me this:
Code:ImportError: No module named mosquitto
The Following User Says Thank You to uvatbc For This Useful Post: | ||
![]() |
2011-02-26
, 18:27
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#8
|
The python libraries _do_ exist in the deb. I'm guessing they aren't sitting in the right locations.
I'll look at this on Monday worst case.
NameError: name 'c_bool' is not defined
![]() |
2011-02-26
, 18:47
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#9
|
I think the library I need is in /opt/maemo/usr/lib/python2.3/site-packages. If I copy that file to the directory I am working in, it starts to work fine, but fails with:
Code:NameError: name 'c_bool' is not defined
The Following User Says Thank You to uvatbc For This Useful Post: | ||
![]() |
2011-03-03
, 01:41
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#10
|
Hm. It seems the Maemo c_types python library is broken - it doesn't define "c_bool", whereas my Ubuntu box does.
The Following User Says Thank You to xur17 For This Useful Post: | ||
Why is pub/sub important and why do I care about porting it to Maemo and Diablo?
I needed a decent open source and easily configurable way to provide push support for all the services that would benefit from using a push model.
For example, email: wouldn't it be nice if there were a way for a script to subscribe to a feed that updated whenever there was a new email? That script would run on the n900 and would initiate an email update only when it got the update message. No more email polling = more battery life.
This can be applied to other things as well - for example, updating DialCentral or TOR or qgvdial whenever there is a contacts update... or on an incoming GV Text message... or an incoming GV phone call...
Whats in the packages?
mosquitto: This has the MQTT broker "mosquitto". In a typical usage scenario, you should never need to install this on your n900 or n810. It should sit on a "server". In my case, I plan to use my n810 as a server - at least for a while. There may be someone who wishes to use the n900 as the message broker server.
To account for all such possibilities, mosquitto has been packaged for Diablo as well as Fremantle.
The mosquitto package also contains a sample pub and sub binary. Look for it at /opt/maemo/usr/bin/mosquitto_pub and mosquitto_sub.
libmosquitto: This library is for "client" applications - the publisher and subscriber both use this library to contact the broker.
There are bindings for c and python in this package.
libmosquittopp: This package has the cpp bindings.
What should the average user do with these packages: At this moment, nothing. Don't bother installing them.
This announcement is targeted more towards developers.
Many thanks to xur17 - because the effort to package mosquitto started because xur17 researched it and to ralight - the creator of the mosquitto broker, its libraries and sample apps.
Happy hacking everyone!
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.
If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.