WIFI Transmo: WI-FI Peer to Peer Text, File transfer with Live audio transmitting

:watermelon: Download extension 】:file_folder: GitHub

🧩 WIFI Transfer

An extension to transfer data from one device to another using WIFI: Peer to peer or
WIFI direct
connection.


Extension version: 1.0 Transmo

Thanks to all beta-testers for helping with suggestions, bugs and improvement of the extension, and even @Vknow360 for helping me!

Use the extension for FREE and should NOT be republished until it's necessary.


πŸ€ Documentation


This block is used to know when the device is successfully connected to another peer. isHost returns the condition true if the device is owner of the WIFI connection.


state

When the connection request block is used, this block helps you to know if that request is sent or if it's failed. code is the result number.

Code Condition ​
0 Internal error has occured :x:
1 WIFI Peer to peer is not supported :x:
2 System is unable to process request :x:
-1 Request sent successfully :white_check_mark:

recei

After you receive a text or file data this blocks will be fired. data contains the received data or path of the saved file. isFile indicates whether the data receied is a file or text.


avai

This block is fired and updated when new devices come in the search of available devices. names contains the WIFI device names and addresses contains device addresses.


disc

The event fired when the connected device is disconnected or lost connection.


sent

Event fired when sent data. length contains the value of how many bytes are sent.


strfailed

The event raised when failed to start discovery. errorCode values are same as ConnectionRequestResult's error code.


start

The event fired when the discovery of devices is started.

bytes

Returns the available bytes pending to be received.

connect

Connect to a device using the device's index.

disconnect

Disconnect from the connected device.

isHost

Returns true if the device is the host of the connection.

merge

If the files are split, use this block to merge them into one with the file names and the save path.

read

Read text from the number of bytes given

receive

Receive the file from the number of bytes given and the save path.

send

Send a list of byte values. Same as you do in Bluetooth component.

file

Send the file to the connected device.

sendmes

Send a message to the connected device.

startD

Use this block to start the device discovery.

stop

Use this block to stop the device discovery.

cSet

Set the connection timeout.

cGet
Get the current connection timeout value.


port

Set the port of the connection.

getPort

Get the current value of the connection port.


πŸ‰ Download

Download this extension. It's free. You cannot resell it.
If you come across any bugs, then let me know about them.

com.kumaraswamy.wifitransmo


πŸ“ GitHub - Source

Feel free to contribute to the source and improving it. :grinning:


An extension made by Kumaraswamy B.G

18 Likes

Is it something like WiFi Direct?

3 Likes

Yes, it's Wi-Fi direct extension.

2 Likes

Did any of the testers mentioned confirm the operation of the extension? I'm testing the extension and can't get the device list.

blocks - 2021-02-12T185112.442test23.aia (28.3 KB)

3 Likes

It may be the problem of location access. Make sure that app has the permission of location and it's turned on with Wi-Fi. Also, the extension doesn't work with companion because of lack of permissions.

2 Likes

Do I have to ask about these permissions myself? Because I don't have any required permissions in the app settings. Yes, I am compiling an app to APK.

2 Likes

Just go to app settings and enable location and storage permission for file transfer

1 Like

Ok. In addition to location permissions, your phone must have location enabled. Does it have to be like that?

I added the message sending function. Messages are plain text, e.g. from a text box?
I added blocks:

After entering the text and clicking on send, the application turns off.

1 Like

Yes sometimes the extension crashes because the send function may not have been initialized. Try after some seconds.

1 Like

Yes, it helped. Perhaps a function could be added to detect if the upload function has been initiated to avoid an error.

1 Like

Yes, I will do some changes according to that like Connected event should be triggered after it's been completely initialized.

2 Likes

Exactly. The hang-up function would also be useful. Cool extension. You can make a local chat, send files, etc. What are these two blocks for?


2 Likes

Those blocks will be removed but you can still use it for now :sweat_smile:. First blocks is if the data being received is message or file. The second block is to set the output file path.

1 Like

Beta update

  • Removed and added some blocks
  • Internal changes done which improved things
  • Reduced the extension size

Thanks to all the testers. Check out the main post to download the new extension.

2 Likes

After updating, error while connecting: "Failed to connect, error code: 0"

1 Like

Maybe location problem one again.

1 Like

No. Permissions granted. Location enabled.

1 Like

That should not happen. According to the android docs it means something is wrong. Maybe you should check again? That is not happening to me. Are you trying to search after connection made by extension?

1 Like

Ok. I gave the new "stop discovery" block right after selecting a device from the list, before connecting to the device. You can see that it's not correct. Now I put the "stop discovery" block in "when connected" and it's ok.

2 Likes

Extension will be released tommorow. After the confirmation that extension is working properly.

Thanks.

1 Like