* Add dns server The access point example is a bit complicated to use as you have to open a browser and enter a url with the IP address of the device Add a simple dns server that can be used to make the access point behave like a captive portal. All DNS requests point back to the gateway IP. * Improve AP example The web page /ledtest gives you a web page with an option to turn the led on and off Start the DNS server and redirect all HTTP requests to this page. Improve the code so it can handle more than one request at a time. Fixes: #232
37 lines
1.1 KiB
CMake
37 lines
1.1 KiB
CMake
add_executable(picow_access_point_background
|
|
picow_access_point.c
|
|
dhcpserver/dhcpserver.c
|
|
dnsserver/dnsserver.c
|
|
)
|
|
|
|
target_include_directories(picow_access_point_background PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts
|
|
${CMAKE_CURRENT_LIST_DIR}/dhcpserver
|
|
${CMAKE_CURRENT_LIST_DIR}/dnsserver
|
|
)
|
|
|
|
target_link_libraries(picow_access_point_background
|
|
pico_cyw43_arch_lwip_threadsafe_background
|
|
pico_stdlib
|
|
)
|
|
|
|
pico_add_extra_outputs(picow_access_point_background)
|
|
|
|
add_executable(picow_access_point_poll
|
|
picow_access_point.c
|
|
dhcpserver/dhcpserver.c
|
|
dnsserver/dnsserver.c
|
|
)
|
|
target_include_directories(picow_access_point_poll PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts
|
|
${CMAKE_CURRENT_LIST_DIR}/dhcpserver
|
|
${CMAKE_CURRENT_LIST_DIR}/dnsserver
|
|
)
|
|
target_link_libraries(picow_access_point_poll
|
|
pico_cyw43_arch_lwip_poll
|
|
pico_stdlib
|
|
)
|
|
pico_add_extra_outputs(picow_access_point_poll)
|