Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label blackberry. Show all posts
Showing posts with label blackberry. Show all posts

2010-08-16

Linux modem tethering with berry4all, Rogers 3G network, and Blackberry Bold 9000

Because I'll be out of town for the next couple days, part of my packing list included setting up tethering via my Blackberry.

First I tried barry but was unsuccessful in trying to make a successful connection.

Then I found berry4all.

I had two problems, but thanks to the extensive FAQ, I managed to solve them:

  1. Ensure your device (in my case, Blackberry Bold 9000) has its APN correctly set in Setup > Options > Advanced > TCP
  2. Ensure other network connections are disabled using route -n; ifconfig -a before attempting to connect via tethered 3G modem. See also If your PPPD does not support replacedefaultroute
  3. Ensure /etc/resolv.conf is being correctly updated with the appropriate DNS entries (I have to do this by hand at the moment, but tweaked the default /opt/bbtether/berry4all.sh script to add this line so that I can automatically update the file immediately before connecting:
    #!/bin/sh
    cp -f /etc/resolv.conf.bbtether /etc/resolv.conf
    python bbgui.py &
    where /etc/resolv.conf.bbtether contains:
    domain rogers.com
    search rogers.com
    nameserver 64.71.255.198
    #nameserver 64.71.255.253
  4. Load up a bandwidth speed test such as bandwidthplace.com and see what network speed you can get.

Admittedly, tethered speeds are nothing close to wifi speeds.

  • With Rogers 3G network and Blackberry Bold 9000 attached via USB, I managed to get about 500-2800kbps down and 100-200 kpbs up.
  • With Rogers "Exterme" cable internet access (wifi @ home) I get 9800kbps down, 960kbps up.

But at least I can surf on my laptop using the 3G network while I'm away from the office.

To disconnect wired & wifi, then tether automatically and stay connected until CTRL-C is pressed, try this script:

#!/bin/bash
if [[ $UID != 0 ]]; then
 echo "Must be run as root!"
else
 /etc/init.d/network stop
 cp /etc/resolv.conf.bbtether /etc/resolv.conf
 route -n; ifconfig

 cd /opt/bbtether; python bbtether.py rogers -P **YOUR_DEVICE_PASSWORD_HERE**

 /etc/init.d/network start
 route -n; ifconfig
fi

2009-09-10

HOWTO: Enable Zimbra filtered message folders on Blackberry w/ BES service

Thanks to the folks at my IT helpdesk for this tip on how to enable your BB to get mail from within Zimbra folders:

  1. Go to your Messages folder, hit menu key and select Options.
  2. Go to Email Settings. Hit menu button, select Folder Redirection.
  3. You will see your mailbox which can be expanded. Expand your inbox and select the folders you want to be sync'd (on my device they're blue instead of grey). Hit menu button, select Save.

Any NEW messages routed to those folders will now be located in the folders on the device as well. As new messages, they'll appear in your Messages folder along with SMSs, MMSs, BBIMs, and other email. Once read, they'll disappear into the appropriate folder(s).

2009-09-06

Opera 10 as Hudson Helper

As there's still no Hudson Helper for Blackberry (David: hint, hint!), I've been forced to do my own monitoring in a browser (when not monitoring by email, that is).

Now, with Opera 10 (and its new tab layout options), it's even easier to monitor multiple builds via a single view:

2009-07-21

HOWTO: generate .m3u playlist from .mp3 directory

Been trying to find a solution to this one for ages. Turns out it's stupidly simple - just dump the results of a find into a file.

#!/bin/bash
dir="$1"
echo "Create playlist for $1 ..."
if [[ $2 ]]; then list="$2"; else list="$1"; fi

pushd "$dir" 2>&1 >/dev/null
find . -type f -name "*.mp3" > "$list.m3u"
echo "Found these files:"
cat "$list.m3u"
popd 2>&1 >/dev/null

With or without the "./" prefix on each found file, the resulting .m3u files work on my Blackberry (and are found automatically), including nested folders and paths with spaces. To run the above, just do this:

$ ./m3u.sh "artist folder/disc folder" "playlist name"

2009-04-02

PocketMac Runs IIS?

Apparently PocketMac, a sync tool for Mac / BlackBerry users, runs IIS for its website. Just not very well.

2009-01-06

Blackberry Linux Mail, Calendar, Tasks & Contact Sync, Part 2

Things have improved since my last post, despite the fact that I managed to kill Thunderbird along the way and lost a good chunk of today figuring out to restore it. Luckily I can read French, or I may never have found the solution to the elusive -203 problem.

Aside:

To recover from a corrupt Thunderbird profile, create a new profile using thunderbird -ProfileManager, then transfer your data to the new profile. Easy-peasy.

