Skip to content

Logbook

er7-njit edited this page Dec 20, 2024 · 25 revisions

Logbook

--Status as of 10-13--

Device choices

Raspberry Pi Zero WH as the microcontroller of choice

Waveshare R800C as the GPRS device of choice

Adafruit GPS Device or the SAM-M8Q for our GPS device

Battery choices pending, but ultimately we will probably use a LiPo battery given our desire for a decent amount of recharge cycles.

Software Choices

At this moment our software of choice seems to be Nextcloud PhoneTrack which is an addon app for nextcloud, which is an open source self-hosted Google Drive replacement. Benefits of this software are that it is easy to deploy, and is open source which means this section of the project doesn't immediately die if their project dies.

The Pi Zero will run a lite version of Pi-OS, which is a specialized Linux distro based on Debian

Configuring the Pi

The R800C has a detailed documentation located here

Also using these guides:

this one by Jeff Geerling and this one by LozWorld

Jumpers will need to be soldered to the Pi to add the GPS on.

Method of pulling location from Pi and adding it to software is yet to be determined, although it will most likely end up being a python script.

Tests for our Project

Functionality needed to be tested:

Network capability

The ability for our device to connect to the internet and be able to transmit data to its destination. This test can be achieved by a simple ping test, followed by a verification that said data made it to its destination. If the device can ping google.com, for example, it can successfully reach the internet.

GPS Capability

The ability for our device to successfully determine its GPS coordinates and store them in a variable in preparation to be sent to the cloud software. This functionality is checked by having the program that pulls the GPS coordinates print them and have it practically checked against Google Maps to ensure map accuracy.

Interpretation of GPS Data and Transmission to cloud

The ability for our device to take the GPS data captured and communicate it to our cloud software, NextCloud PhoneTrack. This test is completed by ensuring that the script is correctly taking the GPS data in the variable from the GPS test and transmitting it consistently to the remote server. This test can be completed by checking the software and ensuring that the coordinate data is being received and interpreted on the map.

Battery Capacity

Battery Capacity is more application specific, as some applications will not use a battery at all, however, in applications that will use a battery, ensuring that the battery does not drain quicker than the needed uptime in the application will be a good test to ensure that the needed battery capacity is present and available. This can be somewhat accurately predicted by observing the percentage loss over a period of time and using that data to predict how long the battery will last before needing recharging. The device should have predictable power usage given its consistent workload.

Links to forum posts that helped

https://forums.raspberrypi.com/viewtopic.php?t=224355

Updates as of 11-4

At this point, configuration of network has used a combination of these microcontrollers and network interfaces:

Microcontrollers

  • The Raspberry Pi 4 (Both running Pi OS)
  • The Raspberry Pi Zero WH

and

Network Interfaces

*Waveshare R800C as a hat

*Waveshare R800C in a USB enclosure

*Waveshare 7670E as a hat with usb interface

The farthest we have gotten with successful configuration of any hat is with the 7670E connected to the headers and USB ports of the Pi 4, with it recognizing the interface but not connecting the the internet. The solution seems to be to configure the APN settings, however there aren't many guides including the AT commands for it, and the Pi's GUI network interface doesn't allow for configuration of the device, so more research has to be done.

Updates as of 11-13

We were unable to configure both the R800C and 7670E. The Pi does not recognize the R800C either as a hat or in a USB enclosure. The Pi recognizes the 7670E in USB mode as a usable network interface but configuring it via QMI and AT commands appear unsuccessful. Additionally, trying different distros and graphically configuring it proved unsuccessful as well. This difficulty has led us to choosing a different WWAN interface with increased documented compatibility with both Linux and the Pi. The one we picked is the Sierra Gobi, as I've used it in the past on Linux. Unfortunately, this means that we will have to run both of our interfaces over USB.

- Summary of Troubleshooting Steps -

  • Running R800C as a Hat
    • Neither PiOS or Ubuntu recognizes the device, regardless of kernel configuration.
  • Running R800C as a USB device
    • Same result
  • Running 7670E as a Hat
    • Same result
  • Running 7670E
    • Detected in both OSes
    • Moved on to configuring device
    • Unable to configure device through AT Commands in PiOS or Ubuntu, and unable to configure with QMI or Ubuntu's GUI configurator for Mobile Broadband

Awaiting different WWAN modules for more testing.


Logbook Entry: 11/13/24
Project: Raspberry Pi GPS Setup

Materials and Hardware Used:
- Raspberry Pi Zero W
- 8GB (or higher) SD Card
- Micro USB B to USB A cable
- Laptop for SSH connection
- Adafruit Ultimate GPS USB Module

Step 1: Configuring Raspberry Pi Zero W

