@@ -74,11 +74,11 @@ int8_t ws_common_regulatory_domain_config(protocol_interface_info_entry_t *cur)
74
74
} else if (cur -> ws_info -> hopping_schdule .operating_class == 3 ) {
75
75
cur -> ws_info -> hopping_schdule .ch0_freq = 8701 ;
76
76
cur -> ws_info -> hopping_schdule .channel_spacing = CHANNEL_SPACING_100 ;
77
- cur -> ws_info -> hopping_schdule .number_of_channels = 59 ;
77
+ cur -> ws_info -> hopping_schdule .number_of_channels = 55 ;
78
78
} else if (cur -> ws_info -> hopping_schdule .operating_class == 4 ) {
79
- cur -> ws_info -> hopping_schdule .ch0_freq = 8701 ;
79
+ cur -> ws_info -> hopping_schdule .ch0_freq = 8702 ;
80
80
cur -> ws_info -> hopping_schdule .channel_spacing = CHANNEL_SPACING_200 ;
81
- cur -> ws_info -> hopping_schdule .number_of_channels = 30 ;
81
+ cur -> ws_info -> hopping_schdule .number_of_channels = 27 ;
82
82
} else {
83
83
return -1 ;
84
84
}
@@ -132,9 +132,51 @@ int8_t ws_common_regulatory_domain_config(protocol_interface_info_entry_t *cur)
132
132
// Note: doesn't work for Brazil region
133
133
ws_generate_channel_list (cur -> ws_info -> hopping_schdule .channel_mask , cur -> ws_info -> hopping_schdule .number_of_channels , cur -> ws_info -> hopping_schdule .regulatory_domain );
134
134
135
+
136
+ phy_rf_channel_configuration_s rf_configs ;
137
+ rf_configs .channel_0_center_frequency = (uint32_t )cur -> ws_info -> hopping_schdule .ch0_freq * 100000 ;
138
+ if (CHANNEL_SPACING_100 == cur -> ws_info -> hopping_schdule .channel_spacing ) {
139
+ rf_configs .channel_spacing = 100000 ;
140
+ } else if (CHANNEL_SPACING_200 == cur -> ws_info -> hopping_schdule .channel_spacing ) {
141
+ rf_configs .channel_spacing = 200000 ;
142
+ } else if (CHANNEL_SPACING_250 == cur -> ws_info -> hopping_schdule .channel_spacing ) {
143
+ rf_configs .channel_spacing = 250000 ;
144
+ } else if (CHANNEL_SPACING_400 == cur -> ws_info -> hopping_schdule .channel_spacing ) {
145
+ rf_configs .channel_spacing = 400000 ;
146
+ } else if (CHANNEL_SPACING_600 == cur -> ws_info -> hopping_schdule .channel_spacing ) {
147
+ rf_configs .channel_spacing = 600000 ;
148
+ }
149
+
150
+ if (OPERATING_MODE_1a == cur -> ws_info -> hopping_schdule .operating_mode ) {
151
+ rf_configs .datarate = 50000 ;
152
+ rf_configs .modulation_index = MODULATION_INDEX_0_5 ;
153
+ } else if (OPERATING_MODE_1b == cur -> ws_info -> hopping_schdule .operating_mode ) {
154
+ rf_configs .datarate = 50000 ;
155
+ rf_configs .modulation_index = MODULATION_INDEX_1_0 ;
156
+ } else if (OPERATING_MODE_2a == cur -> ws_info -> hopping_schdule .operating_mode ) {
157
+ rf_configs .datarate = 100000 ;
158
+ rf_configs .modulation_index = MODULATION_INDEX_0_5 ;
159
+ } else if (OPERATING_MODE_2b == cur -> ws_info -> hopping_schdule .operating_mode ) {
160
+ rf_configs .datarate = 100000 ;
161
+ rf_configs .modulation_index = MODULATION_INDEX_1_0 ;
162
+ } else if (OPERATING_MODE_3 == cur -> ws_info -> hopping_schdule .operating_mode ) {
163
+ rf_configs .datarate = 150000 ;
164
+ rf_configs .modulation_index = MODULATION_INDEX_0_5 ;
165
+ } else if (OPERATING_MODE_4a == cur -> ws_info -> hopping_schdule .operating_mode ) {
166
+ rf_configs .datarate = 200000 ;
167
+ rf_configs .modulation_index = MODULATION_INDEX_0_5 ;
168
+ } else if (OPERATING_MODE_4b == cur -> ws_info -> hopping_schdule .operating_mode ) {
169
+ rf_configs .datarate = 200000 ;
170
+ rf_configs .modulation_index = MODULATION_INDEX_1_0 ;
171
+ } else if (OPERATING_MODE_5 == cur -> ws_info -> hopping_schdule .operating_mode ) {
172
+ rf_configs .datarate = 300000 ;
173
+ rf_configs .modulation_index = MODULATION_INDEX_0_5 ;
174
+ }
175
+
135
176
mlme_set_t set_request ;
136
177
// Set RF configuration
137
- phy_rf_channel_configuration_s rf_configs ;
178
+ rf_configs .number_of_channels = cur -> ws_info -> hopping_schdule .number_of_channels ;
179
+ rf_configs .modulation = M_2FSK ;
138
180
set_request .attr = macRfConfiguration ;
139
181
set_request .value_pointer = & rf_configs ;
140
182
set_request .value_size = sizeof (phy_rf_channel_configuration_s );
0 commit comments