How to create Wireless AP from my Leap42.1 Laptop ?

Hi. All

I`m use:
Laptop with Leap 42.1 +LXDE
How to create Wireless AP from my Leap42.1 Laptop ?

Serg

You want to install and configure hostapd

zypper in hostapd

I don’t see an SDB or similar in English, but the Archlinux Wiki is probably a good reference and the hostapd MAN pages would be your ultimate guide.
https://wiki.archlinux.org/index.php/Software_access_point

TSU

Network Manager is capable of creating hotspots. Very simple.

From the connection editor Add > Wifi (shared)… follow the prompts.

I`m use LXDE .
Can not Found “Wifi (shared)”:
“Edit Connections…” and see only this:

Ethernet
Infiniband
Mobile Broadband
WI-FI
WiMAX

If select “WI-FI” in the “Mode” i see only:
“Infractructure”
“Ad-hoc”

?

I guess you’re using the Gnome NM front-end then? If not, which front-end? Your wireless hardware also needs to be capable of ‘ap’ (access point) mode.

https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.nm.html#sec.nm.gnome.applet.accesspoint

About my wireless hrdware:

# lspci | egrep -i --color 'wifi|wlan|wireless'
10:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)
 # lspci -vv -s 10:00.0
10:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)
    Subsystem: Hewlett-Packard Company BCM4311 802.11b/g Wireless LAN Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 17
    Region 0: Memory at f4000000 (32-bit, non-prefetchable) [size=16]
    Capabilities: [40] Power Management version 2
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
    Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit-
        Address: 00000000  Data: 0000
    Capabilities: [d0] Express (v1) Legacy Endpoint, MSI 00
        DevCap:    MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
            ExtTag+ AttnBtn- AttnInd- PwrInd- RBE- FLReset-
        DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
        LnkCap:    Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s <4us, L1 <64us
            ClockPM- Surprise- LLActRep- BwNot-
        LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt:    DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
        CEMsk:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
        AERCap:    First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
    Capabilities: [13c v1] Virtual Channel
        Caps:    LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:    ArbSelect=Fixed
        Status:    InProgress-
        VC0:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:    Enable+ ID=0 ArbSelect=Fixed TC/VC=01
            Status:    NegoPending- InProgress-
    Kernel driver in use: b43-pci-bridge
    Kernel modules: ssb


As i see - AP not associted.

# iwconfig wlan0
wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

I`m use LXDE With NetworkManager-Applet v1.0.6

 # rpm -qa | grep -i networkmanager
NetworkManager-gnome-lang-1.0.6-2.2.noarch
NetworkManager-lang-1.0.6-10.1.noarch
NetworkManager-gnome-1.0.6-2.2.x86_64
NetworkManager-1.0.6-10.1.x86_64
libproxy1-networkmanager-0.4.11-13.2.x86_64

[/size]

As i see - AP not associted.

# iwconfig wlan0
wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

No, that’s not it. It’s not in master mode as required.

When I set my laptop up (openSUSE 13.2, KDE) to act as a hotspot via NM, I first had to restart NM before I could successfully activate the ‘connection’

systemctl restart NetworkManager

I`m use LXDE With NetworkManager-Applet v1.0.6

 # rpm -qa | grep -i networkmanager
NetworkManager-gnome-lang-1.0.6-2.2.noarch
NetworkManager-lang-1.0.6-10.1.noarch
NetworkManager-gnome-1.0.6-2.2.x86_64
NetworkManager-1.0.6-10.1.x86_64
libproxy1-networkmanager-0.4.11-13.2.x86_64

Ok, so Gnome NM front-end as I’d suspected.

OK, I knew the KDE way, like deano_ferrari describes. But, I’ve got GNOME installed as well, though this is Tumbleweed.

Fired up the Wifi manager from the GNOME menu. At the bottom of the window I see “Use as hotspot”. I connected a cable to the ethernet port of my laptop, and went ahead. Got a warning about losing the existing wireless connection, went ahead. After some seconds ( I saw the disconnect from my wireless router ) I got an SSID and a password to access it.

