Hey, I’m having a heck of a time. I want to write...
# server
m
Hey, I’m having a heck of a time. I want to write a Kotlin command line app (for Linux) that makes a machine with a wifi card into a wifi direct group owner, then listens on a particular port on the wifi direct interface for incoming socket connections. Does anyone have a non-Android example in Kotlin or Java that makes a machine a wifi direct group owner then uses
ServerSocket
or similar to listen on a particular port for wifi direct group members to connect to?
e
I think it would depend on what is being used to manage the configuration of the wifi interface (wpa_supplicant, network manager etc)
m
Let’s say we’re on a Raspberry Pi running Ubuntu. We’ve been toying with
wpa_cli
, but need a programmatic way to set this up. Would you suggest using the native libraries underlying
wpa_cli
?
e
I think that is the approach I would take
Just had a quick look and there doesn't seem to be anything out there that does this already
m
Ok, we’ll start by just shelling out & calling
wpa_cli
to begin with, then look at calling from whatever we write our server in (JavaScript, Kotlin, etc) into the native library/libraries…. I’m getting the inkling that we may just be able to edit
/etc/wpa_supplicant.conf
programatically…
👍 1