Jump to content

[solved] NanoPi NEO Air - WIFI on first boot


tibibs

Recommended Posts

Hi,

 

I am fairly new to the SBC board and struggling to begin my setup of the NanoPo NEO Air.

This little board is a perfect fit for my project I need to develop.

 

The first problem I encounter is the following:

  • There are no HDMI port. Thus I can't do the basic configuration for my network and allow an SSID access.

Does anyone has a solution to preconfigure the WIFI of my Armbian from windows (or Linux if needed)?

 

My second problem will be:

  • I would like to install my system on the EMMC flash to not be dependent of the SD card.

Can you confirm I would only need to run the command "nand-sata-install" when I will get access to SSH? 

 

Last problem is that I will need to implement a trigger between wifi and AP mode. I have briefly seen some topics about this, some are saying friendly arm have this function natively, others that this function will be develop soon for Armbian and some have some kind of tutorials about it (playing with wpa_supplicant config).

What is the state of the art regarding this?

 

Finally but not least, I am trying to get it running with a Bionic image of armbian. If there are some better image to be used, please let me know.

 

I am sorry if those questions seems straightforward but I am not so familiar with Linux and its services nor the SBC world.

 

Thank you for your help and guidance.

 

Tibibs

Link to comment
Share on other sites

For boards that doesn't have HDMI you need to use serial console to login. On this board you have two.

 

1. Via 3 pin connection https://linux-sunxi.org/UART

2. Via mUSB. Simply power the board via PC USB port and  you will get a new serial console to which you connect with a Putty or similar terminal program.

 

That's all.

 

3 hours ago, tibibs said:

Last problem is that I will need to implement a trigger between wifi and AP mode. I have briefly seen some topics about this, some are saying friendly arm have this function natively, others that this function will be develop soon for Armbian and some have some kind of tutorials about it (playing with wpa_supplicant config).

What is the state of the art regarding this?


AP can be setup standard way but you can't run STA and AP at once. Not sure if the driver supports this OOB. In any case the performance would be terrible ...

 

3 hours ago, tibibs said:

If there are some better image to be used, please let me know.

 

No, this is it.

Link to comment
Share on other sites

Hi Igor,

 

thank's for the quick reply.

 

1. Regarding the WIFI on first boot, after some time I have managed to do it by editing the interfaces file in /etc/network from Ubuntu.

it was a relief since I don't want to touch to much to the pins yet.

 

But I am still confusing between network manager and wpa_supplicant. When I do some research, it seems their role is a bit overlapping. Can anyone has an easy explanation to describe the difference between the 2?

I know wpa_supplicant is specialized in wireless interfaces, but in my example, no config has been done with it and I am still able to connect my WIFI.

Sorry for this beginner question, but what's the role of each and which one is prioritized by the system if overlapping?

 

2. ok I will check that in the coming days.

 

3. yes both won't coexist but in my application I would need to be in AP mode and when some conditions are met, switch to STA and connect to a dedicated wifi to run some updates then disconnect. Are there any ways to do this from a script?

Link to comment
Share on other sites

18 hours ago, tibibs said:

But I am still confusing between network manager and wpa_supplicant.


They can co-exists. We prefer Network manager since its novice friendly.
 

18 hours ago, tibibs said:

in my application I would need to be in AP mode and when some conditions are met, switch to STA and connect to a dedicated wifi to run some updates then disconnect. Are there any ways to do this from a script?


Its possible, but this is your job to investigate and code. 

Link to comment
Share on other sites

Hi,

 

sorry for the long time since the last update on my topic but I have been very busy and had no time to spare on this project.

 

I managed to restart this a bit and so far still finding some issues even though I did some progress as well

 

I decided to study what is network manager a bit and started from fresh install.

 

I have flashed my SD card with a new image, and created my connections using network manager.

 

for connecting to my router, working like a charm, no problems so far (a first for me as I used to edit the interfaces file).

 

I then added one nmconnection file to create the AP (autoconnect false for the infrastructure mode and true for the hotspot so my hotspot will be chosen at boot)

 

my hotspot file looks like this

 

[connection]
id=AERStest
type=wifi
autoconnect=true
interface-name=wlan0
permissions=

[wifi]
mac-address-blacklist=
mode=ap
ssid=AERStest

[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=aersaerstest

[ipv4]
dns-search=
method=shared

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

[proxy]

while booting, my SSID shows up, but I am unable to connect. It seems that the client trying to connect doesn't get any IP. I would guess the problem would come from dnsmasq.

 

I can't find any dnsmasq.conf in /etc/ and subfolders.

 

Can you help and give me some directions to further troubleshoot my problem?

 

I am using the image Armbian_20.05.4_Nanopiair_focal_current_5.4.45

 

thank's a lot for the job you're doing. it is really appreciated and actually make me learn a lot about the linux system.

 

Thank you,

 

Tibibs

Link to comment
Share on other sites

Well, I confirm, the problem comes from the DHCP. I can connect without any pb by allocating my IP manually.

 

I have tried to install udhcp and to enable it, with no success.

 

Am I right with installing udhcp or am I going the wrong way? I am a bit lost as I don't know how Network manager handle the DHCP being the server.

 

Can someone give me the direction?

 

thank you,

 

Tibibs

Link to comment
Share on other sites

Hi,

 

Latest update, I have finally managed to sort it out using the terminal and those commands, adapting it based on my needs.

 

nmcli c add type wifi ifname wifi-device con-name connection-name autoconnect no ssid hotspot-ssid
nmcli connection modify connection-name 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection modify connection-name wifi-sec.key-mgmt wpa-psk
nmcli connection modify connection-name wifi-sec.psk "le password"
nmcli connection up connection-name

 

This new connection is working properly.

My guess is that the uuid was needed and I didn't included it ><

 

from there, switching connection will be very easy with the commands

 

nmcli connection down connection1
nmcli connection up connection2

thank's a lot.

 

I would need your help for the next step for sure.

 

Tibibs

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines