- Notifications
You must be signed in to change notification settings - Fork 56
client fails to connect via UDP when binary is compiled by Online Compiler #357
Description
using UDP fails when binary is compiled with Online compiler but if I compiled with CLI GCC_ARM then UDP works.
Bug
Version information
mbed-os-example-client, revision 9468fd3, tag mbed-os-5.7.0-oob
Environment details
https://os.mbed.com/compiler
Expected Behavior
Registered object successfully!
Actual Behavior
Starting mbed Client example
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266)
[EasyConnect] Connecting to WiFi Anfield-tower
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address 5c:cf:7f:04:6a:f2
[EasyConnect] IP address 192.168.43.142
SOCKET_MODE : UDP
Connecting to coap://api.connector.mbed.com:5684
handle_timer_tick, device not registered
Steps to Reproduce
- compile using TCP => restart K64F
Starting mbed Client example
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266)
[EasyConnect] Connecting to WiFi Anfield-tower
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address 5c:cf:7f:04:6a:f2
[EasyConnect] IP address 192.168.43.142
SOCKET_MODE : TCP
Connecting to coap://api.connector.mbed.com:5684
Registered object successfully!
handle_timer_click, new value of counter is 1
-
change to UDP
replace "M2MInterface::BindingMode SOCKET_MODE = M2MInterface::TCP;" with
"M2MInterface::BindingMode SOCKET_MODE = M2MInterface::UDP;" in simpleclient.h -
compile using UDP => restart K64F
Starting mbed Client example
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266)
[EasyConnect] Connecting to WiFi Anfield-tower
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address 5c:cf:7f:04:6a:f2
[EasyConnect] IP address 192.168.43.142
SOCKET_MODE : UDP
Connecting to coap://api.connector.mbed.com:5684
handle_timer_tick, device not registered
Enhancement
Reason to enhance/problem with existing solution
Suggested enhancement
Pros
Cons
Question
How to?