<?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>apt-blog.net   无证程序员的PT桑 &#187; EDGE</title>
	<atom:link href="http://apt-blog.net/tag/edge/feed" rel="self" type="application/rss+xml" />
	<link>http://apt-blog.net</link>
	<description>潜逃中。</description>
	<lastBuildDate>Fri, 18 May 2012 11:25:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ubuntu 下使用蓝牙/USB连接黑莓8700上网</title>
		<link>http://apt-blog.net/blackberry_as_bluetooth_and_usb_modem_for_ubuntu</link>
		<comments>http://apt-blog.net/blackberry_as_bluetooth_and_usb_modem_for_ubuntu#comments</comments>
		<pubDate>Thu, 17 Dec 2009 16:29:37 +0000</pubDate>
		<dc:creator>PT</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[EDGE]]></category>
		<category><![CDATA[GPRS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[蓝牙]]></category>
		<category><![CDATA[黑莓]]></category>
		<guid isPermaLink="false">http://apt-blog.net/blackberry_as_bluetooth_and_usb_modem_for_ubuntu</guid>
		<description><![CDATA[黑莓8700支持EDGE网络，用来做GPRS Modem是相当理想的，标准的mini usb接口，蓝牙2.0，完全足够EDGE的网络速度； 本来以为用蓝牙连接会很简单，在blueman里面连接即可，可是实际上，不行： Failed: Modem Manager did not support the connection 之前用blueman连接Nokia的机，是没问题的，看来黑莓的Modem协议有点不同……Google了一下，找到了不少BB在Linux下的资料：How use BlackBerry device with Linux【介绍了Linux对黑莓的配置、同步、安装软件、Modem、Java开发】how to teather blackberry and linux via bluetooth【连BB蓝牙的完整过程，试验不成功】Berry4all 通过USB连接BB Modem的专用程序 测试Berry4all终于能够连接上BB的GPRS，观察Berry4all其实也是建立了串口通信后，使用pppd的协议来建立数据链接的，要连接cmnet，还得修改其conf下的att-chat，即其中的“拨号”协议； blueman虽然不能建立Modem链接，但是还是能够建立起/dev/rfcomm0，即通过蓝牙的串口链接；使用蓝牙教程，基本上都是使用hcitool等工具来配置的，使用起来真的好不方便，而blueman不是刚好帮忙搞定了蓝牙的配对连接等麻烦事情么…… 于是把Berry4all的conf目录的att跟att-chat文件复制到/etc/ppp/peers，参照别的教程的配置，修改att，在开始115200那行前，加入nodetach跟/dev/rfcomm0两行，最后的connect调用chat文件的路径改成connect "/usr/sbin/chat -f /etc/ppp/peers/att-chat"，att-chat里面修改一行：OK 'AT+CGDCONT=1,"IP","cmnet"' ，最后运行sudo pppd call att，终于用蓝牙连上了GPRS； 其实使用ppp连接modem的方法是最传统的，也是高度可定制（如连接后配置路由表、IP、DNS），不管是用Cable、USB、蓝牙还是红外，都可以这样完成，Of Linux, GPRS Phones, Serial Cable, Irda, Bluetooth and USB文章里面列举了好多这些例子；我修改了其中的三个脚本：gprs, gprs-connect-chat, gprs-disconnect-chat替代了上面Berry4all的att脚本，因为这脚本里面的注释非常详细，以防以后需要的调整； 这是我打包了修改好后（适用于移动CMNET上网的）gprs脚本，使用blueman连接了rfcomm0后，运行sudo pppd call gprs，就能连接上GPRS，ifconfig查看出现一个ppp0，可以直接上网了； 如果不使用blueman，完全使用bluez的工具的话，可以参照Blackberry [...]]]></description>
			<content:encoded><![CDATA[<p>黑莓8700支持EDGE网络，用来做GPRS Modem是相当理想的，标准的mini usb接口，蓝牙2.0，完全足够EDGE的网络速度；</p>
<p>本来以为用蓝牙连接会很简单，在blueman里面连接即可，可是实际上，不行：</p>
<blockquote><p><img style="max-width: 800px; width: 332px; height: 195px;" src="http://apt-blog.net/wp-content/uploads/2009/12/blueman_fail.png" /></p>
<p>Failed: Modem Manager did not support the connection</p></blockquote>
<p>之前用blueman连接Nokia的机，是没问题的，看来黑莓的Modem协议有点不同……Google了一下，找到了不少BB在Linux下的资料：<br /><a target="_blank" href="http://www.progweb.com/modules/blackberry/index-en.html">How use BlackBerry device with Linux</a>【介绍了Linux对黑莓的配置、同步、安装软件、Modem、Java开发】<br /><a target="_blank" href="http://naraku.net/2008/08/15/how-to-teather-blackberry-and-linux-via-bluetooth/">how to teather blackberry and linux via bluetooth</a>【连BB蓝牙的完整过程，试验不成功】<br /><a target="_blank" href="http://www.berry4all.com/">Berry4all</a> 通过USB连接BB Modem的专用程序</p>
<p>测试<a target="_blank" href="http://www.berry4all.com/">Berry4all</a>终于能够连接上BB的GPRS，观察<a target="_blank" href="http://www.berry4all.com/">Berry4all</a>其实也是建立了串口通信后，使用pppd的协议来建立数据链接的，要连接cmnet，还得修改其conf下的att-chat，即其中的“拨号”协议；</p>
<p>blueman虽然不能建立Modem链接，但是还是能够建立起/dev/rfcomm0，即通过蓝牙的串口链接；使用蓝牙教程，基本上都是使用hcitool等工具来配置的，使用起来真的好不方便，而blueman不是刚好帮忙搞定了蓝牙的配对连接等麻烦事情么……</p>
<p>于是把<a target="_blank" href="http://www.berry4all.com/">Berry4all</a>的conf目录的att跟att-chat文件复制到/etc/ppp/peers，参照别的教程的配置，修改att，在开始115200那行前，加入nodetach跟/dev/rfcomm0两行，最后的connect调用chat文件的路径改成connect "/usr/sbin/chat -f /etc/ppp/peers/att-chat"，att-chat里面修改一行：OK 'AT+CGDCONT=1,"IP","cmnet"' ，最后运行sudo pppd call att，终于用蓝牙连上了GPRS；</p>
<p>其实使用ppp连接modem的方法是最传统的，也是高度可定制（如连接后配置路由表、IP、DNS），不管是用Cable、USB、蓝牙还是红外，都可以这样完成，<a href="http://www.iki.fi/mikko.rapeli/linux_gprs.html" target="_top">Of Linux, GPRS Phones, Serial Cable, Irda, Bluetooth and USB</a>文章里面列举了好多这些例子；我修改了其中的三个脚本：gprs, gprs-connect-chat, gprs-disconnect-chat替代了上面<a target="_blank" href="http://www.berry4all.com/">Berry4all</a>的att脚本，因为这脚本里面的注释非常详细，以防以后需要的调整；</p>
<p><a target="_blank" href="http://ptcoding.googlecode.com/files/grps.zip">这是我打包了修改好后</a>（适用于移动CMNET上网的）gprs脚本，使用blueman连接了rfcomm0后，运行sudo pppd call gprs，就能连接上GPRS，ifconfig查看出现一个ppp0，可以直接上网了；</p>
<blockquote><p><img style="max-width: 800px; width: 446px; height: 295px;" src="http://apt-blog.net/wp-content/uploads/2009/12/bb_connected.png" /></p></blockquote>
<p>如果不使用blueman，完全使用bluez的工具的话，可以参照<a href="http://pegelinux.wordpress.com/2008/06/11/blackberry-curve-8310-as-bluetooth-modem-on-ubuntu-hardy/" rel="bookmark" title="Permanent Link: Blackberry Curve 8310 as Bluetooth Modem on Ubuntu&nbsp;Hardy">Blackberry Curve 8310 as Bluetooth Modem on Ubuntu&nbsp;Hardy</a>，我没测试，不过按理说是可行的。</p>
<p>之所以这么折腾，其实可以说blueman的一个bug吧，似乎BB的Modem没啥特别，按通用的Modem都能连接到；有时间看看blueman的代码看能不能弄好……</p>
]]></content:encoded>
			<wfw:commentRss>http://apt-blog.net/blackberry_as_bluetooth_and_usb_modem_for_ubuntu/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

