How to Use BCharge

Many thanks to rivviepop @ BlackBerry Forums
Barry Homepage: Net Direct :: Open Solutions

SourceForge Project Downloads: SourceForge.net: Files
‘bcharge’ is a utility that’s part of the Barry project – which aims to be a complete desktop toolset for interfacing your BlackBerry with linux. The purpose of the bcharge tool is to detect when a BB has been plugged in and then alter the current to the USB port – it will increase the default 100mA flow up to 500mA, which is what the BlackBerry is expecting. This is exactly what the Windows driver does.

The 0.1 version currently available (2007-02-19) will work with any BlackBerry older than the Pearl 8100; for the 8100 (and presumably the 8800, unreleased at this time) you’ll need to get the latest version of the code from CVS (only “bcharge.cc” is needed); the product ID internally has changed from ‘0x0001’ to ‘0x0006’ in this newer handset. The latest CVS version will recognize both older and newer devices, but the newer CVS code includes some special action to take when “seeing” an 8100 device.

CVS link for post-0.1 bcharge.cc: SourceForge.net Repository – {barry} Index of /barry/tools

Compiling the code is beyond the scope of this HowTo, but it’s extremely simple and uses all the standard linux-isms (autoconf, g , etc.) — if you can compile any generic application you should be able to compile bcharge; because this code interfaces with USB ports, make sure you have the ‘libusb-devel’ (exact name depends on your distro) installed so it’ll find the headers and link libraries. There may already be installable packages available download as well (.deb/.rpm) – your need to compile may vary.

There are two parts to ‘bcharge’ – the main binary itself and a “udev” script. You can use the tool without doing anything, just plug in your BlackBerry to any USB port and type ./bcharge (substitute the path if needed). This will scan all the USB devices plugged in, find your BB handset, and adjust the current flow. It’s that simple.

But, to automate the process you can copy a script from CVS (or the official downloads) to your [b]/etc/udev/rules.d/[/b] directory (location may vary depending on distro) to have everything done for you. First, copy the compiled binary (bcharge) to /usr/sbin/ and make sure it’s at least mode 0755 (executable), owned by root (for security’s sake). Now copy one of the scripts from here: SourceForge.net Repository – {barry} Index of /barry/udev[/url… to the udev rules directory mentioned above. Obviously if you’re using Debian (and maybe Ubuntu?) use the one called “Debian”. 🙂
NOTE: if you have a newer Pearl device you will need to update the ProductID in this script.
Replace this code:

 SYSFS{idProduct}=="0001"

With this code:

 SYSFS{idProduct}=="0006"

It should make perfect sense why you’re doing this. You could also just copy/paste the line to a new line and add both products at once — the choice is yours. Maybe you have both an older and newer BB device and need it both ways. 🙂

Reboot. I say again, Reboot. ‘udev’ rules don’t seem to work quite right unless they’re loaded at startup (when udev runs), so just save yourself some hassle and sacrifice your uptime with a reboot. Now plug in your BB device and it should initially flash on the handset the error message about insufficient charge, but then the message will go away in 1sec (or so) when bcharge runs and performs the adjustment.

You can use the ‘lsusb’ tool to verify the current has been changed – run ‘lsusb -v | less’ as root, find the RIM BlackBerry section and it’ll show the current USB port power flow. It should say 500mA and not 100mA.

DIAL TOUCH-TONE ATC WITH POLARITY GUARD-NOS picture

DIAL TOUCH-TONE ATC WITH POLARITY GUARD-NOS

$7.75



2021 POLARITY PANINI FORTNITE SERIES 3 LEGENDARY OUTFIT #219 CRACKED ICE SSP picture

2021 POLARITY PANINI FORTNITE SERIES 3 LEGENDARY OUTFIT #219 CRACKED ICE SSP

$50.00



POLARITY #1 C virgin variant 1st print BOOM COMIC 2013 MAX BEMIS bipolar picture

POLARITY #1 C virgin variant 1st print BOOM COMIC 2013 MAX BEMIS bipolar

$10.00



Polarity 1-4 Complete Lot Set Max Bemis 1 2 3 4 Gemini Ship picture

Polarity 1-4 Complete Lot Set Max Bemis 1 2 3 4 Gemini Ship

$7.99



Polarity HC #1-1ST VF 2013 Stock Image picture

Polarity HC #1-1ST VF 2013 Stock Image

$9.40



Polarity Volume 1 Boom Studios Max Bemis Jorge Coelho Paperback Graphic Novel A picture

Polarity Volume 1 Boom Studios Max Bemis Jorge Coelho Paperback Graphic Novel A

$4.49



1965 APOLLO POLARITY CHECKER / VIBRATION TEST SPECIAL INTEREST BLUE INFO PHOTO picture

1965 APOLLO POLARITY CHECKER / VIBRATION TEST SPECIAL INTEREST BLUE INFO PHOTO

$32.99



Polarity 1 2 3 4 Comic LOT Boom COMPLETE SET 1st Print First FULL RUN Max Bemis picture

Polarity 1 2 3 4 Comic LOT Boom COMPLETE SET 1st Print First FULL RUN Max Bemis

$9.99



Vintage Porcelain Owl Statue Polarity Brown & White Colour Decore Home Figure picture

Vintage Porcelain Owl Statue Polarity Brown & White Colour Decore Home Figure

$179.99



Polarity #1B 1:10 Virgin Variant NM Max Bemis Boom Studios | Combined Shipping picture

Polarity #1B 1:10 Virgin Variant NM Max Bemis Boom Studios | Combined Shipping

$10.00