background image

SBL2e Dual Serial-to-Ethernet User's Manual 

Page 10

 

4.4 

Custom Packetization 

 
Custom packetization can apply to TCP and UDP communication. Unlike TCP, UDP is a 
connectionless protocol. The SBL2e provides two methods to determine the destination network IP 
address: you can specify a static IP address, or you can use the source IP address of the last received 
UDP packet by selecting the “Learn UDP Reply Address” checkbox.  
 

 

 

 
 
 
Use custom packetization logic  

Enables/disables custom packetization settings 

Use UDP instead of TCP 

Check to enable UDP  

Learn UDP reply Address    

Send outbound serial to the IP address from the last 
received UDP packet. Useful for clients that may have 
changing IP addresses.  If not using this feature, you 
must specify the destination IP address and port 
number in the Outgoing Connections section.  

Number of characters to accumulate 
before sending TCP/UDP packet 

Maximum number of characters to accumulate from 
the serial port before sending them out the network 
port. This setting will be overridden if the 
accumulation delay time setting is used and the delay 
time expires. 

Number msec to wait for accumulated 
characters (0 waits forever) 

Maximum wait time in milliseconds for received serial  
characters before sending any available characters out 
the network port. 

Flush TCP frame when this character is 
received (Enter NA to disable) 

Send all accumulated serial data upon receipt of this 
character from the serial port. Enter the decimal value 
of the character. For example, a line feed is 10.  

 
 
 
 

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Содержание SBL2e

Страница 1: ...SBL2e Dual Serial to Ethernet User s Manual Downloaded from Elcodis com electronic components distributor ...

Страница 2: ...mmand Examples 18 7 4 1 Set Pins 14 and 15 to GPIO Outputs 18 7 4 2 Set All GPIO Pins as Inputs and Readback 18 7 4 3 Read A D Inputs 18 8 AT Commands 19 8 1 Enter and Exit Command Mode 19 8 2 Command Syntax 20 8 3 System Network Configuration 21 8 4 Serial Port Configuration 22 8 4 1 Custom Packetization 23 8 5 GPIO Server and Analog to Digital Readback 24 8 6 AT Command Examples 25 8 6 1 Changin...

Страница 3: ...thernet User s Manual Page 3 12 Web Browsers and Proxy Servers 28 13 Testing with a Telnet Connection 28 14 Telnet to Serial Test Procedure 29 Revision History 30 Downloaded from Elcodis com electronic components distributor ...

Страница 4: ...hernet capability through TCP or UDP DHCP and Static IP addressing Custom data packetization options Web page configuration AT command set configuration and operation 3 3VDC input power 250mA max 2 IPSetup Software Utility Setup and configuration of your SBL2e requires the IPSetup exe Windows PC utility available for download at www netburner com in the Support Public Downloads section http www ne...

Страница 5: ... LEDs are illuminated and click the Search Again button If you are still unable to see your SBL2e remove power correct any cabling errors reapply power and click the Search Again button Note IP Setup uses a UDP broadcast protocol and will not operate through a router FIREWALLS IPSetup uses UDP and TCP port number 20034 If your computer s firewall is blocking this port number you will need to eithe...

Страница 6: ... serial AT commands to modify the settings of your SBL2e We recommend using the web interface first to familiarize yourself with the operation of the SBL2e To access the web page click on the Launch Webpage button in IP Setup or you can open your web browser and enter the numeric IP Address in the address field e g http 10 1 1 110 Downloaded from Elcodis com electronic components distributor ...

Страница 7: ...server on your network the DHCP assigned values will be displayed To select a static IP address chance the Address Mode to Static and enter your values in the Static Settings fields Device Name Specifies the device name to send to your DHCP server Address Mode Select between DHCP and Static IP address settings Device IP Address Device Subnet Mask Device Gateway Device DNS If Address Mode is set to...

