{"id":330556,"date":"2022-03-12T09:00:06","date_gmt":"2022-03-12T09:00:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330556"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330556","title":{"rendered":"<span>Raspberry Pi PAN<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p> <em><u>\u041f\u0438\u043a\u043e\u0441\u0435\u0442\u044c Bluetooth-PAN (<\/u><\/em><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%81%D0%B5%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\"><em><u>Personal Area Network<\/u><\/em><\/a><em><u>)<\/u><\/em><\/p>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437 bluetooth \u043d\u0430 Raspberry Pi \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <strong>systemd<\/strong>.<\/p>\n<p>\u041c\u043e\u044f \u0434\u0440\u0443\u0436\u0431\u0430 \u0441 Raspberry Pi \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u044f\u044f,  \u0438 \u0432\u0441\u0435 \u0433\u043e\u0434\u044b  \u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b.  \u041d\u0435\u0443\u0436\u0435\u043b\u0438 Raspberry Pi \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043a  \u0430\u0432\u0430\u043d\u0442\u044e\u0440\u0438\u0437\u043c\u0443?  \u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044f \u0441\u0442\u0440\u0430\u0441\u0442\u043d\u044b\u0439 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444,  \u0432\u043e\u0432\u0441\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u00ab\u043c\u0430\u043b\u0438\u043d\u043a\u0443\u00bb \u043a\u0430\u043a   \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0439 \u043f\u0443\u043b\u044c\u0442 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043e\u0442\u043e\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e  \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <a href=\"http:\/\/gphoto.org\/\" rel=\"noopener noreferrer nofollow\">gphoto2<\/a>.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u0438\u043d\u0438\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439  \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440  \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 wi-fi \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/configuration.html\" rel=\"noopener noreferrer nofollow\">\u0442\u043e\u0447\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/a>.<\/p>\n<p>\u041d\u043e \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043f\u0438\u043a\u043e\u0441\u0435\u0442\u044c\u044e PAN  (<a href=\"http:\/\/bluez.sourceforge.net\/contrib\/HOWTO-PAN\" rel=\"noopener noreferrer nofollow\">HOWTO-PAN<\/a>).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/706\/b78\/599\/706b78599d2cb11a8fd58f97a7f2f72a.png\" width=\"800\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/706\/b78\/599\/706b78599d2cb11a8fd58f97a7f2f72a.png\"\/><figcaption><\/figcaption><\/figure>\n<p> <\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0447\u0438\u043c, \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f Nikon \u0442\u043e\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 wi-fi, \u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u043b\u044e\u0442\u0443\u0441. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.nikon.ru\/ru_RU\/product\/software\/snapbridge\" rel=\"noopener noreferrer nofollow\">SnapBridge \u0434\u043b\u044f iOS \u0438 Android<\/a>.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PAN  \u0438 ssh \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u00ab\u043c\u0430\u043b\u0438\u043d\u043a\u0430\u043c\u0438\u00bb, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043e\u0441\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443.<\/p>\n<p>\u0415\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043f\u0438\u043a\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <strong>pand<\/strong>,  \u0441\u0435\u0433\u043e\u0434\u043d\u044f  \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430  pand \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u044d\u043f\u043e\u0445\u0430 <strong>systemd<\/strong> \u0441  \u00ab\u044e\u043d\u0438\u0442\u0430\u043c\u0438\u00bb  \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0420\u0430\u0431\u043e\u0447\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u044e\u043d\u0438\u0442\u043e\u0432  \u044f \u043d\u0430\u0448\u0435\u043b \u043d\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 <a href=\"https:\/\/stackoverflow.com\/questions\/28304163\/ip-over-bluetooth-with-raspbian-systems\/53335337\" rel=\"noopener noreferrer nofollow\">stackoverflow<\/a>, \u043d\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0431\u043b\u044e\u0442\u0443\u0441 \u043e\u043f\u044f\u0442\u044c-\u0442\u0430\u043a\u0438  \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0432\u044b.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c PAN \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 systemd.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 bluetooth <strong>Raspberry Pi OS<\/strong>, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 bluez-utils:<br \/> <strong>$ sudo apt-get install  bluez-utils<br \/><\/strong> \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043d\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0431\u043b\u044e\u0442\u0443\u0441:<br \/> <strong>$ rfkill<\/strong> (<em>\u0431\u043b\u044e\u0442\u0443\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d<\/em>)<br \/> \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0431\u043b\u044e\u0442\u0443\u0441 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<br \/> <strong>$ hcitool dev<\/strong> (<em>\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 MAC<\/em>)<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u00ab\u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u00bb. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Linux \u0435\u0441\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0430  <strong>bluetoothctl<\/strong>.<br \/> \u0418\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e  bluetoothctl \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u043b\u044e\u0442\u0443\u0441, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0434\u0438\u043e\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u00ab\u0441\u0432\u0435\u0442\u0438\u043b\u0438\u00bb, \u0437\u0430\u0442\u0435\u043c   \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0bluetoothctl, \u0441\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 help. \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u0435\u0442\u0438. \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u00a0MAC \u0430\u0434\u0440\u0435\u0441 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u00abpair\u00a0MAC\u00bb (<em>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <u>tab<\/u>)<\/em> \u0438 \u00abtrust\u00a0MAC\u00bb, \u00abconnect\u00a0MAC\u00bb.<\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043f\u043e\u0437\u0430\u0434\u0438. \u041d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f<br \/> \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b systemd \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/> \u041e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 <u>\/etc\/systemd\/network<\/u> \u0438 <u>\/etc\/systemd\/system<\/u>.<br \/> \u042d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b: <em>\/etc\/systemd\/network\/pan0.netdev, \/etc\/systemd\/network\/pan0.network, \/etc\/systemd\/system\/bt-agent.service, \/etc\/systemd\/system\/bt-network.service.<\/em><\/p>\n<p>\u041d\u0438\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p><strong>\/etc\/systemd\/network\/pan0.netdev<\/strong><\/p>\n<p><code>[NetDev]<br \/> Name=pan0<br \/> Kind=bridge<\/code><\/p>\n<p><strong>\/etc\/systemd\/network\/pan0.network<\/strong><\/p>\n<p><code>[Match]<br \/> Name=pan0<\/code><\/p>\n<p><code>[Network]<\/code><\/p>\n<h2>\u00ab\u0412\u043d\u0435\u0448\u043d\u0438\u0439\u00bb \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ssh.<\/h2>\n<p><code>Address=192.168.5.1\/24<br \/> DHCPServer=yes<\/code><\/p>\n<p><strong>\/etc\/systemd\/system\/bt-agent.service<\/strong><\/p>\n<p><code>[Unit]<br \/> Description=Bluetooth Auth Agent<\/code><\/p>\n<p><code>[Service]<br \/> ExecStart=\/usr\/bin\/bt-agent -c NoInputNoOutput<br \/> Type=simple<\/code><\/p>\n<p>[Install]<br \/> WantedBy=multi-user.target<\/p>\n<p><strong>\/etc\/systemd\/system\/bt-network.service<\/strong><\/p>\n<p><code>[Unit]<br \/> Description=Bluetooth NEP PAN<br \/> After=pan0.network<\/code><\/p>\n<p><code>[Service]<br \/> ExecStart=\/usr\/bin\/bt-network -s nap pan0<br \/> Type=simple<\/code><\/p>\n<p><code>[Install]<br \/> WantedBy=multi-user.target<\/code><\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b <strong>etc\/bluetouch\/main.conf<\/strong><\/p>\n<p>\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c.<\/p>\n<p><code>DiscoverableTimeout=60<br \/>AutoEnable=true<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b systemd.<\/p>\n<p><strong>$ sudo systemctl enable systemd-networkd<br \/>$ sudo systemctl enable bt-agent<br \/>$ sudo systemctl enable bt-network<br \/>$ sudo systemctl start systemd-networkd<br \/>$ sudo systemctl start bt-agent<br \/>$ sudo systemctl start bt-network<\/strong><\/p>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c <u>\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435  \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/u> \u043d\u0430\u0434\u043e  \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 (\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442) \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0433\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a MAC \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/><strong>$ sudo bt-network -c ******** nap<\/strong><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430  <strong>bt-network<\/strong> \u0438\u043c\u0435\u0435\u0442 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u00ab<u>segmentation fault<\/u>\u00bb, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u0415\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435  \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u043e\u043b\u044c \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u00ab<strong>network service is connected<\/strong>\u00bb. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bnep0:<br \/><strong>$ ip a | grep bnep<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ssh.  (\u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <strong>pi<\/strong>)<br \/><strong>$ ssh pi@192.16.8.5.1<\/strong><\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u2026 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430!<br \/> \u0410 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>ifconfig<\/strong> \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <strong>ip<\/strong> \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 pan0 \u0438 bnep0<\/p>\n<p>PS \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u0447\u0435\u0440\u0435\u0437 PAN \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u0443\u0436\u0435 \u043e\u043a\u043e\u043b\u043e \u0433\u043e\u0434\u0430, \u0441\u0435\u0442\u044c \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0430\u044f. <\/p>\n<p> <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/655289\/\"> https:\/\/habr.com\/ru\/post\/655289\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p> <em><u>\u041f\u0438\u043a\u043e\u0441\u0435\u0442\u044c Bluetooth-PAN (<\/u><\/em><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%81%D0%B5%D1%82%D1%8C\" rel=\"noopener noreferrer nofollow\"><em><u>Personal Area Network<\/u><\/em><\/a><em><u>)<\/u><\/em><\/p>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437 bluetooth \u043d\u0430 Raspberry Pi \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <strong>systemd<\/strong>.<\/p>\n<p>\u041c\u043e\u044f \u0434\u0440\u0443\u0436\u0431\u0430 \u0441 Raspberry Pi \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u044f\u044f,  \u0438 \u0432\u0441\u0435 \u0433\u043e\u0434\u044b  \u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b.  \u041d\u0435\u0443\u0436\u0435\u043b\u0438 Raspberry Pi \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043a  \u0430\u0432\u0430\u043d\u0442\u044e\u0440\u0438\u0437\u043c\u0443?  \u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044f \u0441\u0442\u0440\u0430\u0441\u0442\u043d\u044b\u0439 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444,  \u0432\u043e\u0432\u0441\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u00ab\u043c\u0430\u043b\u0438\u043d\u043a\u0443\u00bb \u043a\u0430\u043a   \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0439 \u043f\u0443\u043b\u044c\u0442 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043e\u0442\u043e\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e  \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <a href=\"http:\/\/gphoto.org\/\" rel=\"noopener noreferrer nofollow\">gphoto2<\/a>.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u0438\u043d\u0438\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439  \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440  \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 wi-fi \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/configuration.html\" rel=\"noopener noreferrer nofollow\">\u0442\u043e\u0447\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/a>.<\/p>\n<p>\u041d\u043e \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043f\u0438\u043a\u043e\u0441\u0435\u0442\u044c\u044e PAN  (<a href=\"http:\/\/bluez.sourceforge.net\/contrib\/HOWTO-PAN\" rel=\"noopener noreferrer nofollow\">HOWTO-PAN<\/a>).<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p> <\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0447\u0438\u043c, \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f Nikon \u0442\u043e\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 wi-fi, \u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u043b\u044e\u0442\u0443\u0441. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.nikon.ru\/ru_RU\/product\/software\/snapbridge\" rel=\"noopener noreferrer nofollow\">SnapBridge \u0434\u043b\u044f iOS \u0438 Android<\/a>.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PAN  \u0438 ssh \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u00ab\u043c\u0430\u043b\u0438\u043d\u043a\u0430\u043c\u0438\u00bb, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043e\u0441\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443.<\/p>\n<p>\u0415\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043f\u0438\u043a\u043e\u0441\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <strong>pand<\/strong>,  \u0441\u0435\u0433\u043e\u0434\u043d\u044f  \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430  pand \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u044d\u043f\u043e\u0445\u0430 <strong>systemd<\/strong> \u0441  \u00ab\u044e\u043d\u0438\u0442\u0430\u043c\u0438\u00bb  \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0420\u0430\u0431\u043e\u0447\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u044e\u043d\u0438\u0442\u043e\u0432  \u044f \u043d\u0430\u0448\u0435\u043b \u043d\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 <a href=\"https:\/\/stackoverflow.com\/questions\/28304163\/ip-over-bluetooth-with-raspbian-systems\/53335337\" rel=\"noopener noreferrer nofollow\">stackoverflow<\/a>, \u043d\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0431\u043b\u044e\u0442\u0443\u0441 \u043e\u043f\u044f\u0442\u044c-\u0442\u0430\u043a\u0438  \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0432\u044b.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c PAN \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 systemd.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 bluetooth <strong>Raspberry Pi OS<\/strong>, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 bluez-utils:<br \/> <strong>$ sudo apt-get install  bluez-utils<br \/><\/strong> \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043d\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0431\u043b\u044e\u0442\u0443\u0441:<br \/> <strong>$ rfkill<\/strong> (<em>\u0431\u043b\u044e\u0442\u0443\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d<\/em>)<br \/> \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0431\u043b\u044e\u0442\u0443\u0441 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<br \/> <strong>$ hcitool dev<\/strong> (<em>\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 MAC<\/em>)<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u00ab\u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u00bb. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Linux \u0435\u0441\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0430  <strong>bluetoothctl<\/strong>.<br \/> \u0418\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e  bluetoothctl \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u043b\u044e\u0442\u0443\u0441, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0434\u0438\u043e\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u00ab\u0441\u0432\u0435\u0442\u0438\u043b\u0438\u00bb, \u0437\u0430\u0442\u0435\u043c   \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0bluetoothctl, \u0441\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 help. \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u0435\u0442\u0438. \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u00a0MAC \u0430\u0434\u0440\u0435\u0441 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u00abpair\u00a0MAC\u00bb (<em>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <u>tab<\/u>)<\/em> \u0438 \u00abtrust\u00a0MAC\u00bb, \u00abconnect\u00a0MAC\u00bb.<\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043f\u043e\u0437\u0430\u0434\u0438. \u041d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f<br \/> \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b systemd \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/> \u041e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 <u>\/etc\/systemd\/network<\/u> \u0438 <u>\/etc\/systemd\/system<\/u>.<br \/> \u042d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b: <em>\/etc\/systemd\/network\/pan0.netdev, \/etc\/systemd\/network\/pan0.network, \/etc\/systemd\/system\/bt-agent.service, \/etc\/systemd\/system\/bt-network.service.<\/em><\/p>\n<p>\u041d\u0438\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p><strong>\/etc\/systemd\/network\/pan0.netdev<\/strong><\/p>\n<p><code>[NetDev]<br \/> Name=pan0<br \/> Kind=bridge<\/code><\/p>\n<p><strong>\/etc\/systemd\/network\/pan0.network<\/strong><\/p>\n<p><code>[Match]<br \/> Name=pan0<\/code><\/p>\n<p><code>[Network]<\/code><\/p>\n<h2>\u00ab\u0412\u043d\u0435\u0448\u043d\u0438\u0439\u00bb \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ssh.<\/h2>\n<p><code>Address=192.168.5.1\/24<br \/> DHCPServer=yes<\/code><\/p>\n<p><strong>\/etc\/systemd\/system\/bt-agent.service<\/strong><\/p>\n<p><code>[Unit]<br \/> Description=Bluetooth Auth Agent<\/code><\/p>\n<p><code>[Service]<br \/> ExecStart=\/usr\/bin\/bt-agent -c NoInputNoOutput<br \/> Type=simple<\/code><\/p>\n<p>[Install]<br \/> WantedBy=multi-user.target<\/p>\n<p><strong>\/etc\/systemd\/system\/bt-network.service<\/strong><\/p>\n<p><code>[Unit]<br \/> Description=Bluetooth NEP PAN<br \/> After=pan0.network<\/code><\/p>\n<p><code>[Service]<br \/> ExecStart=\/usr\/bin\/bt-network -s nap pan0<br \/> Type=simple<\/code><\/p>\n<p><code>[Install]<br \/> WantedBy=multi-user.target<\/code><\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b <strong>etc\/bluetouch\/main.conf<\/strong><\/p>\n<p>\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c.<\/p>\n<p><code>DiscoverableTimeout=60<br \/>AutoEnable=true<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b systemd.<\/p>\n<p><strong>$ sudo systemctl enable systemd-networkd<br \/>$ sudo systemctl enable bt-agent<br \/>$ sudo systemctl enable bt-network<br \/>$ sudo systemctl start systemd-networkd<br \/>$ sudo systemctl start bt-agent<br \/>$ sudo systemctl start bt-network<\/strong><\/p>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c <u>\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435  \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/u> \u043d\u0430\u0434\u043e  \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 (\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442) \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0433\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a MAC \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/><strong>$ sudo bt-network -c ******** nap<\/strong><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430  <strong>bt-network<\/strong> \u0438\u043c\u0435\u0435\u0442 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u00ab<u>segmentation fault<\/u>\u00bb, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u0415\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435  \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u043e\u043b\u044c \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u00ab<strong>network service is connected<\/strong>\u00bb. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bnep0:<br \/><strong>$ ip a | grep bnep<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ssh.  (\u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <strong>pi<\/strong>)<br \/><strong>$ ssh pi@192.16.8.5.1<\/strong><\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u2026 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430!<br \/> \u0410 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>ifconfig<\/strong> \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <strong>ip<\/strong> \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 pan0 \u0438 bnep0<\/p>\n<p>PS \u042f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u0447\u0435\u0440\u0435\u0437 PAN \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u0443\u0436\u0435 \u043e\u043a\u043e\u043b\u043e \u0433\u043e\u0434\u0430, \u0441\u0435\u0442\u044c \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0430\u044f. <\/p>\n<p> <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/655289\/\"> https:\/\/habr.com\/ru\/post\/655289\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-330556","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330556"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330556\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}