Setup Cellular Connectivity for AccessHAT

This set up  was done using the Raspberry Pi 4B + AccessHAT + CellCM.

  1. Download the Raspberry Pi 32-bit OS from https://www.raspberrypi.com/software/ on an SD card and load it to your Raspberry Pi. Be sure to also download the AccessHAT drivers from https://github.com/makersolutions-io/accesshat_drivers
  2. Insert the SIM card into the CellCM, ensuring the orientation is correct. Refer to the image below. *Please note that you will need to contact your service provider for an APN.
  3. Connect the CellCM to the AccessHAT.
  4. Connect the antennas to the CellCM at Main and Div.
  5. Connect the AccessHAT to the Raspberry Pi.
  6. Connect a USB cable (A-male to mini B-male) from the Raspberry Pi to the AccessHAT.
  7. Power up the system by connecting the power supply to the barrel jack in the AccessHAT.

Commands to Establish the Cellular Interface

  1. Enable cellular module and wait about 30 seconds for the Raspberry Pi to recognize the modem.

gcc enable_cellcm.c -laccesshat -lwiringPi

sudo ./a.out

  1. Check that ModemManager finds the modem.

mmcli -L

Should see something like this:

/org/freedesktop/ModemManager1/Modem/0 [Telit] LE910-NA1

  1. Enable modem and check primary port. This command shows the interface name (primary port) under System | primary port.

mmcli -m 0 --enable

mmcli -m 0

If ModemManager shows /Modem/1, change the commands to mmcli -m 1.

  1. Add cellular connection through NetworkManager.

nmcli c add type gsm ifname <primary port> con-name <name> apn <operator_apn> username <user> password <password> pin <PIN>

Example:

nmcli c add type gsm ifname ttyACM0 con-name cell apn myapn.com


For a detailed explanation and other configuration options, read:

https://ubuntu.com/core/docs/networkmanager/configure-cellular-connections

 

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.