A Code Snippet

Here is an example of the initialization code for the SCAP library. The code assigns a static IP address. Of course, you can also use a DHCP library for dymamic configuration of your device's IP.

** Tibbo Basic **


sub on_sys_init()
 net.ip="192.168.1.200"        '<======== SET A SUITABLE IP ADDRESS

 if scap_start()<>EN_SCAP_STATUS_OK then
         sys.debugprint("Could not allocate the necessary number of sockets")
         sys.halt
 end if

 ...
end sub