ラズパイピコでAndorid端末のテザリングは使えない?
掲題の通りです。超初心者です。
ラズパイpicoで以下コードを実行しています
しかし、毎回network connection failedとなりwifi接続ができません。
接続ステータスは-2が返ってきているようです。
テザリングではなく、家のwi-fiであれば問題なく接続できているようです。
ssid、passwordは間違っていません。
何か考えられる要因などありますでしょうか?
ラズパイpicoで以下コードを実行しています
Code: Select all
import time
import network
import rp2
ssid = 'myssid'
password = 'mypassword'
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
# Wait for connect or fail
max_wait = 10
while max_wait > 0:
if wlan.status() < 0 or wlan.status() >= 3:
break
max_wait -= 1
print('waiting for connection...')
time.sleep(3)
# Handle connection error
if wlan.status() != 3:
raise RuntimeError('network connection failed')
else:
print('connected')
status = wlan.ifconfig()
print('ip = ' + status[0])
# Connect to another network
wlan.disconnect()
wlan.connect('Other Network', 'The Other Password')
接続ステータスは-2が返ってきているようです。
テザリングではなく、家のwi-fiであれば問題なく接続できているようです。
ssid、passwordは間違っていません。
何か考えられる要因などありますでしょうか?
Re: ラズパイピコでAndorid端末のテザリングは使えない?
Wi-FiのSSIDに空白文字が含まれていると、Pico Wから接続できなかったので、SSIDを変更して対処したという経験はあります。
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Gaming
- Media centres
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion