Search found 13 matches

by Walkline
Fri Jun 05, 2020 7:40 am
Forum: ESP32 boards
Topic: About BLE.gap_connect(esp32-based ubluetooth)
Replies: 44
Views: 8237

Re: About BLE.gap_connect(esp32-based ubluetooth)

In _IRQ_SCAN_RESULT I can get adv_data ,but decode_services(adv_data)=[],it return null. _IRQ_SCAN_RESULT is a callback used for gap_scan(), in this callback you will got addr_type and addr, use gap_connect() with these params to start connect the scanned device, _IRQ_PERIPHERAL_CONNECT will trigge...
by Walkline
Fri Mar 20, 2020 3:52 am
Forum: General Discussion and Questions
Topic: Confusion about micropython.const
Replies: 4
Views: 600

Re: Confusion about micropython.const

Roberthh wrote:
Thu Mar 19, 2020 7:26 pm
The reason: variable assignment does not happen at compile time. It happens when the code is executed.

Note: You do not have to import const.
Thanks Robert, this is helpful for me, thanks again :D
by Walkline
Thu Mar 19, 2020 6:25 pm
Forum: General Discussion and Questions
Topic: Confusion about micropython.const
Replies: 4
Views: 600

Re: Confusion about micropython.const

test = const(0x1) # from now on test is a shortcut for 0x1 Thanks fstengel, that's uh.....amazing And then I have second question from micropython import const ONE = 1 TWO = 2 COMPILED = const(ONE | TWO) In this way, it's still got exception, according to you link The argument to const() may be any...
by Walkline
Thu Mar 19, 2020 1:44 pm
Forum: General Discussion and Questions
Topic: Confusion about micropython.const
Replies: 4
Views: 600

Confusion about micropython.const

Here's the sample code: from micropython import const class a(object): test = const(0x1) class b(object): test = 0 And here is the result: Traceback (most recent call last): File "<stdin>", line 4, in b SyntaxError: can't assign to expression According to the documents about micropython.const Consta...
by Walkline
Mon Mar 02, 2020 5:46 am
Forum: ESP32 boards
Topic: Bluetooth BLE implements HID questions
Replies: 5
Views: 935

Re: Bluetooth BLE implements HID questions

I actually have a working HID demo, have been plannign to turn it into another example in examples/bluetooth. I will try and get this done later this week. Hello jimmo, is there any news could be shared to us? Now I still have a problem not solved, the device will be stuck when it reconnect to cent...
by Walkline
Sun Mar 01, 2020 9:29 am
Forum: ESP32 boards
Topic: BLE Active Exception problem
Replies: 3
Views: 517

Re: BLE Active Exception problem

fstengel wrote:
Sun Mar 01, 2020 9:21 am
[*] Using a USB port capable of reliably providing more than 500mA at 5V. Using a powered hub helped a lot.[/list]
As you said....I try to unplug the cable from a usb hub and replug to notebook usb port, and then problem solved, that's sooooo funny~ :lol: :lol: :lol:

Thanks a lot, fstengel
by Walkline
Sun Mar 01, 2020 8:46 am
Forum: ESP32 boards
Topic: BLE Active Exception problem
Replies: 3
Views: 517

Re: BLE Active Exception problem

Update exception information... >>> import ubluetooth as bt >>> ble=bt.BLE() >>> ble.active(True) I (24440) BTDM_INIT: BT controller compile version [5aed448] I (49208) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE W (49218) phy_init: failed to load RF cal...
by Walkline
Sat Feb 29, 2020 5:51 pm
Forum: ESP32 boards
Topic: BLE Active Exception problem
Replies: 3
Views: 517

BLE Active Exception problem

I have been reinstalled Windows 10 (build 1909), and installed the lastest version of VS Code with RT-Thread plugin, I'm facing a new issue, when I paste the code to repl it will cause exception paste mode; Ctrl-C to cancel, Ctrl-D to finish === import ubluetooth as bt === ble=bt.BLE() === ble.activ...
by Walkline
Fri Feb 21, 2020 3:48 pm
Forum: ESP32 boards
Topic: I have design a new small ESP32 board
Replies: 4
Views: 920

Re: I have design a new small ESP32 board

群主加油!~
by Walkline
Thu Feb 20, 2020 3:56 pm
Forum: ESP32 boards
Topic: Bluetooth BLE implements HID questions
Replies: 5
Views: 935

Re: Bluetooth BLE implements HID questions

At present, it is possible to bond and connect on the mobile, and use the BOOT button on the board to randomly input English letters. However, a "Driver Error" message appears on the Windows 10 and the board cannot be bonded. Another problem is that when the board is reconnected, although _IRQ_CENTR...