Before setting up the GPS module, I needed to configure the Raspberry Pi Zero W to enable communication with the GPS module.

Software Setup:

Used Pi Imager to install Raspberry Pi OS firmware on the SD card and enable SSH for remote access.

- Inserted the SD card into the Pi and booted up.
- Configured SSH access by enabling the SSH feature via the Raspberry Pi Imager interface.
- Connected to the Pi using SSH from my laptop.

Step 2: Setting Up Adafruit Ultimate GPS Module
The GPS module used was the Adafruit Ultimate GPS. It is compatible with Raspberry Pi and comes with a library that allows access to location data such as latitude, longitude, altitude, and more.

Connection Methods:

There are two ways to connect the GPS module to the Raspberry Pi:

1. Built-in UART Method (GPIO pins)
2. USB Direct Connection (via USB cable)

Built-in UART Method:

I initially attempted to connect the GPS module using the GPIO pins (UART method). However, when I ran the script on the command line, I did not receive any data.

USB Direct Connection:

After troubleshooting, I switched to the USB method, connecting the GPS module directly to the Raspberry Pi via USB. This method worked successfully, and the GPS module began receiving data via the antenna and transmitting it to the Raspberry Pi.

Step 3: Troubleshooting

Issue 1 with UART method: I couldn't get data from the GPS module when using the GPIO pins. This could have been due to incorrect pin connections or misconfiguration in the script.

Solution: Switching to the USB connection method solved the issue, and the GPS data was correctly received.

Issue 2 Unable to get GPS to Transmitting Data from Indoors:

When testing the Adafruit's GPS module indoors, the GPS can not receive any data due to a weakness leaver of the GPS built-in antenna.

Solution: The Adafruit GPS Antenna and GPS SMA to uFL adapter image setup

Issue 3 Verifying GPS Data Coordinates:

After setting up the antenna and adapter for the Adruit's GPS module, we received GPS data from indoors. When verifying the Altitude and Latitude on Google Earth website, the coordinates showed as New York. However, the coordinates are not correct because I tested the GPS in New Jersey. MAPS from GPS Indoors

MAPS for Outdoor mapswithoutattena_and_ourdoors

Map from Indoors maps of tracking indoors

Solution: I put the GPS Module outside, which produced the correct coordinates, which showed on Google Earth that I'm in Paterson, New Jersey.

Resources:

Adafruit Ultimate GPS Learning Guide: Provided step-by-step instructions on connecting the GPS module to the Raspberry Pi.

Instructables Guide: [The Ultimate Headless RPi Zero Setup for Beginners](https://www.instructables.com/The-Ultimate-Headless-RPi-Zero-Setup-for-Beginners/)

Conclusion:
After switching to the USB connection, the GPS module started functioning correctly, and I was able to receive location data. The next steps will involve integrating this data into a tracking system or using it for further experiments.


Final Update

Hardware Update

Following the decision to deviate from the Waveshare 7670E, another WWAN interface was chosen. The Sierra Wireless EM7455 was the module chosen, for its native linux compatibility and familiarity.

image

To connect it to the Pi, a miniPCIe to USB adapter was used.

image

However, the Sierra uses M.2, so an M.2 to miniPCIe adapter was needed.

image

For an antenna, the miniPCIe to usb Adapter came with dual antennas, which were connected to the Sierra. Ultimately, the final product looked like this:

image

Although some testing was done with a different miniPCIe to USB adapter

image

Finally, two SIM Cards were used, my T-Mobile SIM as a "known good" and the 1nce Sim Card as the desired card.

Software testing

Several different software configurations were used,

  • The Pi Zero W
  • The Pi 4
  • My main machine running Fedora Linux

All three devices were able to detect the interface in ip link image

Both the Pi 4 and my desktop allowed for a GUI configuration of APN settings, which gave me hope.

image

i tried configuring the APN settings for both of my testing SIM cards with the respective card in the interface, however, each time the interface was unable to communicate with the internet.

image

:( image

(Testing was also in varied locations, with varying antenna configurations)

I concluded that the all the hardware was working correctly, and the issue was in software configuration. I did try to configure it in windows, which wouldn't even let me try and configure it, and any drivers were MIA. I attempted to configure the module with QMI, but I was unable to get a successful ping out of the interface.

As I was writing this up, I got it to work

image

When taking the screenshots for the logbook, it configured itself :).

now that i know everything works, im going to try to configure the pi 4 via cli with nmcli as per lenovo's guide for their thinkpads which have the same interface. That article is here

this stackexchange post was helpful too and the module was successfully configured on a pi 4.

The project will hold here, with our GPS able to locate itself and transmit this information via email, and do that over cellular network.