Nerves를 WiFi를 사용하여 고정 IP로 네트워크에 추가합니다 (Elixir)
소개
nerves-<4 digit serial#>.local (Elixir/Nerves) 라는 기사를 써 보았는데, 고정 IP의 이야기가 나오고, WiFi + 고정 IP의 샘플 그 자체 즈바리 Don!는, VintageNet Cookbook에는 쓰지 않았기 때문에 기사로서 써 둡니다
@ Nishizu Kazuma 님: 고정 IP의 세계도 좋다 ~
VintageNet Cookbook을 잘 섞어서 조합하면 할 수 있지만
config/target.exs
config :vintage_net,
regulatory_domain: "US",
config: [
{"usb0", %{type: VintageNetDirect}},
{"eth0",
%{
type: VintageNetEthernet,
ipv4: %{method: :dhcp}
}},
{"wlan0",
%{
type: VintageNetWiFi,
vintage_net_wifi: %{
networks: [
%{
key_mgmt: :wpa_psk,
ssid: System.get_env("NERVES_NETWORK_SSID"),
psk: System.get_env("NERVES_NETWORK_PSK")
}
]
},
ipv4: %{
method: :static,
address: "192.168.1.200",
prefix_length: 24,
gateway: "192.168.1.1",
name_servers: ["8.8.8.8", "8.8.4.4"]
}
}}
]
192.168.1.200
는 어디까지나 예입니다. 자신의 네트워크 설정이나 이미 할당된 설정과 겹치지 않도록 설정하십시오. prefix_length
, gateway
, name_servers
의 값도 어디까지나 예입니다.@ 키쿠 유타 선생님, 코멘트 감사합니다






@piacerex, 코멘트 감사합니다






memo
mix upload
했을 때 위험하다, 꺾였는지 
ipv4: %{method: :dhcp}
로 설정된 펌웨어로 작동했습니다 address: "192.168.1.200"
변경 mix firmware && mix upload
$ mix upload
...
fwup: Upgrading partition B
100% [====================================] 50.38 MB in / 57.66 MB outReceived disconnect from 192.168.1.12 port 22:11: Terminated (shutdown) by supervisor
Disconnected from 192.168.1.12 port 22
** (Mix) ssh failed with status 255
** (Mix) ssh failed with status 255
는 IP가 바뀌었고 단순히 ssh 연결이 끊어졌습니다 $ ssh 192.168.1.200
iex> ping "nerves-project.org"
Press enter to stop
Response from nerves-project.org (185.199.108.153): time=58.574ms
Response from nerves-project.org (185.199.108.153): time=61.568ms
Response from nerves-project.org (185.199.108.153): time=56.253ms
Response from nerves-project.org (185.199.108.153): time=45.763ms



Wrapping Up



Nerves 뭐라고

NervesJP 커뮤니티에서 유쾌한 folks들이 당신의 방문을 환영합니다




Reference
이 문제에 관하여(Nerves를 WiFi를 사용하여 고정 IP로 네트워크에 추가합니다 (Elixir)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/torifukukaiou/items/45cfc7bdf73f3f232299텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)