<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>logIt &#187; comparison</title>
	<atom:link href="https://lakm.us/logit/tag/comparison/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Modem usb_modeswitch in Raspberry Pi</title>
		<link>https://lakm.us/logit/2013/03/modem-usb_modeswitch-raspberry-pi/</link>
		<comments>https://lakm.us/logit/2013/03/modem-usb_modeswitch-raspberry-pi/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 03:35:30 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[ARMv6]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=571</guid>
		<description><![CDATA[USB modem these days are plug-and-play as CD-ROM first allowing driver and internet dialer application installations and then as modem afterwards. This Windows-behavior is handled by USB_ModeSwitch in Linux. Likely three years ago we did eject and other driver attachment by writing udev rules. Now it&#8217;s almost automatically attached as modem after insertion and people [...]]]></description>
				<content:encoded><![CDATA[<p>USB modem these days are plug-and-play as CD-ROM first allowing driver and internet dialer application installations and then as modem afterwards. This Windows-behavior is handled by <a href="http://www.draisberghof.de/usb_modeswitch/" target="_blank">USB_ModeSwitch</a> in Linux. Likely three years ago we did eject and other driver attachment by <a href="http://www.reactivated.net/writing_udev_rules.html" target="_blank">writing <code>udev</code> rules</a>.</p>
<p>Now it&#8217;s almost automatically attached as modem after insertion and people have been contributing to list of device-and-target device after mode-switching (find it as <code>/usr/share/usb_modeswitch/configPack.tar.gz</code>). At least for <a href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi (RPi)</a>, I have one device list from August 2012 when playing around with <a href="http://xbian.org/" target="_blank">XBian 0.8.3</a> and one from May 2012 in when using <a href="http://www.raspbian.org/" target="_blank">Raspbian Wheezy (2012-08-16)</a>.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="old-huawei-e220-newer-e153-raspberry-pi-compatibility.jpg" src="../../../../images/old-huawei-e220-newer-e153-raspberry-pi-compatibility.jpg" title="Huawei E220 requires no mode-switch" width="310" height="380" /><p class="wp-caption-text">Huawei E220 requires no mode-switch from vendor-product ID 12d1:1003 to function as modem</p></div>
<p>There is still wrapper for udev in <code>/lib/udev/rules.d/40-usb_modeswitch.rule</code> and my Huawei E153 HSDPA stick recognized and switched successfully as shown:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">usb_modeswitch: switching device 12d1:<span style="color: #000000;">1446</span> on 001<span style="color: #000000; font-weight: bold;">/</span>005
...
logger: usb_modeswitch: switched to 12d1:14ac on 001<span style="color: #000000; font-weight: bold;">/</span>006</pre></div></div>

<p><span id="more-571"></span>But I didn&#8217;t get there in the first place. Because of USB power problem (<a href="../../../2013/03/raspberry-pi-common-usb-problems/" title="Raspberry Pi Common USB Problems" target="_blank">detailed in previous post</a>), I used to plug USB devices before powering up so that I could use <a href="http://htc-linux.org/wiki/index.php?title=File:Usb-y-power-cable.jpg" title="File:Usb-y-power-cable.jpg" target="_blank">Y-cable injected by separate power source</a> without powered USB-hub. It turned out that if I had plugged the USB before powering up the RPi the mode-switching didn&#8217;t occur.</p>
<p>The HSDPA USB modem used is <a href="http://www.huaweidevice.co.id/webmain/main/product/detail/35/huawei-e153" target="_blank">Huawei E153</a> appearing in <code>lsusb</code> with vendor-product ID <code>12d1:1446</code>. Using aforementioned <a href="http://xbian.org/" target="_blank">XBian</a> and target device <code>12d1:140c</code> (suggested in <a href="http://www.santinoli.com/open/e1692-howto.html" target="_blank">Santinoli&#8217;s post</a>), I arbitrarily succeeded to switch to modem and dial internet with <code>pppd</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ usb_modeswitch <span style="color: #660033;">-v</span> 12d1 <span style="color: #660033;">-p</span> <span style="color: #000000;">1446</span> <span style="color: #660033;">-P</span> 140c</pre></div></div>

<p>(I placed Santinoli&#8217;s config in <code>/etc/usb_modeswitch.conf</code>)<br />
This wasn&#8217;t stable however (also note that XBian consumed CPU above 50% for <a href="http://xbmc.org/" title="XBMC" target="_blank"><code>xbmc</code></a>).</p>
<p>Later I find out that it will automatically switch to <code>12d1:14ac</code> instead when plugged in after RPi is up. However, since it also won&#8217;t switch if plugged before power-up, I also try to mode-switch manually using config file found inside <code>/usr/share/usb_modeswitch/configPack.tar.gz</code> archive named <code>12d1:1446</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ usb_modeswitch <span style="color: #660033;">-v</span> 12d1 <span style="color: #660033;">-p</span> <span style="color: #000000;">1446</span> <span style="color: #660033;">-c</span> 12d1\:<span style="color: #000000;">1446</span></pre></div></div>

<p>It doesn&#8217;t seem to work. Modification to something close to my previous config also fails. Hence, consistent result only occurs if the stick is plugged in after RPi up. Then I decide to use USB-hub (also <a href="../../../2013/03/raspberry-pi-common-usb-problems/" title="Raspberry Pi Common USB Problems" target="_blank">detailed in previous post</a>) to tackle power issue (it will reboot anyway if you plug in without adequate powering). However, after successful mode-switch what&#8217;s being reported in <a href="http://elinux.org/RPi_VerifiedPeripherals">eLinux Wiki</a> often happens: it slows down, try <code>lsub</code> command for example.</p>
<p>Currently I give up the idea of using that modem and choose older <a href="http://en.wikipedia.org/wiki/Huawei_E220" target="_blank">Huawei E220</a>:</p>
<ol>
<li>No <code>usb_modeswitch</code>. <a href="../../../2012/01/compile-usb-serial-modem-using-option-c-ubuntu-on-beagleboard-xm/" title="Compile USB Serial Modem Using option.c (Ubuntu on Beagleboard xM)" target="_blank">Driver attached directly by the kernel as <code>option.ko</code> device</a> (this device has been on the list for long)</li>
<li>Stable. No slowing down</li>
</ol>
<p>The E153 modem itself has been implemented to stream video using the <a href="http://en.wikipedia.org/wiki/ARM_Cortex-A8" target="_blank">higher ARM type</a> <a href="http://beagleboard.org/hardware-xm" target="_blank">BeagleBoard-xM</a> without significant stability issue (check <a href="https://www.youtube.com/watch?v=yFZoFsqAdS8" title="Zoom IP Camera Streaming &#038; Control on BeagleBoard (Over HSDPA Network)" target="_blank">my YouTube demo</a>). It mode-switched when powering up Ubuntu on the Beagle.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2013/03/modem-usb_modeswitch-raspberry-pi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi Common USB Problems</title>
		<link>https://lakm.us/logit/2013/03/raspberry-pi-common-usb-problems/</link>
		<comments>https://lakm.us/logit/2013/03/raspberry-pi-common-usb-problems/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 08:02:29 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[ARMv6]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=556</guid>
		<description><![CDATA[USB problem is the first thing to arise with Raspberry Pi when plugging-in peripherals. This isn&#8217;t exclusive though, learning that my Linux laptop also has it and the higher ARM architecture, BeagleBoard-xM, also experiences the same issue sometime. But with Raspberry Pi (RPi) in]]></description>
				<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Universal_Serial_Bus" title="Universal Serial Bus" target="_blank">USB</a> problem is the first thing to arise with <a href="http://www.raspberrypi.org/" title="www.raspberrypi.org" target="_blank">Raspberry Pi</a> when plugging-in peripherals. This isn&#8217;t exclusive though, learning that my Linux laptop also has it and the higher ARM architecture, <a href="http://beagleboard.org/hardware-xm">BeagleBoard-xM</a>, also experiences the same issue sometime. But with Raspberry Pi (RPi) in <a href="http://www.pcworld.com/article/156494/superspeed_usb.html" title="""Over 6 billion products are in the market, and over 2 billion ship a year now"" target="_blank">the universe of many viable USB device options</a>, you&#8217;ll definitely need to double its popular credit card-sized form to have powered USB-hub docked next to it, although Y-cable with separate power assistant injecting the USB device directly is sometime adequate.</p>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.flickr.com/photos/aqila_rifti/8580224756/" title="y-cable . #Pi USB power-hog? buggy? by aqila_rifti, on Flickr"><img src="http://farm9.staticflickr.com/8244/8580224756_00de511912_n.jpg" width="310" height="310" alt="y-cable . #Pi USB power-hog? buggy?"></a><p class="wp-caption-text">Y-cable for USB modem stick &#038; various current rating-AC power adapters for smartphone/tablet to go with Raspberry Pi</p></div>
<p><a href="http://elinux.org/RPi_VerifiedPeripherals" title="RPi Verified Peripherals" target="_blank">eLinux Wiki lists</a> market available USB-hubs reported to work. A decent brand (that will cost you) qualifies:</p>
<ul>
<li>Doesn&#8217;t leak power back to RPi via USB port (check this by unplugging the main power, then check the red LED indicator) as this will interfere with the <code>reboot</code> command (physical state vs software).</li>
<li>Provides charging from one of its port for RPi, meaning no separate source for <a href="http://www.raspberrypi.org/archives/260" title="Power supply confirmed as 5V micro USB" target="_blank">the exclusive 700 mA requirement</a>. A single AC power adapter with high current rating will fit all (check <a href="http://www.ianrolfe.com/raspberry-pi/keys-to-getting-the-pi-working/" title="Keys to getting the Pi working" target="_blank">single power connectivity sketch in this blog post</a>)</li>
</ul>
<p><span id="more-556"></span>An ugly situation when I plugged in WiFi stick and modem looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1836.871640</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> smsc95xx <span style="color: #000000;">1</span>-<span style="color: #000000;">1.1</span>:<span style="color: #000000;">1.0</span>: eth0: Failed to <span style="color: #c20cb9; font-weight: bold;">read</span> register index 0x00000118
...
kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1803.780601</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> phy0 -<span style="color: #000000; font-weight: bold;">&gt;</span> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed <span style="color: #000000; font-weight: bold;">for</span> offset 0x101c with error -110.</pre></div></div>

<p>tail of the above <code>syslog</code> is saying error with the (1) ethernet (<a href="http://www.raspberrypi.org/faqs" target="_blank">this is actually also a USB 2.0</a> but not appearing in <code>lsusb</code> command) and (2) the WiFi stick used (in this case with <a href="http://www.mediatek.com/_en/01_products/04_pro.php?sn=1007">RT5370 chipset</a>). Then, of course (3) doing things with the just plugged modem you&#8217;ll expect more instability.</p>
<p>I mentioned <a href="http://beagleboard.org/hardware-xm">BeagleBoard-xM</a> which also came with similar USB ethernet on-board. Unfortunately, Beagle was more stable when my case was to have it stream a zoom-camera input to internet (check <a href="https://www.youtube.com/watch?v=yFZoFsqAdS8" title="Zoom IP Camera Streaming &#038; Control on BeagleBoard (Over HSDPA Network)" target="_blank">my YouTube demo</a>). The camera decoder and modem were both USB plugged without Y-cable or additional power supply. As a standalone system, part of the design was to <code>reboot</code> under trouble detected by the software. Again, OS command <code>reboot</code> is not achievable consistently with the RPi when power backfeeds through USB port.</p>
<p>(PS: Note that previous comparison solely points out what to expect when dealing with USB among other considerations e.g. price, different ARM, etc. which are entirely different.)</p>
<p>As an absolute requirement for me, I found a powered USB-hub available in Indonesian market as <strong>7 ports XTec Go</strong>. Yes, it leaks power back as confirmed by the vendor-product ID <code>05e3:0608</code> of the chipset listed in <a href="http://elinux.org/RPi_VerifiedPeripherals" title="RPi Verified Peripherals" target="_blank">eLinux Wiki lists</a> with a bunch of different names (judging the picture, <a href="http://uk.shopping.com/Hama-USB2-0-HUB-1-7-M-NETZT-KA/info?sb=1" target="_blank">Hama</a> is closest).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ lsusb
...
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-<span style="color: #000000;">2.0</span> <span style="color: #000000;">4</span>-Port HUB
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-<span style="color: #000000;">2.0</span> <span style="color: #000000;">4</span>-Port HUB
...</pre></div></div>

<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.flickr.com/photos/aqila_rifti/8581522699/" title="old HSDPA Huawei modem requiring no usb_modeswitch. Cheap USB hub Genesys chipset. WiFi stick. #Pi by aqila_rifti, on Flickr"><img src="http://farm9.staticflickr.com/8510/8581522699_b1bfcdf05f_n.jpg" width="300" height="300" alt="old HSDPA Huawei modem requiring no usb_modeswitch. Cheap USB hub Genesys chipset. WiFi stick. #Pi"></a><p class="wp-caption-text">Three Musketeers: powered USB-hub (Genesys chipset), Huawei E220 HSDPA modem, and TL-WN727N WiFi stick</p></div>
<p>My el cheapo USB-hub, HDSPA modem, and WiFi stick are the matchmaking of brands shown in the above image. It achieves long uptime like 6 hours serving internet when RPi used as router. I still use separate AC power adapter on the go with me: regular 700 mA that comes with smartphone will do for the RPi, while for the USB-hub, I have 2A rating from tablet charger. However, I&#8217;ve also plugged separate 500 mA charger for the hub without problem and/or excessive heat (you need to touch the supply sometime to feel any nasty heat as some of them might have been low quality build that could blow up. Yes it did). My plan with mobility is to have power bank with dual USB charging output (<a href="http://www.amazon.com/HAME-10400mAh-Double-Indicators-Capacity/dp/B00B5OFC5I" title="HAME MP1 10400mAh Power Bank Double USB Output 5V/1A &#038; 5V/2.1A 4 LED Indicators Show Power Level Full Capacity" target="_blank">this Hame has 1A and 2.1A</a>) when no AC source nears.</p>
<p>Have I tested other USB modem stick? Check <a href="../../../2013/03/modem-usb_modeswitch-raspberry-pi/" title="Modem usb_modeswitch in Raspberry Pi" target="_blank">my other post related to <code>usb_modeswitch</code></a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2013/03/raspberry-pi-common-usb-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
