@@ -32,7 +32,7 @@ static IPAddress const gateway {192, 168, 42, 100};
32
32
static T1SPlcaSettings const t1s_plca_settings{T1S_PLCA_NODE_ID};
33
33
static T1SMacSettings const t1s_default_mac_settings;
34
34
35
- static uint16_t const UDP_SERVER_LOCAL_PORT = 8888 ;
35
+ static uint16_t const UDP_SERVER_LOCAL_PORT = 5001 ;
36
36
37
37
/* *************************************************************************************
38
38
* GLOBAL VARIABLES
@@ -114,12 +114,12 @@ void loop()
114
114
115
115
auto const now = millis ();
116
116
117
- if ((now - prev_beacon_check) > 1000 )
118
- {
119
- prev_beacon_check = now;
120
- if (!tc6_inst->getPlcaStatus (OnPlcaStatus))
121
- Serial.println (" getPlcaStatus(...) failed" );
122
- }
117
+ // if ((now - prev_beacon_check) > 1000)
118
+ // {
119
+ // prev_beacon_check = now;
120
+ // if (!tc6_inst->getPlcaStatus(OnPlcaStatus))
121
+ // Serial.println("getPlcaStatus(...) failed");
122
+ // }
123
123
124
124
/* Check for incoming UDP packets. */
125
125
int const rx_packet_size = udp_server.parsePacket ();
@@ -130,15 +130,15 @@ void loop()
130
130
uint16_t const destination_port = udp_server.remotePort ();
131
131
132
132
/* Print some metadata from received UDP packet. */
133
- Serial.print (" [" );
134
- Serial.print (millis ());
135
- Serial.print (" ] Received " );
136
- Serial.print (rx_packet_size);
137
- Serial.print (" bytes from " );
138
- Serial.print (udp_server.remoteIP ());
139
- Serial.print (" port " );
140
- Serial.print (udp_server.remotePort ());
141
- Serial.print (" , data = \" " );
133
+ // Serial.print("[");
134
+ // Serial.print(millis());
135
+ // Serial.print("] Received ");
136
+ // Serial.print(rx_packet_size);
137
+ // Serial.print(" bytes from ");
138
+ // Serial.print(udp_server.remoteIP());
139
+ // Serial.print(" port ");
140
+ // Serial.print(udp_server.remotePort());
141
+ // Serial.print(", data = \"");
142
142
143
143
/* Read from received UDP packet. */
144
144
size_t const UDP_RX_MSG_BUF_SIZE = 16 + 1 ; /* Reserve the last byte for the '\0' termination. */
@@ -151,18 +151,18 @@ void loop()
151
151
152
152
/* Print received data to Serial. */
153
153
udp_rx_msg_buf[bytes_read] = ' \0 ' ; /* Terminate buffer so that we can print it as a C-string. */
154
- Serial.print (reinterpret_cast <char *>(udp_rx_msg_buf));
154
+ // Serial.print(reinterpret_cast<char *>(udp_rx_msg_buf));
155
155
156
156
/* Continue reading. */
157
157
bytes_read = udp_server.read (udp_rx_msg_buf, UDP_RX_MSG_BUF_SIZE - 1 );
158
158
}
159
- Serial.println (" \" " );
159
+ // Serial.println("\"");
160
160
161
161
/* Finish reading the current packet. */
162
162
udp_server.flush ();
163
163
164
164
/* Send back a reply, to the IP address and port we got the packet from. */
165
- udp_server.beginPacket (destination_ip, destination_port );
165
+ udp_server.beginPacket (destination_ip, 5001 );
166
166
udp_server.write (udp_tx_buf.data (), udp_tx_buf.size ());
167
167
udp_server.endPacket ();
168
168
}
0 commit comments