Go to advanced search

by DuBBox
Tue Dec 25, 2018 6:07 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

Well thank you! The memmove mistake solved the problem! I am sorry for this, bcopy did not work on my system somehow it just did nothing at all and caused an infinite running programm, also it is recommended to replace bcopy and so on with memcopy etc. I do not exactly know why, but it is recommende...
by DuBBox
Tue Dec 25, 2018 5:42 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

Just discovered something that seems weird to me: When I set the address in the client with hp = gethostbyname("xxx.xx......"); if (hp == 0) { fprintf(stderr, "%s: unknown host", "localhost"); return 0; } memmove(hp->h_addr, &serverAddr.sin_addr, (size_t) hp->h_length); and I run server on my local ...
by DuBBox
Tue Dec 25, 2018 4:37 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

server.c /****************** SERVER CODE ****************/ #include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> int main(){ int welcomeSocket, newSocket; char buffer[10000]; struct sockaddr_in serverAddr; struct sockaddr_storage serverStorage; socklen_t addr_size; /...
by DuBBox
Tue Dec 25, 2018 3:53 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

Deactivating the firewall does not change anything. I tried it an still only "Listening" is printed on the Pi. The client executes and stops correctly after the message was send I guess? Or should the client also be "stuck"?
by DuBBox
Tue Dec 25, 2018 3:26 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

When I use the concrete IP-Addresses I can yes.

On the pi I can ping my working PC and on my working PC I can ping the pi
by DuBBox
Tue Dec 25, 2018 3:05 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

Re: TCP/IP Communication from PC to RaspberryPi

Thank you for your response! I was not able to work for on this project for the past days, but now I am back working. I changed my client code as following: /****************** CLIENT CODE ****************/ #include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #inclu...
by DuBBox
Thu Dec 20, 2018 2:47 pm
Forum: Beginners
Topic: TCP/IP Communication from PC to RaspberryPi
Replies: 15
Views: 723

TCP/IP Communication from PC to RaspberryPi

I know there are a tons of threads on TCP/IP and Socket programming. I just wonder, why my code will not work on the PI. It works when I run it locally , no problem so far. But when I try to run my server-code on the PI, there seems to be no connection happening. I am using c for this and here is my...
by DuBBox
Wed Nov 21, 2018 6:02 pm
Forum: Beginners
Topic: GPIO pulse in nanoseconds
Replies: 7
Views: 1252

Re: GPIO pulse in nanoseconds

@rzusman

That is what I thought, so the problem is not the implementation of pulse I guess?
by DuBBox
Wed Nov 21, 2018 5:21 pm
Forum: Beginners
Topic: GPIO pulse in nanoseconds
Replies: 7
Views: 1252

Re: GPIO pulse in nanoseconds

Thank you for your quick response! I took a closer look to https://github.com/lrvdijk/tlc5940-raspberry but here, I may miss something, is no sleep or something similar used. The pulse just works like pulse(){ setPinOutHigh setPinOutLow } No sleeps are used. My current implementation is not working ...
by DuBBox
Wed Nov 21, 2018 3:38 pm
Forum: Beginners
Topic: GPIO pulse in nanoseconds
Replies: 7
Views: 1252

GPIO pulse in nanoseconds

Hey, I try to interact with a TLC5940 via C. I use Rapsbian as OS and I am not sure how I can realize something like pulse(int nanoseconds){ setPinOutHigh sleep(nanoseconds) setPinOutLow sleep(nanoseconds) } The timing diagram requires for example a period of at least 3ns for some signals. So is nan...

Go to advanced search