We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I want communicate with my lpc2368 by the Ethernet port using an application whose create with visual basic. It is possible ? How ?
Thanks,
Mickael
VB knowledge may not mean too much when it comes to the LPC2368 side. A normal PC has about 10,000 times more RAM than the LPC2368 (yes - ten thousand times!), so a networked application in the LPC2368 must take this into consideration.
"A test of strength and perseverance I will succeed."
But is it worth it? If you spend 3-5 times as much time as the consultant, the total project cost will be affected, and the delivery time. It also affects the quality of the program, i.e. future maintainance costs.
This isn't a decision for you as developer, but a business decision for the company. Is it worth it to invest in your schooling, or is it better to get a well working application within a limited time frame.
Do not worry about the company everything will be done in the details. I do not know too much but my tutors c projects know very well. verrz you what he has already done with the lpc2368 you would be surprised. But he did not know too many TCP / IP and no knowledge of VB. That's why they call me. So we should get there. In addition our subcontractor is development expert and he will set the TCP / IP stack so it will surely help us in the party lpc. For the PC party I have very great knowledge in VB I will be able to make a nice application.
Best regards, Mickael
If by chance someone has already done a similar project to mine I am on your listening if you have any tips or leads.
Thank you, Mickael
Is what someone can explain what really has the TCP / IP stack ?
Thanks
I don't think anyone understand what you mean by:
"Is what someone can explain what really has the TCP / IP stack ?"
Is there a particular reason why you want to use ethernet rather than USB or plain, old RS232?
I certainly didn't!
But I thought you said your subcontractor was an "expert" - and they would sort your stack for you...?!
What really do the tcp/ip stack ?
I want to use Ethernet because there is no need for the module as serial port for example. in addition everyone has a ethernet cable and I was not on my USB lpc ...
Yes were experts and they will schedule me my stack but I understand its operation after power to put my code in C inside
A TCP/IP stack is a large block of program code that implements the networking functions. It sometimes - such as in your case - also contains the hardware mapping (driver) for the specific hardware.
Why named TCP/IP stack? TCP is a transfer protocol. IP is another transfer protocol. Stack is the name used for a specific module in a layered solution - each module forms its own layer.
The TCP/IP stack contains a long list of complex logic for (not complete list): - listening on incomming connections - connecting to other hosts - requesting translations from a host name to an IP number. - verify that received messages are addressed to your unit. - verify that received messages are not damaged. - perform resends if a message was lost or broken. - acknowledges the reception of messages. - sends ARP questions to find mappings from IP number of MAC address. - responds to ARP requests by telling your MAC address". - often supports dynamic requests for IP numbers using DHCP. - ...
It is a quite complex package, which is the reason why you don't write your own, but either buy one, or try to find any open-source stack. The disadvantage with an open-source stack is that you normally don't have anyplace where you can buy support if you get stuck. You may be able to get free support if you find someone willing to help on a forum, but the business risk is that no one is interested to help.
If you do not have a sub-contractor that has the knowledge, then it really is a good idea to buy that knowledge. It is way easier to maintain a working and well-written application, than to try to write it from scratch if you are not familiar with the problem. If you do not know what an TCP/IP stack is, then you do not have any real knowledge about network programming. You might have been able to use VB example applications to perform communication, but when you get to the embedded side, you really have to think about everything. The PC hides a lot of the problems with networking. Remember that the PC has "infinite" amounts of memory compared to the LPC2368. It also have a many times faster processor.
Most embedded TCP/IP stacks have severely limited functions for threaded operation. Most often, one single thread may perform networking. Because of the memory limitations, buffering of messages also becomes a big problem requiring your application to be cooperative.
One thing to think about:
Buy the Keil stack.
Take their example code for a web server.
Combine with your application.
Create dynamically generated pages to display state information.
Create input forms to allow input of parameters you want to change.
Then you can communicate with your unit without the need for a special PC program.
If you have advanced functions you want to implement, that isn't suitable for normal web pages, then you can still do it with a web server in the heat pump.
Just create special links that either dumps large amounts of binary data to the PC (and requires a special PC program to accept and extract the data) or create special links where you post large blocks of data or uploads full binary files.
Yes, I know that you said that you didn't need a web server, but it is an example program that will get you up and running - and it is also quite nice to be able to tell a customer:
"Use a cross-over cable and connect to 192.168.0.1."
"Tell us the message you see in your web browser. That message is the total # of running hours, the projected wear level of the internals and any detected errors."
The nice thing about a web server is that just about any user can connect and extract information. This makes it possible to get info out of the system even if the customer has not arranged an external IP for your equipment. Or a service technician can have a chance to get advance information about a problem before going to the customer.
Custom applications to communicate with hardware was something everyone used 10-20 years ago. Now, almost everyone tries to make as much actions as possible accessible through a web server. Possibly with a number of different passwords, to specify access levels. One password for the customer. Another for remote access. Another for a technician. A fourth for the factory...
... there will be no need for any VB programs!
What will the OP do then...?!
Take an early friday evening, knowing that the solution is economical for his employer, and practical for the technicians and customers and is future-proof since no VB code will break if MS makes any radical design decisions with their platform. And the client side will be available on Mac (without running Windows on it), Linux, FreeBSD, ...
Quite a number of people with custom 16-bit Windows applications had to swear a lot when their applications didn't work well on Win2k.
Most developers who have worked with embedded for a while can tell stories about crying technicians who have managed to smash their old Win95/Win98 laptop and suddenly finds themself locked out of the systems they are supposted to work with...
Sorry, but we have already studied possbilité to integrate a web server on the lpc2368 but the memory is strong enough to incorporate all the features we need. that is why we have chosen the solution to integrate all this to create an application with VB that will retrieve different variables or write in others. Everybody has Windows XP in the factory so its no problem given version of the application used for the technician "after sales service"