Set the frame interval for the NEO-M8L

Goal

Using a Python script, it should be possible to change the position update interval of a NEO-M8L GNSS module from 1 Hz to 10 Hz. This allows the location to be updated not just once per second, but up to 10 times per second.

Prerequisites

  • NetModule Wireless Router with wireless connection
  • NetModule Software 5.0.0.104 or newer
  • Not available for legacy products NB1600, NB2700, NB3700, NB3710

**

The wiki was tested with router software 5.0.0.104

**


1. Set up the LXC Contianer

Activate the LXC container on the router

In the second step, the image of the LXC container in this case, a Debina 13 (trixie).

The easiest way to do this is to install the whole thing over the Internet. However, the router requires a mobile connection to the Internet.

From a Jenkins server you get the current image for the container

* Jenkins Server Page image-debian / Link

Here you can download a Debian image for various systems and versions.

The armhf tab is important here, and trixie

The image is the “rootfs.tar.xz” which is required. With a right click you can copy the link.

It would be structured like this:

https://jenkins.linuxcontainers.org/view/Images/job/image-debian/architecture=armhf,release=trixie,variant=default/4118/artifact/rootfs.tar.xz

When the “Apply” button is pressed, Debian will be installed.

Set up the LXC container further. A network interface is enabled here.

The container has now also been assigned an IP address.

Always assign a fixed IP address for the LXC container via the DHCP server. The MAC address of the LXC container is 00:FF:AA:00:44:00.

Log in to the LXC container and test whether it can access the Internet.

——

The container is installed and set up. Now you can set up further tools on the container.


Customize the LXC configuration

Adjust the LXC configuration so that the /dev/ttyUSB1 interface is available within the container.

—— —— —— —— —— —— —— crw——- 1 root root 188, 1 Sep 29 17:26 /dev/ttyUSB1 —— —— —— —— ——

The entry /dev/ttyUSB1 is important; this interface gives us access to the GNSS module.

**

This change is made directly in the router software. When updating the router software, this entry must be made again because it is not part of the official software.

**

Add these entries to the end of the config file.

~ $ vi /etc/lxc/guest0/config
                                                           
# Setting up a USB drive in the LXC container 
lxc.cgroup.devices.allow = c 188:1 rwm
lxc.mount.entry = /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file 0 0   

2. Make additional settings in the container

The next step is to perform a basic test of access to the GNSS module.

API

The GNSS data is then clearly displayed in the console using a Python plotting tool.

To configure the frame interval, you'll need Python programs and a library.

Create a subfolder for the whole thing

––

The script set_cfg_rate_neom8l.py can be downloaded via the View Code link, and the ubxlib can be downloaded from the link using the password.

show code

* Program library ubxlib for the Python script / Link

The password for downloading the library : gnss_cfg_rate

The ssh_start.py script can be downloaded via the “show code” link.

show code

To enable SSH access, an SSH key pair must be generated within the container.

“” …

The file id_rsa.pub must then be added to the router under SSH Authorization.

Once all of this has been completed, you can run the Python script ssh_start.py, and the frame interval will be set in the GNSS module.

python3 ssh_start.py 10
# The Python script is called this way. 
# Values from 1 to 10 can be passed as arguments.

… …

Then test the whole thing with a get script.

measRate: 100
navRate: 1
timeRef: 0

3. Additional information

Download the set_cfg_rate_neom8l.py python script:

show code


Download the ssh_start.py python script:

show code


Download the library ubxlib:

Program library ubxlib for the Python script / Link

The password for downloading the library : gnss_cfg_rate


Download the get_cfg_rate_neom8l.py python script:

show code