Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Connecting to wifi in raspberry pi
QtWS25 Last Chance

Connecting to wifi in raspberry pi

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
networkwifi connectionraspberry pi 3raspbianlinux
1 Posts 1 Posters 725 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    payman
    wrote on last edited by payman
    #1

    Re: Qt - Connecting to wireless networks

    with this sample code :

    QNetworkConfiguration cfg;
    QNetworkConfigurationManager ncm;
    auto nc = ncm.allConfigurations();
    
    for (auto &x : nc)
    {
    if (x.bearerType() == QNetworkConfiguration::BearerWLAN)
    {
    if (x.name() == "YouDesiredNetwork")
    cfg = x;
    }
    }
    
    auto session = new QNetworkSession(cfg, this);
    session->open();
    

    I can find and connect to my wifi when running in my pc (Ubuntu 18.04).

    But when I run this code on Raspberry pi 3, this doesn't work!
    All configuration names are names of network interfaces (e.g wlan0, eth0, ...) not ssids! And also type of wlan0 is Ethernet!

    Anyone know how to use qt network api to connect to wifi nets in Raspberry pi?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved