Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]nrf 52840 dongle使用python库出错 #10

Open
SYJshang opened this issue May 7, 2020 · 8 comments
Open

[BUG]nrf 52840 dongle使用python库出错 #10

SYJshang opened this issue May 7, 2020 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@SYJshang
Copy link

SYJshang commented May 7, 2020

当我在运行nrf官方python库中心率的例子时,我会出现下面这个错误,这是什么导致了驱动程序不能识别串口?但我在NRF connect桌面和命令行找到了这个设备。

python3 heart_rate_collector.py NRF52 /dev/tty.usbmodemC8A5C57A42372 ['heart_rate_collector.py', 'NRF52', '/dev/tty.usbmodemC8A5C57A42372'] Serial port used: /dev/tty.usbmodemC8A5C57A42372 2020-05-07 16:40:30,680 [123145336700928/LogThread] Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none. 2020-05-07 16:40:30,680 [123145336700928/LogThread] evt> severity(20) message(Successfully opened /dev/tty.usbmodemC8A5C57A42372. Baud rate: 1000000. Flow control: none. Parity: none.) 2020-05-07 16:40:30,681 [123145341956096/StatusThread] RpcAppStatus.resetPerformed: Target Reset performed 2020-05-07 16:40:30,681 [123145341956096/StatusThread] evt> status code(RpcAppStatus.resetPerformed) message(Target Reset performed) 2020-05-07 16:40:31,889 [123145341956096/StatusThread] RpcAppStatus.connectionActive: Connection active 2020-05-07 16:40:31,890 [123145341956096/StatusThread] evt> status code(RpcAppStatus.connectionActive) message(Connection active) 2020-05-07 16:40:31,995 [123145341956096/StatusThread] RpcAppStatus.ioResourcesUnavailable: serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6] 2020-05-07 16:40:31,995 [123145341956096/StatusThread] evt> status code(RpcAppStatus.ioResourcesUnavailable) message(serial port read failed on port /dev/tty.usbmodemC8A5C57A42372. Error: Device not configured [6]) 2020-05-07 16:40:33,391 [123145336700928/LogThread] Failed to receive response for command Traceback (most recent call last): File "heart_rate_collector.py", line 222, in 2020-05-07 16:40:33,392 [123145336700928/LogThread] evt> severity(30) message(Failed to receive response for command) 2020-05-07 16:40:33,393 [123145341956096/StatusThread] RpcAppStatus.pktSendError: Error sending packet to target. Code: 0x8016 2020-05-07 16:40:33,393 [123145341956096/StatusThread] evt> status code(RpcAppStatus.pktSendError) message(Error sending packet to target. Code: 0x8016) main(serial_port) File "heart_rate_collector.py", line 178, in main collector.open() File "heart_rate_collector.py", line 103, in open self.adapter.driver.ble_cfg_set(BLEConfig.conn_gatt, gatt_cfg) File "/usr/local/lib/python3.7/site-packages/pc_ble_driver_py/ble_driver.py", line 107, in wrapper error_code=err_code, pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_cfg_set. Error code: NRF_ERROR_SD_RPC_SEND

@SYJshang SYJshang added the bug Something isn't working label May 7, 2020
@xiaolongba
Copy link
Owner

你能不能把报错的完整信息截张图?你这个一堆的乱码,我从中看了一些信息,这个应该不是找不到串口,应该是你配置不当导致的

@SYJshang
Copy link
Author

SYJshang commented May 8, 2020

不好意思,忘改格式了。
image
我是按照官方上python库的教程去做的,但是在运行heart_rate_collector.py例子的时候不知道为什么报这个错误,看上边也是打开串口成功了的,只是在下边没有配置的时候又找不到了。

@xiaolongba xiaolongba added question Further information is requested and removed bug Something isn't working labels May 8, 2020
@xiaolongba
Copy link
Owner

不好意思,我没有搞过这个python库,你的这个问题,官方的论坛也有人遇到,点我跳转

@SYJshang
Copy link
Author

SYJshang commented May 9, 2020

好像问题不太一样,我问了下官方,官方回复说可能是因为版本问题导致的,要使用5.版本,我想问下这个dongle的hex版本是多少呢?

@xiaolongba
Copy link
Owner

好像问题不太一样,我问了下官方,官方回复说可能是因为版本问题导致的,要使用5.版本,我想问下这个dongle的hex版本是多少呢?

这个我要回去用nrf connect看看能不能读出版本号,目前建议你用最新的nRF Connect然后更新你手头上的Dongle Frimware

@xiaolongba
Copy link
Owner

你可以将Dongle的插入PC中,然后打开电脑端的nRF Connect,然后你就可以读到你目前Dongle当前的固件版本,下图是我手上这个Dongle的Firmware版本:
image

@SYJshang
Copy link
Author

你可以将Dongle的插入PC中,然后打开电脑端的nRF Connect,然后你就可以读到你目前Dongle当前的固件版本,下图是我手上这个Dongle的Firmware版本:
image

你好,我想升级这个版本到v5版本,要如何操作才能升级呢?

@xiaolongba
Copy link
Owner

xiaolongba commented May 11, 2020

你可以将Dongle的插入PC中,然后打开电脑端的nRF Connect,然后你就可以读到你目前Dongle当前的固件版本,下图是我手上这个Dongle的Firmware版本:
image

你好,我想升级这个版本到v5版本,要如何操作才能升级呢?

这个你可能要参考如何修复或者更新nRF52840 Dongle固件,然后使用最新的SDK去更新这个固件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants