Dock Pinout

rashid11

Senior Member
Mar 4, 2010
144
11
0
And it looks my theory is correct, there's a function to decode/show BT device ID in there :)

================

static ssize_t bt_addr_show(struct device *dev, struct device_attribute *attr,

362 char *buf)

363 {

364 int ret;

365 u8 bt_addr[6];

366

367 ret = dock_acquire(&ds);

368 if (ret < 0)

369 return ret;

370 ret = dock_read_multi(&ds, DOCK_BT_ADDR, bt_addr, 6);

371 dock_release(&ds);

372 if (ret < 0)

373 return ret;

374

375 return sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x\n",

376 bt_addr[0], bt_addr[1], bt_addr[2],

377 bt_addr[3], bt_addr[4], bt_addr[5]);

378 }
 

stumo5

Member
Jan 19, 2010
19
1
0
Its a bummer about the bluetooth ID code being needed to enter docked mode. But at least we have charging via the 2 outer pins. That should save some wear and tear on the micro USB, which I actually constantly worry about each time I plug in.

So what I'm planning to do is settle on a decent silicon type case for the phone. Then somehow mount some contacts inside the case permanently to the N1 pins. And bring out those connections through the case to the outside. Then they can go into a custom moulded dock (ie. clay) using some more reliable contacts.

EDIT: Thinking about this some more last night, I've decided what I'm gonna do....
1. Make a custom clay sit-in dock, shaped to hold the silicone cased phone, along the lines of the original google dock.
2. Before it is hardened, insert 2 long good quality gold pins (eg. from a lemo connector or similar) protruding from the clay dock in the correct positions and length. The pins will be long enough to pass through 2 small holes I make in the silicon phone case and contact the N1 charge pads.
3. wire it all up to a USB cord.

The small holes I make in the silicone case will help locate and guide the pins/phone to make the connection onto the N1 pads.
Now I just need to decide on a decent N1 case.
 
Last edited:

kittka

New member
May 9, 2010
1
0
0
Stumo5, check out my charging dock instructable at Instructables dot com, search for Charging Nexus One Dock. I've recently made an acrylic version that looks pretty sweet.

I just made holes in the cover where the pin connections are, and used those spring pins to make it connect.
 

gcbxda

Senior Member
Jan 5, 2009
227
17
0
California
amazing how that code is weird.

Mostly bit juggling and no documentation. The only comment reads:
Code:
if (dock_read()) {
 /* Allow some time for the dock pull-down resistor to discharge
 * the capasitor.
 */
msleep(20);
if (dock_read()) {
good english apart, i'm not sure what trigger that code by calling dock_acquire(), but it has a slight smell of a bad race condition.

and yes, i'm thinking about hacking that to allow a 'custom dumb dock' to be easily built. just have to get one weekend of pure boredom. or maybe some motivation if someone start build said dock
 

͘Jan

Member
Mar 2, 2011
7
0
0
Doesn't it depends if you need bluetooth? If you don't need it there might be another way. The first byte is the dockid(docktype) byte: if we make sure the first bit is one for dock_mains and the last bit is probabbly if it's a car or desktop dock.(but might be flipped if it is big endian), So you might just as wel put a 1-signal on it. Or just some voltage, dependable on how mfm_decode works and if it uses a clock signal. the other bytes are bluetooth, so it won't really matter.

Code:
  if (!vbus_present || dock_acquire(&ds))
 475                 goto no_dock;
 476 
 477         if (ds.dock_connected_unknown) {
 478                 /* force a new dock notification if a command failed */
 479                 switch_set_state(&dock_switch, 0);
 480                 ds.dock_connected_unknown = false;
 481         }
 482 
 483         dockid = dock_read_single(&ds, DOCK_TYPE);
 484         dock_release(&ds);
 485 
 486         pr_info("Detected dock with ID %02x\n", dockid);
 487         if (dockid >= 0) {
 488                 msm_hsusb_set_vbus_state(0);
 489                 dock_mains = !!(dockid & 0x80);
 490                 switch_set_state(&dock_switch, (dockid & 1) ? 2 : 1);
 491                 goto done;
 492         }