Next, reinstall all your extensions. I use these 15 extensions.

I've also managed to get barry to work for backing up my Blackberry on Fedora. Turns out the problem is that it simply needs root privileges.

Here's how the data flows, drawn with JBoss Tools' jBPM Graphical Process Designer:


click to enlarge

I don't yet have a solution for Zimbra contacts & calendar being accessible on the Blackberry, short of manually duplicating entries from one repo to the other. Still, 5 out of 7 data sources synched is pretty decent.

2009-01-05

15 Thunderbird Must-Have Plugins

Here are my top 15 Thunderbird 2.0.0 productivity plugins. Except for the Funambol plugin, these are all available from addons.mozilla.org.

    Data Synch & Connectivity

  1. funambol-pim-plugin-linux-v0.8.xpi - synch contacts, notes, tasks, and calendar with my.funambol.com server. Then synch those with Blackberry or other smartphone device.
  2. lightning-0.9-tb-linux.xpi - enables integrated calendar(s) & tasks (local or IMAP)
  3. provider_for_google_calendar-0.5.1-tb+sb.xpi - provides Google Calendar support
  4. zindus-0.8.4-tb.xpi - sync address book with Zimbra and/or Google contacts

    Overall UI Tweaks

  5. additional_folders_view-0.2.3-tb.xpi - adds a second Mail Folders view to the mail perspective
  6. mark_all_read_button-0.2-tb.xpi - adds button to mark all messages in a folder read
  7. threadbubble-0.8-tb.xpi - resorts views by date when new messages arrive
  8. tag_toolbar-0.7.80-tb.xpi - toolbar for mouse- or key-based message tagging

    Key Bindings

  9. tag_toolbar-0.7.80-tb.xpi - toolbar for mouse- or key-based message tagging
  10. gmailui-0.6-tb.xpi - keyboard bindings for gmail (eg., y for archive, j/k for previous/next)
  11. nostalgy-0.2.16-tb.xpi - handy shortcuts for (G)o, (S)ave and (C)opy, to open a folder or move/copy message(s) to a folder
  12. threadkey-0.4-tb.xpi - adds toggle keys for show (un)sorted by thread
  13. headers_toggle-0.5.2.2-tb.xpi - using h key, toggle long headers, short headers, no headers on messages - great for newsgroup posts!

    Message View Tweaks

  14. headers_toggle-0.5.2.2-tb.xpi - using h key, toggle long headers, short headers, no headers on messages - great for newsgroup posts!
  15. quotecollapse-0.7-mz+tb.xpi - collapse quoted text to make messages show less
  16. header_scroll_extension-0.3.2-tb.xpi - scroll long message headers area
  17. show_fixed-width_temporarily-0.6-tb.xpi - temporarily show messages in fixed-width font

If you'd like a copy of all of the above, you can download all 3M of them here.

2009-01-03

Blackberry Linux Calendar & Contact Sync

Ugh, what a nightmare. Skip to solution. See also Part 2.


PocketMac for Blackberry, Linux Edition

Unfortunately, I missed the deadline to be a beta tester for this new app. Comes highly recommended by a Macolyte friend of mine; unfortunately until it's released I won't be able to come anywhere near it. :(

Blackberry Desktop Manager in VirtualBox

First, I tried to install Blackberry Desktop Manager into a VirtualBox 2.1 Win XP Home guest OS, running on xubuntu 8.04. Problem there was that OOTB the VB guest couldn't see my USB devices (ie., the mounted Blackberry). Solved [1], [2].

Unfortunately, while the Windows guest could see the Blackberry, it couldn't sync with it. I keep getting prompted for my password to enter "mass storage mode", then ultimately the backup failed, as the connection was dropped midway through.

Hoping that the story would be better on my newer x200 Thinkpad, I tried again -- same result. Additionally, though the VirtualBox Windows guest found my bluetooth adapter, I couldn't make it work under Windows to connect to the BB.


barry

I tried installing barry, the Blackberry Desktop For Linux project. I installed 0.14-4.fc10 and 0.14-6.fc11, but it didn't work - perhaps the Bold is too new?

(-1, error sending control message: Operation
not permitted): Probe: GetConfiguration failed

So, for now, the only way to backup/restore is via my wife's WinXP laptop.

UPDATE, 2009/01/05: Turns out you have to run barry w/ root privileges. I can now backup on linux. W00t!

But surely there's another way to sync?


OpenSync

Next, I tried OpenSync. This didn't work either. I tried 0.22 on xubuntu 8.04, with KitchenSync 0.1, but it couldn't connect to the device. Then I tried 0.36 on the x200 Fedora 10 box with msynctool, but it too couldn't connect to the device (even though I'd already paired the BB with the Thinkpad over bluetooth), perhaps because my settings were incorrect? Either way, both front ends left a lot to be desired for a total noob user. XML config files are fine, but better in-file documentation would be nice.
msynctool 
msynctool --listplugins
msynctool --addgroup BB
msynctool --enable-objtype BB syncml-obex-client
msynctool --addmember BB syncml-obex-client
msynctool --enable-objtype BB google-calendar
msynctool --addmember BB google-calendar
msynctool --enable-objtype BB file-sync
msynctool --addmember BB file-sync
msynctool --showgroup BB
msynctool --configure BB 1
msynctool --configure BB 2
msynctool --configure BB 3
msynctool --sync BB

