element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Configuring a WiFi Access Point using Raspberry Pi..... How To with the new kernel
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 11 replies
  • Answers 1 answer
  • Subscribers 657 subscribers
  • Views 8145 views
  • Users 0 members are here
  • access point
  • raspberry pi os bookworm
Related

Configuring a WiFi Access Point using Raspberry Pi..... How To with the new kernel

colporteur
colporteur over 1 year ago

The latest upgrade of Raspberry Pi OS Release date: October 10th 2023 Debian version: 12 (bookworm) breaks the solution I have used for creating an AP on a Raspberry Pi. It relies on configurations in /etc/dhcpcd.conf

The release notes tells the tale.

NetworkManager used instead of dhcpcd as networking interface; various changes made to networking plugin to support this

If anyone has any insight on configuring an AP on the new release I appreciate the insight.

I will continue looking to find a configuration that works.

  • Sign in to reply
  • Cancel
  • colporteur
    0 colporteur over 1 year ago

    I found a post on nmtui configuration tool that allows AP configuration if you drill down far enough. Still looking for CLI insight.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago

    Talking to myself, not a good thing.

    Here is what I have discovered so far.

    A fresh install of Raspberry Pi OS Desktop bookworm followed by the string of commands, will create an AP that I can connect to and surf the internet. 

    sudo apt update
    sudo apt upgrade
    sudo nmcli con add type wifi ifname wlan0 mode ap con-name accesspoint ssid "hotspot" autoconnect true
    sudo nmcli con modify accesspoint 802-11-wireless.band bg ipv4.method shared ipv4.address 192.168.6.1/24
    sudo nmcli con modify accesspoint ipv6.method disabled
    sudo nmcli con modify accesspoint wifi-sec.key-mgmt wpa-psk
    sudo nmcli con modify accesspoint wifi-sec.psk "hotspot1234"
    sudo nmcli con up accesspoint

    I can't take credit for the answer, the bulk of the heavy lifting was provided through these articles.

    www.baeldung.com/.../nmcli-wap-sharing-internet
    forums.raspberrypi.com/viewtopic.php


    That being said I still have an unanswered question. The AP distributes IP Addresses to hosts that connect using addresses from the same IP Pool of it's own address. 

    How is the DHCP pool determined? That I don't have an answer for at the moment.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago

    Hi Sean,

    I've never done this so was curious what commands would be used for it too. Glad you're getting there with the config.

    Just out of curiosity, what was the use-case? Is it to create an AP at a location where there is no WiFi but only Ethernet? Or is the Pi connected some other way to the Internet, or not at all, and only used for a LAN with no Internet access?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • feiticeir0
    0 feiticeir0 over 1 year ago in reply to shabaz

    I've used this (at the time with hostap, not NetworkManager ) when the only solution was to use WIFI (because of the location), but I had no wifi router. A RPi connected to the network as a wifi AP.

    For the DHCP server, DNSMasq was perfect.

    It worked flawlessly .

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • obones
    0 obones over 1 year ago in reply to colporteur

    You have to distinguish "dchpcd" and "dhcpd".
    The former has an additional "C" in its name which stands for client. This is the part that is responsible for asking around what IP your raspberry should use when connected to a network.
    This has been replaced by NetworkManager in recent distributions because it can handle a lot of other cases.

    The latter is a DHCP server which keeps track of requests made to it for IP address attribution. It listen on network interfaces for specific messages (DHCPREQUEST) and answers them properly. Its configuration is in /etc/dhcpd.conf and you will find inside it the definition for "subnets" into which there are the IP ranges associated with any given interface.

    Note that "dhcpd" is not the only DHCP server available, nowadays, it is often replaced by DNSMasq which despite its name does not limit itself to DNS handling but also to DHCP management. A frequent situation where DNSMasq is used is in conjunction with PiHole where it is embedded in the solution.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago in reply to shabaz

    I was investigating using smart phone to control the operation of a Model railroad engine. Manufactures solutions are expensive.

    JMRI an open source CMS for programming the decoders in DCC engines had a solution. https://mstevetodd.com/rpi It was using bulleye Raspbian OS.

    I discovered the install on bookworm failed miserably. On investigating I found the implementation of NetworkManager in this release replaces a lot of the old networking configurations.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago in reply to feiticeir0

    I found a procedure I used in 2018 that used hostap, dnsmasq and dhcpcd to create AP. Over the years it appears to have been perfected.

    I suspect the novice Pi dabbler are going to have difficulties. They will find all these complete procedures for AP setup that won't work on the current OS. That understanding of OS releases and what is supported will bite them in the ***.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to colporteur

    I see.. thanks for the explanation! JMRI looks pretty comprehensive. I understand the use-case now. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago in reply to obones

    dnsmasq is not installed in the Raspbian OS (bookworm).

    The modifications to /etc/dnsmasq.conf

    interface=wlan0

    dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

    That enabled a DHCP IP range is not longer available.

    I do have it working using the nmcli commands provided. I just haven't determine (if even possible) how to set the DHCP IP pool range that the AP uses.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • obones
    0 obones over 1 year ago in reply to colporteur

    If dnsmasq is not installed, then it's most likely dhcpd that is available. In that case, the configuration is inside /etc/dhcpd.conf where you find subnet definitions like this:

    subnet 10.10.10.0 netmask 255.255.255.0 {
            authoritative;
            range 10.10.10.100 10.10.10.199;
            option domain-name-servers 10.10.10.254;
            option subnet-mask 255.255.255.0;
            option routers 10.10.10.254;
    }

    Here, I'm telling the DHCP daemon that for the interface plugged to network 10.10.10.0/254 it should act as an authoritative DHCP server and provide an IP between 100 and 199 (inclusive)

    Maybe you have something similar in your case.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube