The invention relates to a method of transmitting a message from a wireless radio-frequency
short-range communication network (20) via a gateway (21) to a network
(14, 24) external to the communication network (20). The method comprises
receiving a first message (41) via a short-range radio link at the gateway
from a terminal device (23) of the short-range communication network (20),
the first message being addressed to an element (25, 34) external to the
short-range communication network, and the first message comprising a network address
of said terminal device as a transmitter's address and a first port number as a
source port number, the network address of the terminal device being used inside
the short-range communication network. The method comprises allocating a second
port number to the terminal device, replacing said network address of the terminal
device in said first message (41) with the network address of the gateway
and the first port number with said second port number, generating the correlation
of the network address of the terminal device, the first port number and the second
port number and storing said correlation in a memory available to the gateway for
identification of the terminal device. The method comprises transmitting the first
message from the gateway to the element external to the short-range communication
network (20) with said replaced information. The invention also relates
to a gateway and to computer software.