Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
Problem in LPC769 interfaced with CC3000 as a UDP server
While using module as UDP server, during transmission of data from CC3000 module the code is getting struck at the function hci_event_handler in while(1) loop. I have downloaded the driver code of CC3000+LPC1768 from mbed but the problem was same. Can any one suggest me the solution for this problem.
1 Answer
10 years, 10 months ago.
If you remove the 2 added lines shown above the mbed demo works. Just add the cc3000 ip address and correct port number into the udp client, thats all that is required.
Dave.
The IP address of UDP client is gettinf wrong if i read from the host controller. This point is discussed in the errata sheet of CC3000 module. Thats why i added those 2 lines.
posted by 25 Jan 2014Can you share that errata, or at least the part which mentions UPD client problem? So if you remove those 2 lines, what is the actual address and the one cc3000 receives? Does it work without those 2 lines?
You probably should start sharing more details with us, otherwise it's going to take us days to get details from you and more to get an answer for your problem you are having.
posted by 25 Jan 2014Lakshmi Praveen,
I do remember the quoted errata with respect to UDP and I thought it had been implemented. The UDP example "as is" from Martin works correctly on my mbed LPC1768, if the correct port number is used from the UDP client. Using an LPC1769 should not be a problem as it is only a faster core, but I guess anything is possible. Can you please post a link to the errata where it requests using the 2 extra lines as you have shown, so that we may investigate further. I do have an expresso LPC1769 which I can use just to make sure it works correctly.
Dave.
posted by 25 Jan 2014I came across 2 problems while implemeting the UDP server.
1.The IP and Port Number of the remote host obtained after calling recvfrom function.
After calling recvfrom function i got the IP 112.4.0.16 and port number 0x6677 But the actual IP and port numbers what i should receive is 192.168.1.138 ,1500 I found something in the errta sheet which i shared now, i manually entered the port and IP address of the remote host. After this thing the issue is solved.
2.After calling Sendto function the code is struck at hci_event_handler() function waiting for the response from the CC3000 module. I checked in this way. After calling Sendto function,the header is successfully sent to the module and module also responded well. After that agian the controller(LPC1768) sent the data, and the module responded but the control is going to unsolicited_event_handler() function. After that there is nothing from the Module. But the controller is looking for the response from the module and it is waiting in the hci_event_handler() routine. What i did is i just removed the function _event.simplelink_wait_event() fucnction in the simple_link_send() function in socket.cpp file. Now the controller is not looking for the response from the module. Now there is no issue. What i did is correct or wrong? Did i miss any thing. Please tell if you want any other information.
/media/uploads/lakshmipraveen/errat_for_cc3000.pdf
Lakshmi Praveen
posted by 26 Jan 2014I run this demo the UDP server demo I have in my code repository here, run this script, http://mbed.org/handbook/Socket#udp-echo-server, Hello world is printed with the proper address of the client. Sent like 10x Hello World. Does also this script lead to the same problem you are having?
Is this the newest errata? Because they refer to fixes in 1.11 which was already released as I recall. However, which point there is errata for your recfrom function? I can't find it there. What script/application you run on the client's side?
If you report an issue, provide a relevant information. So far we don't know how can we replicate the issue you are seeing. Might be your network issue? Please run the script I shared above, report back if the ip address is displayed correctly and Hello world is printed on your terminal. I can share my screen if you need a proof.
Regards, 0xc0170
posted by 26 Jan 2014
Hello Lakshmi Praveen,
to replicate this issue, does this happen as well with this demo and the script shared there : http://mbed.org/handbook/Socket#udp-echo-server ?? I am currently without cc3000 board, will test in the couple of days, once I get back.
I read the issue,but it lacks details. Please add there or just here more information, the code you are running, what's the client executing. Thanks.
Regards,
posted by Martin Kojtal 24 Jan 20140xc0170
Lakshmi, Please post your main() using code tags, then maybe we can see the problem.
EDIT: It is assumed that you mean LPC1769 and not LPC769, as I don't think the LPC769 is capable of running the software.
Dave.
posted by David Fletcher 24 Jan 2014Hi, I'm trying to develop a UDP server with LPC1769+cc3000 I have taken the same code which you shared. I have tested with the code and the issue is same what i told you. Here after executing the function sendto the code is get struck at hci_event_handler() function in while(1) loop. I'm attaching the main loop code also
/media/uploads/lakshmipraveen/main.cpp
Lakshmi Praveen
posted by Lakshmi Praveen 24 Jan 2014Why did you added these 2 lines there :
And what code do you run at the other side? Any script?
posted by Martin Kojtal 24 Jan 2014I have had a look using the mbed LPC1768 the demo works but you need to use the same port number as the server, not 0xDC05 but 1500 or hex 0x5DC. There is also no need for a client IP address as in your second added line. Just enter the cc3000 Ip address and port number into the upd client, and it works. Your 2 added lines are not required.
Dave.
posted by David Fletcher 24 Jan 2014Otherside i'm using a local tool developed in delphi. The IP what we are getting while reception of data is incorrect. It is there in the errata of cc3000 module Thats why i included those two lines
posted by Lakshmi Praveen 25 Jan 2014Hi, I tried in this way. I just removed SimpleLinkWaitEvent() function in simple_link_send() function. Now the module is working fine It was able to receive the data and transmit the data. Previously it waiting for the response from CC3000 module after sendto command executed.
posted by Lakshmi Praveen 25 Jan 2014May be we should know what is the response from the CC3000 module for sendto function.
posted by Lakshmi Praveen 25 Jan 2014