Portable C library that provides data and control APIs for u-blox products across common microcontrollers and RTOSes. Testing api iot library microcontroller embedded esp32 C Apache-2.0 3 18 1 0 Updated Feb 3, 2021. Implementation of the CellularInterface for u-blox C027 and C030 (non-N2xx flavour) modems that uses the IP stack on-board the cellular modem, hence not requiring LWIP (and so less RAM) and AT, C027, C030, CellularInterface, u-blox. Huawei is the most popular brand which provides routers and modems around the world. It provides USB dongle as well as MiFi routers too. We have already covered unlocking these devices, e.g., Huawei UMG587, Huawei E5251, Huawei Vodafone R208, and Huawei E3276, etc. To run any Huawei device, you need some drivers. Without drivers, your modem/router is.
≡ PagesFavoritedFavorite2Introduction
U-center from u-blox is a free software tool for configuring u-blox GPS receivers under Windows. U-center is a dense program with many interface elements. It can be overwhelming at first but over time it will become easier to use. For all its GUI weaknesses, it is very powerful for configuring the u-blox line of modules (such as the NEO-M8P-2 and SAM-M8Q to name a few). In this tutorial, we will be exploring some of its features with the NEO-M8P-2.
Required Materials
To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have and the design of the u-blox's board. We'll be using the NEO-M8P-2 throughout this guide. Feel free to add it (or another u-blox module) to your cart, read through the guide, and adjust the cart as necessary.
GNSS Multi-Band Magnetic Mount Antenna - 5m (SMA)
GPS-15192SparkFun GPS-RTK Board - NEO-M8P-2 (Qwiic)
GPS-15005USB micro-B Cable - 6 Foot
CAB-10215Interface Cable SMA to U.FL
WRL-09145Required Software
The software can be obtained from u-blox. To follow along with this tutorial please download and install u-center. Once completed, open it.
Install Drivers
For this tutorial we'll assume you have the SparkFun GPS-RTK but u-center can be used with any u-blox based product. Start by attaching a micro-B cable to the GPS-RTK board.
Now open Windows Device Manager. The NEO-M8 series has an annoying feature where the module comes up as a Windows Sensor rather than a serial device. If your u-blox receiver does not appear under COM ports then right click on the u-blox GNSS Location Sensor and then Update Driver. Next, click on Browse my computer for driver software.
Then “Let me pick”...
Select the first USB serial device.
The SparkFun GPS-RTK board should now enumerate as a USB serial COM port. In the list below, the GPS-RTK board is COM12.
Return to u-center and drop down the port list. Select the COM port that is your RTK board. Congrats! You can now use u-center.
Configuring and Outputting NMEA Sentences
Let’s go over a few features you’ll likely use:
Text Console
The text console button will show you the raw NMEA sentences. This is handy for quickly inspecting the visible ASCII coming from the module over USB.
Configure
The configuration button opens the most powerful window. From this window you can inspect and configure new settings. It’s not obvious but when you click on a setting such as ‘MSG (Messages),’ u-center will poll the module for its current state. The ‘10s’ in the corner indicates how old the displayed information is. In this case it’s been 10 seconds since this setting was last queried. Click on the ‘Poll’ button to update the information. Go ahead and select the F0-00 NMEA GxGGA
message. As you click the dropdown menu, the software will poll the current settings. It’s a bit disorienting at first but gets better over time.
The MSG configuration is very powerful. It allows you to enable or disable various NMEA sentences as well as binary protocols such as NAV-PVT (checkout the full protocol datasheet). Once a sentence is selected, such as GxGGA, the check boxes will be populated. If you want to disable the GxGGA sentence for the SPI interface, uncheck the SPI checkbox and then click ‘Send’. Congrats! The GxGGA sentence is no longer presented on the SPI interface. This raises an important fact:
Note: The NEO-M8 series has 4 interfaces: USB(serial), I2C, SPI, and UART. All interfaces can access information simultaneously. This means you can inspect configuration settings over the USB serial port while your Arduino makes setting changes over the I2C port. You can read NMEA sentences over the I2C port or send RTCM data into the module over SPI. It’s all highly configurable.
What is the USB Port on the NEO-M8P?
It’s like any other USB to serial device. It will enumerate on your computer as a COM port and acts as such. It is independent and separate from the UART port that is a dedicated TTL serial port.
If something is not accessible through u-center, it probably means that feature or setting is not compatible with the currently attached device. For example, the UART2 box is grayed out in the image above. The NEO-M8P does not have a second UART so you can’t address it.
Ports
The Ports (PRT) sub-menu under Configuration is very helpful. You can do things like change the baud rate, I2C address, and protocols. Depending on your application, you may want to enable or disable entire interface protocols. For example, if you want to enable NMEA sentences for the SPI interface, you would do it here. Fortunately, the factory default for the NEO-M8P is good for I2C and UART1 for RTK purposes (input of RTCM3 is enabled for both ports).
This is also the menu that allows you to change the I2C address of your GPS-RTK. Because we are big fans of the Qwiic system, we’ll be using the GPS-RTK on the I2C bus. If we had another device on the bus that uses address 0x42 this menu will allow us to change the address of the GPS-RTK.
Poke around the various config menus. If you get your module into an unknown state you can unplug and replug to reset the settings.
Messages
The messages window will allow you to view the various sentences reported by the module. It’s not obvious but if you double click on ‘NMEA’, the tree of messages will fold away. Similarly, if you double click on ‘UBX’, it will expand showing the various UBX sentences. By default, many of these are not enabled.
Resources and Going Further
Ready to get hands-on with GPS?
We've got a page just for you! We'll walk you through the basics of how GPS works, the hardware needed, and project tutorials to get you started.
We only went over a few of the features with the u-center. For more resources, we recommend checking your module's protocol specification and the u-center's documentation for more information.
- u-blox u-center Downloads
Once you've mastered U-Center you're ready to begin configuring your Ublox module! Check out some of these related tutorials:
Building an Autonomous Vehicle: The Batmobile
GPS-RTK Hookup Guide
GPS-RTK2 Hookup Guide
Setting up a Rover Base RTK System
How to Build a DIY GNSS Reference Station
Seeed’s LTE CAT.1 Pi HAT is an open sourcecellular extension modem for Raspberry Pi,based on u-blox LARA-R2xx series. Itcompatible with Raspberry Pi 1 Model B+ and later versions.
LTE CAT.1 Pi HAT is designed for LTE Category 1 networks and with 2G fallback(EU version only). Embedding common protocols, like TCP/UDP, HTTP.
LTE CAT.1 Pi HAT supports UART and USB interfaces. By UART, Raspberry Pi communicate with LTE CAT.1 Pi HAT via AT command without any special driver. It’s well suited for building prototyping rapidly.
Version | Links |
---|---|
Europe | |
USA-AT&T | |
USA-VZW |
Version¶
Product Version | Changes | Released Date |
---|---|---|
LTE Cat 1 Pi HAT(USA-AT&T) | Initial | Dec 2017 |
LTE Cat 1 Pi HAT(USA-VZW) | Initial | Dec 2017 |
LTE Cat 1 Pi HAT(Europe) | Initial | Dec 2017 |
Specifications¶
Compatible with Raspberry Pi 1 ModelB+ and later versions
LTE CAT.1 and support 2G fallback(EUversion only)
UART and USB interface forcommunicate
Support Grove I2C and Digitalconnector
Protocols on cellular module
Embed TCP/UDP stack
Embed HTTP, FTP, SSL
Dual stack IPV4/IPV6
3GPP TS 27.007 [8], TS 27.005 [9]standard AT command
Applications¶
- IoT gateway
- Data logger
- Vending machine
- POS
- Smart home devices
- Robot
- Advertising
- Other scenario need cellular networks
Hardware Overview¶
Interfaces
- LTE CAT.1: U-blox LARA-R2xx series LTE CAT.1module, please refer to u-blox LARA-R2 series product page for more information.
- Grove Port: 2 Grove I2C/Digital Port, connected to SDA_RPI, SCL_RPI, it can be used as I2C or GPIO port.
- Switcher: Control Grove port voltage as 5V or 3.3V
- USB Interface: It can be used to power up the LTE Cat.1 Pi HAT and raspberry together, and used for debug port as well. Please refer to FAQ Q1 about how to use as debug port.
- Battery Holder: MP2617 is used for battery power management. If the battery is not connected, the CHG led will flash by 6HZ frequency. It will be off when under charging and on when finish charging. The connector is JST2.0 standard.
- Lara-R2XX Reset button: Reset Lara-R2xx module.
- Lara-R2XX Power on button: Press 2 seconds to power on the Lara-R2xx module.
- Antenna: It includes 2 antennas, one is main and other is div. The main antenna is used for both sending and receiving signals. It must be connected. The div antenna is used for the receving only and to improve receiver sensitivity. It is optional.
- Rpi 40 pins: Refer to pinout.
- SIM card slot: Follow silk screen direction to plug LTE SIM card.
Warning
For the battery, we suggest 3.7V Li-ion battery and connect to JST2.0. Especially for Lara-R211(Europe) Pi HAT, it includes the GSM function with high power consumption. If there is no LTE signal around, the LTE CAT.1 Pi HAT also consumes a lot of power supply. So we highly suggest attach the battery.
Pinout
Pin Used | Python (BCM) | WiringPi GPIO | Name | P1 Pin Number | Name | WiringPi GPIO | Python (BCM) | Pin Used | |
---|---|---|---|---|---|---|---|---|---|
3V3_RPI | 3.3v DC Power | 1 | 2 | 5v DC Power | 5V_RPI | ||||
SDA_RPI | 8 | GPIO02 (SDA1, I2C) | 3 | 4 | 5v DC Power | 5V_RPI | |||
SCL_RPI | 9 | GPIO03 (SCL1, I2C) | 5 | 6 | Ground | GND | |||
FREE | 4 | 7 | GPIO04 | 7 | 8 | GPIO14 (TXD0) | 15 | TX_RPI | |
GND | Ground | 9 | 10 | GPIO15 (RXD0) | 16 | RX_RPI | |||
RTS_RPI | 17 | 0 | GPIO17 | 11 | 12 | GPIO18 | 1 | 18 | FREE |
FREE | 27 | 2 | GPIO27 | 13 | 14 | Ground | GND | ||
FREE | 22 | 3 | GPIO22 | 15 | 16 | GPIO23 | 4 | 23 | FREE |
3V3_RPI | 3.3v DC Power | 17 | 18 | GPIO24 | 5 | 24 | FREE | ||
FREE | 12 | GPIO10 (SPI0_MOSI) | 19 | 20 | Ground | GND | |||
FREE | 13 | GPIO09 (SPI0_MISO) | 21 | 22 | GPIO25 | 6 | 25 | FREE | |
FREE | 14 | GPIO11 (SPI0 SCLK) | 23 | 24 | GPIO08 (SPI0_CS0) | 10 | FREE | ||
GND | Ground | 25 | 26 | GPIO07 (SPI0_CS1) | 11 | FREE | |||
FREE | 30 | Reserved | 27 | 28 | Reserved | 31 | FREE | ||
LARA_PWR | 5 | 21 | GPIO05 | 29 | 30 | Ground | GND | ||
LARA_RST | 6 | 22 | GPIO06 | 31 | 32 | GPIO12 | 26 | 12 | FREE |
FREE | 13 | 23 | GPIO13 | 33 | 34 | Ground | GND | ||
FREE | 19 | 24 | GPIO19(SPI1 MISO) | 35 | 36 | GPIO16(SPI1 CS0) | 27 | 16 | CTS_RPI |
FREE | 26 | 25 | GPIO26 | 37 | 38 | GPIO20(SPI1 MOSI) | 28 | 20 | FREE |
GND | Ground | 39 | 40 | GPIO21(SPI1 SCLK) | 29 | 21 | FREE |
Dimensions
Versions
Now we have made three versions of the LTE Cat 1 Pi HAT. In addition to supporting different networks, they are almost the same. And you may pay attention that the only the Europe version support 2G net.
Version | Module | Network |
---|---|---|
Europe | LARA-R211 | 2G/4G |
USA-AT&T | LARA-R203 | 4G |
USA-VZW | LARA-R204 | 4G |
Getting Started¶
Hardware¶
Note
We use the Raspberry Pi3 with 2018-04-18 RASPBIAN STRETCH WITH DESKTOP for below demo.
- Step 1. Stack LTE Cat 1 Pi HAT on top of Raspberrry and connect the 2 antennas.
- Step 2. Connect the mouse, keyboard and monitor as well.
- Step 3. Power the Raspberry Pi.
Software¶
- Step 1. Use dtoverlay=pi3-disable-bt to enable Raspberry Pi3/Pi4 UART0.
Then add dtoverlay=pi3-disable-bt
and enable_uart=1
to bottom of the config.txt. it should look like this.
- Step 2. Disable the system serivce to use the UART0.
Note
Pi3-disable-bt disables the Bluetooth device and restores UART0/ttyAMA0 to GPIOs 14 and 15. It is also necessary to disable the system service that initialises the modem so it doesn't use the UART: sudo systemctl disable hciuart.
- Step 3. Delete the console=serial0,115200 in cmdline.txt.
Then delete console=serial0,115200 from the string.
- Step 4. Reboot the Raspberry Pi3/Pi4
- Step 5. Run below commands to run the demo
- Step 6. Here is the output from terminal.
FAQ¶
Q1: Can we communicate with LTE Cat 1 Pi HAT directly with PC?
A1: Yes, there are 2 ways. One is USB and other is UART port.
Ublox Driver
- For USB, Please use the USB cable to connect the Pi HAT with PC directly. Then download and install the u-blox Cellular USB_Windows Driver, v2.0. The COM3 and COM4 are used for AT command in device manager. We can use any Serial COM monitor tool to run AT commands or use evaluation software m-center for Windows, version 1.11.0 for windows.
- For the UART port, Please use the usb to serial adaptor, follow below connection and use the baudrate as 115200. We can use any Serial COM monitor tool to run AT commands.
USB to UART Adaptor | LTE Cat1 Pi HAT |
---|---|
GND | Pin6-GND |
TX | Pin8-TX_RPI |
RX | Pin10-RX_RPI |
NA | Pin11-RTS_RPI Connect to Pin9-GND |
Ublox Driver Download
Warning
Please do connect the RTS_RPI to GND as marked as red at above picture if we use the UART port for communication.
Q2: Do you have AT command list?
A2: Here is u-blox-CEL_ATCommands.
Q3: What is differences between the Lara-R203/204/211?
A3: Please refer to u-blox LARA-R2 series product page.
Q4: How to register to AT&T network for LARA-203?
A4: Please run below commands.
You can try below command to verify AT&T network connection.
Ublox Modem
Q5: How to register to Verizon network for LARA-204?
A5: Please run below commands.
You can try below command to verify Verizon network connection.
Resource¶
- [PDF]LTE Cat.1 Pi HAT Schematic
- [PDF]u-blox-CEL_ATCommands
- [PDF]LARA-R2_DataSheet
- [PDF]LARA-R2_SysIntegrManual
- [PDF]AT-Commands Examples AppNote
We have this part available in geppetto, easy modular electronic design with Seeed and Geppeto. Build it Now. geppetto.seeedstudio.com
Projects¶
U-blox Modems Drivers
Face Recognization Smart Lock with LTE Pi HAT: Face recognition is becoming more and more widely used, we can use it to make a smart lock.
Ublox Cell Modem
Tech Support¶
Please submit any technical issue into our forum.