python通过wifi控制手机_使用python在计算机和手机之间通过wifi进行简单的文件传输...

本文介绍了如何使用Python调用OpenOBEX项目的obexftp程序来从移动设备中获取文件,同时也提到了通过蓝牙进行OBEX协议的文件传输。虽然可以使用纯网络编程直接与手机通信,但实现OBEX协议会比较复杂,因此推荐初试者使用obexftp。
摘要由CSDN通过智能技术生成

I've previously done OBEX-related things, mostly fetching things from

mobile phones, using the obexftp program 2 which is part of the

OpenOBEX project 3. Naturally, you can call the obexftp program from

Python and interpret the responses and exit codes using functions in

the os, popen2 and subprocess modules. I believe that obexftp also

supports "push" mode, but you could probably find something else

related to OpenOBEX if it does not.

Since Bluetooth communications are supported using sockets in GNU/

Linux distributions and in Python (provided that the Bluetooth support

is detected and configured), you could communicate with phones using

plain network programming, but this would probably require you to

implement the OBEX protocols yourself - not a straightforward task for

a number of reasons, including one I mention below. Thus, it's

probably easier to go with obexftp at least initially.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值