标签类目:Bluetooth

Python:通过蓝牙发送短信

分类:Python

  1. import bluetooth
  2.    
  3.     sockfd = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
  4.     sockfd.connect(('00:00:00:00:00:00', 1)) # 蓝牙硬件设备地址
  5.     sockfd.send('ATZ\r')
  6.     sockfd.send('AT+CMGF=1\r')
  7.     sockfd.send('AT+CSCA="+13535007000"\r') # 客户端 TIM ITA
  8.     sockfd.send('AT+CMGS="+13866668888"\r') # 手机号码
  9.     sockfd.send('This message send by bluetooth...\n') # 短信内容
  10.     sockfd.send(chr(26)) # CTRL+Z,结束发送
  11.     sockfd.close()

Linux Bluetooth 檔案傳輸

這個 USB 藍芽裝置是在資訊展會場買 Epson RX630 送的, 可惜手邊的電腦都沒藍芽介面, 所以就算插在 RX630 上也沒啥作用, 乾脆拿到 Liunx 玩玩看 :)藍芽技術在電腦上最基本、最實用的, 就是檔案傳輸的功能. 以下是在 FC3 使用 GNOME Bluetooth Subsystem 與藍芽手機、藍芽 PDA 進行檔案傳輸的操作備忘.

继续阅读 »


返回顶部