The custom (Photon like, STM32F207 Ethernet, instead of Wifi) device acquires dynamic IP, resolves dns of device.spark.io, creates a spark socket and connects to it, able to receive nonce of 40 bytes, but couldn't receive key and fails with an error code of -19.
Also unable to use Particle CLI since it says dfu device not found. But the boot loader dfu works with ID's 0x483:DF11 (It's a Nucleo STM32F207 Kit) and also able to dfu the cloud_public.der at the location 2082/34. Need help to resolve this error. And by the way no smart configuration option.