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
"yes. Also i used another cable but the problem wasn't solve"
Yes to what?
Perhaps you work with someone who has more Windows/IT/Networking experience? The guys with those Microsoft Certs rather than real engineering degrees.
Two PC/laptops connected through a switch would at least demonstrate network functioning, at the moment you have the system complaining TCP/IP networking doesn't work, and I haven't seen a IPCONFIG output suggesting otherwise.
I've got dozens of "other" ethernet cables, they are mostly all straight through as that's what people typically make/buy, I've got another box of "special" cross-over cables that do something else.
Is the cable correctly wired for that? i said yes to your question. i connect my LAN cable to two PCs and the communication was stablished then i disconnected it from PCs and connected it to mcb1700 and my laptop but LEDswitch.exe couldn't work and show me prior error.
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 .Can you describe more about your own cross-over cable?
"Couldn't connect. Please check the TCP/IP setting of your PC"
But you've got source code for both ends of the transaction, can't you refine your understanding of the problem a little bit better? What errors/failures on the PC side would cause it to throw the error? Can you replicate that with WINSOCK based code that performs the equivalent function?
" i said yes to your question"
Well, you made a post that started with the word "yes" - but you didn't indicate what specific question it was in reply to!
" i connect my LAN cable to two PCs and the communication was stablished"
But do your PCs auto-detect the connection type...?
So why not use one of them to try to connect to the MCB1700 - and see what result you get?
Again, if you're familiar with this stuff you should be able to think of tools and techniques for debugging this kind of problem. What have you tried?
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.
Yes Pier i have LEDSwitch.exe C++ source code but it makes me complicated.I familiar with C# and can simply write a client server socket program with it but when i debug LEDSwitch.exe unfortunately can't find the problem.I haven't got any winsock app.Can you give me an application that i can test the TCP connection between PC and mcb1700?
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?
Andrew I haven't use my own C# socket server program with mcb1700 so far.I should check it
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.