On Wed, 18 Mar 2020 14:23:42 -0500, in gmane.comp.hardware.beagleboard.user Robert Nelson <[email protected]> wrote:
>On Wed, Mar 18, 2020 at 2:20 PM Alex Rodriguez ><[email protected]> wrote: >> >> Hi, >> >> I intend to use C for this, unless there is an easier way to do it. For my >> application, UDP will work just fine as I'm not too concerned about packet >> loss. And yes, I understand that HEX is a representation of binary data. I >> simply wanted to know if this could be done from the BBB and if so, see if >> there is a similar solution out there for new users. Thanks > >a quick google search found... > >https://wiki.python.org/moin/TcpCommunication Forgive me, but -- that's a rather dated page for Python (it's Python 2.x, for one thing, and any new work should be done with Python 3.x). I'd suggest the OP peruse the following... The basic example at https://docs.python.org/3/library/socketserver.html is more up-to-date... Also, Python has added a lot of standard library modules for network access... cf: https://docs.python.org/3/library/socketserver.html along with https://docs.python.org/3/howto/sockets.html#socket-howto For creating binary packets to send/receive https://docs.python.org/3.8/library/struct.html And a caveat: In Python 3.x, "strings" are Unicode data, not "bytes" -- they may need to be encoded/decoded using a specified encoding into a byte structure. -- Dennis L Bieber -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/alg57f51jrjvj52vm0la72j2bnqp6r2o93%404ax.com.
