Update (21/12/2024): We have plenty of stock of all our products, find us also in and    Shop now

How to connect your simpleRTK2B to a Raspberry Pi

cover rasperberry pi
cover rasperberry pi

Some users have asked us how can they connect their ArduSimple boards to a Raspberry Pi and we have prepared this guide to show all the necessary steps.
Notice that there are many different models of Raspberry Pi, to prepare this tutorial we have used Raspberry Pi 4 Model B.

In this tutorial, we will use a remote connection to the Raspberry Pi to avoid the need for a dedicated keyboard, mouse, or screen for the Raspberry Pi. If you already have these peripherals, you can skip all the steps related to the remote connection.

Required hardware:

Required software:

How to connect your simpleRTK2B to a Raspberry Pi?

Firstly, install Raspberry Pi operation system.

  1. Connect the microSD card to your computer. Run SDFormatter and select the SD card drive. Check Quick format. Click Format.
  1. Run Raspberry Pi imager as administrator. Click CHOOSE OS.
  1. Choose Raspberry pi OS (other)–>Select Raspberry Pi OS Full with desktop environment and recommended applications. 
  1. At Storage select your SD card. Click the Gear icon on right corner.
  1. Here you can setup your Username and Password for logging into Raspberry Pi. And your WiFi name and password.
  1. Click SAVE and WRITE.
  2. With the microSD card still in your computer, open the BOOT drive.
  3. Open the file cmdline.txt with a text editor and add the following text at the end: ip=10.0.0.1 and save the file.
  1. Create a new empty file in BOOT called ssh, without any extension (you can create a txt file and remove the extension).
  1. Eject the card from Windows.

Secondly, setup remote connection.

If you have a screen and keyboard for your Raspberry Pi, you can skip second steps and continue from step 19.

  1. Go to the Windows Control panel–>Network and Internet–>Network connections.
    Make sure your Ethernet connection is enabled (if not, right click on Ethernet and select enable).
  1. Right click on the Ethernet connection–>Properties–>Select Internet Protocol Version 4 (TCP/IPv4)–>Click Properties button.
  1. Set addresses as in the  picture below, click OK.
  1. Insert the microSD card into your Raspberry Pi.
    Connect an Ethernet cable between Raspberry Pi and your computer.
    Power your Raspberry Pi, wait a few seconds.
  2. Open PuttY application and set Host Name to 10.0.0.1, click Open (acknowledge all warnings).
  1. A command prompt will open, use the Username and Password you set in step5.
  1. Congratulations, you have remote access to your Raspberry Pi!

Thirdly, configure Raspberry Pi UART to communicate with GNSS receiver.

  1. On terminal, run sudo raspi-config.
  1. Select 5 Interfacing Options.
  1. Select Serial.
  1. Choose <No> at ‘Would you like a login shell to be accessible over serial?’
  1. Choose <Yes> at ‘Would you like the serial port hardware to be enabled?’
  1. Choose <Ok> and <Finish>.
  1. When asked to reboot, choose <Yes>, PuttY session will close automatically.

Fourthly, testing communications.

  1. Connect your receiver (with default configuration) to the Raspberry Pi with the Raspberry Pi adapter for simpleRTK.
    If you have a simpleRTK3B Pro, go to 192.168.3.1, enable NMEA output at COM1. Because with simpleRTK3B, any position output is disabled by default. If you don’t know how to do this, check the User Manual.
  1. Plug the GNSS antenna to your receiver.
  2. Open PuttY again and connect as in Step 2. Type: sudo nano test.py.
  3. Type or copy paste the following code:
    #!/usr/bin/env python
    import time
    import serial
    ser = serial.Serial(
    port=’/dev/serial0′,
    baudrate = 115200,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS,
    timeout=1
    )
    counter=0
    while 1:
    x=ser.readline()
    print (x)

Note : if you have a newer version of the Raspberry Pi, your serial port might be called dev/ttyAMA0 instead of dev/serial0. Check how your Raspberry pi names the UART on pins 14 and 15

    This is a script that will read information from the GNSS receiver.
    The baudrate configuration is valid for the default configuration of the simpleRTK2B and can be changed if needed.
  1. Press Ctrl+X and Save changes.
  2. Type: python test.py.
    You should see incoming NMEA sentences like in the picture below.
  1. Press Ctrl+C to exit.
    Congratulations, you can now read GNSS data streams in your Raspberry Pi!

Finally, GNSS diagnostics on your Raspberry Pi!

  1. Let’s enable the Raspberry Pi WiFi to connect to the Internet and download some sw packages. If you already enable your WiFi in step 5, you can skip this part and go to step 35.
    Type sudo nano /etc/wpa_supplicant/wpa_supplicant.conf.
    Add the network part as in the picture below, where ssid is your WiFi SSID and psk is your WiFi password.
  1. Press Ctrl+X and Save changes.
  2. Type sudo reboot, which will reboot your Raspberry Pi (and close the PuttY session).
  3. Open again the PuttY session.
    Type sudo apt-get install gpsd gpsd-clients python-GPS and wait for the package installation (acknowledge all warnings).
  4. Type:
    sudo systemctl stop gpsd.socket
    sudo systemctl disable gpsd.socket
    sudo gpsd /dev/serial0 -F /var/run/gpsd.sock
  1. Type gpsmon and you will see a monitor of the GPS status.
  1. Press Ctrl+X to exit the monitor.
  2. Type cgps for a lighter monitor.
  1. Press Ctrl+X to exit the monitor.
  2. Now you are ready to use your GNSS receiver on Raspberry Pi.
If you want to do this tutorial, we have all the products in stock and ready to be shipped:

If you liked this content, you can follow us on Twitter, YouTube, Facebook or LinkedIn to stay updated of content like this.

Got any questions or requests?
Contact us! We'll answer <24 hours!

Want to learn more about GPS/RTK?

1. Our engineering team will contact you to solve any questions
2. We will keep you updated about promotions and new product releases
3.You will only hear from us when we have important news, we won’t spam your email