Want to write a python code for sending and receiving frames over wifi/wlan0 using python

Grant Edwards grant.b.edwards at gmail.com
Thu Oct 12 11:12:55 EDT 2017


On 2017-10-12, Chris Angelico <rosuav at gmail.com> wrote:
> On Thu, Oct 12, 2017 at 7:08 PM, T Obulesu <obulesu.t at gmail.com> wrote:
>> Hello all, I want to send some frames defined by me{Example, [0x45,0x43,0x32]} to the raspberry pi from any macine(Desktop/Laptop/other raspberry pi). But I want to send those frames over wifi or use wlan0 using python Any suggestions?
>> --
>
> Since you use the word "frame", I'm thinking you possibly mean at a
> very low level, and not packaged up into UDP/IP packets. I'm curious
> as to why you'd need that; for most purposes, the easiest way would be
> either TCP or UDP. But sending raw packets is entirely possible in
> Python - though you have to bear in mind that many OSes restrict this
> capability to administrative programs.

Under Linux, theres a network capability that can be enabled for a
program to allow raw packet access w/o having to be root.  However,
it's not very useful for Python apps, since that capability would have
to be set for the Python interpreter executable (e.g. /usr/bin/python).

I avoid Windows as much as possible, but in recent years, colleagues
who do work with Windows have had to convert all of our applicatoins
which used to use raw packets to use UDP instead.  I'm told that
recent windows versions have made raw packet access from userspace
(even by admin apps) virtually impossible.

-- 
Grant Edwards               grant.b.edwards        Yow! Hello?  Enema Bondage?
                                  at               I'm calling because I want
                              gmail.com            to be happy, I guess ...




More information about the Python-list mailing list