Raspberry Pi LESSON 41: How to Send Data to the PC over WiFi or Ethernet Using UDP

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 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

ความคิดเห็น • 65

  • @paperslice
    @paperslice 8 หลายเดือนก่อน +4

    You had me at "I think computers should be polite to each other". love this channel

  • @charlotteswift
    @charlotteswift ปีที่แล้ว +3

    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?

  • @charlotteswift
    @charlotteswift ปีที่แล้ว +2

    I've actually managed to make a video (albeit a very bad one) to demonstrate my Intruder Alarm. Here's the (amended) link: th-cam.com/video/V-dVl89D5ws/w-d-xo.html

  • @DrDave327
    @DrDave327 ปีที่แล้ว +1

    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:
    th-cam.com/video/IHV6E1DCLB0/w-d-xo.html

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว +1

      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.

    • @DrDave327
      @DrDave327 ปีที่แล้ว

      @@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!!!!

    • @DrDave327
      @DrDave327 ปีที่แล้ว

      @@paulmcwhorter I found the error, Paul. It works!!!
      How is I miss that, lol.

  • @NadeemUllah-fp9cn
    @NadeemUllah-fp9cn 6 หลายเดือนก่อน

    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

  • @arguedas02
    @arguedas02 ปีที่แล้ว +2

    What a great lesson this one was, thank you Paul for all your hard work, love the river view. Both cameras view are wonderful.

  • @sahrishmemmon4409
    @sahrishmemmon4409 10 หลายเดือนก่อน

    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?

  • @stacksof40
    @stacksof40 5 หลายเดือนก่อน

    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)

  • @cadmanof50s
    @cadmanof50s 7 หลายเดือนก่อน

    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?

  • @cbrombaugh
    @cbrombaugh ปีที่แล้ว +1

    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 TH-cam. Thanks for all these most-excellent lessons, Paul.

  • @shapesofpixels
    @shapesofpixels 5 หลายเดือนก่อน

    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).

  • @aleksanderklimczyk7879
    @aleksanderklimczyk7879 ปีที่แล้ว +1

    Nice lesson. Will you be making a lesson for TCP as well or do you think that TCP will be too complex?

  • @ZakiZhang
    @ZakiZhang ปีที่แล้ว +1

    thank you very much! a very nice lesson!

  • @KellieGlasgow
    @KellieGlasgow 3 หลายเดือนก่อน

    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!!

  • @keithlohmeyer
    @keithlohmeyer ปีที่แล้ว

    Homework complete th-cam.com/video/iGNtBiSh5dE/w-d-xo.html
    Learned something new today! Thanks Paul for all you do. Merry Christmas everyone.

  • @kubilayakman6284
    @kubilayakman6284 ปีที่แล้ว

    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

  • @mattivirta
    @mattivirta ปีที่แล้ว

    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,

  • @hammadahmed3409
    @hammadahmed3409 8 หลายเดือนก่อน

    Homework: th-cam.com/video/evzQOwUuHzg/w-d-xo.htmlsi=bjVujJVbmrbO5Roc

  • @charlotteswift
    @charlotteswift ปีที่แล้ว

    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.
    th-cam.com/video/bR9RE_yWZqU/w-d-xo.html

  • @tntragan
    @tntragan ปีที่แล้ว

    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

  • @thomasludwig1054
    @thomasludwig1054 7 หลายเดือนก่อน

    Brilliant, it works!!! Really like your lessons. Both entertaining and informative . . .😎👍

  • @MatrixTheFighter
    @MatrixTheFighter ปีที่แล้ว

    Nice lesson. Is You doing some video about raspberry dtls with certifcate?

  • @gameworn1820
    @gameworn1820 ปีที่แล้ว

    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?

  • @WistrelChianti
    @WistrelChianti ปีที่แล้ว

    Useful thanks! Planning to hook this to an ahk UDP server on there the PC to display status info in the tray

  • @TheUnofficialMaker
    @TheUnofficialMaker ปีที่แล้ว

    Howdy, your West TX roots are showing. River cam is awesome.

  • @genepierson1728
    @genepierson1728 8 หลายเดือนก่อน

    This was a great lesson. I think my favortie one of the series. Worth waiting for. Thanks for this.

  • @markbooco1719
    @markbooco1719 ปีที่แล้ว

    Good starter lesson on sockets! Hope to knock out homework assignment tonight. Love the river view! Very relaxing. Hopefully, not a burden to maintain.

  • @stephenlightkep1621
    @stephenlightkep1621 ปีที่แล้ว

    Thanks Paul. Pretty cool homework assignment.

  • @noweare1
    @noweare1 ปีที่แล้ว +1

    Question: Should this be able to work for example between my RPI and my linux desktop ??

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว +1

      Yes just have python installed on the desktop machine

    • @noweare1
      @noweare1 ปีที่แล้ว

      @@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.

    • @noweare1
      @noweare1 ปีที่แล้ว

      It ended up being a restriction on my firewall which is something I have not had to mess with.

    • @stacksof40
      @stacksof40 5 หลายเดือนก่อน

      @@noweare1Thanks for following up. I have the same symptoms. I'll look into firewall angle.

  • @kevinburt3075
    @kevinburt3075 ปีที่แล้ว

    Great lesson Paul and Merry Christmas to you and your family

  • @DrDave327
    @DrDave327 ปีที่แล้ว

    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 TH-cam. It will be interesting how much this costs me, lol.

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว

      Excellent! With some adult supervision, I think a 10 year old can do this stuff. Glad you are investing in future generations.

  • @change4432
    @change4432 ปีที่แล้ว

    VNC works well, but i have problem in logging in to Putty, God bless you

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว

      Make sure SSH is enabled on your rapberry pi preferences

  • @imbalance7332
    @imbalance7332 5 หลายเดือนก่อน

    Great tutorial. Thanks! 👏

  • @dablu1988
    @dablu1988 ปีที่แล้ว

    Helped me to resolve my problem

  • @scottwait3585
    @scottwait3585 ปีที่แล้ว

    Awesome, thanks Paul!

  • @pralaymajumdar1206
    @pralaymajumdar1206 ปีที่แล้ว

    Outstanding & great lesson as always..

  • @kevinburt3075
    @kevinburt3075 ปีที่แล้ว

    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

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว

      you just need to install python on your pc, it will come with an IDE.

    • @kevinburt3075
      @kevinburt3075 ปีที่แล้ว

      @@paulmcwhorter oh I got that installed was not sure what was used on the Pc ok thank you

    • @DrDave327
      @DrDave327 ปีที่แล้ว

      Good question Kevin. I used the visual studio code program from previous lessons, without success. I will try downloading python and use its IDE.

  • @sotirigeorgas7281
    @sotirigeorgas7281 ปีที่แล้ว

    I hope that coffee is Ethiopian Yirgacheffe 😉

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว

      No, from Sipi Falls, at the top of Mount Elgon. I buy it directly from the indigenous farmers.

    • @sotirigeorgas7281
      @sotirigeorgas7281 ปีที่แล้ว

      @@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 th-cam.com/video/_N3wA2-UUuY/w-d-xo.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.

  • @homayounbirangi852
    @homayounbirangi852 ปีที่แล้ว

    Thanks, Thanks, You are the best in this.

  • @quaternion-pi
    @quaternion-pi ปีที่แล้ว

    Another most excellent tutorial, enhanced with non-trivial homework, thanks!

    • @paulmcwhorter
      @paulmcwhorter  ปีที่แล้ว

      Welcome hope you are doing well, have not heard from you in a while.

    • @danielsaenz5570
      @danielsaenz5570 ปีที่แล้ว

      Quaternion, I love your name! :)

  • @georgebibyk1122
    @georgebibyk1122 ปีที่แล้ว

    Awesome!

  • @madisonhypes5332
    @madisonhypes5332 ปีที่แล้ว

    This video rules!

  • @alldaypancakes7058
    @alldaypancakes7058 ปีที่แล้ว

    how old are you guys ??