BlackBerry
Introduction
A travers ce document, vous trouverez différents outils pour utiliser votre BlackBerry sous Linux.
Personnellement, j’utilise un BlackBerry Storm 9530. C’est d’ailleurs mon premier BlackBerry.
Si vous avez des questions ou des propostions, vous pouvez me contacter par l’intermédiaire ce blog.

Matériel
| CPU | 624 MHz MSM7600 CPU de Qualcomm |
| Mémoire | 128 MB Flash (mémoire flash)
1 GB mémoire embarquée Mémoire extensible – accepte seulement le format microSD |
| Caméra | 3.2 Mega Pixels avec flash et autofocus |
| Affichage | 3.25 in (8.3 cm) TFT-LCD avec une résolution de 360 X 480 pixel et 65,536 couleurs. |
| Batterie | Batterie DX-1 Li-ion (5.5 heures en communication GSM, 6 heures en communication CDMA, ou 360 heures en veille). |
| Dimensions | 4.43″/112.5mm (Hauteur)
2.45″/62.2mm (Largeur) 0.55″/13.95mm (Epaisseur) 5.5 oz/155g (Poids) |
| Autres | GPS intégré, prise casque stéréo 3.5mm |
Le coffret BlackBerry

J’ai commandé mon BlackBerry à l’occasion de Noël 2008. Une présentation très pro et très sobre.
C’est mon premier BlackBerry, j’ai eu l’habitude d’utiliser des téléphones Sony Ericson ou encore Nokia. C’est un retour pour moi au PDA après avoir eu un Palm Vx et m505, ainsi qu’un iPaq HP5550.
Certains seront peut-être surpris par le fait qu’il n’y ait aucune documentation… Tout est sur CD ou sur Internet ; ou encore dans le BlackBerry lui-même.
Un produit et une présentation sans surprise.
BlackBerry sous Linux
Debian unstable
J’ai l’habitude de travailler avec une Debian SID, le document s’appuie donc sur cette distribution.
Normallement, cela devrait être exactement pareil avec les autres distributions.
Comme tout le monde, après quelques minutes d’utilisation de mon BlackBerry, le besoin de le connecter à mon ordinateur pour échanger, synchroniser des données, c’est vite fait ressentir. En ce qui me concerne, j’ai besoin de pouvoir synchroniser mon carnet d’adresses, agenda, notes ou encore tâches. Et j’utilise pour cela Evolution. Je veux également être capable de lister, installer ou encore supprimer des applications de mon BlackBerry. Enfin, je souhaite également utiliser mon BlackBerry comme un modem.
J’ai donc chercher les différentes solutions qui existaient sous Linux et j’ai également participer à certains projets pour pouvoir utiliser pleinement mon BlackBerry sous Linux.
Les outils BlackBerry
J’utilise l’application Barry. Barry est une application Open Source qui permet de synchroniser ses données, faire des sauvegardes. Barry est principalement développé pour Linux, mais l’application est portable et utilisable sur d’autres plateformes telles que BSD, 32/64bit, et les systèmes big/little endian.
Avec la version en cours développement, il est possible de :
- charger la batterie de son BlackBerry via le port USB
- récupérer son carnet d’adresses, e-mails, agendas, notes, tâches, messages PIN, e-mails sauvegardés, et dossiers
- exporter son carnet d’adresse au format texte, vCard ou dans le format LDAP LDIF
- faire une sauvegarde de ses données et de les restaurer
- synchroniser son carnet d’adresse, son agenda, ses notes et tâches en utilisant l’application OpenSync
- utiliser son BlackBerry comme un modem
Tout d’abord, nous devons compiler et installer l’application :
[root@Dahlia /root]$ cd /usr/local/src/ [root@Dahlia src]$ mkdir blackberry [root@Dahlia src]$ cd blackberry [root@Dahlia blackberry]$ git clone git://repo.or.cz/barry.git barry [root@Dahlia blackberry]$ cd barry [root@Dahlia barry]$ ./buildgen.sh [root@Dahlia barry]$ ./configure --enable-gui [root@Dahlia barry]$ make [root@Dahlia barry]$ make install
Pour utiliser barry en tant qu’utilisateur, il faut modifier la configuration de udev afin d’attribuer les bons droits lors du branchement du BlackBerry.
[root@Dahlia /root]$ cd /usr/local/src/blackberry/barry [root@Dahlia barry]$ cp udev/10-blackberry.rules udev/99-blackberry-perms.rules /etc/udev/rules.d/ [root@Dahlia barry]$ /etc/init.d/udev restart
Une fois l’installation terminée, vous pouvez utiliser différents outils :
[root@Dahlia /root]$ bidentify
12345678, RIM BlackBerry Device
[root@Dahlia /root]$ btool -t
Blackberry devices found:
Device ID: 0x806ea00. PIN: 12345678, Description: RIM BlackBerry Device
Using device (PIN): 12345678
Database database:
Database: 0x0 'WTLS Options' (records: 1)
Database: 0x1 'Message List Options' (records: 1)
Database: 0x2 'CustomWordsCollection' (records: 12)
Database: 0x3 'Key Store Options' (records: 1)
Database: 0x4 'Address Book - All' (records: 96)
Database: 0x5 'AutoText Data Version' (records: 1)
Database: 0x6 'Map Locations' (records: 2)
Database: 0x7 'Theme Settings' (records: 1)
Database: 0x8 'Random Pool' (records: 1)
Database: 0x9 'Purged Messages' (records: 0)
Database: 0xa 'Phone Options' (records: 1)
Database: 0xb 'Policy' (records: 1)
Database: 0xc 'Browser Options' (records: 1)
Database: 0xd 'Spell Check Options' (records: 1)
Database: 0xe 'Calendar Options' (records: 1)
Database: 0xf 'Sounds' (records: 18)
Database: 0x10 'Location Based Services' (records: 0)
Database: 0x11 'SlideshowToGoPrefs' (records: 1)
Database: 0x12 'Trusted Key Store' (records: 47)
Database: 0x13 'Suretype options' (records: 1)
Database: 0x14 'Profiles Options' (records: 1)
Database: 0x15 'Clock Options' (records: 1)
Database: 0x16 'SheetToGoPrefs' (records: 1)
Database: 0x17 'Handheld Configuration' (records: 0)
Database: 0x18 'Folders' (records: 0)
Database: 0x19 'PasswordKeeper Options' (records: 1)
Database: 0x1a 'WAP Push Messages' (records: 0)
Database: 0x1b 'Memos' (records: 0)
Database: 0x1c 'Code Module Group Properties' (records: 44)
Database: 0x1d 'DocsToGoCommonPrefs' (records: 1)
Database: 0x1e 'MemoPad Options' (records: 1)
Database: 0x1f 'Quick Contacts' (records: 0)
Database: 0x20 'Input Learning Data' (records: 4)
Database: 0x21 'Smart Card Options' (records: 1)
Database: 0x22 'Browser Data Cache' (records: 10)
Database: 0x23 'Memory Cleaner Options' (records: 1)
Database: 0x24 'Application Permissions' (records: 31)
Database: 0x25 'PIN Messages' (records: 0)
Database: 0x26 'Tasks' (records: 0)
Database: 0x27 'Attachment Options' (records: 1)
Database: 0x28 'Browser Push Options' (records: 1)
Database: 0x29 'Device Options' (records: 0)
Database: 0x2a 'Browser Urls' (records: 1)
Database: 0x2b 'Certificate Options' (records: 0)
Database: 0x2c 'Calendar' (records: 3)
Database: 0x2d 'Attachment Data' (records: 0)
Database: 0x2e 'WordToGoPrefs' (records: 1)
Database: 0x2f 'TLS Options' (records: 1)
Database: 0x30 'Browser Channels' (records: 0)
Database: 0x31 'Compatibility Settings' (records: 1)
Database: 0x32 'Categories' (records: 2)
Database: 0x33 'Browser Messages' (records: 0)
Database: 0x34 'Saved Email Messages' (records: 0)
Database: 0x35 'Options' (records: 12)
Database: 0x36 'Service Book' (records: 12)
Database: 0x37 'Input Method Switcher Option' (records: 1)
Database: 0x38 'Searches' (records: 6)
Database: 0x39 'RMS Databases' (records: 6)
Database: 0x3a 'Phone Call Logs' (records: 31)
Database: 0x3b 'Messages' (records: 2)
Database: 0x3c 'Folder Id' (records: 1)
Database: 0x3d 'Content Store' (records: 0)
Database: 0x3e 'AutoText' (records: 312)
Database: 0x3f 'MMS Messages' (records: 1)
Database: 0x40 'BlackBerry Messenger' (records: 1)
Database: 0x41 'VideoRecorder Options' (records: 1)
Database: 0x42 'Tasks Options' (records: 1)
Database: 0x43 'Calendar - All' (records: 3)
Database: 0x44 'SMS Messages' (records: 13)
Database: 0x45 'Alarm Options' (records: 1)
Database: 0x46 'Voice Activated Dialing Options' (records: 1)
Database: 0x47 'PasswordKeeper' (records: 0)
Database: 0x48 'Handheld Key Store' (records: 47)
Database: 0x49 'Camera Options' (records: 1)
Database: 0x4a 'File Explorer Options' (records: 1)
Database: 0x4b 'MMS Options' (records: 1)
Database: 0x4c 'Bluetooth Options' (records: 1)
Database: 0x4d 'Handheld Agent' (records: 290)
Database: 0x4e 'Default Service Selector' (records: 3)
Database: 0x4f 'Browser Folders' (records: 2)
Database: 0x50 'Firewall Options' (records: 1)
Database: 0x51 'KeyStoreManager' (records: 1)
Database: 0x52 'Map Settings' (records: 1)
Database: 0x53 'Alarms' (records: 0)
Database: 0x54 'Diagnostic App Options' (records: 1)
Database: 0x55 'PGP Key Store' (records: 0)
Database: 0x56 'Address Book Options' (records: 1)
Database: 0x57 'Address Book' (records: 96)
Database: 0x58 'Time Zones' (records: 88)
Database: 0x59 'Browser Bookmarks' (records: 2)
Si vous utilisez les sources depuis le dépôt GIT, j’ai écrit des scripts ZSH pour l’auto-complétion.
[root@Dahlia /root]$ cd /usr/local/src/blackberry/barry [root@Dahlia barry]$ cp zsh/_bjavaloader zsh/_btool /usr/share/zsh/functions/Completion/Unix
L’application Barry permet également de faire des sauvegardes et des restaurations de ses données.
[root@Dahlia /root]$ barrybackup

Synchronisation de son BlackBerry
A l’aide des outils fournis par RIM, vous pouvez seulement synchroniser votre BlackBerry avec votre ordinateur en utilisant un cable USB. Vous ne pouvez pas utiliser une connexion Bluetooth.
Afin de synchroniser votre BlackBerry avec Evolution, il faut utiliser la version 0.22 du projet OpenSync et la commande msynctool. La version 0.22 d’OpenSync est la dernière version stable.
[root@Dahlia /root]$ cd /usr/local/src/blackberry/barry [root@Dahlia barry]$ cd opensync-plugin [root@Dahlia opensync-plugin]$ ./configure [root@Dahlia opensync-plugin]$ make [root@Dahlia opensync-plugin]$ make install
A présent, vous pouvez synchroniser vos contacts, votre agenda, vos mémos et tâches avec le plugin fourni par le projet Barry.
J’ai effectué le portage du plugin Barry pour la branche 0.4x du projet OpenSync.
[root@Dahlia /root]$ cd /usr/local/src/blackberry/barry [root@Dahlia barry]$ cd opensync-plugin-0.4x [root@Dahlia opensync-plugin-0.4x]$ ./configure [root@Dahlia opensync-plugin-0.4x]$ make [root@Dahlia opensync-plugin-0.4x]$ make install
Afin d’utiliser ce plugin, vérifier tout d’abord que l’installation est correcte :
[root@Dahlia /root]$ osynctool --listplugins Available plugins: evo2-sync syncml-http-server syncml-http-client syncml-obex-client barry-sync
A présent, vous pouvez créer un groupe et activer les plugins nécessaires.
[root@Dahlia /root]$ osynctool --addgroup BlackBerry [root@Dahlia /root]$ osynctool --addmember BlackBerry evo2-sync [root@Dahlia /root]$ osynctool --addmember BlackBerry barry-sync
Vous avez besoin de connaître les ID des membres créés précédement.
[root@Dahlia /root]$ osynctool --showgroup BlackBerry Group: BlackBerry Member 1: evo2-sync Member 2: barry-sync
Configurer vos plugins :
[root@Dahlia /root]$ osynctool --configure BlackBerry 1 <?xml version="1.0"?> <config version="1.0"> <Resources> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Config>VCARD_EXTENSION=Evolution</Config> <Name>vcard30</Name> </Format> <Format> <Config>VCARD_EXTENSION=Evolution</Config> <Name>vcard21</Name> </Format> </Formats> <ObjType>contact</ObjType> <Url>file:///home/nicolas/.evolution/addressbook/local/system</Url> </Resource> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Name>vevent20</Name> </Format> </Formats> <ObjType>event</ObjType> <Url>file:///home/nicolas/.evolution/calendar/local/system</Url> </Resource> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Name>vtodo20</Name> </Format> </Formats> <ObjType>todo</ObjType> <Url>file:///home/nicolas/.evolution/tasks/local/system</Url> </Resource> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Name>vjournal</Name> </Format> </Formats> <ObjType>note</ObjType> <Url>file:///home/nicolas/.evolution/memos/local/system</Url> </Resource> </Resources> </config> [root@Dahlia /root]$ osynctool --configure BlackBerry 2 <?xml version="1.0"?> <config version="1.0"> <AdvancedOptions> <AdvancedOption> <DisplayName>PIN number</DisplayName> <MaxOccurs>2147483647</MaxOccurs> <Max>2147483647</Max> <Name>PinCode</Name> <Type>string</Type> <Value>0x12345678</Value> </AdvancedOption> <AdvancedOption> <DisplayName>Debug mode</DisplayName> <MaxOccurs>2147483647</MaxOccurs> <Max>2147483647</Max> <Name>Debug</Name> <Type>bool</Type> <Value>0</Value> </AdvancedOption> </AdvancedOptions> <Authentication> <Username></Username> <Password></Password> </Authentication> <Resources> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Name>vcard30</Name> </Format> </Formats> <Name>Contacts</Name> <ObjType>contact</ObjType> </Resource> <Resource> <Enabled>1</Enabled> <Formats> <Format> <Name>vevent20</Name> </Format> </Formats> <Name>Event</Name> <ObjType>event</ObjType> </Resource> </Resources> </config> [root@Dahlia /root]$ osynctool --discover BlackBerry 1 [root@Dahlia /root]$ osynctool --discover BlackBerry 2
Maintenant, vous pouvez lancer la synchronisation de vos données avec Evolution :
[root@Dahlia /root]$ osynctool --sync BlackBerry
BlackBerry Multimedia
Cette partie décrira l’utilisation de petits scripts pour convertir vos vidéos, fichiers sons dans un format lisible pour le BlackBerry.
Pour convertir une vidéo pour votre BlackBerry, j’ai écrit un petit script utilisant ffmpeg.
[root@Dahlia root]$ cat > vid2bb.sh
#!/bin/sh
FILE=$1
RES=480x360
ffmpeg -y -i "$FILE" \
-f mp4 \
-s $RES \
-acodec libfaac -async 4800 \
-dts_delta_threshold 1 \
-vcodec libxvid \
-aspect 4:3 \
-qscale 10 \
"${FILE%.*}_bb.avi"
BlackBerry MTP
Cette partie décrit comment échanger des fichiers via le protocole MTP et votre BlackBerry.
[root@Dahlia root]$ mkdir -p /usr/local/src/mtp [root@Dahlia root]$ cd /usr/local/src/mtp [root@Dahlia mtp]$ cvs -d:pserver:anonymous@libmtp.cvs.sourceforge.net:/cvsroot/libmtp login [root@Dahlia mtp]$ cvs -z3 -d:pserver:anonymous@libmtp.cvs.sourceforge.net:/cvsroot/libmtp co -P libmtp [root@Dahlia mtp]$ cd libmtp [root@Dahlia libmtp]$ ./configure [root@Dahlia libmtp]$ make [root@Dahlia libmtp]$ make install
Si tout se passe bien, vous pouvez vérifier que votre BlackBerry est bien reconnu comme un périphérique MTP.
ATTENTION, le mode mémoire de masse doit être désactivé.

[root@Dahlia root]$ mtp-detect
Device 0 (VID=0fca and PID=8007) is a RIM BlackBerry Storm.
libmtp version: 1.0.1
Listing raw device(s)
Found 1 device(s):
RIM: BlackBerry Storm (0fca:8007) @ bus 0, dev 6
Attempting to connect device(s)
USB low-level info:
Using kernel interface "usbfs"
bcdUSB: 512
bDeviceClass: 0
bDeviceSubClass: 0
bDeviceProtocol: 0
idVendor: 0fca
idProduct: 8007
IN endpoint maxpacket: 512 bytes
OUT endpoint maxpacket: 512 bytes
Raw device info:
Bus location: 0
Device number: 6
Device entry info:
Vendor: RIM
Vendor id: 0x0fca
Product: BlackBerry Storm
Vendor id: 0x8007
Device flags: 0x04000003
Configuration 0, interface 1, altsetting 0:
Interface description contains the string "MTP"
Device recognized as MTP, no further probing.
Device info:
Manufacturer: Research In Motion
Model: 9500
Device version: 100
Serial number: 00000000-12345678-a000000d757cc0
Vendor extension ID: 0x00000006
Vendor extension description: microsoft.com: 1.0; microsoft.com/WMDRMPD: 10.1; microsoft.com/WMPPD: 11.0; vodafone.com/omadrmv2: 1.0;
Detected object size: 64 bits
Supported operations:
1001: get device info
1002: Open session
1003: Close session
1004: Get storage IDs
1005: Get storage info
1006: Get number of objects
1007: Get object handles
1008: Get object info
1009: Get object
100a: Get thumbnail
100b: Delete object
100c: Send object info
100d: Send object
1014: Get device property description
1015: Get device property value
1016: Set device property value
1017: Reset device property value
101b: Get partial object
9801: Get object properties supported
9802: Get object property description
9803: Get object property value
9804: Set object property value
9805: Get object property list
9806: Set object property list
9201: Report Added/Deleted Items
9202: Report Acquired Items
9810: Get object references
9811: Set object references
9101: Get secure time challenge
9104: Get sync list
9106: Get meter challenge
9108: Clean data store
9102: Get secure time response
9103: Set license response
9105: Send meter challenge query
9107: Get meter response
9109: Get license state
Events supported:
0x4001
0x4004
0x4005
0x4008
Device Properties Supported:
0x5001: Battery Level
0xd401: Synchronization Partner
0xd402: Friendly Device Name
0xd102: Device Certificate
0xd404: Unknown property
Playable File (Object) Types and Object Properties Supported:
b984: 3GP
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
dc46: Artist STRING data type GET/SET
dc8b: Track UINT16 data type ANY 16BIT VALUE form GET/SET
dc8c: Genre STRING data type GET/SET
dc91: Use Count UINT32 data type ANY 32BIT VALUE form GET/SET
dc9a: Album Name STRING data type GET/SET
dc9b: Album Artist STRING data type GET/SET
de93: Sample Rate UINT32 data type range: MIN 8000, MAX 48000, STEP 50 READ ONLY
de94: Number Of Channels UINT16 data type enumeration: 0, 1, 2, READ ONLY
de99: Audio WAVE Codec UINT32 data type enumeration: 0, 352, 353, 85, READ ONLY
de9a: Audio Bit Rate UINT32 data type range: MIN 1, MAX 1500000, STEP 1 READ ONLY
dc89: Duration UINT32 data type range: MIN 0, MAX 10000000, STEP 1 READ ONLY
dc9d: DRM Status UINT16 data type enumeration: 0, 1, GET/SET
db02: Unknown property array of UINT8 data type byte array: GET/SET
db01: Unknown property UINT8 data type enumeration: 0, 1, GET/SET
3009: MP3
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
dc46: Artist STRING data type GET/SET
dc8b: Track UINT16 data type ANY 16BIT VALUE form GET/SET
dc8c: Genre STRING data type GET/SET
dc91: Use Count UINT32 data type ANY 32BIT VALUE form GET/SET
dc9a: Album Name STRING data type GET/SET
dc9b: Album Artist STRING data type GET/SET
de93: Sample Rate UINT32 data type range: MIN 8000, MAX 48000, STEP 50 READ ONLY
de94: Number Of Channels UINT16 data type enumeration: 0, 1, 2, READ ONLY
de99: Audio WAVE Codec UINT32 data type enumeration: 0, 352, 353, 85, READ ONLY
de9a: Audio Bit Rate UINT32 data type range: MIN 1, MAX 1500000, STEP 1 READ ONLY
dc89: Duration UINT32 data type range: MIN 0, MAX 10000000, STEP 1 READ ONLY
b901: WMA
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
dc46: Artist STRING data type GET/SET
dc8b: Track UINT16 data type ANY 16BIT VALUE form GET/SET
dc8c: Genre STRING data type GET/SET
dc91: Use Count UINT32 data type ANY 32BIT VALUE form GET/SET
dc9a: Album Name STRING data type GET/SET
dc9b: Album Artist STRING data type GET/SET
de93: Sample Rate UINT32 data type range: MIN 8000, MAX 48000, STEP 50 READ ONLY
de94: Number Of Channels UINT16 data type enumeration: 0, 1, 2, READ ONLY
de99: Audio WAVE Codec UINT32 data type enumeration: 0, 352, 353, 85, READ ONLY
de9a: Audio Bit Rate UINT32 data type range: MIN 1, MAX 1500000, STEP 1 READ ONLY
dc89: Duration UINT32 data type range: MIN 0, MAX 10000000, STEP 1 READ ONLY
3008: MS Wave
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
ba05: Abstract Audio Video Playlist
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
ba09: Abstract Audio Playlist
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
ba10: WPL Playlist
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
ba11: M3U Playlist
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
ba82: XMLDocument
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
3000: Undefined Type
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
3001: Association/Directory
dc01: Storage ID UINT32 data type ANY 32BIT VALUE form READ ONLY
dc02: Object Format UINT16 data type ANY 16BIT VALUE form READ ONLY
dc03: Protection Status UINT16 data type enumeration: 0, 1, READ ONLY
dc04: Object Size UINT64 data type READ ONLY
dc07: Object File Name STRING data type GET/SET
dc0b: Parent Object UINT32 data type ANY 32BIT VALUE form READ ONLY
dc41: Persistant Unique Object Identifier UINT128 data type READ ONLY
Error 2: PTP Layer error 02fe: get_device_unicode_property(): failed to get unicode property.
Error 2: (Look this up in ptp.h for an explanation.)
dc44: Name STRING data type GET/SET
dc4f: Non Consumable UINT8 data type enumeration: 0, 1, GET/SET
dc09: Date Modified STRING data type DATETIME FORM READ ONLY
dc05: Association Type UINT16 data type enumeration: 0, 1, GET/SET
dc06: Association Desc UINT32 data type ANY 32BIT VALUE form GET/SET
Storage Devices:
StorageID: 0x00010001
StorageType: 0x0003 fixed RAM storage
FilesystemType: 0x0001 generic flat filesystem
AccessCapability: 0x0000 read/write
MaxCapacity: 910082048
FreeSpaceInBytes: 910082048
FreeSpaceInObjects: 0
StorageDescription: Mémoire terminal
VolumeIdentifier: 10001-12345678-a000000d757cc0
StorageID: 0x00020001
StorageType: 0x0004 removable RAM storage
FilesystemType: 0x0001 generic flat filesystem
AccessCapability: 0x0000 read/write
MaxCapacity: 7766966272
FreeSpaceInBytes: 7766966272
FreeSpaceInObjects: 0
StorageDescription: Carte Média
VolumeIdentifier: 20001-12345678-a000000d757cc0
Special directories:
Default music folder: 0x00000000
Default playlist folder: 0x00000000
Default picture folder: 0x00000000
Default video folder: 0x00000000
Default organizer folder: 0x00000000
Default zencast folder: 0x00000000
Default album folder: 0x00000000
Default text folder: 0x00000000
MTP-specific device properties:
Friendly name: (NULL)
Synchronization partner: (NULL)
Battery level 5 of 100 (5%)
libmtp supported (playable) filetypes:
ISO MPEG-1 Audio Layer 3
Microsoft Windows Media Audio
RIFF WAVE file
Abstract Playlist file
XML file
Unable to acquire device certificate, perhaps this device does not support this
OK.
Cette commande retourne plusieurs informations importantes. En effet, nous avons la liste des fonctionnalités supportées par notre BlackBerry, mais surtout, nous avons les ID de nos périphériques de stockage. 0x00010001 pour la mémoire interne et 0x00020001 pour la carte mémoire. Respectivement, 65537 et 131073 (en notation décimale).
A présent, vous pouvez lister l’ensemble des dossiers contenant des fichiers multimédias. Vous remarquerez que si un dossier ne contient pas de fichier multimédia, celui-ce ne sera pas afficher.
[root@Dahlia root]$ mtp-folders Device 0 (VID=0fca and PID=8007) is a RIM BlackBerry Storm. Attempting to connect device(s) mtp-folders: Successfully connected Error 2: PTP Layer error 02fe: Error getting friendlyname. Error 2: (Look this up in ptp.h for an explanation.) Friendly name: (NULL) 2097156 music OK.
La commande précédente me retourne un dossier « music » (avec l’ID 2097156).
Nous pouvons également obtenir la liste des fichiers dont le format est reconnu par notre BlackBerry.
[root@Dahlia root]$ mtp-files Device 0 (VID=0fca and PID=8007) is a RIM BlackBerry Storm. libmtp version: 1.0.1 mtp-files: Successfully connected Listing File Information on Device with name: (NULL) File ID: 2097157 Filename: o_surdato_nnammurato.mp3 File size 2707456 (0x0000000000295000) bytes Parent ID: 2097156 Storage ID: 0x00020001 Filetype: ISO MPEG-1 Audio Layer 3 File ID: 2097158 Filename: a_marechiare.mp3 File size 3117056 (0x00000000002F9000) bytes Parent ID: 2097156 Storage ID: 0x00020001 Filetype: ISO MPEG-1 Audio Layer 3 OK.
Pour chaque fichier, nous avons son ID, son nom, sa taille, l’ID de l’objet qui le contient en l’occurence le dossier « music », l’ID du périphérique de stockage en l’occurence la carte mémoire et enfin le type de fichier.
Vous pouvez donc facilement utiliser les commandes mtp-delfile, mtp-getfile…
La commande mtp-sendfile (ou mieux mtp-sendtr) permet d’envoyer un fichier sur notre BlackBerry.
[root@Dahlia root]$ mtp-sendtr -a "Andrea Bocelli" -l "Intanco" -s 131073 voglio_vivere_cos.mp3 "/Music/voglio_vivere_cos.mp3"
Cette commande prend plusieurs arguments : le nom de l’artiste, le nom de l’album, l’ID du périphérique de stockage, le nom du fichier se trouvant sur votre ordinateur et enfin l’emplacement et le nom que vous souhaitez utiliser sur votre périphérique.
Il est également possible d’utiliser la notion de « playlist ». Une fois que vous avez envoyer tous vos fichiers, récupérez leurs ID grâçe à la commande mtp-files (ou mieux mtp-tracks).
[root@Dahlia root]$ mtp-newplaylist -i 2097157 -i 2097158 -n "Andrea Bocelli - Incanto" -s 131073 -p 2097156
Cette commande prend plusieurs arguments : la liste des ID de chaque fichier, le nom de la playlist, l’ID du périphérique de stockage et enfin l’ID du dossier de stockage.
Je travaille actuellement sur l’amélioration du support MTP pour l’application Rhythmbox.
BlackBerry Java Loader
Cette partie décrit les différentes étapes pour installer une application Java sur son BlackBerry.
JavaLoader est fourni avec le projet Barry. JavaLoader permet d’installer ou supprimer des applications sur votre téléphone, lister toutes les applications installées, faire des captures d’écran…
[root@Dahlia root]$ bjavaloader -h
bjavaloader - Command line USB Blackberry Java Loader
Copyright 2008-2009, Nicolas VIVIEN.
Copyright 2005-2009, Net Direct Inc. (http://www.netdirect.ca/)
Using: Barry library version 0.15 (little endian)
-a Wipe applications only
-i Wipe filesystem only
-f Force erase, if module is in use
-h This help
-s List sibling in module list
-p pin PIN of device to talk with
If only one device is plugged in, this flag is optional
-P pass Simplistic method to specify device password
-v Dump protocol data during operation
commands
dir [-s]
Lists modules on the handheld
deviceinfo
Provides information on the handheld
load <.cod file> ...
Loads modules onto the handheld
save ...
Retrieves modules from the handheld and writes to .cod file
Note: will overwrite existing files!
wipe [-a | -i]
Wipes the handheld
Use Caution: Wiping filesystem will remove all data
such as messages, contacts, etc.
Wiping applications will remove all .cod files
on the device, including OS .cod files.
resettofactory
Reset IT policy to factory defaults
Use Caution: Resetting IT policy to factory defaults will
also perform a filesystem wipe which will remove
all data such as messages, contacts, etc.
erase [-f] ...
Erase module from handheld
eventlog
Retrieves the handheld event log
cleareventlog
Clears the handheld event log
logstacktraces
Dump the stack traces for all threads to the event log
screenshot <.bmp file>
Make a screenshot of handheld
settime [yyyy-mm-dd HH:MM:SS]
Sets the time on the handheld to the current time
Or the time specified as an argument to settime
If given as argument, current system timezone is assumed
Par exemple, pour installer une nouvelle application :
[root@Dahlia root]$ bjavaloader load HelloWorldDemo.cod
Pour faire une capture d’écran :
[root@Dahlia root]$ bjavaloader screenshot screen.bmp
BlackBerry comme un modem
Cette partie vous permettra de transformer votre BlackBerry en un modem 3G.
Il y a trois fichiers à créer (voir ci-dessous), à adapter suivant votre opérateur.
[root@Dahlia root]$ cat > /etc/ppp/peers/barry connect "/usr/sbin/chat -f /etc/chatscripts/sfrstart" disconnect "/usr/sbin/chat -f /etc/chatscripts/sfrstop" defaultroute #replacedefaultroute noipdefault usepeerdns debug noauth user "" password "" noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp lock nocrtscts #nodetach nomultilink passive maxfail 5 lcp-echo-interval 5 lcp-echo-failure 12 holdoff 3 ipcp-restart 7 ipcp-accept-local ipcp-accept-remote mtu 1492 pty "/usr/sbin/pppob -v -l /tmp/barry.log"
[root@Dahlia root]$ cat > /etc/chatscripts/sfrstart TIMEOUT 5 ABORT 'BUSY' ABORT 'NO ANSWER' SAY 'Starting GPRS connect script\n' # Get the modem's attention and reset it. '' 'ATZ' OK ATQOV1EO OK AT+GMM # Set Access Point Name (APN) if not already set SAY 'Setting APN\n' #OK 'AT+cgdcont=4,"IP","websfr"' OK AT+cgdcont=1,"IP","wapsfr" # Compose phone nuber OK ATDT*99# # Dial the number ABORT 'NO CARRIER' TIMEOUT 60 SAY 'Dialing...\n' CONNECT ''
[root@Dahlia root]$ cat > /etc/chatscripts/sfrstop "" "\K" "" "+++ATH0" SAY "GPRS disconnected."
Puis, pour lancer une connexion ou l’arrêter :
[root@Dahlia root]$ pon barry
[root@Dahlia root]$ poff barry


2 réponses à BlackBerry Storm sous Linux