The device we will cover in this article is a newer version of the PocketBeagle, which is covered here.
We can go over the newer specs and use the PocketBeagle 2. If you look back at the original Pocket Beagle article, you can see pictures of the board next to a quarter. The PocketBeagle is a little larger than a quarter, and the second version of the board is still the same size.
PocketBeagle Specs
The specs on the second PocketBeagle are:
- AM6254 SoC
- Cortex-A53 microprocessor subsystem at up to 1.4 GHz
- 4 Cores
- 512 L2 Cache
- Each core has 32KB L1 DCache
- Each core has 32 KB l1 ICache
- Cortex®-M4F MCU at up to 400 MHz (coprocessor)
- Single Core
- 256 KB SRAM
- Cortex-A53 microprocessor subsystem at up to 1.4 GHz
- Dual-core Programmable Real-Time Unit Subsystem (PRUSS) running up to 333 MHz
- Cortex-M0+ MCU
- Cortex®-M0+ MCU 32 MHz
- 32 KB Flash
- 4 KB SRAM
- 12 bit ADC
- Cortex®-M0+ MCU 32 MHz
- 512MB LPDDR4 3200MHz
- USB-C or Cape Header VIN (5V @ 1A)
- Integrated power management
- LED Indicators
- 1x Power
- 1x Battery charging
- 4x User Controllable LEDs
- MicroSD Card Slot
- Buttons
- Power Button
- User/Boot Button
PocketBeagle 2 Images
The images for the PocketBeagle 2 are at 'https://www.beagleboard.org/distros'. Be sure to select 'PocketBeagle 2' in the filter list.
The images to download are Debian 12.9 to Debian 13.2. There are three variations:
- Minimal - minimal install of Debian (enough to boot and operate Debian)
- IoT - Minimal image, but includes extras such as programming apps
- Workshop - includes minimal, but also files and drivers for the TechLab Cape
Another good way to deal with images is to use the BeagleBoard Imaging Utility found at 'https://beagleboard.github.io/bb-imager-rs/'.
The imaging utility has downloads for Linux (AppImage), macOS (DMG), Windows (Installer or Portable).
For the AppImage download for Linux, you need to make the file executable and then run it. Once started, you need to select a BeagleBoard device from the drop-down list. After choosing the device, you can then select the image available for the device. You can then choose the destination of where to flash the image and then click on 'Write' to start the flashing process.
Starting the PocketBeagle 2
The PocketBeagle 2 is headless, which means it does not have a video output. To access the PocketBeagle 2, you can accomplish this through a USB connection from another system.
After you flash the SD card and place it into the device, you use a power/data USB-A to USB-C cable. Connect the USB-A end into your system you will use to manage the PocketBeagle 2. Connect the USB-C to the PocketBeagle 2 to supply power and start booting the device. Once the USB-C connector is in place, a red light should come on to show that the board has power.
NOTE: For newer systems, you can use a USB-C to USB-C data/power cable for connection from the PocketBeagle2 to your PC.
To determine if the PocketBeagle 2 has booted, you can check the host PC's IP addresses and you should see a new port listed with an address of '192.168.7.1'. This new port is the USB that is connected to the PocketBeagle 2. To see this, open a terminal and run the command
, it should be similar to Figure 1:
FIGURE 1
When the PocketBeagle 2 boots, it creates an Ethernet over USB link to the host. The PocketBeagle 2’s IP address is '192.168.7.2'.
The name of the Host’s IP address is ‘usb0’, then the system has the Predictable Network Interface Names enabled. To make this work, we need to disable the Predictable Network Interface Naming.
Disable Predictable Network Interface Names
With predictable network names, the scheme for naming interfaces is:
- eno1 (Onboard): integrated/onboard devices
- enpXsY (PCI Express): PCI bus ID (e.g., enp0s29f6 for PCI 0:1d.6).
- enpXsYfZ: multifunction devices.
- ensX (Hotplug Slot): provides a hotplug slot number from the firmware
- ethX (Traditional fallback): if none above apply, defaults to ‘ethX’
What we are using then is the Consistent Network Device Names. The naming convention is:
- ethX: Ethernet
- wlanX: Wireless LAN
- brX: Bridge
- usbX: USB Ethernet
These are the basic prefixes. The ‘X’ is a numbering system which starts at 0 and counts up.
To be honest, my Ubuntu system I was using as a Host had the Consistent Network Device Naming scheme, but after I performed a simple update and rebooted, everything changed to the Predictable Network Interface Names and it would not forward the packets from the PocketBeagle 2 to the Internet through my Host PC. To make everything work again, I needed to change the naming scheme back to Consistent.
To do this, you need to add ‘net.ifname=0’ to the line labeled as ‘GRUB_CMD_LINUX_DEFAULTS’ in the file ‘/etc/default/grub’. Edit the file using your favorite editor, for which you will need elevated privileges. In the labeled line mentioned above, there are a few items listed in quotes. Just add the ‘net.ifname=0’ within the quotes before you save and exit the editor.
To make the new parameter take effect, we need to perform two updates and then reboot, so do:
Code:
sudo update-grub
sudo update-initramfs -u
sudo shutdown now
After the system powers off, restart it and you can run ‘ip a’ and see that the naming convention has changed for the interfaces.
Now, we should be ready to set up the PocketBeagle 2 and the host system to allow the PocketBeagle to access the Internet by IP address or by DNS naming conversion to IP addresses.
Configure PocketBeagle 2 to Access the Internet
So, we need to allow port forwarding and set up ‘iptables’ to allow packets to be sent through the host PC to the Internet.
If you want to see how the PocketBeagle cannot reach the Internet, we can SSH into the PocketBeagle 2 and try to perform a ‘ping’ or even a repository update. Both will fail since there is no internet access.
So, to SSH into the PocketBeagle 2, you need to run the command from a terminal:
You should not have accessed the PocketBeagle 2 before, so it should ask to set up a key pair for encryption. Answer ‘yes’.
NOTE: If you have accessed the PocketBeagle 2 before with a different OS running on it, you will get an error that the SSH keys are invalid. You may also get a different message about the system being hacked. To fix this, you need to delete the old SSH key with ‘sudo rm ~/.ssh/known_hosts’. Try the SSH command again to reconnect, and it should work.
The password is then required, which is ‘temppwd’, but after logging in, it should ask you to change the password. First, you need to re-enter the old password and then type in the new password twice.
After you change the password, it will log you out of SSH and make you connect again with the SSH command. Be sure to use your new password even though the message says the temporary password is ‘temppwd’.
The prompt for the terminal should be ‘debian@BeagleBone’. You can use either of the following commands to see that Internet access is not working:
Code:
ping 8.8.8.8
sudo apt update
So, we need to get internet access working so we can update the PocketBeagle 2.
We need to run some commands on the host system. Use the command ‘exit’ to leave the PocketBeagle 2 and go back to the host system in the terminal.
We need to run the following commands:
Code:
sudo sysctl net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
sudo iptables --append FORWARD --in-interface usb0 -j ACCEPT
The first line enables port forwarding for TCP/IP version 4. The second and third lines configure the ‘iptables’ to set up routing of the packets to the Internet. Be sure to set the interfaces to the proper names. The ‘eth0’ port is the one on the host that has access to the internet. The port ‘usb0’ is the USB connection to the PocketBeagle 2 on the host.
Now, SSH back into the PocketBeagle 2 and we have a few things to do here.
Perform these commands on the PocketBeagle 2:
Code:
sudo route add default gw 192.168.7.1
sudo systemctl disable --now systemd-resolved.service
sudo rm /etc/resolv.conf
The first line is used to set up a routing rule to make the IP address ‘192.168.7.1’ the gateway for network traffic. Looking at the second line, it disables and stops the ‘systemd_resolved’ service so we can set the DNS servers as we want. The last line will remove the file ‘/etc/resolv.conf’ that is left by the service we removed.
Now, we need to set up the DNS servers we want to use. So, use an editor to create and edit the file ‘/etc/resolv.conf’. Be sure to add in the two lines:
Code:
nameserver 8.8.8.8
nameserver 1.1.1.1
Save the file and exit the editor.
You should now be able to perform an update or ping a website by IP address or by name.
Conclusion
With the size of the PocketBeagle 2, you can use it for various hobby projects.
Just be aware that the device is best updated from the repositories and to do this, it must be able to access the Internet. Also, if you install any specialized apps on it, these may also need to be updated.
For a small size with power, give the PocketBeagle 2 a try for your projects where you do not want a large device.











