Raspberry Pi on the Go

Sometimes you are on the go and would like to play around with your Raspberry Pi. I am using a quite easy setup with my MacBook Air.

Power

To power the RPi I am using a standard USB-A to micro USB cable connected to one of the USB ports on the notebook. It is strong enough to power the RPi.

Console Access

One possibility would be to get a standard USB to serial interface, operating at 3.3 V and hook it up to the UARTs of the RPi to get a serial console. This is one perfect solution as long as you do not want to use the RPi’s UART for something else. Then you need to reconfigure two other pins, etc.

I am using a different approach: I a using a thunderbolt to ethernet adapter and connect the RPi to the mac with a short networking cable. As the network is configured to use DHCP I need to start a DHCP server on the mac. The easiest way is to use internet sharing in macOS. Just enable it in preferences and take a look at the ifconfig in the terminal to get the router’s IPv4 address. Usually the RPi has the same network but the last octet is 2. Meaning when the mac has the IP adress 192.168.1.1 the RPi would have 192.168.1.2. Then just use plain SSH to connect to the RPi.

Thomas

Chemist, Programmer, Mac and iPhone enthusiast. Likes coding in Python, Objective-C and other languages.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.