I`m can not found in the NM - How configure as a hotspot !
Please send me Screenshot.

Serg

Please check your quotes. I have no 13.2 laptop, deano_ferrari has.

The NM applet you’re using in LXDE may not have this feature. What you need is the package “Networkmanager-connection-editor”. Install that if not already installed.
Next, open a terminal window and do:

nm-connection-editor

A new window will open. Click Add, choose Wifi, click Create. Choose “Hotspot” for Modus. Give the hotspot a name in the SSID field. You can also set the security.
That’s all.

Step by step:
Step-1: nm-connection-editor ( OK )
Step-2: “Add , choose Wifi” ( OK )
Step-4: “click Create. Choose “Hotspot”” ( PROBLEM )
I see only this Choose:
“Infractructure”
or
“Ad-Hoc”

See images:
https://drive.google.com/open?id=0B1V2SSlATCfNQVZYUHB2VGhrYmc

and
https://drive.google.com/open?id=0B1V2SSlATCfNSXBXTHFuVEVWbVE

I don’t know why ‘Access Point’ is not offered. Okay, try setting the connection up in ‘Ad-hoc’ mode. It will create the connection file in the /etc/NetworkManager/system-connections/ directory. You can then edit it (as root), changing the mode from ‘adhoc’ to ‘ap’. The connection will look similar to this

[connection]
id=hotspot
uuid=603a5a64-eee9-40f7-99b3-d80c1b671a3c
type=wifi
autoconnect=false
permissions=user:joe:;
secondaries=

[wifi]
mac-address-blacklist=
mode=ap
seen-bssids=
ssid=my_shared_connection

[ipv4]
dns-search=
method=shared

[ipv6]
dns-search=
method=auto

Once the connection is edited as required, restart NM

systemctl restart NetworkManager

then see if you can activate the hotspot connection, and get a client device associated.

This is my steps:

# cat system-connections/Wi-Fi\ connection\ 1 
[connection]
id=Wi-Fi connection 1
uuid=a771c4bc-f058-4307-a1d6-a16c43f7cdd9
type=wifi
interface-name=wlan0
permissions=user:ksr:;
secondaries=

[wifi]
mac-address=00:1A:73:1D:4B:D9
mac-address-blacklist=
mode=ap
seen-bssids=
ssid=leap421

[wifi-security]
group=
key-mgmt=wpa-psk
pairwise=
proto=
psk=12345678

[ipv4]
dns-search=
method=auto

[ipv6]
dns-search=
ip6-privacy=0
method=auto


# systemctl restart NetworkManager

And result:

# iwconfig 
lo        no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  **Access Point: Not-Associated **  Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
eth0      no wireless extensions.


Not quite. The IPv4 section should show ‘method=shared’

[ipv4]
dns-search=
method=shared

Didn`t help.

I`m solved the problem some other way:

  1. Download this https://github.com/prahladyeri/hotspotd/blob/master/dist/hotspotd-0.1.6.tar.gz
  2. unpack and cd hotspotd-0.1.6/
  3. sudo python setup.py install
  4. add from the YaST dhcpd ( without configure )
  5. hotspotd configure
  6. manual configure dhcpd ( without yast ) :
    6.1 bind dhcpd to the wlan0
    6.2 ip rang ( ip range from the step 5 )
    6.3 Default Gateway
    6.4 dns = 8.8.8.8
    7 . Press Button Wifi UP in the my LapTop
  7. check interface wlan0 exist or no. If no, i do: ifconfig wlan0 up
  8. Creata iptables rule for nat outgouing packets and for ACCEPT FORWARD from wlan0 and INPUT -i wlan0
  9. Start DHCPD daemon
  10. hotspod start

After this i see this AP from my SmartPhone and Have Internet Access from the SmartPhone over Wifi.

Thank you for Help.

Serg

Good to know hotspotd is working for you. For others who come searching, it available for download as RPM package too

https://software.opensuse.org/package/python-hotspotd?search_term=hotspotd

I confirm that Hotspot is not offered by nm-connection-editor on Leap and is offered on TW. It has nothing to do with physical capabilities (connection is not really associated with any physical device when you create it). It should be present in version 1.0.8 which is in Leap, so looks like a bug. Probably someone who is interested enough should open bug report.
EDIT: Oops, sorry, Leap has 1.0.6 which explains why it does not have this option.

Yes, I agree. However, I’m using KDE (openSUSE 13.2) where it is offered and does work. My Leap install (also KDE) is running as a VM guest so can’t test, but the connection editor does offer ‘Access Point’ mode via Wi-Fi (Shared), so probably best if someone using the Gnome NM can do so.

KDE is using own implementation of NM front-end with own connection editor so it is irrelevant in this case.

and does work
Well, AP mode support in NetworkManger itself appeared in 0.9.8 and 13.2 (with updates) has 0.9.10. I was speaking about versions when it was added to connection editor.
My Leap install (also KDE) is running as a VM guest so can’t test

Of course you can. As I said what is offered in connection editor is not related to what devices you have. You always can create any connection anywhere.

I well aware of that. Which is why I hinted at manually editing the config file as I know what a working hotspot connection should look like.

Well, AP mode support in NetworkManger itself appeared in 0.9.8 and 13.2 (with updates) has 0.9.10. I was speaking about versions when it was added to connection editor.

Yep, and I’ve played around with NM since that time, so working hotspot connections created this way are not new to me. I happen to have the Gnome and KDE front-ends installed, so you’re not telling me anything I don’t already know.

Of course you can. As I said what is offered in connection editor is not related to what devices you have. You always can create any connection anywhere.

Again, I’m well aware of using the front-end to create a connection fictitious or otherwise. (I just don’t have a wireless device available, as I do with my 13.2 install. )

In any case, the OP has gone the hotspotd route, so this kind of discussion serves no useful purpose IMO.