Search found 892 matches

by jimmo
Sun Sep 29, 2019 10:47 am
Forum: ESP8266 boards
Topic: Does <network.wlan>.connect() with no args performs a write operation to the flash?
Replies: 1
Views: 165

Re: Does <network.wlan>.connect() with no args performs a write operation to the flash?

Hi, I think the only way to be 100% is to hook up a logic analyser to the spiflash and verify whether a write is happening. However, my understanding is that wifi_station_set_config is what writes to the flash, and MicroPython's connect method only calls this if you specify any arguments to connect(...
by jimmo
Sun Sep 29, 2019 10:46 am
Forum: General Discussion and Questions
Topic: How Should WiFi Passwords be securely stored on micropython device?
Replies: 8
Views: 442

Re: How Should WiFi Passwords be securely stored on micropython device?

FWIW, as discussed earlier in the thread, on ESP8266 you currently have no option to prevent the credentials from being stored on flash. In order to implement a RAM-based option as is being suggested, you'll need a way to make connect() use wifi_station_set_config_current() instead of wifi_station_s...
by jimmo
Sun Sep 29, 2019 10:38 am
Forum: Other Boards
Topic: ubluepy central example
Replies: 2
Views: 268

Re: ubluepy central example

Hi,

I don't see any sample code that does this, but reading ubluepy_peripheral.c seems to suggest this is possible with:

Code: Select all

p = Peripheral()
p.connect('aa:bb:cc:dd:ee:ff')
services = p.getServices()

c = service.getCharacteristic()
# or:  chrs = service.getCharacteristics()

c.read() / c.write()
by jimmo
Sun Sep 29, 2019 10:28 am
Forum: Other Boards
Topic: Nucleo F401RE WiFi Connection
Replies: 15
Views: 900

Re: Nucleo F401RE WiFi Connection

Hi, I don't think such a thing has been implemented. If you ran the TCP stack on the Nucleo (1), then you'd need some sort of ethernet transport over the serial link. If you ran the TCP stack on the ESP (2), then you'd need to make a sockets-over-serial protocol. That said... for (1), that's kind of...
by jimmo
Sun Sep 29, 2019 10:24 am
Forum: General Discussion and Questions
Topic: Change Network Hostname of Device?
Replies: 1
Views: 141

Re: Change Network Hostname of Device?

Sorry I absent-mindedly replied on the other thread. viewtopic.php?f=16&t=2256
GordanTrevis wrote:
Fri Sep 27, 2019 11:40 am
also there is no ref. in the Documentation on it.
https://docs.micropython.org/en/latest/ ... p_hostname
by jimmo
Sun Sep 29, 2019 10:19 am
Forum: ESP8266 boards
Topic: Change hostname.
Replies: 15
Views: 7579

Re: Change hostname.

hi Gordan, Interesting... I just tried this on my ESP32 and it seemed to work fine. >>> import network >>> sta = network.WLAN(network.STA_IF) ... >>> sta.active(True) ... >>> sta.config(dhcp_hostname='tinypico') >>> sta.config('dhcp_hostname') 'tinypico' >>> sta.connect('----', '----') >>> ... I (10...
by jimmo
Sat Sep 28, 2019 3:32 am
Forum: ESP32 boards
Topic: bluetooth on esp32
Replies: 19
Views: 3000

Re: bluetooth on esp32

See the updates on that PR. I'll address the review comments from yesterday this weekend, and then you can see the comment from me this morning about the esp32 branch.
by jimmo
Thu Sep 26, 2019 3:53 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 3440

Re: ulab, or what you will - numpy on bare metal

This is amazing!! Thank you!!! I saw your hints at this earlier and have been excitedly waiting for an announcement like this :) I look forward to being able to use this in conjunction with the native loadable shared library feature (as discussed in that thread https://forum.micropython.org/viewtopi...
by jimmo
Wed Sep 25, 2019 10:53 pm
Forum: General Discussion and Questions
Topic: Frozen Modules based on board
Replies: 3
Views: 270

Re: Frozen Modules based on board

You can also put FROZEN_MPY_DIR in your board-specific mpconfigboard.mk This works well on STM32 because the default frozen modules are not required for board functioning, but on ESP32 you can't override the default ones. If you're interested, see https://github.com/micropython/micropython/pull/5084...
by jimmo
Tue Sep 24, 2019 1:52 pm
Forum: ESP8266 boards
Topic: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
Replies: 9
Views: 399

Re: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?

Extending on what stjin said, looking at the implementation of dupterm: STATIC mp_obj_t mp_uos_dupterm(size_t n_args, const mp_obj_t *args) { mp_int_t idx = 0; if (n_args == 2) { idx = mp_obj_get_int(args[1]); } if (idx < 0 || idx >= MICROPY_PY_OS_DUPTERM) { mp_raise_ValueError("invalid dupterm inde...