SETTING WiFi ON NanoPi-M1
- I'm using EDUP Nano 802.11N model EP-N8508GS which works well on my Raspberry Pi and hopefully it should support NanoPi-M1 as well.
- Without power down NanoPi, just plug-in the dongle and list the USB device,
lsusb
- Great! I got the return
Bus 003 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
- Trying to check network configuration using a simple command
ifconfig
- But unfortunately got an error in return...
-bash: ifconfig: command not found
- Hmmm.... whats'up! something differ from Pi!!!
- Let's try again with root privilege,
sudo ifconfig
[sudo] password for fa: (enter root password)
- Success!!! I got the network configuration!
- Next, open the network configuration file.
sudo nano /etc/network/interfaces
- Add the following lines,
allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.confiface default inet dhcp
- Now open file '/etc/wpa_supplicant/wpa_supplicant.conf' but there's nothing so a new file will be created, append the following lines,
network={ ssid="xxxxx"psk="12345678"key_mgmt=WPA-PSK}
- Save and Exit and try to enable the interface...
ifdown wlan0 ifup wlan0
- Wow! it's work!!!
SHARING FOLDER WITH WINDOWS MACHINE
- I want to open image/video/audio, edit python program using Windows machine, so sharing files from myNano to PC is a great idea.
- Now let's install and configure 'SAMBA' (for more details read here and here):
sudo apt-get install samba samba-common-bin
- After installation, configure the software by opening the file '/etc/samba/smb.conf' using the command:
sudo nano /etc/samba/smb.conf
Read through the file and make sure you have the following parameters set:workgroup = WORKGROUP wins support = yes
You can use anything as your workgroup name as long as it is alphanumerical and matches the workgroup you would like to join. The default workgroup in Windows 7 is WORKGROUP.Setup folder to share
Next step is to create the folder to be shared. To create a folder called “share” in home directory do the following:sudo mkdir -m 1777 home/share
With the folder created we can now tell the Samba software to share it on the network. Open the file '/etc/samba/smb.conf' using the command:sudo nano /etc/samba/smb.conf
Scroll to the bottom and add the following:[data] comment= myNanoPi Share path=/home/share browseable=Yes writeable=Yes only guest=no create mask=0777 directory mask=0777 public=no
Notice how we tell Samba that public access is not allowed via “public=no” this means that anyone wanting to access the shared folder must login with a valid user.In this case the valid user is the user called “fa”. To let Samba know that “fa” is a network user run the command:sudo smbpasswd -a fa
- If you do not want to deal with logging in you can always make the share publicly available by changing the config file to say:
public=yes
No comments:
Post a Comment