[LINUX] Connect Sipeed Lichee Zero to the net

I want to connect to the internet

The OS in this device seemed to be Debian-based and included the apt command. So I want to connect to the internet and update.

However, in the default state of this device, there is neither Ethernet nor wifi, so it cannot be connected to the net. There are two possible ways to connect: bridging a USB virtual ethernet using a Linux PC or using a USB wifi dongle.

The method at the bridge was done once because the wifi did not connect well at first, but it was very troublesome.

wifi dongle

I tried two types that are famous for their easy-to-hit drivers on Linux. Buffalo WLI-UC-GNM on the left The right is PLANEX's GW-USNANO2A image.png As a result, WLI-UC-GNM did not recognize it as a network device, but GW-USNANO2A recognized it as wlan0. image.png

If you connect a dongle to USB, you cannot supply power from USB, so 5V is supplied from the pin header to move. image.png

wifi settings

Create / add wifi configuration file

Since the dongle is recognized, set the wifi. First, generate a wifi setting template with the following command

~# wpa_passphrase "Your_SSID" Your_passwd


 Probably it should be output like this.
 For security reasons, it may be better to delete the raw password. (# part)
network={
ssid="${your ssid}"
\#psk="${your password}"
psk=${key}
}

 Add the contents output by the above command to /etc/wpa_supplicant/wpa_supplicant.conf, and create it if it does not exist.

#### **`~# vim /etc/wpa_supplicant/wpa_supplicant.conf`**
```root@licheepi


 When creating a new file, write the following contents at the beginning of the file and then write the settings.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=JP


### Register wifi configuration file

#### **`~# vim /etc/network/interfaces`**
```root@licheepi

 Add this line
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

 * The location of wlan0 may change depending on the environment, so change it in that case.

 After that, when I restarted, it was connected
 ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/599350/fa194cfa-09ff-ae3d-0ab4-96561d7a8426.png)


 At this point, you can update with apt update.

 Incidentally, the OS default for this device was Hong Kong.
 Since it is inconvenient as it is, change to Japan time

#### **`~# ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime`**
```root@licheepi

When you hit this command, the time zone will switch immediately.



###Continued
[Sipeed Lichee Zero with L Chika(GPIO operation)](https://qiita.com/17_kitano/items/aecf3f7dfb0d376f4347)


Recommended Posts

Connect Sipeed Lichee Zero to the net
[Day3] Preparing to connect to the database
I bought Sipeed Lichee Zero so I set it up for the time being
Connect to mysql
L Chika with Sipeed Lichee Zero (GPIO operation)
Connect to the Bitcoin network using pybitcoin tools
The road to Pythonista
Connect python to mysql
The road to Djangoist
Connect to the Bitcoin network using pycoin (Python Cryptocoin Utili)
Check when the Docker container does not connect to the Internet
Connect the Jupyter Notebook kernel to Spyder with Jupytext enabled
How to connect the contents of a list into a string