There is a big error in this code. It uses strdup which allocates new memory each iteration. After about 2 min you run out of memory an the code appears to have stopped. To fix this you can either manage your memory with mallac() and free() functions OR you can correctly replace strdup with strcpy (which implies other minor changes to the code). I went the strcpy route and now my gps has been running for a long time with no trouble.
3 роки тому+3
There is a flaw in this code. We have strdup function allocating memory with a relatively big string. Which may and probably will cause a memory leakage ending with a hard fault. Therefore it is critical to deallocate the memory by using a char pointer such as "tofree" in the end of operation. (Tokenizing NMEA sentences.)
ahmet bey merhabalar öncelikle, acaba siz kodu çalıştırabildiniz mi bitirme projem için gps'e ihtiyaç duydum fakat bir türlü beceremedim cevaplarsanız çok sevinirim
3 роки тому+1
@@ogb.2687 Link yorumdan atamıyorum, e-posta adresinizi paylaşırsanız Github linkini paylaşabilirim.
The code with strdup() causes a stop after 2-3 minutes. Just replace strdup with strcpy(buffStr2, buffStr), set additional memset for buffStr2 before sprintf() and after HAL_UART_Transmit() set memset() for buffStr2, buffStr and token again. The program is running without problems. The link to the code is expired. Could you please replace it?
Thank you for this video, But what is the terminal you are using to show because I tried out your code but I didn't saw any thing on Putty from &Uart2! can you guide me about this?
If the GPS cannot connect to any satellite, then you shouldn't see anything on putty. I had the same issue too, and the solution was very simple, run it outdoors.
Thanks for the video. Unfortunately I'm getting the error that no ST-Link is connected. Do I even need one for this code and this GPS sensor? Help's always much appreciated :)
Hello, I really need the link to the code but it's not working anymore, can you send me a new one please ?
There is a big error in this code. It uses strdup which allocates new memory each iteration. After about 2 min you run out of memory an the code appears to have stopped. To fix this you can either manage your memory with mallac() and free() functions OR you can correctly replace strdup with strcpy (which implies other minor changes to the code). I went the strcpy route and now my gps has been running for a long time with no trouble.
There is a flaw in this code. We have strdup function allocating memory with a relatively big string. Which may and probably will cause a memory leakage ending with a hard fault. Therefore it is critical to deallocate the memory by using a char pointer such as "tofree" in the end of operation. (Tokenizing NMEA sentences.)
ahmet bey merhabalar öncelikle, acaba siz kodu çalıştırabildiniz mi bitirme projem için gps'e ihtiyaç duydum fakat bir türlü beceremedim cevaplarsanız çok sevinirim
@@ogb.2687 Link yorumdan atamıyorum, e-posta adresinizi paylaşırsanız Github linkini paylaşabilirim.
@ rica ederim bana da gönderirdiz
Göndermeyi pek istemekle beraber, e-posta adreslerini vermediğiniz için bu mümkün değil.
@ çok üzgünüm, unutmuşum😄 So sorry. kerimova.minaye@gmail.com
This code should also work with the NEO M8N module?
Сразу видно, наш человек!!
The code also works with F103C8?
The code with strdup() causes a stop after 2-3 minutes. Just replace strdup with strcpy(buffStr2, buffStr), set additional memset for buffStr2 before sprintf() and after HAL_UART_Transmit() set memset() for buffStr2, buffStr and token again. The program is running without problems. The link to the code is expired. Could you please replace it?
The code link seems to have gone bad. Can you please update that?
can ı use stm32f407vg this code ?
after receiving data 10-15 times my *string doesn't storing any data any no data is sending through uart.
any idea why it is happening.
read my comment
Thank you for this video, But what is the terminal you are using to show because I tried out your code but I didn't saw any thing on Putty from &Uart2! can you guide me about this?
Hi Sara pahlavan sent your code via email sureshgct2010@gmail.com I will try it
If the GPS cannot connect to any satellite, then you shouldn't see anything on putty. I had the same issue too, and the solution was very simple, run it outdoors.
@@sureshp632 i have the same problem, i can't see nothing on Putty, i ll be thankfull, if i get some help.
Thanks for the video. Unfortunately I'm getting the error that no ST-Link is connected. Do I even need one for this code and this GPS sensor? Help's always much appreciated :)
Thank you so much
Nice video! Cool accent though =)