Search found 37 matches
- Sat Jun 06, 2020 3:09 pm
- Forum: General Discussion and Questions
- Topic: Avoiding "async def" creep
- Replies: 21
- Views: 15276
Re: Avoiding "async def" creep
You can't make a silk purse out of a sow's ear Heh. Yes, all good points. Note that block I/O speed can also depend on response latency, i.e. when reading a block on an SD card, there's a delay before actual data comes in (in the order of few ms, I think). There's a 100x retry loop here: https://gi...
- Sat Jun 06, 2020 8:43 am
- Forum: General Discussion and Questions
- Topic: Avoiding "async def" creep
- Replies: 21
- Views: 15276
Re: Avoiding "async def" creep
When I write something like "with open('blah','r') as f: ...", am I correct in assuming that this will block for the duration of the open, and then again for the subsequent reads? I'm asking because I get the impression that flash and sd-card reads can be slow (usng one of the pyboard variants). Wri...
- Sat Jun 06, 2020 7:45 am
- Forum: General Discussion and Questions
- Topic: own IP address?
- Replies: 8
- Views: 3771
Re: own IP address?
Hey, thanks ... nice! Now I see where your ifconfig suggestion comes from. FWIW, my freshly brewed implementation is here: https://git.jeelabs.org/jcw/pythonx/src/branch/master/ftp It uses uasyncio to avoid blocking on new clients connecting and on waiting for a new command. It also turns out to be ...
- Fri Jun 05, 2020 8:59 pm
- Forum: General Discussion and Questions
- Topic: own IP address?
- Replies: 8
- Views: 3771
Re: own IP address?
Whee, could it be that simple? Not sure - I'm trying this on unix, there's no network module, is there?
UPDATE: Aha, the IP address is not needed after all (I am writing a little FTP server, but PASV also works with a "0.0.0.0" reply).
UPDATE: Aha, the IP address is not needed after all (I am writing a little FTP server, but PASV also works with a "0.0.0.0" reply).
- Fri Jun 05, 2020 7:33 pm
- Forum: General Discussion and Questions
- Topic: own IP address?
- Replies: 8
- Views: 3771
own IP address?
I need to report "my" IP address to a connected client. The server is bound to interface "0.0.0.0", i.e. any. The socket.accept() call returns the address of the other end, i.e. the client's IP address. In general, "my" IP address is ill-defined, i.e. there can be more than one interface. But once t...
- Thu Jun 04, 2020 11:46 pm
- Forum: Pyboard D-series
- Topic: Overflow in time.localtime()
- Replies: 1
- Views: 3014
Re: Overflow in time.localtime()
MicroPython v1.12 on 2019-12-20; PYBLITEv1.0 with STM32F411RE Type "help()" for more information. >>> import time >>> time.localtime(1<<30) (2034, 1, 9, 13, 37, 4, 0, 9) >>> time.localtime((1<<31)-1) (2068, 1, 19, 3, 14, 7, 3, 19) >>> time.localtime(1<<31) Traceback (most recent call last): File "<...
- Thu Jun 04, 2020 10:12 am
- Forum: Other Boards
- Topic: NUCLEO-H743ZI2 Support & MAC address composition
- Replies: 2
- Views: 2105
Re: NUCLEO-H743ZI2 Support & MAC address composition
Ethernet MAC address: looks like this depends on the board. Not surprising, as each type has its own network hardware. For PyBoard D's (and STM32's in general), see: https://github.com/micropython/micropython/blob/master/ports/stm32/boards/PYBD_SF2/board_init.c#L64-L74 , and as you assumed: https://...
- Thu Jun 04, 2020 9:15 am
- Forum: ESP32 boards
- Topic: How can I do use RX2/TX2 ports to extra serial communications?
- Replies: 3
- Views: 1993
- Thu Jun 04, 2020 9:14 am
- Forum: Other Boards
- Topic: NUCLEO-H743ZI2 Support & MAC address composition
- Replies: 2
- Views: 2105
Re: NUCLEO-H743ZI2 Support & MAC address composition
The difference regarding the NUCLEO-H743ZI2 versus the previous version appears to be STLINK-V3E vs ST-LINK/V2-1. As for clock: many Nucleo boards don't have a high-frequency crystal on the main processor, they get their clock from the on-board ST-Link instead. Perhaps as a minor cost-saving decisio...
- Thu Jun 04, 2020 9:00 am
- Forum: General Discussion and Questions
- Topic: STM32F407VET6 Black Board freeze
- Replies: 6
- Views: 3168
Re: STM32F407VET6 Black Board freeze
Typo? See the error message at the end: $ micropython MicroPython v1.12-496-ge54626f4c-dirty on 2020-06-04; darwin version Use Ctrl-D to exit, Ctrl-E for paste mode >>> paste mode; Ctrl-C to cancel, Ctrl-D to finish === mchp=0 === mchf=0 === mcha=0 === msdb=0 === mchv=0 === mesc=0 === mcui=0 === msm...