-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description of defect
We made a custom board based on NUCLEO-F429ZI but with a different PHY chip (DP83848CVV). It seems to successfully initialize itself. Here's the code that works without any issue.
EthernetInterface net;
#define IP "192.168.0.3"
#define MASK "255.255.255.0"
#define GATEWAY "192.168.0.2"
int InitNetwork() {
SocketAddress ip = SocketAddress(IP, 0);
SocketAddress mask = SocketAddress(MASK, 0);
SocketAddress gateway = SocketAddress(GATEWAY, 0);
if(net.set_network(ip,mask,gateway) != 0) {
pc.printf("Failed Establishing Ethernet Interface\n");
return -1;
}
if(net.connect() != 0) {
pc.printf("Failed connecting Ethernet\n");
return -1;
}
return 0;
}
We connect the board and a PC through Ethernet and run a small test. Basically, the PC sends some number through UDP. The board receives the data and shows it through serial communication.
void receive()
{
SocketAddress receive;
UDPSocket socket(&net);
int bind = socket.bind(8080);
pc.printf("bind return: %d\n", bind);
uint16_t buffer;
while (true)
{
pc.printf("\nWait for packet...\n");
socket.recvfrom(&receive, &buffer, sizeof(buffer));
switch(buffer) {
case 0x0001:
pc.printf("That's one.");
break;
default:
pc.printf("Unable to Interpret the code");
break;
}
}
}
This works well when we're using NUCLEO-F429ZI. However when it comes to our custom board, our board does not receive any data from PC. Weirdly enough, It does executes InitNetwork()
without a problem. Also we were able to find out its MAC address using get_mac_address()
. get_connection_status()
returns NSAPI_STATUS_GLOBAL_UP
.
If there's anything I can provide, please let me know!
Thanks for your time and effort.
Target(s) affected by this defect ?
None
Toolchain(s) (name and version) displaying this defect ?
Mbed Compiler
What version of Mbed-os are you using (tag or sha) ?
mbed-os-5.15.1
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
None
How is this defect reproduced ?
As stated above.