Mock location with USB OTG

If you are ever in need to convert your GNSS RTK USB OTG connection into a TCP client or TCP server connection, this tutorial is for you.
If you did not understand half of the above paragraph, don’t leave yet!
We will try to put an example that may help you understand better 🙂

Imagine that you need to use high precision GNSS on your smartphone/tablet and your application does not support direct connection with an external receiver. You would need to use the mock location functionality that replaces your smartphone internal GPS by your fancy external RTK GNSS receiver.
The most popular app for doing so is Lefebure NTRIP Client.
This app works great BUT only supports Bluetooth or TCP connection to your external receiver.
What if your receiver only has a USB OTG connection and no Bluetooth?
Well, there’s a cool app called TCPUART transparent Bridge that allows you to convert your USB OTG connection into a TCP client or TCP server. This app only does one thing but does it well.

Let’s work on the example above step by step.

  1. We assume you have both Lefebure and TCPUART apps installed on your Android device, and also that you have a GNSS RTK receiver connected to your device via USB OTG
  2. Open TCPUART transparent Bridge app
  3. Set baudrate as 115200 (38400 if you have a professional kit or a simpleRTK2Blite) and click Connect
  4. Select TCP server and you can leave Port as 8080, click Start.
    The app should look like this:
  5. Open Lefebure NTRIP client app, click the “Gear” icon, go to Receiver Settings
  6. Set Receiver Connection as TCP/IP, receiver IP as localhost, receiver port as 8080
  7. Set Antenna height or other options if necessary and enable GPS Mock Locations
  8. Configure your NTRIP Settings as usual
  9. Go back to the main screen and click Connect. That’s all!
  10. If you go back to the TCPUART app, you will be able to see data being transferred on both directions

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

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