User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: I made a Raspberry PI Laptop

Sat Dec 08, 2012 3:55 pm

Devfarse wrote:I will be getting a rev 2 model B so I will try to backfeed power through the USB A connector but if I have problems I will just use the micro USB and make the Y adapter. Sometimes it is vague, but am I correct in assuming that the micro USB can't be used in host mode?
The RasPi Micro USB jack only connects Vbus (+5V) and GND. It does not connect the USB data lines. You shouldn't have any trouble with backfeed: RasPi rev 2 directly connects its USB A ports to 5V0 = TP1.

Bobknopfler
Posts: 8
Joined: Sun Dec 02, 2012 9:05 am

Re: I made a Raspberry PI Laptop

Sat Dec 08, 2012 5:10 pm

Update.....

I don't know if it's due to buying cheap cables or not, but the problem of the keyboard/trackpad not working was down to the green and white wires being switched. To solve this it's simply a case of connecting the green to the white and the white to the green.

Very pleased with myself for working this out using a meter!

Next challenge is sound over the hdmi, followed by wifi.

Much happier now.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: I made a Raspberry PI Laptop

Sat Dec 08, 2012 9:33 pm

Bobknopfler wrote:If you connect your lapdock only to to the rpi through the hdmi and provide power to it, can you adjust the volume or brightness using the lapdock keyboard? I can't, which I'm guessing might suggest a fault on the unit?
Adjusting the display brightness via the keyboard should work, but I don't recall anyone being able to adjust the volume via the keyboard.

It appears audio is processed within the phones with which these docks were designed to work where the particular keyboard Fn key codes are being interpreted by the phones, but the Pi has no idea what those key codes are supposed to do, and it just ignores them. The display brightness, on the other hand, is apparently controlled completely within the lapdock, so the linkage is there between the Fn key codes and control of the display via something like lapdock firmware.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

Bobknopfler
Posts: 8
Joined: Sun Dec 02, 2012 9:05 am

Re: I made a Raspberry PI Laptop

Sat Dec 15, 2012 4:15 pm

Thanks Jim, you're right. This is a good way of working out if it's the lapdock or the set-up that's at fault. I nearly returned my lapdock before discovering the green/white wire problem.

Devfarse
Posts: 9
Joined: Sat Dec 08, 2012 1:44 am

Re: I made a Raspberry PI Laptop

Mon Dec 17, 2012 11:16 pm

A quick update on which parts to buy for a successful adapter set. The last of my things arrived today and after some splicing, everything works perfectly. I chose to only backfeed power through the USB A connector.

Micro USB female to male adapter $4.28
http://www.amazon.com/gp/product/B001EJHH20

HDMI male to Micro HDMI Male $6.99
http://www.amazon.com/gp/product/B0060AU5MW

Atrix Lapdock new in box $71.99 (it has a UK keyboard but only affects placement of symbols. This is also where you could save the most money by shopping around. Price is dropping, I paid $79.99 11 days ago)
http://www.amazon.com/gp/product/B004M17D62

Micro HDMI Female to Micro HDMI Female $5.99
http://www.ebay.com/itm/280761232832

Optional USB Male to Micro USB Male $5.79 (if you dont have a spare USB lying around that you can hack up or if you need to provide power to the micro USB instead of the USB A connectors.)
http://www.amazon.com/gp/product/B003ES5ZSW

All items have free shipping and the last item shipped directly from China to the US in 11 days. No grinding or sanding of the connectors is required either; there is plenty of clearance between them when connected to the lapdock.

Total price $95.04... not too bad for the best possible RPi mobile setup and all new stuff.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: I made a Raspberry PI Laptop

Sat Dec 22, 2012 10:44 am

Has anyone experienced the trackpad locking up where the cursor stops responding and the LED no longer turns off/on when double-tapped to lock/unlock the trackpad? The buttons and keyboard still work, so you can Ctrl-Tab between windows and type into terminal sessions, Ctrl-Esc to get to the LXDE menu, direction arrows to navigate menus, etc.

Logging out of the X session doesn't fix it, as reentering via startx doesn't restore response, which suggests a hardware/driver soft failure (i.e., it's not hardware fatal). I think I've had Chromium running every time, but I can't say for sure 100%. Of course, I always have too much running, but only because the Pi keeps fooling me into thinking that I have a full-fledged laptop using the lapdock - I'm amazed at how responsive LibreOffice runs.

I'm not overclocking or doing anything else non-stock, BTW.

Other than this, I'm more than happy with my PiTops!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

malcolmmp
Posts: 3
Joined: Mon Oct 22, 2012 11:50 pm
Location: Santa Barbara, CA

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 2:36 am

Hi all- I've been lurking on this thread for a while as I've waited for all my components to arrive. I just sat down this week and put it all together and things have been working pretty well so far.

I noticed some people have been having trouble trying to get the Volume +/- fn shortcuts working, and I just got a rough but working solution together today.

If you run Xev you can see that the key combo is generating XF86Audio[Lower/Raise]Volume events. If I understand correctly, LXDE doesn't natively handle those events. So if you edit ~/.config/openbox/lxde-rc.xml and add the following keybinds, you can increment the volume by about 10%.

Code: Select all

    <!-- Volume keys -->
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer -q set PCM 1064- unmute</command>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer -q set PCM 1064+ unmute</command>
      </action>
    </keybind>
I was having problems incrementing by actual percentage. As far as I could tell, amixer wasn't behaving as described in the man pages. Any expertise on a more elegant solution is more than welcome! The next step would probably be to use an OSD system to present the state updates.

Also note that this solution is LXDE-specific, and would only work during your x session.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 2:48 am

What a fantastic thing you've done there many thanks can't wait to try it out.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

HippoMan
Posts: 3
Joined: Sun Dec 23, 2012 7:58 pm

Problem with Lapdock and Model B (512Mb)

Sun Dec 23, 2012 8:16 pm

I'm wondering if anyone has been able to get a RasPi Model B rev 2 (512 Mb) to display HDMI video on a Lapdock.

I and a friend of mine have not been able to do so with a total of three different RasPi Model B rev 2's.

My friend has been able to use an Atrix-type Lapdock with the older 256M Raspberry Pi. He uses unaltered USB and HDMI cables. However, when he tried the exact, same setup with a newly obtained 512Mb model (Model B rev 2), he was unable to get any HDMI video to show up on the lapdock. He then got a second Model B rev 2, and he had the same problem.

I also got a Model B rev 2 (from Element 14), and I'm using a newer Lapdock-100 with it, in the same way as my friend is doing with his Atrix-type Lapdock ... and I also have the same HDMI problems: i.e., no HDMI video on the lapdock. I even tried this with the exact, same HDMI and USB cables that my friend has been using in his setup.

Given that this issue is occurring with 3 different 512Mb Raspberry Pi's while the older, 256Mb version works fine with the same lapdock and cables, I'm wondering whether anyone has noticed a difference between the HDMI design in the 256Mb Raspberry Pi and the 512M bmodel which might cause this difference in behavior.

I have tried numerous settings within config.txt that were suggested in various online messages. None of them work. I've come to the conclusion that is almost certainly a hardware-only issue.

I know my 512Mb RasPi is indeed working, because if I hook it up to a network, I can ssh into it from another host and run linux commands to my heart's content. The only thing which is failing is the HDMI to the lapdock.

I've mostly been a software guy up until now, and I'm fairly ignorant regarding the hacking of cables and other related hardware. Therefore, I'm unsure about many of the suggestions in this thread and how they might or might not pertain to the specific HDMI issues I'm seeing.

However, I'm very willing to learn.

Anyway, I want to repeat for clarity that this HDMI problem occurs both with the Atrix lapdock and the Lapdock-100, and it only (!!!) occurs on the 512Mb RasPi, not the older 256Mb RasPi, whose HDMI to these lapdocks works perfectly.

Thanks for any wisdom, tips, or suggestions you might offer.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 8:28 pm

I swap between the 256 and 512 no issues on 3 Lapdocks I would try a different cable it does need a grounding wire if I remember correctly and some cables do not have this connection. Perhaps the 256 is some how grounding and the 512 are not.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

HippoMan
Posts: 3
Joined: Sun Dec 23, 2012 7:58 pm

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 8:32 pm

Thank you, malakai.

Since I'm pretty ignorant about hardware/cables/etc., could you or someone suggest how I can determine whether an HDMI cable has or doesn't have the grounding wire? Seems to me that cable vendors aren't going to tell me about this in advance.

Thanks.
Last edited by HippoMan on Sun Dec 23, 2012 8:38 pm, edited 1 time in total.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 8:46 pm

That I am not sure I think in this picture it is the Hot Plug Detect since one end is so small it would be hard to verify

http://www.hdmi.org/installers/insidehdmicable.aspx

Post a link to the cable you are using. If like many setups you have a cable and a female to female adapter it could also be the adapter
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

HippoMan
Posts: 3
Joined: Sun Dec 23, 2012 7:58 pm

Re: I made a Raspberry PI Laptop

Sun Dec 23, 2012 9:09 pm

Thanks, malakai.

The HDMI cable was given to me, and there is no link.

And I guess it could also be the female-female adapter.

I'll do my own investigation on this, now that I have something to go on. Whatever I come up with, I'll post my results or any new questions.

colin B
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
Contact: Website

Re: I made a Raspberry PI Laptop

Wed Dec 26, 2012 9:51 am

I have a BIONIC lapdock and my setup is -

Micro female to micro female HDMI adapter -> Micro male to Type A female -> Type A to Type A Male cable - with all pins connected.

It is a bit hit and miss on whether I get any HDMI output/input, I have tracked the intermittency down to the male cable into the female Pi end. If it is 'homed' there is no HDMI, if it is pulled out slightly and skewed so that the SD card facing part of the connector is slightly pulled out and the other side rammed home, the display comes on.

This suggest to me (I've tried more than one HDMI cable) that there is a contact problem with the female A connector on the Pi. It seems unlikely to be pin 19 purely because the Pi switches on and the 'No HDMI input' notice appears, having said that it is the pin 17/19 end of the plug that needs to be skewed to get an output.
On a clear disk one can seek forever

Devfarse
Posts: 9
Joined: Sat Dec 08, 2012 1:44 am

Re: I made a Raspberry PI Laptop

Wed Dec 26, 2012 2:05 pm

colin B wrote:I have a BIONIC lapdock and my setup is -

Micro female to micro female HDMI adapter -> Micro male to Type A female -> Type A to Type A Male cable - with all pins connected.

It is a bit hit and miss on whether I get any HDMI output/input, I have tracked the intermittency down to the male cable into the female Pi end. If it is 'homed' there is no HDMI, if it is pulled out slightly and skewed so that the SD card facing part of the connector is slightly pulled out and the other side rammed home, the display comes on.

This suggest to me (I've tried more than one HDMI cable) that there is a contact problem with the female A connector on the Pi. It seems unlikely to be pin 19 purely because the Pi switches on and the 'No HDMI input' notice appears, having said that it is the pin 17/19 end of the plug that needs to be skewed to get an output.
It is distinctly possible that there is a manufacturing defect in your pi. Have you tried it on a different monitor/TV just to rule out all defects in the lapdock? You can also hook up the lapdock to a device like an appleTV or a bluray player to ensure the lapdock is working properly. The HDMI signal will activacte the screen. Also where was your board manufactured? There have been reports of lesser quality from the China boards so that is something to think about.

lifescienceswahiawa
Posts: 2
Joined: Wed Dec 26, 2012 8:56 pm

Re: I made a Raspberry PI Laptop

Wed Dec 26, 2012 9:10 pm

Hi HippoMan,

I seem to be running into the same problem as you, where the Raspberry Pi is being charged (red light on), but the LapDock screen is showing "No Signal Input: HDMI"

I'm neither a software guy nor a hardware guy (I'm a middle school teacher), so all those suggestions of soldering and what-not are sort of intimidating.

Anyways, I was just wondering if you got it to work, and if so, what the solution was.

Thanks!

Thomas

HippoMan wrote:Thanks, malakai.

The HDMI cable was given to me, and there is no link.

And I guess it could also be the female-female adapter.

I'll do my own investigation on this, now that I have something to go on. Whatever I come up with, I'll post my results or any new questions.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: I made a Raspberry PI Laptop

Thu Dec 27, 2012 2:27 am

lifescienceswahiawa wrote:Hi HippoMan,

I seem to be running into the same problem as you, where the Raspberry Pi is being charged (red light on), but the LapDock screen is showing "No Signal Input: HDMI"
If RasPi's red PWR LED is on, it means that Lapdock has detected that the HDMI cable is plugged in, so at least the DDC/CEC ground line is connected in your HDMI cable.

Are you seeing any green flashes on RasPi's OK/ACT LEDs? If not, RasPi isn't booting or something is keeping it from completing the boot process. I'm still using Debian Squeeze, and I don't see anything on the screen until the boot process is pretty far along. Does your RasPi work with a different monitor and keyboard?

lifescienceswahiawa
Posts: 2
Joined: Wed Dec 26, 2012 8:56 pm

Re: I made a Raspberry PI Laptop

Thu Dec 27, 2012 4:41 am

Thank you for your great suggestion. I checked the green light, and nothing was flashing, which I found out meant I must have done the SD card wrong. When I went back to reflash an SD card, I realized that before I had flashed it to a subdirectory rather than the rawdisk. The Raspberry Pi boots up fine now and interacts with the Lapdock with no problem. It's exciting to have my very first Linux computer up and running.
johnbeetem wrote:
lifescienceswahiawa wrote:Hi HippoMan,

I seem to be running into the same problem as you, where the Raspberry Pi is being charged (red light on), but the LapDock screen is showing "No Signal Input: HDMI"
If RasPi's red PWR LED is on, it means that Lapdock has detected that the HDMI cable is plugged in, so at least the DDC/CEC ground line is connected in your HDMI cable.

Are you seeing any green flashes on RasPi's OK/ACT LEDs? If not, RasPi isn't booting or something is keeping it from completing the boot process. I'm still using Debian Squeeze, and I don't see anything on the screen until the boot process is pretty far along. Does your RasPi work with a different monitor and keyboard?

pouano
Posts: 1
Joined: Thu Dec 27, 2012 9:35 am

Re: I made a Raspberry PI Laptop

Thu Dec 27, 2012 9:46 am

@Devfarse: regarding your post dated Dec 18, 2012 7:16 am. Are the stuff you listed everything I would need to get my Pi working with a lapdock, "out of the box"? (Sorry I'm new to this hardware thing). Also, I'm a bit confused because you mentioned at the first paragraph, "after some splicing...", but at the end you also said, "No grinding or sanding of the connectors is required". I am just concerned that I have to mess with any of the wires or connectors, something I'm afraid I would not be able to do.

User avatar
terrycarlin
Posts: 70
Joined: Thu Jun 14, 2012 10:42 pm

Re: I made a Raspberry PI Laptop

Thu Dec 27, 2012 6:48 pm

Jim Manley wrote:Has anyone experienced the trackpad locking up where the cursor stops responding and the LED no longer turns off/on when double-tapped to lock/unlock the trackpad? The buttons and keyboard still work, so you can Ctrl-Tab between windows and type into terminal sessions, Ctrl-Esc to get to the LXDE menu, direction arrows to navigate menus, etc.

Logging out of the X session doesn't fix it, as reentering via startx doesn't restore response, which suggests a hardware/driver soft failure (i.e., it's not hardware fatal). I think I've had Chromium running every time, but I can't say for sure 100%. Of course, I always have too much running, but only because the Pi keeps fooling me into thinking that I have a full-fledged laptop using the lapdock - I'm amazed at how responsive LibreOffice runs.

I'm not overclocking or doing anything else non-stock, BTW.

Other than this, I'm more than happy with my PiTops!
I have seen this with my rig also. I usually have to shutdown the RPi and restart to get the trackpad back. I don't use Chromium, so that probably isn't the issue. I checked the voltages on TP1 & TP2 and they are fine. About 4.9v. Had to build my own USB cable as all the cables I bought had way too much voltage drop.
If it ain't broke, take it apart and see how it works.

Bobknopfler
Posts: 8
Joined: Sun Dec 02, 2012 9:05 am

Re: I made a Raspberry PI Laptop

Mon Dec 31, 2012 4:09 pm

Sorted!

Sound over hdmi and wifi now working. I've also overclocked to 800MHz since I read somewhere that the foundation claim there's no problem in doing this. There's some excellent advice around here, keep it going.

Piradiussquared
Posts: 5
Joined: Sun Dec 30, 2012 6:10 pm

Re: I made a Raspberry PI Laptop

Tue Jan 01, 2013 4:44 pm

Have you considered using the DSI video output to connect the laptop screen? This would make it more compact as it is a ribbon cable and most laptop screens already use this a input.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: I made a Raspberry PI Laptop

Tue Jan 01, 2013 7:47 pm

Piradiussquared wrote:Have you considered using the DSI video output to connect the laptop screen? This would make it more compact as it is a ribbon cable and most laptop screens already use this a input.
The last I heard is that RasPi has no software support for DSI and you can't get a spec for DSI unless you're a MIPI Alliance member.

Here's a recent thread with DSI status: http://www.raspberrypi.org/phpBB3/viewt ... 44&t=23370

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: I made a Raspberry PI Laptop

Thu Jan 03, 2013 5:30 am

I'm goiing to also cross-post this to somewhere in the games/graphics/programming subforums once I figure out where would be the appropriate place(s), but, for now, I figured this might be useful to someone else who's built a PiTop/LapPi and needs to read from the keyboard as each key is pressed.

I was figuring out how to read the lapdock keyboard from within a C program and discovered an important difference between external USB keyboards connected to the Pi directly to its USB port and the lapdock keyboard connected through the micro-USB connector on the lapdock. A typical Pi external keyboard interrupt detection routine in C (see keys.c in Peter de Rivaz's PenguinsPuzzle example code - https://github.com/peterderivaz/penguinspuzzle) looks something like:

Code: Select all

// Normally, you would use one of the following two lines for obtaining the keyboard device fname string:
// char *fname = find_kbd_event();
// or
// char *fname = "/dev/input/event0";

// However, for the lapdock keyboard, use the following line to obtain 
// the keyboard device fname string (i.e., the event1 input device instead of event0):
char *fname = "/dev/input/event1";

// Open a keyboard event queue device (file, in Unix/Linux terminology) descriptor as read-only and non-blocking
fd = open(fname, O_RDONLY | O_NONBLOCK);

// Verify that the keyboard event queue device descriptor was opened successfully
assert(fd);

// Set up a keyboard device event status string
unsigned char b[16];

// Loop until a key is pressed
while(1) {

  // Read an event character string from the keyboard device event queue
  int num = read(fd, b, 16);

  // Determine if a full event string was read from the queue and abort the scan if not
  if (num <16) return;

  // Obtain event flag values in 9th and 10th bytes of event string
  int t = b[8] + 256 * b[9];

  // Abort the routine if the 8th and 9th byte flags are anything other than 01
  if (t != 1) return;

  // Obtain the value of the 11th byte in the event string
  int c = b[10];

  // Detect whether the Esc key has been pressed and terminate the program if it has
  if (c == KEY_ESCAPE)

    exit(0);

  // Uncomment the following line to print out hex code of the key just pressed
  // printf("Pressed 0x%x\n", c);

  // Detect whether a key has been pressed
  if (b[12] == 1) {

    // Update a status array defined in the calling code indicating which key has been pressed
    currentlyPressedKeys[c] = 1;

    // Set a flag indicating that a key has been pressed
    key_pressed = 1;

  } // if (b[12] == 1)

} // while(1)
Hope this is useful to someone.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

++bahjatk++
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am

Re: I made a Raspberry PI Laptop

Thu Jan 03, 2013 4:51 pm

OP, great job but...
you got nothing on the Pi-to-Go

Return to “General discussion”