SCREENSHOT 5. We need to add the socket library to
our project. It is as easy as browsing the library folder,
selecting the sock directory, and clicking on the sock.tbh
and sock.tbs files.
SCREENSHOT 6. This is a shot of the whole shooting match.
It's a little bit of Visual Basic, a little bit of C, and little bit of
MPLAB X all wrapped up as Tibbo Basic.
Our Tibbo Basic networking application begins by
including the global.tbh file, which is atop of every Tibbo
dim target_sock as byte ‘assigned socket number
dim bitesIn as string ‘incoming bytes to the
SCREENSHOT 7. This is the result of dialing up the EM500EV
over the Internet and pressing the ESC key.
is providing eye candy in the form of blinking the
EM500EV’s green LED five times:
Following the light show, we head off to do some real
work. Recall that we are using sockets. With that, we need
to set up the IP portion of our local socket. These IP
addresses belong to the EM500EV:
net.ip = “192.168.0.99”
net.gatewayip = “192.168.0.1”
net.netmask = “255.255.255.0”
To make the IP stuff work, we have to do some things
at the gateway. I configured a socket using IP address
192.168.0.99 with a corresponding port number of 8088.
Written on paper, this socket is described as
192.168.0.99:8088. The port portion of the socket is
defined in the sock method:
The sock signature is a descriptive string you can put
between the quotation marks of the sock_get method. It is
permissible to leave the signature blank if the signature
length is equal to zero. Trust me. It is.
The socket we are handed will use TCP protocol
(PL_SOCK_PROTOCOL_TCP). Our socket will also allow any
IP address and any port address to connect