background image

User Manual

Advantech 

Advanced LAN Bypass

Summary of Contents for LAN Bypass

Page 1: ...User Manual Advantech Advanced LAN Bypass...

Page 2: ...f Advantech s high quality control standards and rigorous testing most of our customers never need to use our repair service If an Advantech product is defec tive it will be repaired or replaced at no...

Page 3: ...may cause harmful interference to radio communications Opera tion of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct th...

Page 4: ...Advanced LAN Bypass User Manual iv...

Page 5: ...og Trigger Mechanism 11 2 6 Bypass Master Slave Mode with Button and LED Control 12 2 6 1 Master Segment 12 2 6 2 Master Slave Mode LED 12 2 6 3 Master Slave Mode Button 12 2 7 LED Indication 13 Table...

Page 6: ...gle 31 3 7 6 LBP FW Upgrade 31 Table 3 24 API function lbp_check_upgrade_image Error Codes 31 Table 3 25 API function lbp_get_fw_mode Error Codes 31 Table 3 26 API Function lbp_upgrade_fw Error Codes...

Page 7: ...t BYPASS Action for the POWER_OFF Event on Segment 1 46 4 8 lbpcu SW 47 Figure 4 12Usage of the lbpcu SW Command 47 Figure 4 13Set the WDT Timeout to 100 s on Segment 1 47 4 9 lbpcu GW 47 Figure 4 14U...

Page 8: ...the LED ON OFF Settings for a BYPASS Action on Segment 1 59 4 29 lbpcu GBL 60 Figure 4 45Get the LED ON OFF Settings for a BYPASS Action on Segment 1 60 4 30 lbpcu SDL 60 Figure 4 46Set the LED ON OF...

Page 9: ...nts 65 4 41 lbpcu CBTEST 66 Figure 4 59Enable the Event Change Detect Thread 66 4 42 lbpcu i 67 Figure 4 60Get all Info of a Segment 68 Appendix A OS limitation 69 A 1 OS limitation 70 A 1 1 Segmentat...

Page 10: ...Advanced LAN Bypass User Manual x...

Page 11: ...Chapter 1 1 ADVANCED LAN BYPASS...

Page 12: ...03 01 20 01 20 01 22 00 08 Table 1 2 Terminology Term Description Action A specific action that the Advanced LAN Bypass mechanism should take for a specific event API Application programming interface...

Page 13: ...can either connect to their associated NICs be dis connected from their associated NICs or be switched to bypass mode where both of the physical LAN ports connect directly to each other isolating them...

Page 14: ...Advanced LAN Bypass User Manual 4...

Page 15: ...Chapter 2 2 OVERVIEW...

Page 16: ...ndependently instead of using a single global control method In this case each application or instance only accesses the local NIC s and LAN Bypass MCU s This eliminates shared resources which would c...

Page 17: ...NGE Means that the state will not be changed when the specified event occurs i e network connectivity will remain as is Figure 2 1 Bypass Actions and Related Port Connectivity The default action setti...

Page 18: ...ion SW is running and strobing the WDT Does not allow any traffic through the unit or bypassing the unit in any other sit uation Master Slave mode is disabled Table 2 2 Mapping between Events and Acti...

Page 19: ...od can be set between 100 ms and 6553 5 s approximately 109 min Several WDT modes are supported In addition to the standard WDT mode Advanced LAN Bypass also supports an additional feature called togg...

Page 20: ...pin initiated through the lbp_start_wdt_by_toggle API call to start the WDT In normal operation the WDT will be disarmed when it expires and needs to be re armed by the host SW For use cases where man...

Page 21: ...the external trigger event action and remain in this state until another event occurs or until a manual action is received via an API In level trigger mode a low level hardware signal will trigger an...

Page 22: ...an use the Master Slave Mode button to trigger Button Event_1 and Button Event_2 on all segments and to check what action is taken on the system as indi cated by the Master Slave Mode LED Master slave...

Page 23: ...ct is based on the specific MCU that controls the segment This means that if two segments are con trolled by the same MCU then the blinking frequency setting will be shared by the two segments Duty ca...

Page 24: ...ONF_FILE_FORMAT Configuration file format error please check the configuration file 0x82 LBP_ERR_CONF_GET_PCI_DEVIC E Cannot retrieve the PCI device ID def inition from the configuration file please c...

Page 25: ...RR_PARAM_NULL_POINTER Null pointer parameter is specified please check the API call for correct ness 0x95 LBP_ERR_LBP_INIT LBP initialization check error the LBP library needs to be initialized first...

