Search found 440 matches

by devnull
Sun Dec 29, 2019 7:19 am
Forum: General Discussion and Questions
Topic: reading socket into buffer and then reading buffer by line
Replies: 2
Views: 96

Re: reading socket into buffer and then reading buffer by line

OK, forget these requests for help, I have solved the problem by using select.poll() on the socket.readline()
by devnull
Sun Dec 29, 2019 6:23 am
Forum: General Discussion and Questions
Topic: reading socket into buffer and then reading buffer by line
Replies: 2
Views: 96

Re: reading socket into buffer and then reading buffer by line

This is an attempt at readline using a byte array: a = bytearray(b'0123\r\n45678\r\n9\r\n\r\n') def readline(): global a data=a old=None for i in range(len(a)): new = a[i] if old == 13 and new == 10: data = a[:i-1] a=a[i+1:] return data old = new a = bytearray() return data >>> readline() bytearray(...
by devnull
Sun Dec 29, 2019 2:38 am
Forum: General Discussion and Questions
Topic: reading socket into buffer and then reading buffer by line
Replies: 2
Views: 96

reading socket into buffer and then reading buffer by line

I need to read from the socket and cannot use readline() as it is possible that the data does not contain line endings, in which case it will wait forever. So I am reading into a byte string as per the code below, however I realise that using a byte string may not be as efficient as reading into a b...
by devnull
Sat Dec 28, 2019 3:50 am
Forum: Pyboard D-series
Topic: RSSI of connected WLAN
Replies: 3
Views: 200

Re: RSSI of connected WLAN

Hi; This has been discussed before, unless something has changed recently, you have to scan for all devices, and then iterate through them to match your connected SSID and then read the RSSI value from that scan result. I get the rssi (dbm) from my info() function and also calculate a sig strength %...
by devnull
Tue Dec 24, 2019 3:08 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 214

Re: No File System After Build

Look at for example how the tinypico manifest (esp32/boards/TINYPICO/manifest.py) inherits from the base one.
@jimmo Thanks, I just added that to the Build Secrets Post
by devnull
Tue Dec 24, 2019 3:04 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 214

Re: No File System After Build

How can I add a new path to the build so that I can also use it in related files line PORT_DIR

Code: Select all

freeze('$(PORT_DIR)/modules')
How can I add a new path i.e MY_DIR
by devnull
Tue Dec 24, 2019 3:02 am
Forum: General Discussion and Questions
Topic: Build Secrets
Replies: 11
Views: 426

Re: Build Secrets - Frozen Manifest

If you have a custom manifest file, In order to include the files in the port/modules folder (which are the default frozen files) you need to include the modules folder in your manifest file: freeze('$(PORT_DIR)/modules') OR include('$(PORT_DIR)/boards/manifest.py') freeze("modules") If you don't th...
by devnull
Tue Dec 24, 2019 2:59 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 214

Re: No File System After Build

Thats very strange, I added an update before @jimmo posted but it does not seem to be updated ! anyway, the problem is caused by having a custom manifest file, and there are some files in the modules folder that are needed: So this needs to be added to your custom frozen manifest file: freeze('$(POR...
by devnull
Tue Dec 24, 2019 1:57 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 214

Re: No File System After Build

OK, this is somehow related to the new method for defining overrides (viewtopic.php?f=2&t=7433) as when I re-build the f2ecfe8 file using the new method overrides, it has the problem, but when I flash using the old file built in November the problem is not there.
by devnull
Tue Dec 24, 2019 1:46 am
Forum: ESP32 boards
Topic: No File System After Build
Replies: 8
Views: 214

Re: No File System After Build

I think this is the key:

Code: Select all

could not find module '_boot.py'
I have just reverted back to November build f2ecfe8 and the problem does not exist.

I have added MICROPY_VFS_FAT=1 to my make command.