Properly load the UDS network wifi channel, apparently it was hard-coded to channel 1 previously. This fixed the udsConnectNetwork() failures with the example app(not yet available under the 3ds-examples repo).
This commit is contained in:
parent
6f6926921e
commit
d7500b3608
@ -39,8 +39,8 @@ typedef struct {
|
|||||||
/// Network struct stored as big-endian.
|
/// Network struct stored as big-endian.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 host_macaddress[6];
|
u8 host_macaddress[6];
|
||||||
u8 hostmacaddr_flag;//"This flag being set to non-zero presumably indicates that the MAC address is set."
|
u8 channel;//Wifi channel for this network.
|
||||||
u8 unk_x7;
|
u8 pad_x7;
|
||||||
|
|
||||||
u8 initialized_flag;//Must be non-zero otherwise NWM-module will use zeros internally instead of the actual field data, for most/all(?) of the fields in this struct.
|
u8 initialized_flag;//Must be non-zero otherwise NWM-module will use zeros internally instead of the actual field data, for most/all(?) of the fields in this struct.
|
||||||
|
|
||||||
@ -95,7 +95,10 @@ typedef struct {
|
|||||||
/// General NWM output structure from AP scanning, for each entry.
|
/// General NWM output structure from AP scanning, for each entry.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 size;//"Size of this entire entry. The next entry starts at curentry_startoffset+curentry_size."
|
u32 size;//"Size of this entire entry. The next entry starts at curentry_startoffset+curentry_size."
|
||||||
u32 unk_x4;
|
u8 unk_x4;
|
||||||
|
u8 channel;//Wifi channel for the AP.
|
||||||
|
u8 unk_x6;
|
||||||
|
u8 unk_x7;
|
||||||
u8 mac_address[6];//"AP MAC address."
|
u8 mac_address[6];//"AP MAC address."
|
||||||
u8 unk_xe[6];
|
u8 unk_xe[6];
|
||||||
u32 unk_x14;
|
u32 unk_x14;
|
||||||
|
@ -694,7 +694,7 @@ static Result usd_parsebeacon(u8 *buf, u32 size, udsNetworkScanInfo *networkscan
|
|||||||
if(appdata_size)memcpy(networkscan->network.appdata, &tagptr[0x34], appdata_size);
|
if(appdata_size)memcpy(networkscan->network.appdata, &tagptr[0x34], appdata_size);
|
||||||
|
|
||||||
networkscan->network.initialized_flag = 1;
|
networkscan->network.initialized_flag = 1;
|
||||||
networkscan->network.hostmacaddr_flag = 1;
|
networkscan->network.channel = networkscan->datareply_entry.channel;
|
||||||
memcpy(networkscan->network.host_macaddress, networkscan->datareply_entry.mac_address, sizeof(networkscan->network.host_macaddress));
|
memcpy(networkscan->network.host_macaddress, networkscan->datareply_entry.mac_address, sizeof(networkscan->network.host_macaddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user