Every time I run it, what seems wrong is that the SocketWithRXData (which is in the UDPIsGetReady function shows a value of 0x00FF which is the default in the UDP.c and UDP.h code which I don't think I'm supposed to change. My UdpSocket is static and it stays at 0x00 when I run through my program. Well, I think my code is close (I can't post it which is unfortunate.), but I think my main problem is with trying to use UDPIsGetReady(UdpSocket) function. Let me know if I need to include more details to get my questions answered. Also, I was very confused about this for a while but I think I have it setup right now: What's the difference between UdpOpen() and UdpOpenEx() ? I ended up using UdpOpenEx(). I have a specific IP address set up for the PIC and another IP address for the PC. Maybe this is redundant when I can just check on Wireshark but I was thinking Wireshark was only showing me what is being sent from one destination to another, not if it actually is being accepted by the destination.įYIs: For Hercules I am using the UDP tab. I am also trying to write a loop so that I can ensure what I send to the PIC can be read and sent back to the server just to verify that what the PC sends to the PIC (via Hercules) can actually be read and sent back. ![]() If I enter a message into Hercules to send to my PIC, this usually works but only about two times and then the PIC stops sending its pre-programmed heartbeat message altogether. Issues: Nothing starts sending until WireShark begins capturing data. ![]() ![]() The PIC is programmed to send a heartbeat every few seconds and this seems to work. What I have: Have a main.c using the microchip library and wrote a UdpServer function with a state machine to try and get the UDP comms to work. I'm trying to get the PIC to send and recieve messages. Goal: Have the Hercules server program that I'm using on my computer talk to my PIC uC. ![]() This is my first time doing this (going to a forum and trying to get a UDP communication setup to work.) I'm getting there but having some weird issues occur.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |