enabling UDP communication in arduino

hello everyone, I have an arduino Uno connected to sensors (humidity, C02 sensor), that sends measured information through an xbee shield to Raspberry Pi, I want to make that communication reliable, and be able to access internet applications. So I have uploaded contiki os to arduino, but still I have troubleshouting executing a simple udp server-echo example. I would like to know if there are other solutions to make communication through internet only with the hardware I have. Thank you

How is the XBee connecting to the Internet?

Previous you said it communicated to. RPI. Is this still the gateway?