Is there a special setting that must be enabled to allow reception and sending of UDP packets on the 3G adapter? Uinsg udp:setsockname, I’ve tried binding to both 0.0.0.0 and the 3G adapter address on port 8082. While the server receives packets from the LAN, it doesn’t receive anything from the 3G network. I’ve also verified that the network isn’t blocking this port by forwarding pakets to this port to a device on the LAN adapter. Appreciate if someone could shed some light on this.
Here’s more info regarding the problem:
i) It appears that there was a bug in the bind operation - the host parameter should have been “*” instead of INADDR_ANY to bind to all adapters
ii) while sending works over the 3G adapter, I am still having no luck with the receivefrom opeartion (LAN is ok)
Any info/suggestions will be appreciated
at AAF/Lua’s level, there’s nothing interface-specific, so the problem is most likely at some lower level. Are you sure that your telecom operator lets UDP come through? Most of them run through a NAT, and some of them don’t enable every protocol by default.
Yes, we’ve rechecked (several times) that the telco isn’t blocking the traffic by configuring the GX400 to port forward the packets to another device on the LAN port and observed packets flowing through every time. The sample code below reproduces the problem.
local socket = require(“socket”)
local sched = require (“sched”)
local ghost = “*”
local gport = 16001
local function main ()
udp = socket.udp()
local dgram, lip, lport
while (true) do
dgram, lip, lport = udp:receivefrom()
if dgram then
print("received datagram from", lip, lport)