Ben - I modified your makefile a bit to give more warnings (-Wall and -pedantic to each build statement) and this is what I get: bash-3.2$ make gcc -o rcv receiveimagestub.c -g -Wall -pedantic receiveimagestub.c:1:1: warning: C++ style comments are not allowed in ISO C90 receiveimagestub.c:1:1: warning: (this will be reported only once per input file) In file included from receiveimagestub.c:6: wrapper3.h:1:1: warning: C++ style comments are not allowed in ISO C90 wrapper3.h:1:1: warning: (this will be reported only once per input file) In file included from receiveimagestub.c:6: wrapper3.h: In function 'receiveImage': wrapper3.h:279: warning: passing argument 6 of 'recvfrom' from incompatible pointer type wrapper3.h:235: warning: unused variable 's' wrapper3.h: In function 'receiveCommand': wrapper3.h:384: warning: ISO C90 forbids mixed declarations and code receiveimagestub.c: In function 'main': receiveimagestub.c:36: warning: ISO C90 forbids mixed declarations and code gcc -o snd sendimagestub.c -g -Wall -pedantic sendimagestub.c:1:1: warning: C++ style comments are not allowed in ISO C90 sendimagestub.c:1:1: warning: (this will be reported only once per input file) In file included from sendimagestub.c:6: wrapper3.h:1:1: warning: C++ style comments are not allowed in ISO C90 wrapper3.h:1:1: warning: (this will be reported only once per input file) In file included from sendimagestub.c:6: wrapper3.h: In function 'receiveImage': wrapper3.h:279: warning: passing argument 6 of 'recvfrom' from incompatible pointer type wrapper3.h:235: warning: unused variable 's' wrapper3.h: In function 'receiveCommand': wrapper3.h:384: warning: ISO C90 forbids mixed declarations and code gcc -o cam camerastub.c -g -Wall -pedantic camerastub.c:1:1: warning: C++ style comments are not allowed in ISO C90 camerastub.c:1:1: warning: (this will be reported only once per input file) In file included from camerastub.c:5: wrapper3.h:1:1: warning: C++ style comments are not allowed in ISO C90 wrapper3.h:1:1: warning: (this will be reported only once per input file) In file included from camerastub.c:5: wrapper3.h: In function 'receiveImage': wrapper3.h:279: warning: passing argument 6 of 'recvfrom' from incompatible pointer type wrapper3.h:235: warning: unused variable 's' wrapper3.h: In function 'receiveCommand': wrapper3.h:384: warning: ISO C90 forbids mixed declarations and code camerastub.c: In function 'main': camerastub.c:11: warning: unused variable 'command' gcc -o tmc TMCstub.c -g -Wall -pedantic TMCstub.c:1:1: warning: C++ style comments are not allowed in ISO C90 TMCstub.c:1:1: warning: (this will be reported only once per input file) In file included from TMCstub.c:5: wrapper3.h:1:1: warning: C++ style comments are not allowed in ISO C90 wrapper3.h:1:1: warning: (this will be reported only once per input file) In file included from TMCstub.c:5: wrapper3.h: In function 'receiveImage': wrapper3.h:279: warning: passing argument 6 of 'recvfrom' from incompatible pointer type wrapper3.h:235: warning: unused variable 's' wrapper3.h: In function 'receiveCommand': wrapper3.h:384: warning: ISO C90 forbids mixed declarations and code TMCstub.c: In function 'main': TMCstub.c:31: warning: format '%s' expects type 'char *', but argument 2 has type 'void *' TMCstub.c:16: warning: unused variable 'command3' TMCstub.c:15: warning: unused variable 'command2' TMCstub.c:14: warning: unused variable 'command1' TMCstub.c:11: warning: unused variable 'cam3' TMCstub.c:10: warning: unused variable 'cam2' TMCstub.c:9: warning: unused variable 'cam1' There looks to be a fair amount of warnings dealing with the pointers and types, I'll start looking through these. Hopefully it's a simple type error hidden in there somewhere that's blocking it from working properly. - Dave On Thu, Oct 30, 2008 at 4:28 PM, <bgarris@xxxxxxxxxxx> wrote: > TCP functions wanted TCPPORT as an integer, and UDP functions wanted > UDPPORT as a string, for some reason. I tried them both the same way but > was getting "trying to cast pointer as an integer" errors, etc. > > No error message is printing out, currently. Just the picture is not where > it's supposed to be. I realize the buffer is not being written to the > file, but there is nothing in the buffer, which is the problem. > > BenG > > > #define TCPPORT 3904 //port we'll be talking over data - > > TCP > > #define UDPPORT "3900" //port we'll be talking > over image - > > UDP > > > > Any reason the UDPPORT has paren's, when the TCPPORT does not? Also, I > > don't ever see you writing the buffer to the image file in the stub code. > > Don't know if either of these are the cause of your error. What error > > message prints out on the server/client? > > > > Lee > > > > -----Original Message----- > > From: 453_all-bounce@xxxxxxxxxxxxx [mailto:453_all-bounce@xxxxxxxxxxxxx] > > On > > Behalf Of bgarris@xxxxxxxxxxx > > Sent: Thursday, October 30, 2008 3:33 PM > > To: 453_all@xxxxxxxxxxxxx > > Subject: [ECE 453] API > > > > Hola, > > > > Here is my latest version of the network API. I wrote it in a UNIX > > environment, so will need to port that to windows at some point (soon), > > but > > that is not a big problem. > > > > Data transmission over TCP is fine one-way. In other words, we'll need to > > run both a server and client on both ends, eventually, so that TMC can > > send > > commands/receive data, and so cameras can receive commands/send data. > > Since we are using TCP for data and UDP for images/video, these will be > on > > different ports. > > > > Image transmission is currently not working. I feel like this is because > > of > > something incredibly stupid on my part - but I've been looking at it for > > too > > long and can't find where I'm going wrong. I'm not even sure the image > > file > > I'm testing with is being read in correctly in my stub code - take a look > > and see what you think. However, the UDP sendto() function is sending the > > correct number of bytes, so I'm not sure what's going on. > > > > I'm attaching all my stuff - the header file, stub code simulating TMC > and > > camera, and makefile. > > > > Usage: make > > > > (for data) > > [server-end]: tmc > > [camera-end]: cam > > > > (for images) > > [server-end]: rcv > > [camera-end]: snd > > > > Thanks for any input/help that will make this go faster/work!! > > > > Ben G > > > > P.S. I'll go ahead and attach the picture files I was trying to use > > > > > > > > > > >