2

I have an old laptop with some spare room inside it. The laptop itself is not much, but it works and I don't really want to replace it. I also have a Raspberry Pi 2.

What I would really love to do is house the raspberry pi inside the casing of the laptop and be able to SSH to it, move files to it, etc. and essentially treat it as a second computer. I can not use the Ethernet port to access the Pi because of space constraints and because I would like to keep the laptop's Ethernet port free. Is there an alternative way to communicate with the Raspberry Pi that will allow me to access a fileshare (either hosted on the RPi or on the laptop) and also log in to the RPi?

  • 1
    How exactly do you plan to fit the Pi into the laptop case? Are you planning to gut the laptop to make room? There is not a lot of spare room in a laptop. The thickest part of the laptop is not much taller than the Ethernet port. What do you think the advantage of putting the Pi inside will be? How do you plan to cool this - normally a PI 2 would not need any auxillary cooling but when placed in a laptop not only will it be fully enclosed it will be bathed by the heat of the laptop. – Steve Robillard Sep 02 '16 at 14:59
  • 2
    The only thing which will get anywhere near matching the speed of the ethernet connection on a Pi 2 is if you use a wifi dongle. It's also the only other option if you want a normal network connection for SSH, etc. Network adapters are complex, specialized pieces of hardware. You cannot mimic one via the GPIO pins. – goldilocks Sep 02 '16 at 15:02
  • @SteveRobillard There's plenty of room inside this old laptop. I can easily fit the RPi in inside a space that looks as though it was designed to be empty for some reason. The advantage of sticking a raspberry pi in there would be that it's more convenient than carrying it as a separate piece and so I will be able to run some tasks in parallel (yes I know this is not normally how clusters and such work). – Omar and Lorraine Sep 02 '16 at 15:08
  • Depending on how old your laptop is, it might have a serial port. If it does, you could connect TX->RX and RX->TX between that port and the RPi GPIO TX/RX pins. Not saying this is fast, but it might give you good enough speeds. – Phil B. Sep 02 '16 at 15:08
  • @PhilB. that seems alright. My laptop does not have a serial port but there is a spare USB header and I could attach an adapter to that. Is there a readily available way to multiplex several connections over one of these? – Omar and Lorraine Sep 02 '16 at 15:14
  • There's only one UART on the Pi so nothing to multiplex. The connection speed will be limited to < 1 Mbps and your choice of software for file transfer, etc., is going to be pretty limited (and at that speed, it may take several minutes to transfer 10 MB). You cannot SSH this way, but then there is no need to do so -- it's not exposed like a network. You log in directly via serial console instead (which ain't flashy, BTW, but as Phil says it works). – goldilocks Sep 02 '16 at 15:16
  • Or use the spare usb header for a USB-ethernet, and connect to the ethernet port after all (with SSH). If you're feeling brave, desolder the ethernet port and solder bare wires in place – Chris H Sep 02 '16 at 15:45
  • You might want to look at this: usb - serial cable – Phil B. Sep 02 '16 at 16:39
  • With my Pi Zero, I usually use it as a usb Ethernet gadget: http://p1cg.qr.ai, but for a non-Zero with no OTG, I'd suggest trying a usb file transfer cable if possible: http://www.linux-usb.org/usbnet/#t-host . Using such a cable would give you a point-to-point network at pretty high speed and not take up your ethernet port. – BJ Black Sep 03 '16 at 11:56
  • Regardless of your implementation, you need to be able to reset the Pi without disassembling your laptop. See https://raspberrypi.stackexchange.com/a/28573 – user2497 Sep 01 '17 at 15:53

2 Answers2

1

I am not sure about how you were planning on networking the pi and the laptop both, or were you looking to share the connection? If you were utilizing the laptop ethernet, why not dremel a spot and make another short ethernet jumper next to it or some other location where there is space. What laptop model are you using for this, so we could get an idea of dimensions and layout. If you didn't want to use to ethernet cables to the laptop you may be able to do the wifi dongle route extending the usb so the dongle is not enclosed.

Eric Lewis
  • 21
  • 6
0

If you just want SSH-like remote terminal without Ethernet, you can use a serial TTY to USB converter, which plugs into the Pi's serial GPIO pins (Tx&Rx plus 5v&Gnd), and the USB end can go into your laptop. This will allow you to control the Pi's terminal from the laptop (with some configuration). For moving files, you'd probably want to stick with SSH (SFTP operates over SSH) using a USB Ethernet adapter to keep the onboard Ethernet free.

Luke Moll
  • 747
  • 1
  • 7
  • 16
  • I think I'll try with the TTY as you suggest. Is there a way to stop any transmission from the RPi? Some sort of handshaking that can say "I don't want to receive any bytes yet". – Omar and Lorraine Sep 24 '16 at 18:31
  • @Wilson not sure that's how the protocol works, the Arduino will have a buffer for the incoming serial data, you'd implement that yourself. – Luke Moll Sep 24 '16 at 18:32