2022-12-01 12:22 AM
I'm planning to make a GPS tracker using Teseo LIV3FL as a slave device and STM32 Nucle-WL55JC1 MCU with I2C communication protocol. The I2C reading is working (I assumed it works since I'm receiveing some data), but the problem is when I take one of the reading and decode it using a GPGGA (or similar) decoder it says I got an invalid data.
Serial monitor
Decoded data
And code snippet for sensor reading
while (1)
{
/* USER CODE BEGIN 3 */
if (HAL_I2C_IsDeviceReady(&hi2c1, 0x3A <<1 + 0, 2, 10) == HAL_OK) {
HAL_I2C_Master_Receive(&hi2c1, 0x3A <<1 + 0, (uint8_t *)receivedData, sizeof(receivedData), 1000);
HAL_UART_Transmit(&huart2, (uint8_t*)receivedData, sizeof(receivedData), 1000);
while (HAL_I2C_GetState(&hi2c1) != HAL_I2C_STATE_READY);
} else {
uint8_t state[10] = "DEVICE IS NOT READY\n";
HAL_UART_Transmit(&huart2, (uint8_t*)state, sizeof(state), 1000);
}
HAL_Delay(500);
}
Any idea where did I go wrong? Thank you.
2022-12-01 01:18 AM
It flags that it doesn't have a solution, and you use it anyway.
Suggests the antenna or RF side is not working properly, should be outside with a clear view of the sky. Expect in to take around 30 to 40 seconds to get an initial fix in ideal conditions.
2022-12-01 08:03 PM
Ahhh turns out the solder connection between the antenna and modules isn't good. Thanks!