Page 26: ...Advanced LAN Bypass User Manual 16...

Page 27: ...Chapter 3 3 LIBLBPCU ADVANCED LAN BYPASS LIBRARY...

Page 28: ...or multiple segment definitions Using different configuration files for different segments allows for the use of parallel library instances e g individual applications or application instances contro...

Page 29: ...FAs 03 00 0 and 03 00 1 The control port messaging interface is 03 00 0 so the parameters for this segment in the configuration file would be BUS 3 DEV 0 FUN 0 An NMC has one quad port NIC with PFAs 0...

Page 30: ...of error codes can be found in Section 2 8 Events cf Section 2 3 define DEFAULT 0 define POWER_ON 1 define POWER_OFF 2 define POWER_RST 3 define WATCHDOG_START 4 define WATCHDOG_TIMEOUT 5 define EXTER...

Page 31: ..._timeout x x 0x06 0x06 Macros for MCU FW upgrade mode Those macros are used to check firmware upgrade status and the returned value to each macro is either TRUE or FALSE define lbp_is_in_ap x x 0x10 0...

Page 32: ...01 lbp_get_action 3 7 3 1 00 04 00 04 00 01 lbp_set_action 3 7 3 2 00 04 00 04 00 01 lbp_set_wdt_counter 3 7 4 1 00 04 00 04 00 01 lbp_get_wdt_status 3 7 4 2 00 04 00 04 00 02 lbp_set_reset_start_wdt...

Page 33: ...e called before executing any other function on the specific LAN bypass segment Returns 0 on success or the following error codes in the case of an error lbp_set_bypass_ctrl_typ e 3 7 9 1 00 10 00 08...

Page 34: ...ent of an error 3 7 2 3 lbp_err lbp_get_fw_version unsigned char major unsigned char minor Returns the FW version of the LAN Bypass MCU Refer to the release notes for more information on MCU FW versio...

Page 35: ...n the event of an error 3 7 2 5 lbp_err lbp_get_bl_fw_version int segment unsigned char major unsigned char minor Returns the bootloader version of the LAN Bypass MCU FW Returns 0 on success or the fo...

Page 36: ...2 define POWER_RST 3 define WATCHDOG_START 4 define WATCHDOG_TIMEOUT 5 define EXTERNAL_TRIGGER 6 define MANUAL 7 define BUTTON_EVENT_1 8 define BUTTON_EVENT_2 9 Table 3 10 API Function lbp_get_action...

Page 37: ...manually without affecting any event action definitions The Do not change action is not supported in this function Action Returns 0 on success or the following error codes in the event of an error Tab...

Page 38: ...on success or the following error codes in the event of an error 3 7 4 3 lbp_err lbp_reset_start_wdt int segment Resets the WDT counter to the initial countdown value see Section 3 7 4 1 and starts t...

Page 39: ...tting is non volatile and will be stored locally in EEPROM Table 3 17 API Function lbp_stop_wdt Error Codes Name Error Code LBP_ERR_INTERFACE_OPEN 0x89 LBP_ERR_FW_NRDY 0x8A LBP_ERR_FW_CS 0x8B LBP_ERR_...

Page 40: ...0x89 LBP_ERR_FW_NRDY 0x8A LBP_ERR_FW_CS 0x8B LBP_ERR_PARAM_OUT_OF_BOUND 0x93 LBP_ERR_PARAM_NULL_POINTER 0x94 LBP_ERR_LBP_INIT 0x95 Table 3 21 Parameter toggle_mode Error Codes Parameter toggle_mode B...

Page 41: ...ror 3 7 6 2 lbp_err lbp_get_fw_mode int segment int mode Returns the current FW upgrade status This function is intended for debugging purposes during FW upgrade Returns 0 on success or the following...

Page 42: ...the defined action for a POWER RESET event However it may cause unexpected and undesirable behavior For example when the system is powered on the last event should be POWER ON when the system boots M...

Page 43: ...p the reset during sys tem bootup 3 7 7 1 lbp_err lbp_start_reset_monitoring int segment Forces LAB Bypass MCU to start monitoring reset signal immediately Refer to Section 3 7 7 for more information...

Page 44: ...N A reserved for future use Bit 2 1 01b Reset signal monitoring is started by BIOS Bit 2 1 10b Reset signal monitoring is started by LBPCU Bit 2 1 11b Reset monitoring timer timeout Macros for Reset M...