Страница 8: ...s for Port0 and Port1 must be different Timeout and disconnect after this many seconds of inactivity Terminate TCP connection if no incoming network data or outgoing serial data has occurred This is useful because there is no way to detect if a client has crashed or abnormally terminated unless unacknowledged data exists and times out A value of 0 disables this feature This field has no effect in ...

Страница 9: ... section or enable the Learn UDP Reply Address feature in the Custom Packetization section Timeout and disconnect after this many seconds of inactivity Terminate TCP connection if no incoming network data or outgoing serial data has occurred This is useful because there is no way to detect if a client has crashed or abnormally terminated unless unacknowledged data exists and times out A value of 0...

Страница 10: ...ddresses If not using this feature you must specify the destination IP address and port number in the Outgoing Connections section Number of characters to accumulate before sending TCP UDP packet Maximum number of characters to accumulate from the serial port before sending them out the network port This setting will be overridden if the accumulation delay time setting is used and the delay time e...

Страница 11: ...SBL2e Dual Serial to Ethernet User s Manual Page 11 Downloaded from Elcodis com electronic components distributor ...

Страница 12: ...a RS 232 level shifter DEBUG Specifies whether or not to use the serial port as stdin stdout and stderr for serial status messages or debugging Data Port Settings If both are DEBUG defaults to Port 0 Select serial mode RS 232 or DEBUG Data Baud Rate Set serial baud rate Data bits Serial data bits Data parity Serial parity Stop bits Number of stop bits Flow control Set to None for no flow control I...

Страница 13: ... Password Settings Use the Password Settings screen to enable disable or change an existing password Only one password is allowed To clear a password leave the fields blank and click on submit Downloaded from Elcodis com electronic components distributor ...

Страница 14: ... of the SBL2e has 10 signals with multiple functions such as general purpose digital I O analog to digital conversion and serial hardware handshaking The GPIO Settings configuration screen enables you to select the functions of the multi function pins Downloaded from Elcodis com electronic components distributor ...

Страница 15: ... you have established a TCP connection to the GPIO Network Server the following commands can be used where xx is a value from 03 to 15 All commands and queries must be terminated by a line feed character 0x0A You may also terminate with a carriage return and line feed the carrage return will be ignored by the parser General Purpose I O Functions Pxx 0 Set pin output low Pxx 1 Set pin out put high ...

Страница 16: ...value followed by a and optional text to provide details on the response Any successful command will return 0 OK r n Any command error will return a negative number followed by an explanation of the error For example sending the command abcd n returns 3 Syntax Error r n Any readback query response will be the value of the readback followed by the status For example sending P07 n could return 2034 ...

Страница 17: ...x error Commands that return values will be in format status result where status is 0 success or 1 syntax error and the return value is one or more hexadecimal values depending on the command Hexadecimal values have the MSB first Return values are terminated by r n Command Summary MGxxxx GPIO Enable Set pin configuration primary function 0 or GPIO mode 1 MG GPIO Enable Query Return primary GPIO pi...

Страница 18: ...high M Query all input and output pins 0 0x5BCC Pin 15 low pin 14 high remaining pins report input value 7 4 2 Set All GPIO Pins as Inputs and Readback MG7BCC Set pin configuration to GPIO mode for all GPIO capable pins 0 Return value of 0 for success MR0000 Set GPIO pin direction to input for all pins 0 Return value of 0 for success M Read all GPIO input pin values 0 0x3BCC Return value of 0 for ...

Страница 19: ...t Command Mode AT configuration commands can only be processed when the SBL2e is in AT Command Mode To enter AT command mode 1 Pause for 1 second send no data 2 Send 3 Wait for 1 second 4 The device will respond with r nOK To exit command mode 1 Wait 30 seconds for timeout any changes will be lost 2 Send AT X or ATO to exit and discard any changes 3 Send AT P to exit and save new settings 4 Send A...

