teensy 4.1 tcp socket issue

Status
Not open for further replies.

datkins47

New member
Hi,

Loving the 4.1's capabilities, using platformio as an environment with Arduino libraries is great.

I have been building a simple serial to tcp converter and used the availableForWrite() to restrict the number of bytes we would send on a socket with the following used to get value

unsigned int NetCanTake = Client.availableForWrite();

This always returns 0, had a similar issue in some code in a simple HTTP server, we have to send and use the return value to let us know what was sent rather than restrict sne request to what is possible. Is this a known issue?

A second issue is that my teensy 4.1 does not run the code when its connected to a power source, seems to need code downloading each time, and I had expected it to auto run, not done so much on this yet but its a concern and maybe I'm missing something I need to do?

Final query, is connected a SWD debugger by segger jlink or similar easy? any guidance on this?

Thanks,

David
 
Hi,

A second issue is that my teensy 4.1 does not run the code when its connected to a power source, seems to need code downloading each time, and I had expected it to auto run, not done so much on this yet but its a concern and maybe I'm missing something I need to do?


David

Many of the example code snippets have this at the top :

Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}


This is useful when developing as it waits for you serial-over-usb connection to appear before continuing, so you don't miss early debug output. It's less useful when you want the teensy to run standalone as it will wait forever for the USB connection.

Is that, or any other USB dependency, present in your test code ?
 
Status
Not open for further replies.
Back
Top