spieglt / FlyingCarpet

Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips in close range.
GNU General Public License v3.0
3.6k stars 145 forks source link

[Feature Request] Static network option #61

Open Rihcus opened 10 months ago

Rihcus commented 10 months ago

I noitced for mac and android transfers due to limitations, you have to enter a ssid and password (which can be a bit long).

I was wondering if it would be possible for to set a static network (ssid and password don't change) for specific peers (say mac).

spieglt commented 10 months ago

Unfortunately no. The Android device has to host the hotspot since macOS doesn't let you start hotspots programmatically. And Android's startLocalOnlyHotspot method generates the SSID and password for you.

Rihcus commented 10 months ago

Unfortunately no. The Android device has to host the hotspot since macOS doesn't let you start hotspots programmatically. And Android's startLocalOnlyHotspot method generates the SSID and password for you.

Thanks for the clarification. Would it be possible to add a option to scan the qr code generated on android from Mac (say using Webcam if available)?

Alternatively would it be possible to use Bluetooth to share wireless credentials?

Edit: Here is a mac shortcut which uses apple script to auto fill in the Flying carpet mac app using the ios Step 2 ios qr code

https://www.icloud.com/shortcuts/fa4abd9a61704eb19335237529c3f570

Shortcut actions app needed for QR code scanning (its free and opensource): https://apps.apple.com/us/app/actions/id1586435171 https://github.com/sindresorhus/Actions

Edit 2:

https://github.com/spieglt/FlyingCarpet/assets/30292597/53f1ae29-8f2d-4332-9853-8d71a9ba922a

Screenshot_20240121_184235_Flying_Carpet

spieglt commented 10 months ago

Webcam, maybe? I'm not sure how complicated that is. Bluetooth is a good idea but would be a lot of work. Will keep these in mind and do some research.

agdamsbo commented 10 months ago

Hi. I have just found your app. It is really great as a completely local version of eg Snapdrop. I would really love, though if the connection between the two devices was a little smoother, like suggested above. When that is said, it has bridged the gap for me after changing from iOS to Android (/e/os). Thank you!

spieglt commented 10 months ago

I've started looking into Bluetooth and I haven't found solid reason to say it isn't possible yet, but it would be a long-term project. I'd have to write a Bluetooth server and client in:

Each one of those steps is going to be pretty involved and will be a steep learning curve as I haven't worked with Bluetooth before. After all that, I'd have to figure out how to fall back to QR code or manual entry for devices that don't have Bluetooth (or failing that, cameras). And one device can't really know if the other device has Bluetooth, so there will have to be good UI for the user to know and inform the app of whether Bluetooth is worth trying. I don't want to make Bluetooth a requirement for future versions as I imagine there are people with laptops that have WiFi but not Bluetooth. So this is likely months away if it happens.

spieglt commented 10 months ago

And thank you @agdamsbo!