Search found 109 matches

by prem111
Mon Jul 20, 2020 9:39 am
Forum: Programs, Libraries and Tools
Topic: BLE buffer problem.
Replies: 6
Views: 816

Re: BLE buffer problem.

yes self.tele is the same self.telemetry_val. sorry, I rewrote the code wrong earlier. But the problem is the same :)
by prem111
Mon Jul 20, 2020 8:49 am
Forum: Programs, Libraries and Tools
Topic: BLE buffer problem.
Replies: 6
Views: 816

Re: BLE buffer problem.

tb it was null... but the problem passed when I changed:
From:

Code: Select all

self._ble.gatts_set_buffer(self.tele, rx_tele_buf, True)
To:

Code: Select all

self._ble.gatts_set_buffer(self.tele, rx_tele_buf, False)
Why could this be happening because of "True"?
by prem111
Sun Jul 19, 2020 8:14 pm
Forum: Programs, Libraries and Tools
Topic: BLE buffer problem.
Replies: 6
Views: 816

Re: BLE buffer problem.

I see some dependency, everything works fine until I run xbee_uart_send function. When the xbee_uart_send function is executed, when irqm comes, I have gats_read empty (attr_handle)
by prem111
Sun Jul 19, 2020 5:54 am
Forum: Programs, Libraries and Tools
Topic: BLE buffer problem.
Replies: 6
Views: 816

BLE buffer problem.

Hi, im have problem in buffer gatts_read. With a single data transfer to the BLE buffer, there is no problem, but when it sends 10-20 separate packets, some are cut off. This is my code: self._ble.gatts_set_buffer(self.tele, rx_tele_buf, True) ... ble.py: elif event == _IRQ_GATTS_WRITE: conn_handle,...
by prem111
Sat Jul 18, 2020 11:39 am
Forum: Programs, Libraries and Tools
Topic: NotImplementedError. Loop for bytearray.
Replies: 3
Views: 531

NotImplementedError. Loop for bytearray.

def escape(msg): escaped = bytearray() reserved = bytearray(b"\x7E\x7D\x11\x13") escaped.append(msg[0]) for m in msg[1:]: if m in reserved: escaped.append(0x7D) escaped.append(m ^ 0x20) else: escaped.append(m) return escaped File "<stdin>", line 8, in escape NotImplementedError: How can you do? Tha...
by prem111
Mon Jul 13, 2020 5:59 am
Forum: General Discussion and Questions
Topic: OSError: -257
Replies: 2
Views: 413

Re: OSError: -257

I will try to detect the moment (in the code) when it happens.

It is important that when this error occurs, soft-reset does not help. I have to do hard-reset.
by prem111
Mon Jul 13, 2020 5:56 am
Forum: Programs, Libraries and Tools
Topic: BLE - peripheral name = ESP32 ?
Replies: 4
Views: 756

Re: BLE - peripheral name = ESP32 ?

Maybe there is something else I don't know about?
by prem111
Sat Jul 11, 2020 12:42 pm
Forum: General Discussion and Questions
Topic: OSError: -257
Replies: 2
Views: 413

OSError: -257

Sometimes im give error, in use BLE libs:

Code: Select all

OSError: -257
What is it ?
by prem111
Wed Jul 08, 2020 3:47 pm
Forum: Programs, Libraries and Tools
Topic: BLE - peripheral name = ESP32 ?
Replies: 4
Views: 756

Re: BLE - peripheral name = ESP32 ?

Ok im have MicroPython v1.12

Code: Select all

ble_service = ble.bluetooth.BLE()
ble_service.config(gap_name="test")
ble_conn = ble.bleInit(ble_service)

>>
ValueError: unknown config param