Hello David,
Unfortunately, because of my heath problems (I’m on chemo … ), I don’t have time to “play” with mbed anymore
However, I have re-tested my code above without any modifications (copy&paste). So the IP address is assigned by DHCP when connecting to the network.
Environment:
- LPC1768 connected to the local network directly over Ethernet pins RD-, RD+, TD-, TD+
- mbed OS 6.16.0
- mbed CLI1
- mbed_app. json file with the following content:
{
"target_overrides": {
"*": {
"target.default_lib": "small",
"platform.stdio-baud-rate": 115200
}
}
}
- .mbedignore file with the following content (created in the root directory of the project):
/* Bootloader */
mbed-os/features/FEATURE_BOOTLOADER/*
/* BLE */
mbed-os/connectivity/drivers/ble/*
mbed-os/connectivity/FEATURE_BLE/*
/* Cellular */
mbed-os/connectivity/cellular/*
mbed-os/connectivity/drivers/cellular/*
mbed-os/connectivity/netsocket/source/Cellular*.*
/* Device Key */
mbed-os/drivers/device_key/*
/* Experimental */
mbed-os/platform/FEATURE_EXPERIMENTAL_API/*
/* FPGA */
mbed-os/features/frameworks/COMPONENT_FPGA_CI_TEST_SHIELD/*
/* Greentea client */
mbed-os/features/frameworks/greentea-client/*
/* LORAWAN */
mbed-os/connectivity/drivers/lora/*
mbed-os/connectivity/lorawan/*
/* LWIP */
#mbed-os/connectivity/drivers/emac/*
#mbed-os/connectivity/lwipstack/*
/* Mbed-client-cli */
#mbed-os/features/frameworks/mbed-client-cli/*
/* MBED TLS */
#mbed-os/connectivity/drivers/mbedtls/*
#mbed-os/connectivity/mbedtls/*
/* Nanostack */
#mbed-os/connectivity/drivers/emac/*
#mbed-os/connectivity/libraries/mbed-coap/*
#mbed-os/connectivity/libraries/nanostack-libservice/*
#mbed-os/connectivity/libraries/ppp/*
#mbed-os/connectivity/nanostack/*
/* Netsocket */
#mbed-os/connectivity/drivers/emac/*
#mbed-os/connectivity/netsocket/*
#mbed-os/libraries/mbed-coap/*
#mbed-os/libraries/ppp/*
/* NFC */
mbed-os/connectivity/drivers/nfc/*
mbed-os/connectivity/nfc/*
/* RF */
mbed-os/connectivity/drivers/802.15.4_RF/*
/* Storage */
mbed-os/storage/filesystem/*
mbed-os/storage/kvstore/*
mbed-os/storage/platform/*
/* Tests */
mbed-os/platform/test/*
mbed-os/TEST_APPS/*
mbed-os/TESTS/*
mbed-os/UNITTESTS/*
/* Unity */
mbed-os/features/frameworks/unity/*
/* Utest */
mbed-os/features/frameworks/utest/*
/* USB */
mbed-os/drivers/usb/source/*
mbed-os/hal/usb/source/*
mbed-os/hal/usb/TARGET_Templates/*
/* WiFi */
mbed-os/connectivity/drivers/wifi/*
Test results:
Starting
IP address: 192.168.1.244
Netmask: 255.255.255.0
Gateway: 192.168.1.1
=========================================
And after connecting in Firefox to 192.168.1.244:
Client with IP address 192.168.1.11 connected.
Recieved Data: 345
GET / HTTP/1.1
Host: 192.168.1.244
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
echo done.
Client socket closed
=========================================
I hope the above info can help you.
With best regards,
Zoltan