Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 Raspberry Pi(Python):使用SIM800L发送短信 树莓皮3 Python 2.7_Python 2.7_Raspberry Pi3_Gsm_Sim800 - Fatal编程技术网

Python 2.7 Raspberry Pi(Python):使用SIM800L发送短信 树莓皮3 Python 2.7

Python 2.7 Raspberry Pi(Python):使用SIM800L发送短信 树莓皮3 Python 2.7,python-2.7,raspberry-pi3,gsm,sim800,Python 2.7,Raspberry Pi3,Gsm,Sim800,嗨! 我在连接gsm模块时出错 这是我从你那里得到的密码 以下是错误: OSError: [Errno 11] Resource temporarily unavailable raise SerialException('device reports readiness to read but returned no data (device disconnected?)') serial.serialutil.SerialException: device reports readines

嗨! 我在连接gsm模块时出错

这是我从你那里得到的密码

以下是错误:

OSError: [Errno 11] Resource temporarily unavailable

raise SerialException('device reports readiness to read but returned no data (device disconnected?)')
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected?)

raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error
有时它会发出

Hello User
Login incorrect
raspberrypi login:
有时

>
>
> 
(100+ more '>')
Hello User
但它几乎总是不连接,并给出错误11

你也经历过吗?
在继续发送消息之前,是否有办法等待gsm连接?

您是否已断开uart与内部蓝牙和内核控制台的连接

如果不这样做,您将在访问设备时遇到问题。您需要禁用使用它的服务:

sudo systemctl disable hciuart
还禁用该uart上的内核控制台

console=serial0,115200
从内核命令行(/boot/cmdline.txt)。您需要在设备树(/boot/config.txt)上启用两个覆盖,也许这可以帮助您:

dtoverlay=pi3-disable-bt 
dtoverlay=pi3-miniuart-bt

rasberrypi.org提供的完整解决方案:

您是否已断开uart与内部蓝牙和内核控制台的连接?也许这可以帮助你:
dtoverlay=pi3-disable-bt 
dtoverlay=pi3-miniuart-bt