Sunday, May 27, 2012

Raspberry Pi and Motorola Lapdock






Here's some info for those interested in setting up a Motorola Lapdock to work with the Raspberry Pi.  This is extremely easy to set up and should work without the need for any hardware modifications.  I used the Atrix Lapdock, which can be found between $50 and $100 on various websites.  I used the Debian Squeeze image from the Raspberry Pi downloads section.  I haven't had luck with Arch Linux ARM.




Parts List

~Raspberry Pi
~Motorola Lapdock (Atrix works)
~1 USB Male to Micro USB Male cable (Standard cell phone cable)
~1 USB 2.0 A female to Micro USB B female adapter cable FF
~1 Micro HDMI Type D Female to Micro HDMI Type D ~Female Connector Adapter Gold
~1 USB Male to USB Male cable  *You will need to open this cable and cut the red 5 volt wire*
~1 MICRO HDMI to HDMI cable


*Please note, my Micro USB and Micro HDMI ports are reversed on my Lapdock due to a previous modification unrelated to the Raspberry Pi.  Yours should work out of the box, without any modifications to the Lapdock. 


.




Attach Micro HDMI to Micro HDMI Female

Connect the Micro HDMI to HDMI cable to the Lapdock and Raspberry Pi


Attach the Micro USB Female to USB Female cable to the Lapdock

Slice open the USB Male to USB Male cable and cut the red, 5 volt wire.  Tape closed using electrical tape.

Connect the USB Male to USB Male cable to the Lapdock

Connect the other end of the USB Male to USB Male cable the Raspberry Pi


Plug the USB to Micro USB cable into the Lapdock



Connect the Micro USB end of the USB to Micro USB cable into the Micro USB power port of the Raspberry Pi


Make sure your SD card and Ethernet cable are connected, then open your Lapdock to power on your Raspberry Pi!





Sound through HDMI
Once your logged into Debain Squeeze, you will need to edit config.txt and set hdmi_drive=2
Step 1: Enter command sudo nano /boot/config.txt
Step 2: Enter hdmi_drive=2
Step 3: Press Control-x
Step 4: Press y
Step 5: Press [enter]
Step 6: Enter: sudo modprobe snd_bcm2835
Credit veryevil from RaspberryPi forum








Wifi
I used a Netgear wg111v2 adapter plugged into one of the Lapdock's USB ports.  I used this guide as a reference, but obviously my adapter is different.  The Debian Squeeze image has the drivers for the wg111v2 adapter preinstalled.



Useful Links
I made a Raspberry Pi Laptop - Raspberry Pi forum



This blog will be updated frequently, with more pictures, instructions and links to come!







