LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   NanoPi M3 Working with Debian (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/nanopi-m3-working-with-debian-4175586228/)

jiatang 08-03-2016 10:32 PM

NanoPi M3 Working with Debian
 
Ethernet Connection
If the NanoPi M3 is connected to a network via Ethernet before it is powered on, it will automatically obtain an IP after it is powered up.

Wireless Connection
Open the file "/etc/wpa_supplicant/wpa_supplicant.conf" with vi or gedit and append the following lines:

network={
ssid="YourWiFiESSID"
psk="YourWiFiPassword"
}The "YourWiFiESSID" and "YourWiFiPassword" need to be replaced with your actual ESSID and password.
Save, exit and run the following commands your board will be connected to your specified WiFi.


ifdown wlan0
ifup wlan0
If your WiFi password has special characters or you don't want your password saved as plain text you can use "wpa_passphrase" to generate a psk for your WiFi password. Here is how you can do it:


wpa_passphrase
YourWiFiESSID
Following the prompt type in your password.
If you open the file "/etc/wpa_supplicant/wpa_supplicant.conf" you will find that your password has been updated and you can delete your clear-text password.

If the system's WiFi AP mode is on it cannot search and connect to a wireless router. You need to turn off the WiFi AP mode by following the instructions below:

su turn-wifi-into-apmode no

Setup Wi-Fi AP
You can follow the steps below to setup WiFi AP:


turn-wifi-into-apmode yes
Reboot the system as prompted. By default the AP's name is "nanopi2-wifiap" and the password is 123456789.

Now you are able to find the "nanopi2-wifiap" from a host PC and connect to it. If a connection is successful you will be able to SSH to this NanoPi M3 at "192.168.8.1":

ssh root@192.168.8.1

The password for it is "fa".

To make SSH session run faster turn off the WiFi's power saving mode by using the following command:

iwconfig wlan0 power offYou can check the WiFi mode via the following command:


cat /sys/module/bcmdhd/parameters/op_modeIf the result is "2" it means it is currently working as a WiFi AP.If you want to switch back to the Station mode you can do it this way:


turn-wifi-into-apmode noBluetooth

Click on the bluetooth icon on the GUI a menu will pop up:
Make discoverable... enables the NanoPi M3 to be searched for by nearby bluetooth devices;
Devices... opens a search window and searches for nearby bluetooth devices(Note: the "Make discoverable" property needs to be enabled on those nearby devices as well);
Send Files to Device...enables the NanoPi-M3 to send files to another bluetooth device which is paired to the NanoPi M3;


Install Debian Packages[edit]We provide a Debian Jessie image. You can install Jessie's packages by commanding "apt-get". If this is your first installation you need to update the package list by running the following command:

apt-get updateYou can install your preferred packages. For example if you want to install an FTP server you can do this:

apt-get install vsftpdNote: you can change your download server by editting "/etc/apt/sources.list". You can get a complete server list from [1]. You need to select the one with "armhf".

onebuck 08-05-2016 09:59 AM

Member response
 
Hi,

Thanks for sharing.
:hattip:


All times are GMT -5. The time now is 03:34 AM.