Search found 94 matches

by Craige Hales
Tue Mar 19, 2024 11:07 am
Forum: ESP-IDF
Topic: WIFI sockets fail after a while
Replies: 10
Views: 2571

Re: WIFI sockets fail after a while

by Craige Hales
Mon Mar 18, 2024 2:54 pm
Forum: ESP-IDF
Topic: WIFI sockets fail after a while
Replies: 10
Views: 2571

Re: WIFI sockets fail after a while

agree about memory leaks. Something like this unsigned int totFreeBytes() { // Total free bytes in the heap. Equivalent to multi_free_heap_size(). heap_caps_get_info(&sMHIT, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); return sMHIT.total_free_bytes; } static unsigned int total_allocated_bytes() { // Tota...
by Craige Hales
Fri Feb 09, 2024 4:37 pm
Forum: ESP-IDF
Topic: ESP32-S2: need to adjust Brown Out Level at runtime
Replies: 15
Views: 6305

Re: ESP32-S2: need to adjust Brown Out Level at runtime

I've got a similar project, thanks for the idea about enabling/disabling the converter. In my case I think I'm going to have to add an external reset button. 15F of super-capacitor decays very slowly after the ESP32 shuts down, maybe hours around 2 volts. It prevents a normal restart when the power ...
by Craige Hales
Mon Dec 11, 2023 3:20 am
Forum: Hardware
Topic: ESP32 Direct coax wi-fi connection
Replies: 5
Views: 18643

Re: ESP32 Direct coax wi-fi connection

@thezcx - Can you post a picture showing what you are doing? Sounds interesting. I've used this on a wroom32 (pcb antenna) with a streaming wifi web socket: static int8_t const sPowers[] = {8, 20, 28, 34, 44, 52, 56, 60, 66, 72, 80}; ... ESP_ERROR_CHECK_WITHOUT_ABORT(esp_wifi_set_max_tx_power(sPower...
by Craige Hales
Fri Aug 25, 2023 12:50 am
Forum: ESP32 Arduino
Topic: ESP32-wroom-32e freezes after some days/months
Replies: 3
Views: 2879

Re: ESP32-wroom-32e freezes after some days/months

Start by testing the power supply with a scope.
Simulate some brownouts and see what happens.
If you added a large capacitor >= 1mf to the enable pin for programming, try removing it.
Get a better supply; make sure you have not added more filter capacitance than it can handle.
by Craige Hales
Fri Aug 25, 2023 12:23 am
Forum: Hardware
Topic: High negative voltage on scope
Replies: 3
Views: 2278

Re: High negative voltage on scope

check the Q1 part number. Double check the pinout. The scope ground must be connected to the circuit ground (not a motor pin.) https://electronics.stackexchange.com/questions/21498/help-with-tip122-darlington-transistor hints the 10K resistor might be too big. Scope probe to the base on Q1: It's bee...
by Craige Hales
Wed Jun 07, 2023 1:45 pm
Forum: General Discussion
Topic: error: array subscript has type 'char' when using isdigit()
Replies: 3
Views: 3424

Re: error: array subscript has type 'char' when using isdigit()

If the line[] data might have characters beyond 0x7F then I think you have to cast to unsigned char before any conversion to int. Otherwise they become negative numbers. The cast to unsigned char does not generate code, it just interprets 8-bit patterns with the high bit set as numbers > 0x007F rath...
by Craige Hales
Wed Jun 07, 2023 11:43 am
Forum: General Discussion
Topic: error: array subscript has type 'char' when using isdigit()
Replies: 3
Views: 3424

Re: error: array subscript has type 'char' when using isdigit()

use isdigit((unsigned char)(line[4])) The problem is not the 4, it is because char is really signed char and isdigit is warning about numbers > 127 will be negative indexes without the cast. Something changed, probably the isdigit definition. (good, it is safer now.) The cast does not generate code;...
by Craige Hales
Tue Jun 06, 2023 3:28 pm
Forum: General Discussion
Topic: HTTP Client uploading file via POST
Replies: 4
Views: 6786

Re: HTTP Client uploading file via POST

Found the upload part, it did use curl in a shell script...Sorry, don't have anything else. I kind of remember needing to read server logs to figure out some of the answers. raspistill -q 15 -n -rot 180 -w 2592 -h 1944 -t 5000 -o /run/shm/temp.jpg > /run/shm/cmra.log curl -k -i -F "name=camera5" -F ...
by Craige Hales
Sun Jun 04, 2023 11:03 pm
Forum: General Discussion
Topic: HTTP Client uploading file via POST
Replies: 4
Views: 6786

Re: HTTP Client uploading file via POST

here's a snip of some php not used in the last 7 years but worked with a raspberry to do about the same thing. Might point you somewhere...as I recall, returning messages from the server to the pi as html was a good debugging technique. You could send the returned html page to the serial console. Ca...