56 comments:

  1. Can you post a video of how this has been worked out please.

    ReplyDelete
  2. Likely not; this is my first attempt at such a thing and I'm certain someone will create more thorough videos than I can do in the near future :)

    ReplyDelete
  3. this was very nicely done little hack using existing and cheaply attained plugs and connectors, very much dig it, especially with all the talk about how to get a good display on this thing, might have to pick up a lap dock myself

    ReplyDelete
  4. Thanks fhlipZero. This has been a fun project!

    ReplyDelete
  5. Great job! Thanks for all the hard work. I assume the Lapdock puts out 500ma at 5V on both ports as per the USB spec? The Pi can run on 500ma because it is not powering a mouse/keyboard or any other external device??? I could use one of those splitter USB power cables connected to both ports on the Lapdock to provide more power to the Pi if needed? I was hoping the Lapdock would supply power to the Pi with the lid closed so it could be used as a large battery to supply power when using the Pi to display on other display devices. I guess it still could but with the display powered it would run down the battery more quickly.

    Again Thanks, Ron
    BTW, I ordered my Lapdock yesterday $70 shipped. When the word gets out on this mod, the Lapdock prices will probably go higher.

    ReplyDelete
  6. Hi Ron,
    The back USB ports do power off when the Lapdock is closed. The male micro USB powers off for about a second or two, then powers back on when the Lapdock is closed. I haven't opened it up to check if there's a way to keep the power on when the lid is closed, but that would be an interesting thing to know.
    We haven't thought of your suggestion with the splitter cable (Y cable)...but I'm going to try it! I am having some obstacles with powering a wifi adapter and some other peripherals. Right now, if I have a wifi adapter or mouse connected to either the Lapdock's or Pi's usb port I lose my LAN connection. The best I can suggest is experimenting with different configurations like my wife and I are. If you find anything, please share it!
    There's a lot of people working on this and there's a few different modifications. I'm trying to keep everything as stock as possible without having to splice wires.
    I also definitely suggest checking out the Raspberry Pi forum I linked to above.
    Thanks
    -Joe

    ReplyDelete
  7. Joe,
    Excellent work and thanks for the clear step through.
    Does the lapdock have speakers ?
    Is this what your section about 'Sound Through HDMI' relates to ?

    fyi your link to '1 MICRO HDMI to HDMI cable' is going to a MINI not MICRO cable.

    On the RPi instruction sheet that came from Farnell there is the following warning "The Raspberry Pi is not designed to be powered from a USB port or other connected equipment, if this is attempted it may malfunction" Is this not what you are doing in your set up ? Perhaps you could put a covering comment in your text?

    now onto getting asecond RPi and fitting it inside a Netgear MP101 Media Player from circa 2004.

    ReplyDelete
  8. Hi Insepes,
    Yes, the Lapdock does have speakers and the part about "Sound through HDMI" will work! Thanks for pointing out the error in my link, I fixed it... the HDMI cable should be Micro.

    From what I've read on the forums, there are quite a number of USB hubs people are using that will power the Pi through the standard USB port as well. From what I've read here goo.gl/0Zt0c , (last post) "setup won't be able to trip the USB polyfuse", but a disclaimer is coming as well as instructions. You could cut the lead in the Lapdock or USB cable.

    Thanks Again!

    ReplyDelete
  9. Joe,
    There are power management and performance issues when any peripheral is attached to the USB ports of the RPI, whether powered or un-powered.
    In your setup the USB cable to the RPi is effectively operating as a powered hub with Keyboard and Trackpad attached. This is a neat solution and it works. The power going through the RPi USB port is sufficient to power it. But is it too much, not enough or just about right ?
    The question is does it have any impact on performance ?
    I now have a RPi and lapdock and I am going to do some testing. I'll let you know what I find out. I'm also buying a USB port current and voltage tester to see what is coming out of the lapdock USB ports and see what is arriving at the RPi USB ports.

    The idea of cutting the power wire in the USB cable may not be a solution. I think the power wire may form part of a wake up call process that is necessary for both powered and un-powered devices.

    This link explains the issue, I think:
    http://yourfinalsystem.com/cable-design-f-a-q/147-how-do-data-only-usb-cables-work

    Also a Google search for data only USB cables proves fruitless, suggesting such an item is not any use to anyone, assuming that it exists.

    kind regards

    ReplyDelete
  10. The blog is quite interesting!!,there are plenty of new things are there, The pictures also depicts the technology has boom up and innovation raises, with the invent of IC to the VLSI, the things are changed in the past histroy.

    Wireworld Usb

    ReplyDelete
  11. Very good project, is this possible to get an atrix without 1 GB of ram and processor since it cannot be used by the raspberry pi and make the cost of the lapdock higher, also is this is possible to embedded the raspberry inside the lapdock?

    ReplyDelete
    Replies
    1. Just FYI, you are mixing up two products. The Atrix is the phone(contain the 1 GB ram and the processor). The lapdock is just a portable hdmi screen with keyboard, trackpad.

      Delete
  12. Made a lot of progress this week. Wifi is working, the pi and all peripherals are completely running off the lapdock! You'll see an update tonight or tomorrow!

    ReplyDelete
  13. I've done this with my RPi as well and the guide above is actually dangerous. You need to cut the wire that would have provided a charge voltage, otherwise you have +5V going to the USB host port on the Pi. This is what has held me back from posting a guide about it.

    So, if make your own USB cable with the +5V line cut, you should be ok.

    ReplyDelete
    Replies
    1. Is there a quick explanation for why it's dangerous to use a USB cable with the +5V wire intact?

      Is it because both the Lapdock and Raspberry Pi would be attempting to send power across the USB cable?

      Delete
  14. Yea, I did do that a while ago, haven't had a chance to update this blog. I switched to a Y cable, used 1 end to power the Pi and cut the power wire in the USB host end. It worked great, and left me with 2 USB ports in the Lapdock.

    ReplyDelete
    Replies
    1. My USB Wifi adapter does work when directly plugged into one of the Pi's USB ports but only if I do NOT have a USB data only cable (from the other Pi USB hub port) connection to the Lapdock microUSB port. With this configuration, I can only use the LapDock as a display device (ie.. no keyboard/trackpad). There is a conflict somewhere?? If anyone has their Wifi device functioning with the LapDock and can use the LapDock keyboard/trackpad please chime in. I can confirm that the two standard LapDock USB ports appear to supply enough power to operate the Pi; however, not enough power when my Wifi adapter is plugged into one of the Pi USB hub ports.

      If the USB conflict described above can be resolved, I think the Wifi adapter would work plugged into one of the LapDock standard USB ports (dmesg shows the Wifi was identified but I get firmware load/kernel errors).

      Regards, Ron

      Delete
  15. Thanks for writing this post - I've followed your lead and made my own Rasptop, with a customised set of adapters.

    I've not hacked into the Lapdock hardware itself yet - have you found a way to stop it stopping/restarting the dock-socket power when closing the lid?

    Just stopping the power at that point (or leaving it on) would be nicer, I guess Motorola expects your device to have its own battery...

    ReplyDelete
    Replies
    1. I've built one of these also, however my video is not right. Can you post your video settings?

      Delete
    2. if you add the following line to config.txt

      disable_ov​erscan=1

      this will remove black borders around the screen.

      Delete
  16. Can you tell me how to keep everything on the lapdock without the wire dangling around

    ReplyDelete
  17. I bought a lapdock just for this project! I've wired it all up as instructed, including the cut +5v line in the male-to male USB cable but neither the trackpad nor the keyboard work on the lapdock. I know they work OK because they work when I plug in my Moto Atrix...

    ReplyDelete
    Replies
    1. Did you resolve this issue? I have the same problem.

      Delete
    2. I'm having the same issue now and got stock by this weird problem. I double checked all cables, but the lapdock keyboard and trackpad aren't recognised by the RPi. Can you please give me any hint or trick, to get this fixed?

      Delete
    3. I am having this problem too, have somebody found a solution?

      Delete
  18. This comment has been removed by the author.

    ReplyDelete
  19. I'm hoping to start playing around with a setup like this. I've had my lapdock for a few weeks now, and am growing really impatient waiting for one adapter and one cable to arrive. :-(

    ReplyDelete
  20. Your mod to switch the location of the micro-usb and micro-hdmi ... were you trying to connect a different cellphone to the dock?

    ReplyDelete
    Replies
    1. Yes, we had been using ours for a Droid Bionic previously, and that required switching the two.

      Delete
  21. Hello,

    think you're using Debian wheezy now ? I try this one. But i can't get the display running.

    Does your configuration runs out of the box or did you have changed the config.txt. If so, could you publish yours ?

    Thanks

    Jochen

    ReplyDelete
    Replies
    1. Jochen,
      We are still working with squeeze. We did need to make some changes to the config.txt but I can't do much in the way of posting until after the kids are back in school in September. I plan to make several improvements to what we have posted then; but I can say that we used http://rohankapoor.com/2012/04/americanizing-the-raspberry-pi/
      in our "set-up" process.

      Delete
  22. Hey I tried this. I open up the lapdock and nothing...No red light on my raspi nothing on my lapdock :( What am I doing wrong?

    ReplyDelete
    Replies
    1. I bought everything specifically for this purpose. The raspi does power up when I connect it directly to power. The lapdock gets a charging light and shows the battery charged but doesn't look like it's providing any power when open or shut

      Delete
    2. I have a similar issue. I suspect the female to female HDMI adapter doesn't pass the signal properly. Using the link provided, it is now an adapter that has ribbing on the edges instead of the smooth surface portrayed in the images above, so I believe they've changed the model.

      I have an micro HDMI extension cable ordered and a micro HDMI (female) to HDMI (male) adapter. The extension cable will come out of the lapdock and the adapter will go into the Raspberry Pi.

      Delete
    3. I just got my new micro HDMI extension cable and micro HDMI to HDMI adapter and that worked perfectly.

      There is either an issue with the female to female adapter or the HDMI-M to micro HDMI-M cable.

      Delete
    4. @Chris - Could you post the parts list that worked for you?

      My lapdock is on its way, but I wanted to make sure I ordered adapters that work.
      Where you got those parts from would help a lot too.

      Delete
  23. $100 at 1saleaday.com today only

    ReplyDelete
  24. Now you can buy the cancelled Lapdock 100 at Verizon stores for $49.99.

    ReplyDelete
  25. Well, after weeks of waiting i finally was able to get all the cables connected.

    Opened the Atrix lid and - oops! my Raspi starts to smoke!!!

    Closed the lid and pulled some cables.

    Then - what the heck... plugged power back in and HDMI, but no keypad/mouse cable and opened lid. No smoke, but Atrix reports No HDMI signal. The PWR comes on red and the OK blinks for a while.

    Ug and sigh. It seems from reading above i need to find a female micro HDMI to standard male cable bec. perhaps the tiny adaptor isn't working. i also need to figure out it i have cut the correct wire on the USB cable (keyboard/mouse).

    Does this sound correct?

    Have a great evening! :)

    ReplyDelete
  26. you could do this better... female micro usb from lapdock to usb male on rpi usb hub. the rpi would power up. and for hdmi, get a female micro hdmi to male hdmi adapter. i got my setup like this, works quiet nice.

    ReplyDelete
    Replies
    1. By no means would we imply that there was not a better way to do the same thing; Our only intention was to share what we did.

      Delete
  27. This comment has been removed by a blog administrator.

    ReplyDelete
  28. can we attach do we have any storage capability.. i mean can i connect my 500GB Harddisk to this laptop??...
    plzz answer admin......

    ReplyDelete
    Replies
    1. I don't see why that wouldn't work; but I can't say for certain since I haven't tried it.

      Delete
  29. Beginner question: why cut the red wire? The power led on my pi doesn't light up if I use a cut wire cable. (this might be because neither hdmi or micro usb female adapter are well seated - I'm waiting for the dremel to charge...)

    ReplyDelete
  30. Great article!

    I would be tempted to try to use it without the lapdock powering the pi. I can keep the pi powered as it is in my environment. It would be really handy to have a keyboard, trackpad, small screen, and speakers all off a single USB port.

    As I understand it, I would STILL need a cut power line in the micro-usb => usb 2.0 cord, where I am connecting to the usb 2.0 port on the pi.. I don't want to smoke my pi, it's too cool for that.

    Someone should make a "kit" that has the proper cables, without the power line (or cut), etc. I would be willing to pay $20 for the $10 worth of cables, just to know it's going to work.

    ReplyDelete
  31. HDMI, DisplayPort and DVI are all digital standards used for High Definition video signals. DVI & DisplayPort (V1) solely carry the video-image signal however no audio, where as HDMI covers every. Thus if you use a DVI or DisplayPort (V1) cable, you may want to attach audio cables from your DVD-player, CPU, games console or cable/satellite receiver to your TV.

    ReplyDelete
  32. Dueltek conjointly have on the market a large vary of Single-Mode (OS1) Fibre Optic Cables. On the market connector types are: LC, SC, MTRJ, ST, SCA, FC, E2000.

    ReplyDelete
  33. I saw that you had issues with your resolution. How did you fix it?

    ReplyDelete
    Replies
    1. I don't recall having to fix the resolution; so I couldn't answer that. I will have to ask Joe if he can remember, but I'm not getting my hopes up on that one.

      Delete
  34. Would this work with a Motorola Lapdock 100 (newer model)?

    ReplyDelete
    Replies
    1. From what I've read online, it doesn't look like it would. If you attempt and have success, let me know!

      Delete
  35. I have a direct connect cable being manufactured for this, basic drawing of what to expect pic.twitter.com/qvctQ5SNNm

    ReplyDelete
    Replies
    1. That's awesome! Once you've got that in production we'd really like to add a link to it here!

      Delete