alibaba / alibaba/AliOS-Things

[Bug Report]: ESP32车辆定位项目中无法获取GPS模块数据,一直显示[12658.727]<E>DRIVER_UART obj_read: py_board_get_node_by_handle failed;

Open
#1,933 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
4.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### 联系方式

2432552396@qq.com

### 您发现了什么问题

A bug happened!
运行环境:PS D:\ESP32\workspace\dingwei> $Env:Path="C:\ProgramData\aos\miniconda3;C:\ProgramData\aos\miniconda3\Scripts;C:\ProgramData\aos\miniconda3\Library\bin;$Env:Path";python c:\Users\86159\.vscode\extensions\haas.haas-studio-2.3.1\asserts\mpy_tools\mpytool.py -p COM5 -f d:\ESP32\workspace\dingwei\src -t c:\Users\86159\.vscode\extensions\haas.haas-studio-2.3.1\asserts\mpy_tools -ou(不知道是不是这个)
固件版本:HaaSPython-ESP32-v1.0.2.bin

已经确定能够联网连云端,使用串口助手查看定位模块时也能获取信息,就是ESP32无法获取定位模块数据,一直显示
DRIVER_UART obj_read: py_board_get_node_by_handle failed;

我ESP32是ESP32 DEVKITV1 TX0对应GPIO01 RX0对应GPIO03

board.json
{
"name": "esp32",
"version": "1.0.0",
"io": {
"gnss": {
"type": "UART",
"port": 5,
"dataWidth": 8,
"baudRate": 9600,
"stopBits": 1,
"flowControl": "disable",
"parity": "none"
}
},
"debugLevel": "ERROR",
"repl": "ensable"
}

### 分支

master (Default)

### 请选择您发现此问题的解决方案名称

helloworld_demo

### 日志

```shell
VSCODE上(正常):
PS D:\ESP32\workspace\dingwei> $Env:Path="C:\ProgramData\aos\miniconda3;C:\ProgramData\aos\miniconda3\Scripts;C:\ProgramData\aos\miniconda3\Library\bin;$Env:Path";python c:\Users\86159\.vscode\extensions\haas.haas-studio-2.3.1\asserts\mpy_tools\mpytool.py -p COM5 -f d:\ESP32\workspace\dingwei\src -t c:\Users\86159\.vscode\extensions\haas.haas-studio-2.3.1\asserts\mpy_tools -ou
[*] port is COM5
[*] Filename is d:\ESP32\workspace\dingwei\src
[*] Filename is c:\Users\86159\.vscode\extensions\haas.haas-studio-2.3.1\asserts\mpy_tools
C:\Users\86159\AppData\Roaming\Thonny
==== wait hardware reset!!! ====
==== hardware reset OK!!! ====
=== start upload... ===
=== wait python process interrupt ===
upload process...0%
upload process...6%
upload process...9%
upload process...12%
upload process...15%
upload process...20%
upload process...23%
upload process...26%
upload process...29%
upload process...34%
upload process...37%
upload process...40%
upload process...42%
upload process...45%
upload process...48%
upload process...50%
upload process...53%
upload process...56%
upload process...59%
upload process...61%
upload process...64%
upload process...67%
upload process...70%
upload process...72%
upload process...75%
upload process...78%
upload process...81%
upload process...83%
upload process...86%
upload process...89%
upload process...92%
upload process...94%
upload process...97%
upload process...100%
=== upload progress end ===

使用Thonny查看时
wifi_connected: False
wifi_connected: False
wifi_connected: False
wifi_connected: False
wifi_connected: False
wifi_connected: False
('172.20.10.11', '255.255.255.240', '172.20.10.1', '172.20.10.1')
establish tcp connection with server(host='hjuaCPwFqyH.iot-as-mqtt.cn-shanghai.aliyuncs.com', port=[443])
sleep for 1 s
tcp_connect: can only connect from state CLOSED
success to establish tcp, fd=54
物联网平台连接成功
sleep for 2s
[ 53.880]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
[ 55.880]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
[ 57.880]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
[ 59.890]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
[ 61.890]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
[ 63.890]DRIVER_UART obj_read: py_board_get_node_by_handle failed;
[0.0, 'W'] [0.0, 'N'] 0.0
```

Contributor guide

Open the contributing guide

Research direction

Start with the mentioned board.json UART configuration and the helloworld_demo entry point, then reproduce the failure using the shown mpytool.py command on the ESP32. Check how the gnss UART node is opened when DRIVER_UART reports py_board_get_node_by_handle failed; done means the GPS data can be read instead of repeated zero values.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.