Страница 20: ...arameter parameter cr The format of an AT query is AT command cr Syntax rules All white space outside quotations is ignored All commands and queries are terminated by a carriage return cr decimal value 13 if a line feed lf follows a cr it will be ignored Downloaded from Elcodis com electronic components distributor ...

Страница 21: ... GS enable disable gpio server 0 disable 1 enable GP gpio server listen port CUR Get current active values IP MK GW DN ST Return port status for current port S0 Return port status for port 0 S1 Return port status for port 1 Return Values Connected to IP xx xx xx xx Listening on port xx UDP mode with learned send to IP Address xx xx xx xx UDP mode send to Address xx xx xx xx Idle Downloaded from El...

Страница 22: ...on 0 don t listen BR baud rate DB data bits 7 8 PR N O E none odd even ST stop bits 1 2 FL N S H none software or hardware SP listen network port number SD disconnect timeout in seconds SO override timeout in seconds CM N P R outgoing connection mode never listen mode only power up or upon received serial data CI dest ip name addr CP destination port number CD disconnect timeout in seconds CR retr...

Страница 23: ...ER0LNPE 1 cr enable packetization options PE 0 1 0 disable packetization 1 enable PN 1 128 Number of serial characters to accumulate before sending a packet PT 0 32768 Number of milliseconds since last character to wait before sending a packet A value of 0 waits forever PC hex char Sends all accumulated serial data upon receipt of the specified ASCII character The character value must be entered a...

Страница 24: ...tely upon issuing the AT command The typical sequence of events in this case are 1 Enter command mode 2 Send configuration change commands 3 Exit command mode with AT X or ATO to avoid losing any existing TCP serial connections Example AT P07 cr or AT P07M GPIO cr Pnn Where n or nn is the pin number Pn Read a GPIO or A D pin ERR if pin is not a GPIO or A D 0 1 Write GPIP pin high or low ERR if not...

Страница 25: ...mple first queries the current TCP Serial Server listening port number and then changes the current port number to 30 Once the port number change request is made the settings are saved No system restart was required 8 6 3 Configure Outgoing Network Client Connection This example changes the client connection s IP and port Once the changes are made the settings are saved No system restart was requi...

Страница 26: ...ue is immediately returned 8 6 5 Change Pin to GPIO and Set Output to High This example checks the current pin mode and finds it in a2d channel 1 The mode is then updated to GPIO and set to high OK AT P08 2248 OK AT P08M AD1 OK AT P08M GPIO OK AT P08M GPIO In 1 OK AT P08 1 OK Downloaded from Elcodis com electronic components distributor ...

Страница 27: ...ons 11 Network IP Address Configuration If you are part of an existing network and are not using DHCP you need to specify a Static IP Address and Network Mask IP Addresses are required to route packets from place to place on an Intranet Internet If you are on your own LAN there are some standard private address ranges that are commonly used Class A 10 0 0 0 to 10 255 255 255 Class B 172 16 0 0 to ...

Страница 28: ... an Serial Terminal Program such as the NetBurner MTTTY program included on the CD ROM To run this test configure your system as one of the two examples shown below The Red Ethernet cable is a cross wired cable that can be used for a direct connection without a network hub switch The Blue Ethernet cable is a standard straight through Ethernet cable that should be used if you have a network hub swi...

Страница 29: ...ing is the PC serial communication port of your host computer Click the MTTTY Connect button 5 In your command prompt window run Telnet by typing telnet 10 1 1 79 23 after the prompt and press the Enter key The 23 is the network port number of the SBL2e that is listening for incoming connections This example syntax uses the default value of 23 for SBL2e serial port 0 which is connected to the USB ...

Страница 30: ...raft 1 1 8 10 2009 Initial release 1 2 12 17 2009 Added AT command set 1 3 2 22 2010 Clarified description of packetization settings to indicate the settings only apply to the outgoing serial to Ethernet direction 1 4 5 5 2010 Added machine commands Downloaded from Elcodis com electronic components distributor ...

Отзывы: