Raspberry Pi LESSON 41: How to Send Data to the PC over WiFi or Ethernet Using UDP
Вставка
- Опубліковано 7 жов 2024
- Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!
In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)
amzn.to/3tSk9Mo
or for our UK friends, amzn.to/3I5d401
In this video lesson I will show you how to exchange data between the Raspberry Pi and your PC over ethernet or wifi using UDP. This will work for devices connected to the same home network. This allows a simple way to control the raspberry pi remotely, and to set up a simple client server relationship.
If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:
amzn.to/36NyfHq
If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):
amzn.to/3v13Mhl
You guys get your hardware ordered so you can follow along at home!
You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:
amzn.to/3pBMfKm
The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:
amzn.to/3KcXTn2
I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.
amzn.to/36Rv9Sk
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
/ paulmcwhorter
[Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
#UDP
#CLIENTSERVER
#RASPBERRYPI - Наука та технологія
You had me at "I think computers should be polite to each other". love this channel
I AM LEGEND! I am back in North Carolina after 2 months of Florida sunshine. I bought the Pico W kit there and kept up with the Pico lessons, but could not take my Pi 4. I am excited about wireless networking on both platforms! I still have not taken the bold step of learning to post my homework on UA-cam. Thanks for all these most-excellent lessons, Paul.
Thank you so much for this tutorial! I have been having issues with various network communication protocols and could never get any of them to work until now. Loved how you managed to simplify some complex ideas in simple, digestible terms.
And I agree, Paul. Nothing is better than black iced coffee while I'm working with my Raspberry Pi!!
What a great lesson this one was, thank you Paul for all your hard work, love the river view. Both cameras view are wonderful.
Good starter lesson on sockets! Hope to knock out homework assignment tonight. Love the river view! Very relaxing. Hopefully, not a burden to maintain.
Useful thanks! Planning to hook this to an ahk UDP server on there the PC to display status info in the tray
Jolly good lesson, Paul. All this is new to me although I did a project at university using Corba and Java. All details are now lost in the mists of time.
Obviously the classic view camera is better because we can see boats, fishermen and island boy and girl. I did like the view with the cow as well. #WHERE'STHECOW?
This was a great lesson. I think my favortie one of the series. Worth waiting for. Thanks for this.
Brilliant, it works!!! Really like your lessons. Both entertaining and informative . . .😎👍
thank you very much! a very nice lesson!
Howdy, your West TX roots are showing. River cam is awesome.
Thanks Paul. Pretty cool homework assignment.
Great tutorial. Thanks! 👏
Great lesson. Thanks for the knowledge you are sharing. I prefer the close up of the river. I really enjoy watching the fishermen. The other cam is a little far away to see the river. The close up, however is a bit obscured by the Palm tree. If it could be on the other side of the tree it would be perfect. Both of the cams have beautiful scenery though.
Tom
Outstanding & great lesson as always..
Another most excellent tutorial, enhanced with non-trivial homework, thanks!
Welcome hope you are doing well, have not heard from you in a while.
Quaternion, I love your name! :)
Helped me to resolve my problem
Great lesson Paul and Merry Christmas to you and your family
Awesome, thanks Paul!
Thanks, Thanks, You are the best in this.
Wow, thanks
Thanks for the knowledge you are sharing. Great lesson as always. Will you be making a lesson for Modbus RTU ? PLEASE MAKE A VIDEO FOR MODBUS RTU , I NEED YOUR HELP PAUL
Another great lesson, Paul! I haven’t finished the homework yet, but have recruited my 10 Yr old granddaughter to join the community over the Christmas celebration. She seems interested in taking your RPi Pico W course. I am giving her a financial incentive to do the homework on time to UA-cam. It will be interesting how much this costs me, lol.
Excellent! With some adult supervision, I think a 10 year old can do this stuff. Glad you are investing in future generations.
Nice lesson. Is You doing some video about raspberry dtls with certifcate?
This video rules!
Thanks!
Hi Paul, thank you for putting on these great lessons. I do have a question, What app did you use when you started programing the PC client?
Nice lesson. Will you be making a lesson for TCP as well or do you think that TCP will be too complex?
Hi: Paul McWhorter,
Thank you, it was a good experience when I was connecting and exchanging data with RPi through WLAN and PC (Laptop) with WLAN also.
But when I connect my RPi to the GSM module it cannot send message to the PC and hangs up...
Do we need Port-Forwarding here?
If yes then how we can do Port-Forwarding in the case RPi is connected to GSM module as server and PC as Client?
make a brief tutorial on it please
Awesome!
Hi Paul Your lessons are terrific as usual. There is one thing that I am missing. When you write the client software, you say you are switching over to the PC side. What software are you typing the client code on?
I'm new but I would have thought that Paul's 'client' code would have required a 'bind' statement too? I'm attempting to debug why I received no response on the client side after sending message to server (pi)
Hi Paul, I want to know either this is good approcah if I want my PC to do image processing .I want pi to send live streaming to computer ,computer do processing and send back the result such as pan tilt movement or some output on GPIOs. UDP is good for such application?
How would one go about sending data from the pi 5 to a quest 2 over bluetooth. Without using an internet connection(if that's even possible).
VNC works well, but i have problem in logging in to Putty, God bless you
Make sure SSH is enabled on your rapberry pi preferences
Question: Should this be able to work for example between my RPI and my linux desktop ??
Yes just have python installed on the desktop machine
@@paulmcwhorter The server is not receiving anything from client. I used the netcat commands to communicate between between both computers successfully using udp . Will let y'all know when i figure it out.
It ended up being a restriction on my firewall which is something I have not had to mess with.
@@noweare1Thanks for following up. I have the same symptoms. I'll look into firewall angle.
Just finished the lesson Paul I got Thorney on the raspberry pi but what software do I need on the PC please. Many thanks for your help
you just need to install python on your pc, it will come with an IDE.
@@paulmcwhorter oh I got that installed was not sure what was used on the Pc ok thank you
Good question Kevin. I used the visual studio code program from previous lessons, without success. I will try downloading python and use its IDE.
fantastic serie learn raspberry pi, i like, but need understand how imske PREEM RT raspberry pi linuxcnc too hard understand all how make,lot need know but no understand. what distro need different CPU, how install,how clean raspberry no other have, what max jitter have and what need do, how make jitter down smallesta..etc,etc,
I hope that coffee is Ethiopian Yirgacheffe 😉
No, from Sipi Falls, at the top of Mount Elgon. I buy it directly from the indigenous farmers.
@@paulmcwhorter
Lucky you. Uganda has great coffee as well. I’m always on the look out for a good African washed. I’m putting together a fluid bed roaster based on Jan & Tije’s ua-cam.com/video/_N3wA2-UUuY/v-deo.html using TC4 arduino & raspberry pi, so I’ve been following a few of your videos as I have absolutely zero knowledge and need all the help I can get. Greetings from Australia.
I've actually managed to make a video (albeit a very bad one) to demonstrate my Intruder Alarm. Here's the (amended) link: ua-cam.com/video/V-dVl89D5ws/v-deo.html
Homework complete ua-cam.com/video/iGNtBiSh5dE/v-deo.html
Learned something new today! Thanks Paul for all you do. Merry Christmas everyone.
I wonder if anyone can help me with this unexpected behavior that I am getting:
This video is showing a problem I am having with my UDP Client server, if anyone can tell me why am I getting that annoying 'b' character getting sent to the server, which, I believe, messes with the if statements:
ua-cam.com/video/IHV6E1DCLB0/v-deo.html
You have an error in your code on the server side. I see it, but you need to find it. the b means your message is still in byte encoding. Look at your code, you should find your mistake.
@@paulmcwhorter I haven’t looked at it yet, because it late here, but I might have written encode instead of decode. I will check tomorrow. Thank you!!!!
@@paulmcwhorter I found the error, Paul. It works!!!
How is I miss that, lol.
Homework: ua-cam.com/video/evzQOwUuHzg/v-deo.htmlsi=bjVujJVbmrbO5Roc
Here is my solution. I never know whether to leave a comment on the lesson which sets the homework or on the solution, so I've done both.
ua-cam.com/video/bR9RE_yWZqU/v-deo.html
how old are you guys ??