Is there a WiFi parallel to the B4A Bluetooth examples?
a. show a list of WiFi connections?
b. select which wifi (by MAC, i presume) connection to connect Serial & Asynchstreams?
I'm using a Gainspan GS1011 Wifi Serial module (<$30). I have B4A working for Bluetooth serial modules(<$8) quite well due to the great forum help & samples!!
Bluetooth example:
a. show a list of WiFi connections?
b. select which wifi (by MAC, i presume) connection to connect Serial & Asynchstreams?
I'm using a Gainspan GS1011 Wifi Serial module (<$30). I have B4A working for Bluetooth serial modules(<$8) quite well due to the great forum help & samples!!
Bluetooth example:
B4X:
Sub ButtonConnect_Click 'use BTLabel to express if connected or not; if connected, then show device name here
If Serial1.IsEnabled = False Then
Msgbox("Please enable Bluetooth.", "")
Else
Serial1.Listen 'listen for incoming connections
End If
Dim PairedDevices As Map
PairedDevices = Serial1.GetPairedDevices
Dim l As List
l.Initialize
For i = 0 To PairedDevices.Size - 1
l.Add(PairedDevices.GetKeyAt(i)) 'add the friendly name to the list
Next
Dim res As Int
res = InputList(l, "Choose device", -1) 'show list a list(l) of paired devices as selection dialog box
If res <> DialogResponse.CANCEL Then
Serial1.Connect(PairedDevices.Get(l.Get(res))) 'convert the name to mac address
End If
End Sub