network specific configuration
This commit is contained in:
@ -13,7 +13,9 @@ typedef struct __attribute__((__packed__)) s_configBlock {
|
||||
char deviceId[16];
|
||||
char sharedSecret[SHA256_BLOCK_SIZE];
|
||||
char sinkServer[48];
|
||||
union networkspecific {
|
||||
uint8_t macAddress[6];
|
||||
};
|
||||
uint8_t filler[22];
|
||||
} t_configBlock;
|
||||
|
||||
|
@ -44,12 +44,12 @@ void configInit() {
|
||||
}
|
||||
coloredMsg(LOG_BLUE, "cfg ci configMagic: %lx", mainConfigBlock.configMagic);
|
||||
coloredMsg(LOG_BLUE, "cfg ci deviceName: %s", mainConfigBlock.deviceName);
|
||||
coloredMsg(LOG_BLUE, "cfg ci MAC address: %02x:%02x:%02x:%02x:%02x:%02x", mainConfigBlock.macAddress[0],
|
||||
mainConfigBlock.macAddress[1],
|
||||
mainConfigBlock.macAddress[2],
|
||||
mainConfigBlock.macAddress[3],
|
||||
mainConfigBlock.macAddress[4],
|
||||
mainConfigBlock.macAddress[5]);
|
||||
// coloredMsg(LOG_BLUE, "cfg ci MAC address: %02x:%02x:%02x:%02x:%02x:%02x", mainConfigBlock.macAddress[0],
|
||||
// mainConfigBlock.macAddress[1],
|
||||
// mainConfigBlock.macAddress[2],
|
||||
// mainConfigBlock.macAddress[3],
|
||||
// mainConfigBlock.macAddress[4],
|
||||
// mainConfigBlock.macAddress[5]);
|
||||
coloredMsg(LOG_BLUE, "cfg ci ntp server: %s", mainConfigBlock.ntpServer);
|
||||
coloredMsg(LOG_BLUE, "cfg ci deviceId: %s", mainConfigBlock.deviceId);
|
||||
coloredMsg(LOG_BLUE, "cfg ci sharedSecret: %s", mainConfigBlock.sharedSecret);
|
||||
|
@ -211,7 +211,7 @@ static void wizPhyLinkHandler(void *handle) {
|
||||
int wizInit() {
|
||||
config = getConfig();
|
||||
netInfo.dhcp = NETINFO_DHCP;
|
||||
memcpy(netInfo.mac, config->macAddress, 6);
|
||||
memcpy(netInfo.mac, config->networkspecific.macAddress, 6);
|
||||
|
||||
coloredMsg(LOG_BLUE, "wizI, resetting Ethernet module");
|
||||
wizReset(true);
|
||||
|
Reference in New Issue
Block a user