-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxcc_type1sc_buffer.patch
60 lines (56 loc) · 3.51 KB
/
xcc_type1sc_buffer.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Following patch was applied to X-Cube-Cellular 7.0.0 to make FOTA on TYPE1SC
# modem work properly. It's because the maximum packet size of the TYPE1SC is
# smaller than other modems because the data transfer between the modem and the
# STM32 is in hex format.
diff --git a/Application/Inc/plf/plf_ipc_config.h b/Application/Inc/plf/plf_ipc_config.h
index a28ca56..a30991c 100644
--- a/Application/Inc/plf/plf_ipc_config.h
+++ b/Application/Inc/plf/plf_ipc_config.h
@@ -31,9 +31,15 @@ extern "C" {
#define IPC_BUFFER_EXT ((uint16_t) 400U) /* size added to RX buffer because of RX queue implementation (using
* headers for messages)
*/
+#ifdef USE_TYPE1SC_MODEM
+#define IPC_RXBUF_MAXSIZE ((uint16_t) 3080U + IPC_BUFFER_EXT) /* maximum size of character queue
+ * size has to match ATCMD_MAX_CMD_SIZE
+ */
+#else
#define IPC_RXBUF_MAXSIZE ((uint16_t) 1600U + IPC_BUFFER_EXT) /* maximum size of character queue
* size has to match ATCMD_MAX_CMD_SIZE
*/
+#endif /* USE_TYPE1SC_MODEM */
/* IPC tuning parameters */
#if (USE_SOCKETS_TYPE == USE_SOCKETS_MODEM)
diff --git a/Drivers/BSP/X_STMOD_PLUS_MODEMS/TYPE1SC/AT_modem_type1sc/Inc/plf_modem_config.h b/Drivers/BSP/X_STMOD_PLUS_MODEMS/TYPE1SC/AT_modem_type1sc/Inc/plf_modem_config.h
index 43c5252..98a837f 100644
--- a/Drivers/BSP/X_STMOD_PLUS_MODEMS/TYPE1SC/AT_modem_type1sc/Inc/plf_modem_config.h
+++ b/Drivers/BSP/X_STMOD_PLUS_MODEMS/TYPE1SC/AT_modem_type1sc/Inc/plf_modem_config.h
@@ -56,12 +56,8 @@ extern "C" {
#define UDP_SERVICE_SUPPORTED (1U)
#define CONFIG_MODEM_UDP_SERVICE_CONNECT_IP ((uint8_t *)"0.0.0.0")
-#define CONFIG_MODEM_MAX_SOCKET_TX_DATA_SIZE ((uint32_t)710U) /* sendto managed, remote IP/port should be send
- IPv6/IPv4: protocol around 80/50 bytes
- data send in ASCII format:(1500-80)/2 = 710 */
-#define CONFIG_MODEM_MAX_SOCKET_RX_DATA_SIZE ((uint32_t)750U) /* receivefrom managed, remote IP/port should be received
- IPv6/IPv4: protocol around 80/50 bytes
- data received in ASCII format:(1600-80)/2 = 760 */
+#define CONFIG_MODEM_MAX_SOCKET_TX_DATA_SIZE ((uint32_t)1500U)
+#define CONFIG_MODEM_MAX_SOCKET_RX_DATA_SIZE ((uint32_t)1500U)
#define CONFIG_MODEM_MAX_SIM_GENERIC_ACCESS_CMD_SIZE ((uint32_t)1460U)
#define CONFIG_MODEM_MIN_SIM_GENERIC_ACCESS_RSP_SIZE ((uint32_t)4U)
diff --git a/Middlewares/ST/STM32_Cellular/Core/AT_Core/Inc/at_core.h b/Middlewares/ST/STM32_Cellular/Core/AT_Core/Inc/at_core.h
index db1497f..c1443eb 100644
--- a/Middlewares/ST/STM32_Cellular/Core/AT_Core/Inc/at_core.h
+++ b/Middlewares/ST/STM32_Cellular/Core/AT_Core/Inc/at_core.h
@@ -44,7 +44,11 @@ extern "C" {
/* Define buffers max sizes */
#define ATCMD_MAX_NAME_SIZE ((uint16_t) 32U)
#if (USE_SOCKETS_TYPE == USE_SOCKETS_MODEM)
+#ifdef USE_TYPE1SC_MODEM
+#define ATCMD_MAX_CMD_SIZE ((uint16_t) 3080U)
+#else
#define ATCMD_MAX_CMD_SIZE ((uint16_t) 1600U)
+#endif /* USE_TYPE1SC_MODEM */
#else
#define ATCMD_MAX_CMD_SIZE ((uint16_t) 128U)
#endif /* USE_SOCKETS_TYPE */