Specifications
444
[ 3 ] Declare TCP/IP Communications Pathway
Specify the following system settings by using the socket library (SOCKET.FN3):
• Communications device: IrDA communications device
• Link layer: Ethernet
For the setting procedure with the
SOCKET.FN3, refer to Section 18.6, "Socket Library
(SOCKET.FN3)."
Given below is a setting example using
SOCKET.FN3:
iftype% = 2 ’Specify IrDA communications device
layermode% = 2 ’Specify Ethernet as a link layer
call "socket.fn3" .fcTSetup iftype%, layermode%, interface%
’Specify communications pathway
’(SOCKET.FN3 function #40)
’Returns value in interface%
’(The returned value will be used in
’[5] and [7].)
[ 4 ] Open IrDA Communications Device
Use the OPEN "COM1:" statement in BHT-BASIC.
For details on how to use
OPEN statement, refer to the BHT-BASIC Programmer's Manual,
Chapter 14 "Statement Reference."
Given below is an example using the IrDA communications-related statement:
hCom1% = 1 ’Specify a file number to be opened
’(The file number will be used also in [8].)
open "COM1:115200:" as #hCom1% ’Open the IrDA communications device
’(OPEN "COM1:" statement)