Macbook command key to alt
맥북에 ubuntu를 설치해서 사용하면 command키가 은근 거슬린다.
원래 alt자리에 command키가 있기 때문에 평소처럼 command키를 alt키로 사용하고 싶다.
그럴때는 gnome-tweak-tool
을 이용하자
sudo apt-get update
sudo apt-get install gnome-tweak-tool
설치를 한 후 실행한다. 터미널을 열고 실행
실행 후 typing
탭에서 alt/win key behavior
을 조정해 주면되는데
alt is mapped to win keys
로 설정해 주면 command키가 alt키로 변경된다.
How to pairing bluetooth device
이 글에서는 안드로이드 어플에서 직접 주변에 있는 기기들을 검색하고 pairing을 수행하는 방법에 대해서 설명한다.
이전 글에서는 페어링이 되어있는 기기 목록에서 사용자가 선택하여 기기에 연결하는 방법에 대해서 설명하였다.
이 글에서 사용된 블루투스 연결 기기는 일반적으로 많이 사용되는 HC-06 블루투스 모듈이다.
1. 블루투스 관련 권한 설정
안드로이드 디바이스에서 블루투스 관련 기능을 사용하기 위해서는 블루투스 관련 권한 설정을 해야한다.
또한 블루투스 권한설정 뿐만 아니라 주변 기기의 검색을 위해서는 위치 접근에 대한 권한이 필요하다. 따라서 다음과 같이 4개에 대해서 접근 권한을 설정한다.
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
안드로이드 디바이스에서 블루투스 권한을 얻기 위해서는 AndroidManifest.xml
파일에 위의 코드 두줄을 추가해 줘야 한다.
2. 블루투스 기기 검색에 대한 IntentFilter 설정
안드로이드의 IntentFilter는 안드로이드 시스템이나 다른 어플에서 broadcast하는 메세지를 받을 수 있도록 설정하는 것이다. 즉 어떤 메세지를 날렸을 때 받을 것인지를 설정하는 것이다. 아래 코드는 블루투스의 상태변화, 연결됨, 연결 끊어짐 등에 대한 설정 뿐만 아니라 기기 검색 시작, 종료, 검색됨 등에 대한 메세지도 받을 수 있도록 설정하는 코드이다.
IntentFilter stateFilter = new IntentFilter();
stateFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); //BluetoothAdapter.ACTION_STATE_CHANGED : 블루투스 상태변화 액션
stateFilter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
stateFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); //연결 확인
stateFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED); //연결 끊김 확인
stateFilter.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
stateFilter.addAction(BluetoothDevice.ACTION_FOUND); //기기 검색됨
stateFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED); //기기 검색 시작
stateFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); //기기 검색 종료
stateFilter.addAction(BluetoothDevice.ACTION_PAIRING_REQUEST);
registerReceiver(mBluetoothStateReceiver, stateFilter);
registerReceiver
는 intentfilter를 특정 broadcast receiver로 연결시켜주는 역할을 한다. 이 코드에서는 mBluetoothStateReceiver
라는 broadcast receiver에 연결시켜 주었다. 만약 앱이 비활성화 상태일 때 broadcast를 수신하지 않도록 하기 위해서는 onPause
와 같은 함수에서 unregister를 해주어야 한다.
unregisterReceiver(bluetoothRequest.mBluetoothStateReceiver);
3. Broadcast Receiver 정의
다음으로는 Intentfilter에 의해서 메세지를 수신할 broadcast receiver를 정의해야 한다.
BroadcastReceiver mBluetoothStateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction(); //입력된 action
Toast.makeText(context, "받은 액션 : "+action , Toast.LENGTH_SHORT).show();
Log.d("Bluetooth action", action);
final BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
String name = null;
if (device != null) {
name = device.getName(); //broadcast를 보낸 기기의 이름을 가져온다.
}
//입력된 action에 따라서 함수를 처리한다
switch (action){
case BluetoothAdapter.ACTION_STATE_CHANGED: //블루투스의 연결 상태 변경
final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
switch(state) {
case BluetoothAdapter.STATE_OFF:
break;
case BluetoothAdapter.STATE_TURNING_OFF:
break;
case BluetoothAdapter.STATE_ON:
break;
case BluetoothAdapter.STATE_TURNING_ON:
break;
}
break;
case BluetoothDevice.ACTION_ACL_CONNECTED: //블루투스 기기 연결
break;
case BluetoothDevice.ACTION_BOND_STATE_CHANGED:
break;
case BluetoothDevice.ACTION_ACL_DISCONNECTED: //블루투스 기기 끊어짐
break;
case BluetoothAdapter.ACTION_DISCOVERY_STARTED: //블루투스 기기 검색 시작
break;
case BluetoothDevice.ACTION_FOUND: //블루투스 기기 검색 됨, 블루투스 기기가 근처에서 검색될 때마다 수행됨
String device_name = device.getName();
String device_Address = device.getAddress();
//본 함수는 블루투스 기기 이름의 앞글자가 "GSM"으로 시작하는 기기만을 검색하는 코드이다
if(device_name != null && device_name.length() > 4){
Log.d("Bluetooth Name: ", device_name);
Log.d("Bluetooth Mac Address: ", device_Address);
if(device_name.substring(0,3).equals("GSM")){
bluetooth_device.add(device);
}
}
break;
case BluetoothDevice.ACTION_DISCOVERY_FINISHED: //블루투스 기기 검색 종료
Log.d("Bluetooth", "Call Discovery finished");
StartBluetoothDeviceConnection(); //원하는 기기에 연결
break;
case BluetoothDevice.ACTION_PAIRING_REQUEST:
break;
}
}
};
위와 같이 주변의 블루투스 기기를 검색해서 처리하기 위한 broadcast receiver를 등록하였다.
주변에 모든 블루투스 기기를 모두 검색하기 위해서는 약 11초 전후의 시간이 걸리며 action의 순서는 다음과 같다.
사용자 검색 요청 -> BluetoothAdapter.ACTION_DISCOVERY_STARTED
-> BluetoothDevice.ACTION_FOUND
(검색되는 기기 갯수대로) -> BluetoothDevice.ACTION_DISCOVERY_FINISHED
따라서 검색되는 기기에 대한 저장을 한 후에 BluetoothDevice.ACTION_DISCOVERY_FINISHED
가 수행되었을 때 원하는 기기에 접근해서 페어링을 수행하면 된다.
4. 블루투스 기기 검색 요청
블루투스 기기에 대한 요청을 하기 위해서는 bluetooth adapter 객체를 가지고 있어야 한다.
이전 블루투스 연결 글에서 처럼 다음과 같은 맴버 변수가 있으며 다음과 같이 검색 수행을 시작시킬 수 있다.
private static final int REQUEST_ENABLE_BT = 3;
public BluetoothAdapter mBluetoothAdapter = null;
Set<BluetoothDevice> mDevices;
int mPairedDeviceCount;
BluetoothDevice mRemoteDevice;
BluetoothSocket mSocket;
InputStream mInputStream;
OutputStream mOutputStream;
Thread mWorkerThread;
int readBufferPositon; //버퍼 내 수신 문자 저장 위치
byte[] readBuffer; //수신 버퍼
byte mDelimiter = 10;
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); //블루투스 adapter 획득
mBluetoothAdapter.startDiscovery(); //블루투스 기기 검색 시작
mBluetoothAdapter.startDiscovery()
가 실행되면 블루투스 기기 검색이 시작되며 broadcast receiver로 메세지가 들어오게 된다.
이제 검색이 시작되었으니 검색이 종료되었을 때, 즉 BluetoothDevice.ACTION_DISCOVERY_FINISHED
이 수행될 때 검색된 목록 중에서
원하는 기기로 연결을 하면 된다.
본 예제에서는 검색 종료시 StartBluetoothDeviceConnection()
함수가 수행되었다.
5. 검색된 블루투스 기기에 페어링 및 연결
앞에서 검색된 기기의 이름은 bluetooth_device
라는 맴버변수에 저장되어 있다. 이제 이 리스트 중에서 연결한 기기를 사용자가 선택할 수 있도록 해준다.
그리고 사용자가 선택할 경우 그 기기에 연결을 수행한다.
public void StartBluetoothDeviceConnection(){
//Bluetooth connection start
if(bluetooth_device.size() == 0){
Toast.makeText(activity,"There is no device", Toast.LENGTH_SHORT).show();
}
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.select_device_title);
// 페어링 된 블루투스 장치의 이름 목록 작성
List<String> listItems = new ArrayList<String>();
for (BluetoothDevice bt_device : bluetooth_device) {
listItems.add(bt_device.getName());
}
listItems.add("Cancel"); // 취소 항목 추가
final CharSequence[] items = listItems.toArray(new CharSequence[listItems.size()]);
builder.setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Dialog dialog_ = (Dialog) dialog;
if (which == bluetooth_device.size()) {
// 연결할 장치를 선택하지 않고 '취소'를 누른 경우
} else {
// 기기 이름을 선택한 경우 선택한 기기 이름과 같은 블루투스 객체를 찾아서 연결을 시도한다
for (BluetoothDevice bt_device : bluetooth_device) {
if (bt_device.getName().equals(items[which].toString())) {
Log.d("Bluetooth Connect", bt_device.getName());
ConnectBluetoothDevice(bt_device); //해당하는 블루투스 객체를 이용하여 연결 시도
Log.d("Bluetooth Connect", "ConnectBluetoothDevice");
break;
}
}
}
}
});
builder.setCancelable(false); // 뒤로 가기 버튼 사용 금지
AlertDialog alert = builder.create();
alert.show();
Log.d("Bluetooth Connect", "alert start");
}
6. 해당 기기에 연결
이제 사용자가 선택한 블루투스 객체를 이용해서 해당 블루투스 기기에 연결 혹은 pairing을 수행해야 한다.
다음 함수는 이러한 역할을 수행한다.
public void ConnectBluetoothDevice(final BluetoothDevice device){
mDevices = mBluetoothAdapter.getBondedDevices();
mPairedDeviceCount = mDevices.size();
//pairing되어 있는 기기의 목록을 가져와서 연결하고자 하는 기기가 이전 기기 목록에 있는지 확인
boolean already_bonded_flag = false;
if(mPairedDeviceCount > 0){
for (BluetoothDevice bonded_device : mDevices) {
if(activity.bluetooth_device_name.equals(bonded_device.getName())){
already_bonded_flag = true;
}
}
}
//pairing process
//만약 pairing기록이 있으면 바로 연결을 수행하며, 없으면 createBond()함수를 통해서 pairing을 수행한다.
if(!already_bonded_flag){
try {
//pairing수행
device.createBond();
} catch (Exception e) {
e.printStackTrace();
}
}else{
connectToSelectedDevice(device);
}
}
위 코드처럼 이전 연결 목록을 확인하여 처음 연결되는 기기는 createBond()
함수를 통해 페어링을 수행하며, 처음 연결이 아닌 경우에는 바로 연결을 수행한다.
연결을 수행하기 위한 함수인 connectToSelectedDevice
는 이전 글에서 확인할 수 있다.
물론 이러한 블루투스에 연결되는 과정들은 시간이 소요되는 과정들이기 때문에 연결 중에는 로딩화면을 띄워주면 좋다.
위의 코드에서는 로딩 화면을 띄워주는 부분은 포함하고 있지 않다.
How to connect bluetooth device and receive data in android device
이 글은 일반적으로 많이 사용되는 HC-06 블루투스 모듈과 통신하기 위한 방법을 설명한다. HC-06은 블루투스 2.0을 이용하며 최근 많이 사용되고 있는 저전력 블루투스 모듈인 BLE와는 다르다.
1. 블루투스 관련 권한 설정
안드로이드 디바이스에서 블루투스 관련 기능을 사용하기 위해서는 블루투스 관련 권한 설정을 해야한다.
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
안드로이드 디바이스에서 블루투스 권한을 얻기 위해서는 AndroidManifest.xml
파일에 위의 코드 두줄을 추가해 줘야 한다.
이 글에서는 다루지 않고 따로 정리하겠지만 블루투스 연결뿐만 아니라 주변에 있는 블루투스 기기 검색을 위해서는 다음과 같이 ACCESS_COARSE_LOCATION
와 ACCESS_FINE_LOCATION
에 대한 권한도 필요하다.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2. 블루투스 활성화 및 연결
블루투스 연결 관련 함수들을 class 로 작성해서 사용하는 것이 좋은 방법이며 다음과 같은 맴버 변수를 선언하였다.
private static final int REQUEST_ENABLE_BT = 3;
public BluetoothAdapter mBluetoothAdapter = null;
Set<BluetoothDevice> mDevices;
int mPairedDeviceCount;
BluetoothDevice mRemoteDevice;
BluetoothSocket mSocket;
InputStream mInputStream;
OutputStream mOutputStream;
Thread mWorkerThread;
int readBufferPositon; //버퍼 내 수신 문자 저장 위치
byte[] readBuffer; //수신 버퍼
byte mDelimiter = 10;
가장 먼저 사용하는 기기가 블루투스를 지원하는지, 지원한다면 블루투스가 켜져있는지 확인해야 한다.
public void CheckBluetooth(){
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
// 장치가 블루투스 지원하지 않는 경우
Toast.makeText(activity, "Bluetooth no available", Toast.LENGTH_SHORT).show();
} else {
// 장치가 블루투스 지원하는 경우
if (!mBluetoothAdapter.isEnabled()) {
// 블루투스를 지원하지만 비활성 상태인 경우
// 블루투스를 활성 상태로 바꾸기 위해 사용자 동의 요첨
Intent enableBtIntent = new Intent( BluetoothAdapter.ACTION_REQUEST_ENABLE);
activity.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
} else {
// 블루투스를 지원하며 활성 상태인 경우
// 페어링된 기기 목록을 보여주고 연결할 장치를 선택.
selectDevice();
}
}
}
이상이 없는 경우에 pairing 목록에서 연결하고자 하는 기기를 검색해서 사용자에게 선택하도록 한다. 이때 bluetooth 모듈에 연결하기 위해서는 기기와 paring 한 기록이 있어야 한다. paring이 되어 있다는 의미는 기기의 정보가 핸드폰에 등록이 되어 있으며 서로 존재를 알고 있다는 의미이다. pairing은 핸드폰의 블루투스 설정에서 기기 검색을 통해 가능하다. (코드를 통해서 pairing 과정을 수행할 수도 있다. 하지만 이 글에서는 페어링이 되어 있는 기기에 연결하는 과정만을 설명한다)
selectDevice()
함수는 현재 핸드폰에 등록되어 있는 pairing목록을 화면의 띄워서 사용자에게 연결하고자 하는 기기를 선택할 수 있도록 화면을 띄워준다.
private void selectDevice() {
//페어링되었던 기기 목록 획득
mDevices = mBluetoothAdapter.getBondedDevices();
//페어링되었던 기기 갯수
mPairedDeviceCount = mDevices.size();
//Alertdialog 생성(activity에는 context입력)
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
//AlertDialog 제목 설정
builder.setTitle("Select device");
// 페어링 된 블루투스 장치의 이름 목록 작성
final List<String> listItems = new ArrayList<String>();
for (BluetoothDevice device : mDevices) {
listItems.add(device.getName());
}
if(listItems.size() == 0){
//no bonded device => searching
Log.d("Bluetooth", "No bonded device");
}else{
Log.d("Bluetooth", "Find bonded device");
// 취소 항목 추가
listItems.add("Cancel");
final CharSequence[] items = listItems.toArray(new CharSequence[listItems.size()]);
builder.setItems(items, new DialogInterface.OnClickListener() {
//각 아이템의 click에 따른 listener를 설정
@Override
public void onClick(DialogInterface dialog, int which) {
Dialog dialog_ = (Dialog) dialog;
// 연결할 장치를 선택하지 않고 '취소'를 누른 경우
if (which == listItems.size()-1) {
Toast.makeText(dialog_.getContext(), "Choose cancel", Toast.LENGTH_SHORT).show();
} else {
//취소가 아닌 디바이스를 선택한 경우 해당 기기에 연결
connectToSelectedDevice(items[which].toString());
}
}
});
builder.setCancelable(false); // 뒤로 가기 버튼 사용 금지
AlertDialog alert = builder.create();
alert.show(); //alert 시작
}
}
connectToSelectedDevice()
함수는 선택된 기기로 연결하는 과정을 시작하는 함수이다.
private void connectToSelectedDevice(final String selectedDeviceName) {
//블루투스 기기에 연결하는 과정이 시간이 걸리기 때문에 그냥 함수로 수행을 하면 GUI에 영향을 미친다
//따라서 연결 과정을 thread로 수행하고 thread의 수행 결과를 받아 다음 과정으로 넘어간다.
//handler는 thread에서 던지는 메세지를 보고 다음 동작을 수행시킨다.
final Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
if (msg.what == 1) // 연결 완료
{
try {
//연결이 완료되면 소켓에서 outstream과 inputstream을 얻는다. 블루투스를 통해
//데이터를 주고 받는 통로가 된다.
mOutputStream = mSocket.getOutputStream();
mInputStream = mSocket.getInputStream();
// 데이터 수신 준비
beginListenForData();
} catch (IOException e) {
e.printStackTrace();
}
} else { //연결 실패
Toast.makeText(activity,"Please check the device", Toast.LENGTH_SHORT).show();
try {
mSocket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
};
//연결과정을 수행할 thread 생성
Thread thread = new Thread(new Runnable() {
public void run() {
//선택된 기기의 이름을 갖는 bluetooth device의 object
mRemoteDevice = getDeviceFromBondedList(selectedDeviceName);
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
try {
// 소켓 생성
mSocket = mRemoteDevice.createRfcommSocketToServiceRecord(uuid);
// RFCOMM 채널을 통한 연결, socket에 connect하는데 시간이 걸린다. 따라서 ui에 영향을 주지 않기 위해서는
// Thread로 연결 과정을 수행해야 한다.
mSocket.connect();
mHandler.sendEmptyMessage(1);
} catch (Exception e) {
// 블루투스 연결 중 오류 발생
mHandler.sendEmptyMessage(-1);
}
}
});
//연결 thread를 수행한다
thread.start();
}
//기기에 저장되어 있는 해당 이름을 갖는 블루투스 디바이스의 bluetoothdevice 객채를 출력하는 함수
//bluetoothdevice객채는 기기의 맥주소뿐만 아니라 다양한 정보를 저장하고 있다.
BluetoothDevice getDeviceFromBondedList(String name) {
BluetoothDevice selectedDevice = null;
mDevices = mBluetoothAdapter.getBondedDevices();
//pair 목록에서 해당 이름을 갖는 기기 검색, 찾으면 해당 device 출력
for (BluetoothDevice device : mDevices) {
if (name.equals(device.getName())) {
selectedDevice = device;
break;
}
}
return selectedDevice;
}
socket에 연결이 완료되면 데이터를 수신할 thread (beginListenForDat()
) 를 실행한다.
//블루투스 데이터 수신 Listener
protected void beginListenForData() {
final Handler handler = new Handler();
readBuffer = new byte[1024]; // 수신 버퍼
readBufferPositon = 0; // 버퍼 내 수신 문자 저장 위치
// 문자열 수신 쓰레드
mWorkerThread = new Thread(new Runnable() {
@Override
public void run() {
while (!Thread.currentThread().isInterrupted()) {
try {
int bytesAvailable = mInputStream.available();
if (bytesAvailable > 0) { //데이터가 수신된 경우
byte[] packetBytes = new byte[bytesAvailable];
mInputStream.read(packetBytes);
for (int i = 0; i < bytesAvailable; i++) {
byte b = packetBytes[i];
if (b == mDelimiter) {
byte[] encodedBytes = new byte[readBufferPositon];
System.arraycopy(readBuffer, 0, encodedBytes, 0, encodedBytes.length);
final String data = new String(encodedBytes, "US-ASCII");
readBufferPositon = 0;
handler.post(new Runnable() {
public void run() {
//수신된 데이터는 data 변수에 string으로 저장!! 이 데이터를 이용하면 된다.
char[] c_arr = data.toCharArray(); // char 배열로 변환
if (c_arr[0] == 'a') {
if (c_arr[1] == '1') {
//a1이라는 데이터가 수신되었을 때
}
if (c_arr[1] == '2') {
//a2라는 데이터가 수신 되었을 때
}
}
}
});
} else {
readBuffer[readBufferPositon++] = b;
}
}
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
});
//데이터 수신 thread 시작
mWorkerThread.start();
}
마지막으로 데이터를 전송하는 방법은 다음과 같다.
public void SendResetSignal(){
String msg = "bs00000";
try {
mOutputStream.write(msg.getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}
이번 글에서는 pairing목록에서 기기 정보를 가져와서 블루투스 통신을 수행하는 방법에 대해서 다루었다. 다음에는 기기가 pairing목록에 없을 때
기기를 검색해서 pairing과정까지 한번에 수행하는 방법을 알아볼 것이다.
Tensorflow 1.0 설치 방법
Tensorflow 1.0 버전과 조합에 따른 설치 방법 정리
##### 파이썬 2.7
# Ubuntu/Linux 64-bit, CPU only, Python 2.7
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc0-cp27-none-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc0-cp27-none-linux_x86_64.whl
# Mac OS X, CPU only, Python 2.7:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc0-py2-none-any.whl
# Mac OS X, GPU enabled, Python 2.7:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc0-py2-none-any.whl
##### 파이썬 3.x
# Ubuntu/Linux 64-bit, CPU only, Python 3.3
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc0-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.3
# Requires CUDA toolkit 8.0 and CuDNN v5.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc0-cp33-cp33m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 8.0 and CuDNN v5.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc0-cp34-cp34m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.5
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc0-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc0-cp35-cp35m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, CPU only, Python 3.6
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0rc0-cp36-cp36m-linux_x86_64.whl
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.6
# Requires CUDA toolkit 8.0 and CuDNN v5.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0rc0-cp36-cp36m-linux_x86_64.whl
# Mac OS X, CPU only, Python 3.4 or 3.5:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0rc0-py3-none-any.whl
# Mac OS X, GPU enabled, Python 3.4 or 3.5:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.0.0rc0-py3-none-any.whl
#### 설치
$ sudo pip install --upgrade $TF_BINARY_URL
최신 intel wireless chipset을 사용하는 노트북에서 ubuntu 부팅시 bluetooth를 인식하지 못하는 문제 해결방법
인텔 최신 칩셋인
Intel® Dual Band Wireless-AC 8265
Intel® Dual Band Wireless-AC 8260
과 같은 무선칩셋을 사용하는 노트북의 경우 ubuntu 16.04가 부팅할 때 다음과 같은 오류 메세지를 띄우면서 부팅이 안되는 경우가 발생한다.
Intel 8265 Dual-band Wireless Bluetooth Drivers Failing to Load
위와 같은 최신 인텔 칩셋은 16.04.1에서는 지원하지 않으며 16.04.02의 경우 wifi는 잘 연결된다. 16.10은 문제없이 모두 지원하는 것 같으나 LTS버전이 아니기 때문에 본인은 16.04버전을 선호한다.
위와 같이 오류 메세지가 뜨면서 부팅이 안되는 경우 아래의 Ubuntu forum글을 참고하면된다.
참고 url
해결방법:
sudo apt-get install linux-generic-hwe-16.04-edge xserver-xorg-input-libinput-hwe-16.04 && wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.161.1_all.deb && sudo dpkg -i linux-firmware_1.161.1_all.deb
위의 명령어를 sudo 권한으로 실행시킨다. 본인의 경우 dual 부팅을 사용하고 있는데 바로 ubuntu를 실행하는 경우에는 오류가 뜨고, 윈도우를 한번 실행시켰다가 다시 ubuntu로 부팅하는 경우는 정상적으로 부팅이 되는 상황이라 위의 해결방법으로 해결하였다.