By default, the GPS module on the BerryGPS-GSM outputs to the Raspberry Pi RX and TX pins. However, if you need to use these pins for something else or you want to connect the BerryGPS-IMU via USB only, you can redirect the NMEA sentences to one of its USB serial interfaces.
The two main components on the BerryGPS-GSM are;
The block diagram below shows how these are connected, you can see that a serial switch is used to select which module (GSP, GSM or none) is connected to the Raspberry Pi RX/TX pins.
By default, the GPS is connected to the Pi RX/TX pins, this only works if the BerryGPS-GSM is sitting onto of the Raspberry Pi.
If you are connecting the BerryGPS-GSM by USB only, you will need to access the GPS NMEA sentence through the USB interface.
This can easily be done as the SARA-U201 and CAM-M8 speak to each other via i2c.
First, connect to the second COM port of the GSM module;
Activate storing of last values of NMEA, from the GPS to the GSM module by entering these AT commands;
Activate the unsolicited aiding result. Without this, you will not know if the GPS has started correctly.
Set NMEA data to stream through USB interface /dev/ttyACM3;
Turn on GPS, (Start GNSS with GPS+SBAS+GLONASS systems and local aiding.);
The +UGPS command is used to control the GPS module and the assist mode. Here is its syntax and options;
0 : Off
1 : On
0 (default value): no aiding
1: automatic local aiding
2: AssistNow Offline
4: AssistNow Online
8: AssistNow Autonomous
To view the stream;
to stop GPS;