Skip to main content
KKS
Associate II
August 14, 2018
Solved

I want to get gps information using p nucleo lrwan1.

  • August 14, 2018
  • 28 replies
  • 3930 views

I want to get gps information using p nucleo lrwan1. Can I get an open source that can help? I'll use the uart port.(gps)

This topic has been closed for replies.
Best answer by Tesla DeLorean

The LoRa shield doesn't use the D0/D1 USART pins so you could stack in a GPS Shield. On the NUCLEO-64 you will likely need to modify the solder bridges so as not to conflict with the VCP-USART wiring.

The XCUBE-LRWAN code will need a bit of modification to support the USART. I've posted GPS/USART parsing/processing code several times, you could use that or code your own. Likely you want to extract position and send that in a small LoRa packet. The Ping-Pong example can be modified to be Location Pinging one.

28 replies

Tesla DeLorean
Guru
August 16, 2018

To reiterate again the ping-pong example doesn't use a Gateway, it is a point-to-point implementation, basically broadcasting to the same band other radios are listening on.

It configures the SX1276 radio and throws data into the air.

Take your two LoRa-DISCO boards and program in the Ping-Pong program into each, and review behaviour.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KKS
KKSAuthor
Associate II
August 16, 2018

Do I compile the same source (modified readme.txt) both on the board (master) that connects to the pc and on the board (slave) to which it is connected (gps module + power)? Separately?

Tesla DeLorean
Guru
August 16, 2018

Step one on your journey needs to be building the Ping-Pong example, as-is, and putting it on your two nodes, and to learn/observe how it functions.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KKS
KKSAuthor
Associate II
August 17, 2018

Ok. Do I have to put the same ping-pong example on both boards? One side gives power supply separately?or use 2pc.

Tesla DeLorean
Guru
August 17, 2018

Same software.

Program one at a time.

You can then connect two boards to a single PC.

If insufficient USB ports use a hub or second PC, or Battery Pack/Charger.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KKS
KKSAuthor
Associate II
August 17, 2018

If I connect two boards to one pc and put in a ping-pong example, should two terminals display ping messages and pong messages, respectively? Do I need st-link settings or other settings? It does not work. How do I decide on a master board and a slave board?

KKS
KKSAuthor
Associate II
August 18, 2018

Thanks~~~!! The ping pong example works. What's the next step?

Tesla DeLorean
Guru
August 18, 2018

Split into two programs, strip out unnecessary code so you can make one a listener printing what it receives and make the other a transmitter that sends an evolving message.

Then you might want to start experimenting with reading data from the UART, and processing data from the GPS, or user input from the terminal.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KKS
KKSAuthor
Associate II
August 18, 2018

Do I have to modify the readme.txt according to the link you gave? How do I modify the code for gps use?

Tesla DeLorean
Guru
August 18, 2018

Not sure the readme.txt impacts the functioning of the code.

You're going to have to own your learning journey here, you need to understand how to program, and integrate functionality. Try experimenting with simpler tasks until you understand the basics. If you've not done embedded development before try some basic tasks like blinking LEDs or reading UART data.

Work with your peers, teachers and supervisors.

If you want me to code a solution I'm open to reasonable offers for my time.

To use the GPS you're going to need to find available UART pins, configure them and connect up the receiver and power.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..