-
Notifications
You must be signed in to change notification settings - Fork 0
/
usb-serial-sierra.html
332 lines (321 loc) · 19.3 KB
/
usb-serial-sierra.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!DOCTYPE html>
<html lang="ja">
<head>
<title>macOS SierraでUSB-RSAQ2とUSB-RSAQ5を使う - pLog</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=1">
<meta http-equiv="X-UA-Compatible" content="IE=11">
<meta name="author" content="pman0214">
<meta name="keywords" content="usbserial,prolific,pl2303,osx">
<meta name="description" content="USB-RSAQ2及びUSB-RSAQ5をmacOS Sierra上で使うための設定。">
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/pure-min.css">
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/ext-pure.css">
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/style.css">
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/pygments/github.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://pman0214.github.io/blog/theme/css/grids-responsive-min.css">
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="http://pman0214.github.io/blog/theme/js/html5shiv.js"></script>
<![endif]-->
<link href="http://pman0214.github.io/blog/feeds/atom.xml" type="application/atom+xml" rel="alternate" title="pLog Full Atom Feed">
<link href="http://pman0214.github.io/blog/feeds/rss.xml" type="application/rss+xml" rel="alternate" title="pLog Full RSS Feed">
<!-- open graph tags -->
<meta property="og:site_name" content="pLog">
<meta property="og:type" content="article">
<meta property="og:title" content="macOS SierraでUSB-RSAQ2とUSB-RSAQ5を使う">
<meta property="og:url" content="http://pman0214.github.io/blog/usb-serial-sierra.html">
<meta property="og:description" content="USB-RSAQ2及びUSB-RSAQ5をmacOS Sierra上で使うための設定。">
<meta property="article:published_time" content="2018-06-28">
<meta property="article:section" content="osx">
<meta property="article:tag" content="usbserial">
<meta property="article:tag" content="prolific">
<meta property="article:tag" content="pl2303">
<meta property="article:tag" content="osx">
</head>
<body>
<header>
<nav id="menu">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog" class="pure-menu-heading pure-menu-link">pLog</a></li>
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
<a href="#" class="pure-menu-link">Categories</a>
<ul class="pure-menu-children">
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/category/devel.html" class="pure-menu-link">devel</a></li>
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/category/info.html" class="pure-menu-link">info</a></li>
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/category/linux.html" class="pure-menu-link">linux</a></li>
<li class="pure-menu-item pure-menu-selected"><a href="http://pman0214.github.io/blog/category/osx.html" class="pure-menu-link">osx</a></li>
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/category/python.html" class="pure-menu-link">python</a></li>
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/category/tex.html" class="pure-menu-link">tex</a></li>
<li class="pure-menu-item menu-item-divided"><a href="http://pman0214.github.io/blog/categories.html" class="pure-menu-link">See all...</a></li>
</ul>
</li>
<li class="pure-menu-item"><a href="http://pman0214.github.io/blog/archives.html" class="pure-menu-link">Archives</a></li>
</ul>
</div>
</nav>
</header>
<div id="layout" class="pure-g">
<div class="pure-u-1 pure-u-lg-3-4">
<main id="main">
<article>
<header>
<h1><a href="http://pman0214.github.io/blog/usb-serial-sierra.html" rel="bookmark" title="Permalink to macOS SierraでUSB-RSAQ2とUSB-RSAQ5を使う">macOS SierraでUSB-RSAQ2とUSB-RSAQ5を使う</a></h1>
<div class="article-info">
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 on-create"><time datetime="2018-06-28T09:18:00+09:00">2018年06月28日 09:18</time></div>
</div>
<div class="category">Category: <a class="pure-button" href="http://pman0214.github.io/blog/category/osx.html">osx</a></div>
<div class="tags">Tags:
<a class="pure-button" href="http://pman0214.github.io/blog/tag/usbserial.html">usbserial</a>
<a class="pure-button" href="http://pman0214.github.io/blog/tag/prolific.html">prolific</a>
<a class="pure-button" href="http://pman0214.github.io/blog/tag/pl2303.html">pl2303</a>
<a class="pure-button" href="http://pman0214.github.io/blog/tag/osx.html">osx</a>
</div>
</div>
</header>
<section class="contents">
<!-- -*- coding: utf-8; -*- -->
<div class="section" id="id1">
<h2>概要</h2>
<p>USB-RSAQ2とUSB-RSAQ5のOSXドライバは10.4くらいまでしか提供されていない。
macOS Sierra (10.12)上で使うためにProlificのドライバーを導入した上でUSB-RSAQ2とUSB-RSAQ5の情報を追加する。</p>
</div>
<div class="section" id="id2">
<h2>手順</h2>
<div class="section" id="prolific-pl2303">
<h3>Prolific PL2303ドライバをインストールする</h3>
<p><a class="reference external" href="http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41]">ここ</a> からドライバをダウンロードしてインストールする。
現時点では10.13用まで提供されている。
(ただし、10.13に導入する際は注意書きが付いている)</p>
<p>導入後は再起動を求められる。
このときに <tt class="docutils literal">Command+R</tt> を押しながら起動してリカバリモードで起動する。</p>
</div>
<div class="section" id="kext">
<h3>kextの署名チェックを無効化する</h3>
<p>自己責任で実施のこと。
しかし、これをやらないとProlificのドライバーは導入できない。と思う。</p>
<p>リカバリモードで起動してからターミナルを開き、以下のコマンドを実行する。</p>
<div class="highlight"><pre><span></span>$ csrutil <span class="nb">enable</span> --without kext
</pre></div>
<p>実行したら再起動する。
再起動後にcsrutilで状態を確認するとこんな感じに <tt class="docutils literal">Kext Signing</tt> が <tt class="docutils literal">disabled</tt> になるはず。</p>
<div class="highlight"><pre><span></span>$ csrutil status
System Integrity Protection status: enabled <span class="o">(</span>Custom Configuration<span class="o">)</span>.
Configuration:
Apple Internal: disabled
Kext Signing: disabled
Filesystem Protections: enabled
Debugging Restrictions: enabled
DTrace Restrictions: enabled
NVRAM Protections: enabled
BaseSystem Verification: enabled
This is an unsupported configuration, likely to <span class="nb">break</span> in the future and leave your machine in an unknown state.
</pre></div>
<p>なお、 <tt class="docutils literal">Apple Internal</tt> は <tt class="docutils literal">disabled</tt> と表示されていても有効らしい。
なぜかは分からんので気にしたら負け。</p>
</div>
<div class="section" id="usb-rsaq2usb-rsaq5">
<h3>USB-RSAQ2とUSB-RSAQ5の情報を調べる</h3>
<p>MacにUSB-RSAQ2あるいはUSB-RSAQ5を接続する。
System Informationを起動し(Optionを押しながらメニューバー左のりんごマークを押すなどすれば)、USBの項目でProduct IDとVendor IDをメモる。</p>
<p>自分が確認したものは以下の通り。</p>
<div class="highlight"><pre><span></span>USB-RSAQ2
Product ID: 0x04bb
Vendor ID: 0x067b
USB-RSAQ5
Product ID: 0x0a0e
Vendor ID: 0x04bb
</pre></div>
<p>16進数はbcコマンドや電卓で10進数を確認しておく。</p>
<div class="highlight"><pre><span></span>$ <span class="nb">echo</span> <span class="s2">"ibase=16; 4BB; 67B; A0E; 4BB"</span> <span class="p">|</span> bc
<span class="m">1211</span>
<span class="m">1659</span>
<span class="m">2574</span>
<span class="m">1211</span>
</pre></div>
</div>
<div class="section" id="id4">
<h3>USB-RSAQ2とUSB-RSAQ5の情報を追加する</h3>
<p><tt class="docutils literal">/Library/Extensions/ProlificUsbSerial.kext/Contents/Info.plist</tt> を↓のような感じで変更する。
<tt class="docutils literal"><key></tt> のところは16進数のProduct IDとVendor IDを <tt class="docutils literal">_</tt> でつなげたものとなっているようなので、該当のものがないことを検索して確認してから追加すると良い。
<tt class="docutils literal">idProduct</tt> と <tt class="docutils literal">idVendor</tt> は先ほど調べた10進数を書く。</p>
<div class="highlight"><pre><span></span><span class="gd">--- /Library/Extensions/ProlificUsbSerial.kext/Contents/Info.plist.orig 2018-06-28 08:30:29.000000000 +0900</span>
<span class="gi">+++ /Library/Extensions/ProlificUsbSerial.kext/Contents/Info.plist 2018-06-28 08:36:18.000000000 +0900</span>
<span class="gu">@@ -108,6 +108,40 @@</span>
<key>idVendor</key>
<integer>1659</integer>
</dict>
<span class="gi">+ <key>067B_04BB</key></span>
<span class="gi">+ <dict></span>
<span class="gi">+ <key>CFBundleIdentifier</key></span>
<span class="gi">+ <string>com.prolific.driver.PL2303</string></span>
<span class="gi">+ <key>IOClass</key></span>
<span class="gi">+ <string>com_prolific_driver_PL2303</string></span>
<span class="gi">+ <key>IOProviderClass</key></span>
<span class="gi">+ <string>IOUSBInterface</string></span>
<span class="gi">+ <key>bConfigurationValue</key></span>
<span class="gi">+ <integer>1</integer></span>
<span class="gi">+ <key>bInterfaceNumber</key></span>
<span class="gi">+ <integer>0</integer></span>
<span class="gi">+ <key>idProduct</key></span>
<span class="gi">+ <integer>1211</integer></span>
<span class="gi">+ <key>idVendor</key></span>
<span class="gi">+ <integer>1659</integer></span>
<span class="gi">+ </dict></span>
<span class="gi">+ <key>04BB_0A0E</key></span>
<span class="gi">+ <dict></span>
<span class="gi">+ <key>CFBundleIdentifier</key></span>
<span class="gi">+ <string>com.prolific.driver.PL2303</string></span>
<span class="gi">+ <key>IOClass</key></span>
<span class="gi">+ <string>com_prolific_driver_PL2303</string></span>
<span class="gi">+ <key>IOProviderClass</key></span>
<span class="gi">+ <string>IOUSBInterface</string></span>
<span class="gi">+ <key>bConfigurationValue</key></span>
<span class="gi">+ <integer>1</integer></span>
<span class="gi">+ <key>bInterfaceNumber</key></span>
<span class="gi">+ <integer>0</integer></span>
<span class="gi">+ <key>idProduct</key></span>
<span class="gi">+ <integer>2574</integer></span>
<span class="gi">+ <key>idVendor</key></span>
<span class="gi">+ <integer>1211</integer></span>
<span class="gi">+ </dict></span>
</dict>
<key>OSBundleLibraries</key>
<dict>
</pre></div>
</div>
<div class="section" id="kextload">
<h3>kextload!</h3>
<p>あとは <tt class="docutils literal">kextload</tt> すれば幸せになれる。</p>
<div class="highlight"><pre><span></span>$ sudo kextload /Library/Extensions/ProlificUsbSerial.kext
</pre></div>
<p>USB-RSAQ2などをMacにつなぐと <tt class="docutils literal">/dev/cu.usbserial</tt> が現れる。
2つ同時につなぐと <tt class="docutils literal">/dev/cu.usbserial6</tt> というのも現れた。
数字がどうやって決まるのかは良く分かっていない。</p>
<div class="highlight"><pre><span></span>$ ls /dev/cu.usb*
/dev/cu.usbserial /dev/cu.usbserial6
</pre></div>
</div>
</div>
<div class="section" id="id5">
<h2>参考にしたページ</h2>
<ul class="simple">
<li><a class="reference external" href="https://qiita.com/kawasakisa/items/9ecfbbc67dc0a7ceae65">Qiita「USB-RSAQ2(PL2303)をMacOS Sierraで使う」</a></li>
</ul>
</div>
</section>
<section id="comments">
<!-- Disqus -->
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE
* SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT:
* https://disqus.com/admin/universalcode/#configuration-variables
*/
var disqus_config = function () {
this.language = 'ja';
this.page.url = 'http://pman0214.github.io/blog/usb-serial-sierra.html';
this.page.identifier = 'usb-serial-sierra';
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//pman0214-plog.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</section>
</article>
</main>
</div>
<div class="pure-u-1 pure-u-lg-1-4">
<aside id="sidebar">
<section>
<h1>About pman0214</h1>
<p>ハードからソフトまで分かる研究者。そういうものに私はなりたい。</p>
</section>
<section>
<h1>Links</h1>
<ul class="links">
<li><a href="https://www.f.ait.kyushu-u.ac.jp/~ishida/">Research</a></li>
</ul>
</section>
<section>
<h1>Social Links</h1>
<ul class="links">
<li><a href="https://www.facebook.com/pman0214">facebook</a></li>
<li><a href="https://twitter.com/pman0214">twitter</a></li>
<li><a href="https://github.com/pman0214">github</a></li>
</ul>
</section>
<section class="tags">
<h1>Tags</h1>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/autofs.html">autofs</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/backlogs.html">backlogs</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/bios.html">bios</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/blog.html">blog</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/category.html">category</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/chrome.html">chrome</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/chromium.html">chromium</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/cron.html">cron</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/css-framework.html">css framework</a>
<a class="tag tag-1" href="http://pman0214.github.io/blog/tag/debian.html">debian</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/dpkg.html">dpkg</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/efi.html">efi</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/emacs.html">emacs</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/fft.html">fft</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/format.html">format</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/github.html">github</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/gitlab.html">gitlab</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/gnuplot.html">gnuplot</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/html.html">html</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/ieice.html">ieice</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/info.html">info</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/install.html">install</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/latex.html">latex</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/ldap.html">ldap</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/line-style.html">line style</a>
<a class="tag tag-1" href="http://pman0214.github.io/blog/tag/linux.html">linux</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/numpy.html">numpy</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/openwrt.html">openwrt</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/openwrt-package.html">openwrt package</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/osx.html">osx</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/pandas.html">pandas</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/pelican.html">pelican</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/pl2303.html">pl2303</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/prolific.html">prolific</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/pthread.html">pthread</a>
<a class="tag tag-1" href="http://pman0214.github.io/blog/tag/python.html">python</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/raid.html">raid</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/raspberry-pi.html">raspberry pi</a>
<a class="tag tag-2" href="http://pman0214.github.io/blog/tag/redmine.html">redmine</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/rfft.html">rfft</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/tex.html">tex</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/thin-client.html">thin client</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/timezone.html">timezone</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/usbserial.html">usbserial</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/valgrind.html">valgrind</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/virtualenv.html">virtualenv</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/windows.html">windows</a>
<a class="tag tag-4" href="http://pman0214.github.io/blog/tag/yatex.html">yatex</a>
<p><a href="http://pman0214.github.io/blog/tags.html">See all...</a></p>
</section>
</aside>
</div>
<!-- #layout --></div>
<footer id="footer">
© 2018 pman0214
|
Powered by <a href="http://docs.getpelican.com/" target="_blank">Pelican</a>
with <a href="https://github.com/pman0214/pelican-pure" target="_blank">Pure theme</a>
</footer>
</body>
</html>