got 2 STM32F446VET7 MCU board and I am trying to communicate each other with LoRa E220-400T30S.
I cannot found any usefull libraries so I am trying to write one.
I can communicate with modules from UART and setting configuration parameters.
Both E22 module has same configuration(address,channel, baudrate, etc.)
in the document of E220-400T30S it says “During fixed transmission, the module will recognize the first three bytes of serial data as: address high + address low + channel, and use it as a wireless transmission target.”
data[0] is 0x00 which is ADDR High
data[1] is 0x01 which is ADDR Low
data[2] is 0x32 which is Channel (410.125MHz + data[2]*1MHz = 460.125MHz)
so I am sending uint8_t data[5] = {0x00, 0x01, 0x32, 0x03, 0x03}; through to the E220 in tranciever board.
I try with 2 functions.
HAL_UART_Transmit(&huart1, data, sizeof(data), HAL_MAX_DELAY);
HAL_UART_Transmit_DMA(&huart1, data, sizeof(data));
on the other side I am trying to read with 3 ways:
HAL_UART_Receive(&huart1, data, sizeof(data), HAL_MAX_DELAY);
HAL_UART_Receive_IT(&huart1, data, sizeof(data));
HAL_UART_Receive_DMA(&huart1, data, sizeof(data));
But I cannot read any data. What should I do?