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
i set the ip for each PC and they can simply connect to each other via LAN cable.i think PC auto detect the connection type. i'm sure that the cable is OK.by the way what is your suggestion for connecting my pc to mcb1700 in order to control the LEDs? I couldn't use LEDSwitch.exe for control the LEDs with TCP and i faced with error.
You "think"? - don't you think that's something you need to check carefully and know for sure?!
"i'm sure that the cable is OK"
But "OK" for what, exactly?
Do you understand why a different cable might be required for connecting 2 devices directly - as opposed to via a switch/hub...?
-> 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
Andrew I think when i can run HTTPDemo with the LAN cable it indicate that my LAN cable and hardware is fine and my problem is refer to software.why you suggest to use another type of cable?
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.
Yes, that seems a fair conclusion.
But it's getting a bit confused as to what you've actually tried - I don't think you mentioned having had HTTPDemo working at the time I first asked the cable question, and it's been really hard to get an answer from you that indicated that you'd properly considered the type of cable necessary.
Yes Andrew i mentioned about working with HTTPDemo project and could run it on my board simply with LAN cable.but i think i have to write my own C# socket server because couldn't use C++ code(LEDSwitch.exe) and have problem with it
Before writing anything yourself, I would recommend that you use something like
www.simplecomtools.com/.../viewPrd.asp
to test whether there is a PC or network configuration problem.