@@ -32,7 +32,7 @@ static IPAddress const gateway {192, 168, 42, 100};
3232static T1SPlcaSettings const t1s_plca_settings{T1S_PLCA_NODE_ID};
3333static T1SMacSettings const t1s_default_mac_settings;
3434
35- static uint16_t const UDP_SERVER_LOCAL_PORT = 8888 ;
35+ static uint16_t const UDP_SERVER_LOCAL_PORT = 5001 ;
3636
3737/* *************************************************************************************
3838 * GLOBAL VARIABLES
@@ -114,12 +114,12 @@ void loop()
114114
115115 auto const now = millis ();
116116
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+ // }
123123
124124 /* Check for incoming UDP packets. */
125125 int const rx_packet_size = udp_server.parsePacket ();
@@ -130,15 +130,15 @@ void loop()
130130 uint16_t const destination_port = udp_server.remotePort ();
131131
132132 /* 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 = \"");
142142
143143 /* Read from received UDP packet. */
144144 size_t const UDP_RX_MSG_BUF_SIZE = 16 + 1 ; /* Reserve the last byte for the '\0' termination. */
@@ -151,18 +151,18 @@ void loop()
151151
152152 /* Print received data to Serial. */
153153 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));
155155
156156 /* Continue reading. */
157157 bytes_read = udp_server.read (udp_rx_msg_buf, UDP_RX_MSG_BUF_SIZE - 1 );
158158 }
159- Serial.println (" \" " );
159+ // Serial.println("\"");
160160
161161 /* Finish reading the current packet. */
162162 udp_server.flush ();
163163
164164 /* 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 );
166166 udp_server.write (udp_tx_buf.data (), udp_tx_buf.size ());
167167 udp_server.endPacket ();
168168 }
0 commit comments