JPush
(→Install) |
(→Server) |
||
(6 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
JPush provides a way for information to be pushed to a device or computer. It provides 'hooks' on the server that cause 'actions' to be performed on the device, such as checking for new email. | JPush provides a way for information to be pushed to a device or computer. It provides 'hooks' on the server that cause 'actions' to be performed on the device, such as checking for new email. | ||
- | One common use is to get push email on a | + | One common use is to get push email on a [[Nokia N900|N900]] device. |
- | + | ==How it Works== | |
- | JPush utilizes an existing XMPP (Jabber) connection to communicate with a device. The client adds the server as a 'buddy' using any existing jabber account on the | + | |
+ | JPush utilizes an existing XMPP (Jabber) connection to communicate with a device. The client adds the server as a 'buddy' using any existing jabber account on the N900. | ||
==Setup== | ==Setup== | ||
+ | |||
===Pre-Setup=== | ===Pre-Setup=== | ||
- | *Create jabber account separate from your own (anywhere works, gmail, jabber.org, etc). | + | |
- | *Add server account to buddy list of client account. | + | * Create jabber account separate from your own (anywhere works, gmail, jabber.org, etc). |
- | *Modest must be set to check for new email automatically (just set it to once every 24 hours). | + | * Add server account to buddy list of client account. |
- | *Install the following files as instructed below. | + | * Modest must be set to check for new email automatically (just set it to once every 24 hours). This is some odd issue that I ran into. |
+ | * Install the following files as instructed below. | ||
===Install=== | ===Install=== | ||
+ | |||
*Server: a .deb file is available [https://garage.maemo.org/frs/?group_id=1903&release_id=4168 here]. | *Server: a .deb file is available [https://garage.maemo.org/frs/?group_id=1903&release_id=4168 here]. | ||
- | *Client ( | + | *Client (N900): a .deb is not available yet. Download the source code from [https://garage.maemo.org/frs/?group_id=1903&release_id=4168 here], and install the files in any directory. Make sure the files are executable (<code>chmod +x</code>). |
===Configuration=== | ===Configuration=== | ||
+ | |||
====Server==== | ====Server==== | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | # Edit <code>/usr/bin/jpush-server</code> | |
- | */usr/bin/jpush-emailhook should be called whenever a new email is received. This sends an update to JPushServer, which notifies the | + | #* edit the config block: |
- | *This file receives two arguments | + | #** insert username and password for a new jabber account created above. |
- | ** | + | #** set a secret that you will also put on the client (make this up). |
- | **Run 'sudo newaliases' to make server update email config above. | + | #** set notifications (type of commands to be sent to the device). Leave this as the default if you only want email. |
- | **Forward all email to part-of-email-before-at-symbol@server.com | + | # Setup Email Hook |
- | + | #* <code>/usr/bin/jpush-emailhook</code> should be called whenever a new email is received. This sends an update to JPushServer, which notifies the N900. | |
- | + | #* This file receives two arguments: <code>/usr/bin/jpush-emailhook username updateType</code> | |
- | *Run jpush-server start | + | #** example: To receive push email, insert new line into <code>/etc/aliases</code> as: <pre>part-of-email-before-at-symbol "|/usr/bin/jpush-emailhook username email"</pre> |
+ | #** Run '<code>sudo newaliases</code>' to make server update email config above. | ||
+ | #** Forward all email to part-of-email-before-at-symbol@server.com | ||
+ | # Starting | ||
+ | #* Run jpush-server start | ||
====Client==== | ====Client==== | ||
- | |||
- | |||
- | |||
- | |||
- | + | # Edit <code>/opt/jpush/jpush.py</code> | |
- | + | #* edit the config block | |
- | + | #** set a secret (use the same value that you set for the server config above). | |
- | * Follow instructions in file. | + | # Optional - Edit <code>/?/?/actions.py</code> |
+ | #* Follow instructions in file. | ||
==Download== | ==Download== | ||
+ | |||
https://garage.maemo.org/projects/jpush/ | https://garage.maemo.org/projects/jpush/ | ||
+ | |||
+ | [[Category:Software]] | ||
+ | [[Category:Fremantle]] |
Latest revision as of 18:32, 5 February 2011
JPush provides a way for information to be pushed to a device or computer. It provides 'hooks' on the server that cause 'actions' to be performed on the device, such as checking for new email.
One common use is to get push email on a N900 device.
Contents |
[edit] How it Works
JPush utilizes an existing XMPP (Jabber) connection to communicate with a device. The client adds the server as a 'buddy' using any existing jabber account on the N900.
[edit] Setup
[edit] Pre-Setup
- Create jabber account separate from your own (anywhere works, gmail, jabber.org, etc).
- Add server account to buddy list of client account.
- Modest must be set to check for new email automatically (just set it to once every 24 hours). This is some odd issue that I ran into.
- Install the following files as instructed below.
[edit] Install
- Server: a .deb file is available here.
- Client (N900): a .deb is not available yet. Download the source code from here, and install the files in any directory. Make sure the files are executable (
chmod +x
).
[edit] Configuration
[edit] Server
- Edit
/usr/bin/jpush-server
- edit the config block:
- insert username and password for a new jabber account created above.
- set a secret that you will also put on the client (make this up).
- set notifications (type of commands to be sent to the device). Leave this as the default if you only want email.
- edit the config block:
- Setup Email Hook
-
/usr/bin/jpush-emailhook
should be called whenever a new email is received. This sends an update to JPushServer, which notifies the N900. - This file receives two arguments:
/usr/bin/jpush-emailhook username updateType
- example: To receive push email, insert new line into
/etc/aliases
as:part-of-email-before-at-symbol "|/usr/bin/jpush-emailhook username email"
- Run '
sudo newaliases
' to make server update email config above. - Forward all email to part-of-email-before-at-symbol@server.com
- example: To receive push email, insert new line into
-
- Starting
- Run jpush-server start
[edit] Client
- Edit
/opt/jpush/jpush.py
- edit the config block
- set a secret (use the same value that you set for the server config above).
- edit the config block
- Optional - Edit
/?/?/actions.py
- Follow instructions in file.
[edit] Download
- This page was last modified on 5 February 2011, at 18:32.
- This page has been accessed 16,442 times.