UDP Entry Point

This entry point accepts UDP traffic from an Air for Cellular device and forwards the individual traffic (strictly one UDP datagram) to the cloud service.


Entry Point

Your device should be configured to send data to: udp://funnel.soracom.io:23080.


Behavior

Request

The maximum transmission data size per request is based on the UDP fragment size. While the UDP specification allows a maximum of 65,536 bytes per packet, the actual maximum is determined by the MTU of the network path. In most cases, the maximum packet size is approximately 1500 bytes, with the maximum payload slightly less.

Response

Since UDP has no request and response mechanism like HTTP, Funnel will return a UDP packet to the device containing the HTTP response code and message received from the cloud service. The UDP packet message will use the following format: ${http-status-code} ${http-response-body}

When data has been successfully sent to the cloud service, Funnel will simply return a UDP packet containing the following body:

200

If the Funnel Content type has been set to JSON and the data contains invalid JSON, Funnel will return a TCP packet with the FIN flag, containing the following body:

400 Invalid JSON is send to funnel.

Example

Establish a UDP session with Funnel:

nc -v -u funnel.soracom.io 23080
>found 0 associations
>found 1 connections:
>     1:    flags=82<CONNECTED,PREFERRED>
>  outif (null)
>  src 192.168.43.232 port 61136
>  dst 100.127.65.43 port 23080
>  rank info not available

nc will send a UDP datagram to confirm the connection. If the Funnel Content type has been set to JSON, Funnel will return an error indicating that the payload does not contain valid JSON data. However, no error has occurred:

>Connection to funnel.soracom.io port 23080 [udp/*] succeeded!
>(response) 400 Invalid JSON is send to funnel.
>(response) 400 Invalid JSON is send to funnel.
>(response) 400 Invalid JSON is send to funnel.
>(response) 400 Invalid JSON is send to funnel.

Send valid JSON:

>(request) {"key":"value"}
>(response) 200

Send invalid JSON:

>(request) bad text
>(response) 400 Invalid JSON is send to funnel.