... still failed to connect to device :(

Funambol

Then I discovered the Funambol web-based sync option, and signed up. This worked, and I now have my contacts and BB calendar synched with their server. OK, that's great, but what I really wanted was to sync w/ my desktop apps and/or with Google Calendar. So, I tried the Funambol Mozilla Plugin 0.8 for synching contacts and calendar with Sunbird 0.9 (or Thunderbird 2.0 with Lightning 0.9). It worked on my home xubuntu 8.04 machine (one email address, no calendars) but failed to install on my work Fedora 10 machine (two email addresses, two calendars, RSS feeds & newgroup subscriptions). Bummer.

UPDATE, 2009/01/05: My Thunderbird profile had been corrupted. Creating a new one, importing from the old one, and reinstalling all extensions fixed this problem. But because I can use Google Sync for Contacts and Calendar, I'm only using Funambol for Tasks now. Details here.


Google Sync

Finally, checking my Google Calendar online I noticed a new "Sync" link in the top right. I found that Google has released an early Xmas present: Google Sync for your BlackBerry. Finally, a solution!

BBToday

If you would like to have a snapshot of your mail, calendar, tasks, calls and optionally, battery status & weather in one convenient portal page, try BBToday 1.6.


Captured with CaptureIt

UPDATE, 2009/01/29: I've found a better Today screen, but it's not free. BOLD CrossBar Plus Xtreme - BOLD OS 4.6 by JC Designs / Gadgetbean. Combine this with WeatherEye from The Weather Network, and you've got weather, mail, messages, calendar... all on one attractive screen! Best. Seven Bucks. Ever.

Continued in Part 2...

2009-01-02

Blackberry Bold + MidpSSH + Mutt = Mail Over VPN

Got a new Blackberry Bold 9000 for Xmas. Typical of Rogers, I was overcharged for it, and all the freebies I had quoted to me on the phone have yet to arrive. I'm told I'll be credited back the surcharge, but I won't see that until February.

Anyway, customer service infractions aside, setting up Gmail, TwitterBerry, Facebook, Google Talk, Windows Live Messenger, Yahoo! Messenger, and of course Blackberry Messenger was a snap. Tried to use the internal mail client for Gmail but it doesn't respect my filters so I get the flashing light notification for every bit of spam, rather than just the interesting mail I want to see.

Setting up IRC was a little tricky, but thanks to Opera Mini and mibbit.com, I can more or less check Freenode channels on the go. Not ideal, but tolerable.

But the real challenge was getting access to my corporate mail, since we're not running a BES server, and thanks to all the supported options, there are over 5,000 possible ways to configure Cisco VPN access on a Blackberry. I'm not that patient.

Instead, I decided to try using MidpSSH 1.7.3 to connect into my laptop (which is already connected to the VPN), then use Mutt 1.5.18 to connect over IMAP to the mail server. Because I'm connecting to a local IP within my home LAN, I set the SSH session's Connection Type to WiFi, rather than Default, BES, or TCP/IP. In order to avoid having to key in a password every time I connect to the laptop, I set up an SSH key and shared that with my laptop.

If I want to have this solution work when I'm not at home, I'll have to expose my laptop to the outside world, and connect using Connection Type = Default to that public IP address instead of my more secure internal one. Still, it's a step in the right direction.

Incidentally, this tip might help, if you're having network access problems:

Options > Advanced Options > TCP > APN: "internet.com" (no username or password) [1], [2]

Now I just have to teach myself all the keyboard commands for Mutt. I tried using MidpSSH on my previous phone, a SonyEricsson W810i, but it's nearly impossible to do anything without a full keyboard.

If you're thinking of doing something like this, here are some handy links for setting up Mutt to connect to IMAP and to send mail via SMTP.

Is there a better way to VPN over BIS for IMAP mail? If so, feel free to share your solution here or via email with nickboldt(at)rogers(dot)blackberry(dot)net.