Page 45: ...ass control type The macros are defined as Returns 0 on success or the following error codes in the event of an error Table 3 31 API Function lbp_get_rmt_status Error Codes Name Error Code LBP_ERR_INT...

Page 46: ...in the event of an error Bypass control type define COPPER_BP_TYPE 0xFF define FIBER_BP_TYPE 0x00 Table 3 34 API Function lbp_get_bypass_ctrl_type Error Codes Name Error Code LBP_ERR_INTERFACE_OPEN 0x...

Page 47: ...ttings are defined as follows Returns 0 on success or the following error codes in the event of an error Table 3 38 API Function lbp_get_bypass_led Error Codes Name Error Code LBP_ERR_INTERFACE_OPEN 0...

Page 48: ...owing error codes in the event of an error Table 3 42 API Function lbp_get_disconnect_led Error Codes Name Error Code LBP_ERR_INTERFACE_OPEN 0x89 LBP_ERR_FW_NRDY 0x8A LBP_ERR_FW_CS 0x8B LBP_ERR_PARAM_...

Page 49: ...int m_led_duty int m_led_period_100ms Gets the master LED s ON duty cycle and the total ON OFF period of LED indication for CONNECT DISCONNECT and BYPASS actions Returns 0 on success or the following...

Page 50: ...d between two scanning operation The parameter is a structure in liblbpcu h Returns 0 on success or 1 in the event of an error 3 7 12 2 lbp_err lbp_scan_event_detach Stops and detaches the scan event...

Page 51: ...Chapter 4 4 LBPCU...

Page 52: ...ys requires a configuration file named lbpcu cfg in the local directory Note If the command needs input segment then you could use a to tell lbpcu runs this command on all segments SMSM command doesn...

Page 53: ...C to strobe reset the WDT for all segments Tog gle pin WDT mode needs to be enabled armed GLEA Get last event and last action on this segment SCA Set the action on this segment This command will chang...

Page 54: ...he protocol version of the MCU FW on Segment 1 Figure 4 6 Retrieve the Protocol Versions on Segment 1 root localhost lbpcu V LBPCU version 01 20 liblbpcu version 01 18 LBPCU protocol version 00 08 roo...

Page 55: ...n the Current Action for the POWER_OFF Event on Segment 1 root localhost lbpcu n Segment number in conf file 2 Seg 1 5e 00 0 Seg 2 5e 00 2 root localhost lbpcu GA Example Current POWER_OFF event actio...

Page 56: ...ost lbpcu SA Example Set segment_1 as BYPASS action for POWER_OFF event So use SA 1 POWER_OFF BYPASS will set BYPASS action for POWER_OFF event on segment_1 Command Set Action Syntax SA segment event...

Page 57: ...onds 100ms count So use SW 1 1000 will set segment_1 Watch_Dog_Timer 100 seconds Command Set Watch_Dog_Timer Syntax SW segment countdown value 100ms count Output N A Error LBP_ERR_PARAM_OUT_OF_BOUND 0...

Page 58: ...rt WDT on Segment 1 root localhost lbpcu GW 1 Watchdog Timer Is Stopped External WDT pin status active slave mode Toggle pin WDT mode active Toggle pin arm status armed Toggle pin auto rearm disabled...

Page 59: ...ommand Stop WDT Syntax StopW segment Output N A Error LBP_ERR_PARAM_OUT_OF_BOUND 0x93 root localhost lbpcu StopW 1 root localhost root localhost lbpcu ST Example enable Toggle pin arm Toggle pin not a...

Page 60: ...t_1 External watchdog mode as MASTER_EDGE So use SEW 1 MASER_EDGE will set external watchdog as MASTER_EDGE mode Command Set External watchdog mode Syntax SEW segment mode mode DISABLE SLAVE MASTER_ED...

Page 61: ...nt 1 Figure 4 25 Get the Last Event and Last Action on Segment 1 root localhost lbpcu WT Example Toggle the NIC to strobe reset the WDT on segment_1 So use WT 1 will Toggle the NIC on segment_1 Comman...

Page 62: ...bin Figure 4 29 Check Upgraded FW Image File root localhost lbpcu SCA Example Set BYPASS action on segment_1 So use SCA 1 BYPASS will change segment_1 s action to BYPASS immediately Command Set curre...

Page 63: ...cess commenced Figure 4 33 MCU FW Upgrade Process Commenced 4 19 lbpcu UG Upgrades the LAN Bypass MCU FW on a specified segment cf Section 3 7 6 3 Figure 4 34 Usage of the lbpcu UG Command root localh...

