Skip to content

Commit fe7eb3f

Browse files
committed
Craete project cellular_config file
Craete project cellular_config.h
1 parent c7501a5 commit fe7eb3f

10 files changed

Lines changed: 201 additions & 28 deletions

File tree

lib/cellular

projects/bg96_mqtt_mutual_auth_demo/WIN32.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_slot_management.h" />
127127
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_storage.h" />
128128
<ClInclude Include="..\..\lib\mbedtls\library\ssl_invasive.h" />
129-
<ClInclude Include="..\..\source\cellular\cellular_config.h" />
129+
<ClInclude Include="..\..\source\cellular\bg96\cellular_config.h" />
130130
<ClInclude Include="..\..\source\cellular\cellular_platform.h" />
131131
<ClInclude Include="..\..\source\coreMQTT\core_mqtt_config.h" />
132132
<ClInclude Include="..\..\source\coreMQTT\sockets_wrapper.h" />
@@ -306,7 +306,7 @@
306306
</Midl>
307307
<ClCompile>
308308
<Optimization>Disabled</Optimization>
309-
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;.\..\..\source;.\..\..\source\coreMQTT;.\..\..\source\FreeRTOS;.\..\..\source\mbedtls;.\..\..\source\cellular;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
309+
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;.\..\..\source;.\..\..\source\coreMQTT;.\..\..\source\FreeRTOS;.\..\..\source\mbedtls;.\..\..\source\cellular;.\..\..\source\cellular\bg96;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
310310
<PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
311311
<MinimalRebuild>false</MinimalRebuild>
312312
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

projects/bg96_mqtt_mutual_auth_demo/WIN32.vcxproj.filters

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
4-
<Filter Include="..\..\lib\cellular\common\include">
5-
<UniqueIdentifier>{20285887-a978-4285-8bcf-9424eaaf19d4}</UniqueIdentifier>
6-
</Filter>
7-
<Filter Include="..\..\lib\cellular\common\src">
8-
<UniqueIdentifier>{1d3a8210-7a8e-4beb-9616-f2894df32bf6}</UniqueIdentifier>
9-
</Filter>
104
<Filter Include="..\..\lib\cellular\common\include\private">
115
<UniqueIdentifier>{53878999-cbc4-4041-aded-aa0a519bb66a}</UniqueIdentifier>
126
</Filter>
13-
<Filter Include="..\..\lib\cellular\modules\bg96">
14-
<UniqueIdentifier>{e06971d3-76bc-4697-9cc8-368b097e1532}</UniqueIdentifier>
15-
</Filter>
167
<Filter Include="lib">
178
<UniqueIdentifier>{525fb155-a1a7-46a1-b777-d3fcdacc7277}</UniqueIdentifier>
189
</Filter>
@@ -465,10 +456,10 @@
465456
<ClInclude Include="..\..\source\FreeRTOS\FreeRTOSConfig.h">
466457
<Filter>source\FreeRTOS</Filter>
467458
</ClInclude>
468-
<ClInclude Include="..\..\source\cellular\cellular_config.h">
459+
<ClInclude Include="..\..\source\cellular\cellular_platform.h">
469460
<Filter>source\cellular</Filter>
470461
</ClInclude>
471-
<ClInclude Include="..\..\source\cellular\cellular_platform.h">
462+
<ClInclude Include="..\..\source\cellular\bg96\cellular_config.h">
472463
<Filter>source\cellular</Filter>
473464
</ClInclude>
474465
</ItemGroup>

projects/hl7802_mqtt_mutual_auth_demo/WIN32.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@
126126
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_slot_management.h" />
127127
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_storage.h" />
128128
<ClInclude Include="..\..\lib\mbedtls\library\ssl_invasive.h" />
129-
<ClInclude Include="..\..\source\cellular\cellular_config.h" />
130129
<ClInclude Include="..\..\source\cellular\cellular_platform.h" />
130+
<ClInclude Include="..\..\source\cellular\hl7802\cellular_config.h" />
131131
<ClInclude Include="..\..\source\coreMQTT\core_mqtt_config.h" />
132132
<ClInclude Include="..\..\source\coreMQTT\sockets_wrapper.h" />
133133
<ClInclude Include="..\..\source\coreMQTT\using_mbedtls.h" />
@@ -306,8 +306,8 @@
306306
</Midl>
307307
<ClCompile>
308308
<Optimization>Disabled</Optimization>
309-
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;.\..\..\source;.\..\..\source\coreMQTT;.\..\..\source\mbedtls;.\..\..\source\cellular;.\..\..\source\FreeRTOS;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
310-
<PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;CELLULAR_MODEM_NO_GSM_NETWORK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
309+
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;.\..\..\source;.\..\..\source\coreMQTT;.\..\..\source\mbedtls;.\..\..\source\cellular;.\..\..\source\FreeRTOS;.\..\..\source\cellular\hl7802;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
310+
<PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
311311
<MinimalRebuild>false</MinimalRebuild>
312312
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
313313
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

projects/hl7802_mqtt_mutual_auth_demo/WIN32.vcxproj.filters

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
4-
<Filter Include="..\..\lib\cellular\common\include\private">
5-
<UniqueIdentifier>{53878999-cbc4-4041-aded-aa0a519bb66a}</UniqueIdentifier>
6-
</Filter>
74
<Filter Include="lib">
85
<UniqueIdentifier>{525fb155-a1a7-46a1-b777-d3fcdacc7277}</UniqueIdentifier>
96
</Filter>
@@ -423,9 +420,6 @@
423420
<ClInclude Include="..\..\lib\cellular\modules\hl7802\cellular_hl7802.h">
424421
<Filter>lib\cellular\modules\hl7802</Filter>
425422
</ClInclude>
426-
<ClInclude Include="..\..\source\cellular\cellular_config.h">
427-
<Filter>source\cellular</Filter>
428-
</ClInclude>
429423
<ClInclude Include="..\..\source\cellular\cellular_platform.h">
430424
<Filter>source\cellular</Filter>
431425
</ClInclude>
@@ -462,6 +456,9 @@
462456
<ClInclude Include="..\..\source\logging_stack.h">
463457
<Filter>source</Filter>
464458
</ClInclude>
459+
<ClInclude Include="..\..\source\cellular\hl7802\cellular_config.h">
460+
<Filter>source\cellular</Filter>
461+
</ClInclude>
465462
</ItemGroup>
466463
<ItemGroup>
467464
<ClCompile Include="..\..\lib\cellular\common\src\cellular_common.c">

projects/sara_r4_mqtt_mutual_auth_demo/WIN32.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@
126126
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_slot_management.h" />
127127
<ClInclude Include="..\..\lib\mbedtls\library\psa_crypto_storage.h" />
128128
<ClInclude Include="..\..\lib\mbedtls\library\ssl_invasive.h" />
129-
<ClInclude Include="..\..\source\cellular\cellular_config.h" />
130129
<ClInclude Include="..\..\source\cellular\cellular_platform.h" />
130+
<ClInclude Include="..\..\source\cellular\sara_r4\cellular_config.h" />
131131
<ClInclude Include="..\..\source\coreMQTT\core_mqtt_config.h" />
132132
<ClInclude Include="..\..\source\coreMQTT\sockets_wrapper.h" />
133133
<ClInclude Include="..\..\source\coreMQTT\using_mbedtls.h" />
@@ -306,8 +306,8 @@
306306
</Midl>
307307
<ClCompile>
308308
<Optimization>Disabled</Optimization>
309-
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;..\..\source;..\..\source\cellular;..\..\source\coreMQTT;..\..\source\FreeRTOS;..\..\source\mbedtls;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
310-
<PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;CELLULAR_MAX_SEND_DATA_LEN=1024;CELLULAR_MAX_RECV_DATA_LEN=1024;%(PreprocessorDefinitions)</PreprocessorDefinitions>
309+
<AdditionalIncludeDirectories>.\..\..\lib\cellular\include;.\..\..\lib\cellular\common\include;.\..\..\lib\cellular\common\include\private;.\..\..\lib\FreeRTOS\portable\MSVC-MingW;.\..\..\lib\FreeRTOS\include;.\..\..\lib\coreMQTT\source\portable;.\..\..\lib\coreMQTT\source\include;.\..\..\lib\coreMQTT\source\interface;.\..\..\lib\mbedtls\include;..\..\source;..\..\source\cellular\sara_r4;..\..\source\cellular;..\..\source\coreMQTT;..\..\source\FreeRTOS;..\..\source\mbedtls;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
310+
<PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
311311
<MinimalRebuild>false</MinimalRebuild>
312312
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
313313
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

projects/sara_r4_mqtt_mutual_auth_demo/WIN32.vcxproj.filters

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,10 @@
453453
<ClInclude Include="..\..\source\FreeRTOS\FreeRTOSConfig.h">
454454
<Filter>source\FreeRTOS</Filter>
455455
</ClInclude>
456-
<ClInclude Include="..\..\source\cellular\cellular_config.h">
456+
<ClInclude Include="..\..\source\cellular\cellular_platform.h">
457457
<Filter>source\cellular</Filter>
458458
</ClInclude>
459-
<ClInclude Include="..\..\source\cellular\cellular_platform.h">
459+
<ClInclude Include="..\..\source\cellular\sara_r4\cellular_config.h">
460460
<Filter>source\cellular</Filter>
461461
</ClInclude>
462462
</ItemGroup>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Amazon FreeRTOS Cellular Preview Release
3+
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* http://aws.amazon.com/freertos
23+
* http://www.FreeRTOS.org
24+
*/
25+
26+
/**
27+
* @file cellular_config.h
28+
* @brief cellular config options.
29+
*/
30+
31+
#ifndef __CELLULAR_CONFIG_H__
32+
#define __CELLULAR_CONFIG_H__
33+
34+
/* This is a project specific file and is used to override config values defined
35+
* in cellular_config_defaults.h. */
36+
37+
/**
38+
* Cellular comm interface make use of COM port on computer to communicate with
39+
* cellular module on windows simulator, for example "COM5".
40+
* #define CELLULAR_COMM_INTERFACE_PORT "...insert here..."
41+
*/
42+
43+
/*
44+
* Default APN for network registartion.
45+
* #define CELLULAR_APN "...insert here..."
46+
*/
47+
48+
/*
49+
* PDN context id for cellular network.
50+
*/
51+
#define CELLULAR_PDN_CONTEXT_ID ( CELLULAR_PDN_CONTEXT_ID_MIN )
52+
53+
/*
54+
* PDN connect timeout for network registration.
55+
*/
56+
#define CELLULAR_PDN_CONNECT_TIMEOUT ( 100000UL )
57+
58+
/*
59+
* Overwrite default config for different cellular modules.
60+
*/
61+
/*
62+
* GetHostByName API is not used in the demo. IP address is used to store the hostname.
63+
* The value should be longer than the length of democonfigMQTT_BROKER_ENDPOINT in demo_config.h.
64+
*/
65+
#define CELLULAR_IP_ADDRESS_MAX_SIZE ( 64U )
66+
67+
/*
68+
* GSM network is not supported in HL7800.
69+
* Add this config to suppress Error message if you are using HL7800.
70+
* #define CELLULAR_MODEM_NO_GSM_NETWORK
71+
*/
72+
#define CELLULAR_MODEM_NO_GSM_NETWORK
73+
74+
#endif /* __CELLULAR_CONFIG_H__ */
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
* Amazon FreeRTOS Cellular Preview Release
3+
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* http://aws.amazon.com/freertos
23+
* http://www.FreeRTOS.org
24+
*/
25+
26+
/**
27+
* @file cellular_config.h
28+
* @brief cellular config options.
29+
*/
30+
31+
#ifndef __CELLULAR_CONFIG_H__
32+
#define __CELLULAR_CONFIG_H__
33+
34+
/* This is a project specific file and is used to override config values defined
35+
* in cellular_config_defaults.h. */
36+
37+
/**
38+
* Cellular comm interface make use of COM port on computer to communicate with
39+
* cellular module on windows simulator, for example "COM5".
40+
* #define CELLULAR_COMM_INTERFACE_PORT "...insert here..."
41+
*/
42+
43+
/*
44+
* Default APN for network registartion.
45+
* #define CELLULAR_APN "...insert here..."
46+
*/
47+
48+
/*
49+
* PDN context id for cellular network.
50+
*/
51+
#define CELLULAR_PDN_CONTEXT_ID ( CELLULAR_PDN_CONTEXT_ID_MIN )
52+
53+
/*
54+
* PDN connect timeout for network registration.
55+
*/
56+
#define CELLULAR_PDN_CONNECT_TIMEOUT ( 100000UL )
57+
58+
/*
59+
* Overwrite default config for different cellular modules.
60+
*/
61+
/*
62+
* GetHostByName API is not used in the demo. IP address is used to store the hostname.
63+
* The value should be longer than the length of democonfigMQTT_BROKER_ENDPOINT in demo_config.h.
64+
*/
65+
#define CELLULAR_IP_ADDRESS_MAX_SIZE ( 64U )
66+
67+
/*
68+
* Sara R4 maximum socket send buffer size is 1024U.
69+
*/
70+
#define CELLULAR_MAX_SEND_DATA_LEN ( 1024U )
71+
72+
/*
73+
* Sara R4 maximum socket receive buffer size is 1024U.
74+
*/
75+
#define CELLULAR_MAX_RECV_DATA_LEN ( 1024U )
76+
77+
/*
78+
* Sara R4 supports set mobile network operators commands.
79+
* Set the mobile network operators of your environment.
80+
* Reference https://www.u-blox.com/sites/default/files/SARA-R4_ATCommands_%28UBX-17003787%29.pdf
81+
* 0: undefined / regulatory
82+
* 1: SIM ICCID/IMSI select
83+
* 2: AT&T
84+
* 3: Verizon
85+
* 4: Telstra
86+
* 5: T-Mobile US
87+
* 6: China Telecom
88+
* 8: Sprint
89+
* 19: Vodafone
90+
* 20: NTT DoCoMo
91+
* 21: Telus
92+
* 28: SoftBank
93+
* 31: Deutsche Telekom
94+
* 32: US Cellular
95+
* 33: VIVO
96+
* 39: SKT
97+
* 44: Claro Brasil
98+
* 45: TIM Brasil
99+
* 46: Orange France
100+
* 90: global
101+
* 100: standard Europe
102+
* Notes :
103+
* The standard Europe profile should be used as the basis for all other MNOs in
104+
* Europe outside of Vodafoneand Deutsche Telekom. However, there may be changes
105+
* that need to be applied to the module for properoperation with any given European
106+
* MNO such as attach type, RAT preference, band selection, etc. Pleaseconsult with
107+
* the preferred network provider.
108+
* #define CELLULAR_CONFIG_SARA_R4_SET_MNO_PROFILE ( ...insert here... )
109+
*/
110+
111+
#endif /* __CELLULAR_CONFIG_H__ */

0 commit comments

Comments
 (0)