Jun 13

That title is a bit of a mouthful, particularly for those who don’t know or care what I am talking about.

But again, for those that do…here goes.

So my scenario is as follows….

I have a newly installed Ubuntu 7.04 installation, and a Blackberry 8700.
As any of you blackberry users know, when you plug your blackberry into the USB cable in windows, it conveniently begins to charge. Easy stuff, no messing about generally. This is not really the case with Linux. (Ubuntu 7.04 to be precise, in this scenario)

You see, as I understand it, and have confirmed in my last few days of migrating to Ubuntu on my desktop PC, a usb port normally outputs 100mA of juicy power. This is not enough to charge the Blackberry. It requires 500mA.
Now windows, in all it’s wonder (and with the help of a driver) is quite efficient in recognizing that when you are plugging in your blackberry, you most likely want to charge it. So, sensing the blackberry it increases the output of the USB port accordingly and viola, you have a charged blackberry some hours later.

Ubuntu however requires a little help in this area. Out of the box it does not appear to see the blackberry for what it is, and does not change the power output of the USB port, and therefore, does not charge your little hip side companion.

Fortunately, there is some help for ubuntu in this regard. The Barry Project at Sourceforge includes a handy utility called bcharge that can recognize your Blackberry and adjust the output power to the required 500mA, much like Windows does. In many cases this tool is all that is required for making your Ubuntu install into a fully functional blackberry charger.

However, this did not quite work for me with the 8700. I am not entirely sure why. But the issue was that the power on my usb port would be increased, but only for about 1 second. Then, my little charging icon on the blackberry would go away, leaving me sadly with no more juice in my crackberry.

I was stumped, and could not find a resolution to this issue until today, when I spoke to my nephew, who knew a guy who had resolved it. I wish I could take credit for the idea, but I cannot. :) But since I didn’t find this work around anywhere on the net so far, I thought I would share in the hopes that someone else will have some luck with it!

So here is the solution (Finally) to…

Charging the Blackberry 8700r on Ubuntu 7.04 (Feisty Fawn) using bcharge.

***********************************************************
DISCLAIMER: USE THIS SOLUTION AT YOUR OWN RISK!
***********************************************************

I cannot be held responsible for any damage you may do to your device as a result of using this method.
All I can say is that it works for me, and so far, my blackberry has not blown up or caught fire, or been otherwise visibly damaged, I cannot guarantee you will get the same results!

The solution is pretty simple really. A loop. Since the charging icon goes away after just over a second, Run bcharge, every second!

This is what I did exactly. (Fyi: I placed the script in my home directory, but put the sudo in anyway)

1. Use your favourite text editor to create a script that we will use to loop bcharge.

sudo nano bbcharge.sh

2. Use the following script code that will run bcharge every second, forever. :) Save it when you are done.

#!/bin/sh
X=0
while (X=0)
do
bcharge > NUL
sleep 1
done

*Note: This is exactly the second shell script I have ever written so forgive the rudimentary nature of it.

3. Make the script Executable.

sudo chmod 755 bbcharge.sh

4. Plug in your Blackberry. (Do this first, when I run the script first the blackberry reboots when I plug it in, can’t be good)

5. Run the script!

./bbcharge.sh

You should now be charging away.

Let me know how it works out.

11 Responses to “Charging my Blackberry 8700 On Ubuntu 7.04 with bcharge”

  1. Troy Says:

    Boooooring!!! Come to my cottage ya bitch!!! :)

  2. smoosh Says:

    You only say that because you didn’t live it man. :)

  3. aaron Says:

    works for me. thanks alot.

  4. jetpeach Says:

    thanks for the tip. does syncing and other functions work well with ubuntu 7.04? i am thinking of getting a 8700g but want to make sure it works well with ubuntu…

  5. Ashwani Says:

    Works great. Thanks.. rudimentary script? dude.. your simple script just saved a life here..

    cheers.

  6. smoosh Says:

    Jetpeach: Not sure about the Synching….all my synching is doen wireless through the enterprise server, so I really only plug it in to charge it.

    Ashwani: Glad it worked for you :)

  7. richard williams Says:

    works for me with debian etch and bb 8703
    not pretty but functional.

    thanks.

  8. smoosh Says:

    “Not pretty but functional”

    Much like myself :)

  9. Anthony Valentine Says:

    Thanks for your script. I have improved upon it a little:

    #!/bin/bash

    while true
    do
    MYPID=$$
    MYNAME=$(basename $0)
    RUNNING=$( ps -ef | egrep -v “${MYPID} | grep” | grep -i ${MYNAME} )

    ### Start a new instance only if one isn’t currently running
    if [ -z "${RUNNING}" ]; then

    ### Stop the loop when the /dev/bb device(s) go away
    if [ -e "$(ls /dev/bb* 2> /dev/null | tail -n1)" ]; then
    bcharge &> /dev/null
    else
    exit 0
    fi

    sleep 1
    else
    exit 0
    fi

    done

  10. Anthony Valentine Says:

    Also, If you copy the udev rules file from the barry tarball to /etc/udev/rules.d, you won’t have to start bcharge manually. You will need to change the “RUN” parameter in the file to match whatever you name your loop script.

    As root:
    cp barry-0.8/udev/10-blackberry.rules /etc/udev/rules.d

  11. Anthony Valentine Says:

    Oops. I put the ‘is running’ code inside the loop by mistake.

    Here is the script again, slightly better:

    #!/bin/bash

    MYPID=$$
    MYNAME=$(basename $0)
    RUNNING=$( ps -ef | egrep -v “${MYPID}|grep” | grep -i ${MYNAME} )

    ### Start a new instance only if one isn’t currently running
    if [ -z "${RUNNING}" ]; then

    while true
    do
    ### Stop the loop when the /dev/bb device(s) go away
    if [ -e "$(ls /dev/bb* 2> /dev/null | tail -n1)" ]; then
    bcharge &> /dev/null
    else
    exit 0
    fi

    sleep 1
    done

    else
    exit 0
    fi

Leave a Reply