Page 64: ...lbp_fw_RU_01_20 bin FW downloading This process will take 1 2 minutes FW upgrade completed root localhost lbpcu SRM Example Start rst monitoring by segment_1 So use SRM 1 will start rst monitoring by...

Page 65: ...alue to 100 sec onds 100ms count So use SRMT 1 1000 will set segment_1 Reset_Monitoring_Timer 100seconds Command Set Reset_Monitoring_Timer value Syntax SRMT segment countdown value 100ms count Output...

Page 66: ...4 25 lbpcu ML Sets the debug message output level of LBPCU cf Section 3 7 8 1 Example root localhost lbpcu SWT Example Start wdt by toggle on segment_1 So use SWT 1 will send a spcific Toggle signal...

Page 67: ...t be executed independently This command should be added after other commands Example lbpcu VF 1 ML 2 Error LBP_ERR_PARAM_OUT_OF_BOUND 0x93 root localhost lbpcu VF 1 ML 2 check_conf 1 file data outpu...

Page 68: ...wdten 0 conf 2 seg0_req_data 0 conf 2 seg0_global_wdt_data 0 conf 2 seg0_req_iodir 0 conf 2 seg0_global_wdt_iodir 0 conf 2 CTRL_offset 0 conf 2 CTRL_EXT_offset 0 conf 2 FLA_offset 1c ID 15228086 found...

Page 69: ...s control type is copper on segment_1 So use GBCT 1 will get copper bypass control type Command Get bypass control type Syntax GBCT segment Output Bypass control type Error LBP_ERR_PARAM_OUT_OF_BOUND...

Page 70: ...od are 50 and 500ms for bypass led indication on segment_1 So use GBL 1 will get value of duty and period Command Get duty and period for bypass led indication Syntax GBL segment Output duty and perio...

Page 71: ...ty and period are 50 and 500ms for bypass led indication on segment_1 So use GBL 1 will get value of duty and period Command Get duty and period for bypass led indication Syntax GBL segment Output dut...

Page 72: ...the specific config Example Get the master slave mode and the specific config of the segment 1 Example command lbpcu GMSM 1 Error LBP_ERR_PARAM_OUT_OF_BOUND 0x93 root localhost lbpcu GMSM 1 Master Sl...

Page 73: ...r Slave Mode LED to the corresponding actions Synatx GML the master segment action action CONNECT DISCONNECT BYPASS Output The duty cycle and the period of the Master Slave Mode LED to the correspondi...

Page 74: ...Example Stop the Watch_Dog_Timer of all segments So use StopAW will stop WDT counting on all segments Command Stop WDT Syntax StopAW Output N A Error LBP_ERR_PARAM_OUT_OF_BOUND 0x93 root localhost lbp...

Page 75: ...gments 1 and 2 Figure 4 58 Set the Manual BYPASS Action on All Segments root localhost lbpcu WAT E Example Toggle the NIC to strobe reset the WDT on all seg ments So use WAT will Toggle the NIC on all...

Page 76: ...ot localhost lbpcu RAW root localhost lbpcu CBTEST scan event thread id b87a1700 seg 1 last event WATCHDOG_START seg 1 last action BYPASS seg 2 last event WATCHDOG_START seg 2 last action BYPASS seg 1...

Page 77: ...01 20 Bootloader firmware version 01 16 protocol version lib 00 08 fw 00 08 Bypass control type COPPER last event WATCHDOG_TIMEOUT last action CONNECT Master Slave Mode MASTER_MODE Master Slave Speci...

Page 78: ...WDT pin status inactive Toggle pin WDT mode active Toggle pin arm status armed Toggle pin auto rearm enabled Toggle pin status at start up enabled Initial Countdown 10 0 sec Current Countdown 0 0 sec...

Page 79: ...Appendix A A OS limitation...

Page 80: ...INUX GRUB_CMDLINE_LINUX console ttyS0 115200 iomem relaxed Run update grub Reboot Table A 1 Linux Distribution Compatibility Linux distribution Compatibility Ubuntu Works OK CentOS Works OK Debian Seg...

Page 81: ...71 Advanced LAN Bypass User Manual Appendix A OS limitation...

Page 82: ...tions are subject to change without notice No part of this publication may be reproduced in any form or by any means electronic photocopying recording or otherwise without prior written permis sion of...

Reviews: