Skip to content

Tutorial: Raspberry Pi as Host

This instruction describes how to use a Raspberry Pi 3 (Raspbian Buster) as host for the ahoi modem.

Setup the Operating System

  1. Install Raspbian (e.g. Buster); easiest with Rasperry Pi Imager

  2. Use SSH or a monitor to access the Pi's command terminal

  3. Run sudo apt-get update

  4. Run sudo apt-get upgrade

  5. Run sudo reboot

Enable UART Interface

Enable the UART interface via raspi config, let the serial console be disabled:

  1. Run sudo raspi-config
  2. Select option 3 - Interface Options.
  3. Select option P6 - Serial Port.
  4. At the prompt: Would you like a login shell to be accessible over serial?, answer 'No'
  5. At the prompt: Would you like the serial port hardware to be enabled?, answer 'Yes'

Configure UART Interface

Attention

This procedure may be specific to Raspberry Pi 3

  1. Set rights to write on UART: sudo usermod -a -G dialout pi

    You can check with the command groups if it worked.

  2. To prevent issues and work with a stable UART, move Bluetooth to mini-UART (ttyS0) and work with UART0:

    • Add the line dtoverlay=pi3-miniuart-bt to the end of the file /boot/config.txt. You can edit the file with: sudo nano /boot/config.txt
    • Save the file with Ctrl+O and confirm with Enter
  3. Reboot the system to make changes effective: sudo reboot

The last two lines of the file /boot/config.txt should finally look like this:

enable_uart=1
dtoverlay=pi3-miniuart-bt

Hardware Wiring

Connect the ahoi modem to GPIO pins 14 (TX) and 15 (RX) plus a GND pin (e.g. pin 6) and Vcc = 3.3 V (pin 1) of the Pi.

3.3V only

Do not use any other power-supply pin, as the other ones use 5 V, which could damage the ahoi modem!

GPIO numeration

Keep in mind that pin numeration on the Pi is different to the GPIO pin numeration!

Set up Python (optional)

To use the MoSh on the Pi, refer to the PyLib Tutorial.