Dear Sir/Madam I have a MCB1700 board and i want to control its LEDs via pc via TCP/ip.in order to do it i used LEDswitch program but i read the help and it suggests to use a specific windows application for control the LEDs via LAN cable and pc.in this case the board is a server and PC is a client. How can i find this windows application ? can i use command prompt window instead of windows application?if yes please help me how to use it. Also please give me some help for configuring my LEDswitch program codes on my board.
Thank you
-> But when i connect my Ethernet cable to mcb1700 and my laptop -> i can run HTTPDemo project on board and can simply control the board .
So, the hardware and cable is working fine.?
couldn't connect please check TCP/IP setting of your PC.
In the source of LEDSwitchDlg.cpp
static CString WSTITLE = _T("Ethernet Connection Error"); static CString WSERROR1 = _T("Failed to start Winsocket Connection.\nPlease check the settings of your network interface card!"); static CString WSERROR2 = _T("Couldn't get a socket.\nPlease check the TCP/IP settings of your PC!"); static CString WSERROR3 = _T("Couldn't connect.\nPlease check TCP/IP settings of your PC!"); static CString WSERROR4 = _T("Couldn't send complete data!");
if(connect(s,(struct sockaddr*)&sin,sizeof(sin)) == SOCKET_ERROR) { MessageBox(WSERROR3,WSTITLE, MB_OK | MB_ICONSTOP); WSACleanup(); return; }
It give you that err-msg, because connect() failed with SOCKET_ERROR. You should use C# to connect to MCB1700, and try your best.
What is the IP/MAC configured in HTTPDemo project?
John I can find these part of codes in LEDSwitch.exe but can't find when Socket_Error happend. why should i use C# ?why C++ programm doesn't work for me?Have you any C# socket app or I have to write my own C# codes? in HTTPDemo project i didn't change MAC but set the IP =192.168.2.12
Just because you yourself said that you have done this before in C#.
"why C++ programm doesn't work for me?"
That's for you to find out - you need to Debug it.