Project

General

Profile

Serial Cable » History » Version 20

steve-m, 02/19/2016 10:48 PM
add buspirate how-to, thanks to Fabian!

1 5 vogelchr
The Calypso phones typically all have a serial port @ 3.3V levels on the 2.5mm earphone jack.
2 1 laforge
3 18 laforge
Those cables are sometimes called ''T191 unlock cable'' and come in a variety of fashions, such as
4
 * Real RS232 on DB9
5
 * with integrated USB serial converter chips
6
  * PL2303 (cheap, only standard baud rates)
7
  * FT232 (expensive, non-standard baud rates)
8
  * CP2102 (medium price, non-standard baud rates)
9 7 tsaitgaist
10
You can either buy ready-made cables, e.g. at:
11 9 laforge
 * USB variant
12 1 laforge
  * [http://www.gsmliberty.net/shop/motorola-t191-dataunlock-cable-p-1252.html gsmliberty.net]
13
  * [http://www.fonefunshop.co.uk/datacables/motorola.htm fonefunshop.co.uk]
14 13 tsaitgaist
  * [http://gsmserver.com/cables/Smart-Clip_Cable_for_Compal_Chi_Mei_based_phones.php gsmserver]
15 18 laforge
  * [http://shop.sysmocom.de/products/cp2102-25 sysmocom shop] (CP2102 for burst_ind!)
16
 * RS232 variant, you still need a RS232 serail port or separate USB/RS232 adapter
17 7 tsaitgaist
  * [http://www.cellcorner.com/xshp/unlock-phone-codes/motorola-t190-t191-t193-unlock-data-cable.html cellcorner.com]
18 10 laforge
 * USB/RS232 cable 
19
  * [http://www.tronisoft.com/cat_usbtoserial.php tronisoft.com] (FTDI and Prolific cables)
20 3 laforge
21
Or you can build it yourself (detailed instructions can be found on the net, search for "t191 unlock cable" or the like).
22
23 4 laforge
 * TxD is at the tip of the plug (PC to Device)
24 1 laforge
 * RxD is at the middle contact (Device to PC)
25 5 vogelchr
 * GND is the outer contact
26
27
== Hints and Warnings ==
28 1 laforge
29
 * If you don't use a 3.3V (low voltage TTL, LVCMOS) serial port you can fry your phone! (internally, it connects to the IO-pins of the baseband processor which run at 2.8V). '''Don't connect directly to your PCs serial port (running at +/- 12V!).'''
30
 * If your development system is virtualized (runs inside VMware, Virtualbox, Parallels...) the connections can be unreliable (the loader protocol is timing critical).
31
 * Your safest bet is a USB cable with a FTDI chip (FTx232) configured for operation at 3.3V connected to a machine running Linux natively. Prolific chips (PL2303) also work, but are far less reliable.
32 18 laforge
33
=== non-standard higher baud-rates (burst_ind branch) ===
34
If you want to communicate with the Calypso at baudrates higher than 115200 bps, you'll have to resort to non-standard baudrates. 
35
36 19 laforge
These are not supported by cheap PL2303 based cables and only work with a FTDI or [wiki:Hardware/CP210xTutorial CP210x] based USB adapter cable.
37 20 steve-m
38
=== Using OsmocomBB with a Bus Pirate ===
39
 
40
To connect to your phone using a Bus Pirate, you have to put the bp into "Bridge Mode", that is a transparent bridge between whatever you connect to the bp and the serial terminal it provides.
41
Because timing is _very_ critical when working with the phone's boot loader, you have to set the bp in "Bridge Mode with Flow Control". Thus, the code can use exact timing and would not have to wait for serial port timeouts.
42
 
43
To do so, first disconnect your bus pirate if it already is in bridge mode.
44
Then connect it to your computer and open a serial terminal.
45
At the "HiZ>" prompt, enter the following keys exactly as described:
46
        1. m    -	to change the mode
47
        2. 3    -	for UART mode
48
        3. 9    -	for 115200 bps
49
        4. 1    -	for 8 bits of data, no parity control
50
        5. 1    -	for 1 stop bit
51
        6. 1    -	for Idle 1 receive polarity
52
        7. 2    -	for Normal output type
53
 
54
Then you are at the "UART>" prompt. Enter "(0)" to show available macros:[[BR]]
55
UART>(0)[[BR]]
56
 0.Macro menu[[BR]]
57
 1.Transparent bridge[[BR]]
58
 2.Live monitor[[BR]]
59
 3.Bridge with flow control[[BR]]
60
 
61
Now enter "(3)" to enter bridge mode with flow control, confirm your selection with "y" and you're ready to go!
62
 
Add picture from clipboard (Maximum size: 48.8 MB)