mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
Modified wifi_gecko to use UDP instead of TCP.
Added WifiGeckoReader to the tools directory. It is a windows program used to read the gecko debug messages over a wifi connection. Thanks r-win & Dimok
This commit is contained in:
parent
8912e55e5a
commit
b56b9662c3
@ -31,6 +31,9 @@
|
||||
#include <network.h>
|
||||
#include "wifi_gecko.h"
|
||||
|
||||
// set to use TCP socket instead of UDP
|
||||
#define WIFI_GECKO_USE_TCP (0)
|
||||
|
||||
static int connection = -1;
|
||||
static int init = 0;
|
||||
|
||||
@ -63,13 +66,21 @@ int WifiGecko_Connect()
|
||||
|
||||
if (dest_ip == NULL || dest_port == 0) return connection;
|
||||
|
||||
connection = net_socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
|
||||
#if WIFI_GECKO_USE_TCP
|
||||
connection = net_socket(PF_INET, SOCK_STREAM, 0);
|
||||
#else
|
||||
connection = net_socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||
#endif
|
||||
if (connection < 0)
|
||||
return connection;
|
||||
|
||||
struct sockaddr_in connect_addr;
|
||||
memset(&connect_addr, 0, sizeof(connect_addr));
|
||||
connect_addr.sin_family = AF_INET;
|
||||
#if WIFI_GECKO_USE_TCP
|
||||
connect_addr.sin_family = PF_INET;
|
||||
#else
|
||||
connect_addr.sin_family = AF_INET;
|
||||
#endif
|
||||
connect_addr.sin_port = htons(dest_port);
|
||||
inet_aton(dest_ip, &connect_addr.sin_addr);
|
||||
|
||||
@ -132,4 +143,4 @@ void wifi_printf(const char * format, ...)
|
||||
va_end(va);
|
||||
|
||||
SAFE_FREE(tmp);
|
||||
}
|
||||
}
|
||||
|
@ -42,4 +42,4 @@ void wifi_printf(const char * format, ...);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
BIN
tools/windows/WifiGeckoReader/WifiGeckoReader.exe
Normal file
BIN
tools/windows/WifiGeckoReader/WifiGeckoReader.exe
Normal file
Binary file not shown.
15
tools/windows/WifiGeckoReader/readme.txt
Normal file
15
tools/windows/WifiGeckoReader/readme.txt
Normal file
@ -0,0 +1,15 @@
|
||||
WifiGeckoReader allows you to view the gecko debug messages over the wifi connection. Only use this when debugging. There is no need to use it regularly.
|
||||
|
||||
It uses UDP port 4405.
|
||||
|
||||
To make it work with wiiflow, edit or add the following wiiflow.ini lines:
|
||||
[GENERAL]
|
||||
async_network=yes
|
||||
wifi_gecko=yes
|
||||
wifi_gecko_port=4405
|
||||
|
||||
wifi_gecko_ip=your.computer.ipAddr.here
|
||||
eg:
|
||||
wifi_gecko_ip=192.168.0.199
|
||||
|
||||
Once this is done, run WifiGeckoReader, then run wiiflow. You should start seeing debug messages.
|
Loading…
Reference in New Issue
Block a user