Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: shawn

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    124
    Views
    11,179

    Thanks. After some discussion...

    Thanks. After some discussion (https://github.com/ssilverman/QNEthernet/issues/15), it turns out that this is expected TCP behaviour. The solution to reduce the waiting time is to either use...
  2. Replies
    4
    Views
    154

    It is not strictly necessary; it’s there,...

    It is not strictly necessary; it’s there, however, for completeness. Setting the DNS with the QNEthernet-style API matches the Arduino-style API that you were using before with NativeEthernet. With...
  3. Replies
    4
    Views
    154

    Here's some illustrative code that should work...

    Here's some illustrative code that should work with QNEthernet. (Caveat: I'm not near a Teensy so haven't tested it.)



    #include <QNEthernet.h>

    using namespace qindesign::network;
    ...
  4. Replies
    124
    Views
    11,179

    Thanks for the report. Could you file an issue in...

    Thanks for the report. Could you file an issue in the GitHub repository? See here: https://github.com/ssilverman/QNEthernet/issues

    (If you don't have an account there, let me know and I'll file it...
  5. QNEthernet is mostly a drop-in replacement, but...

    QNEthernet is mostly a drop-in replacement, but there are additional features that I think make the library easier to use, more robust, and more functional, once you learn how to use it. But at the...
  6. Have you tried using the regular Arduino IDE and...

    Have you tried using the regular Arduino IDE and not Teensyduino for the non-Teensy devices?
  7. Another method is to convert them to C-style...

    Another method is to convert them to C-style arrays in an include file and then ensure they stay in flash via the PROGMEM attribute.
  8. Here's a modified version to work with...

    Here's a modified version to work with QNEthernet. I'm curious how it works for you. I took the liberty of modifying the structure to be closer to how I would do it.



    #include <QNEthernet.h>
    ...
  9. Replies
    11
    Views
    236

    Here's a version that is designed for QNEthernet....

    Here's a version that is designed for QNEthernet. I took out the #ifdefs for readability and added a few notes. (Hopefully I didn't make any mistakes.) There's a few other ways to do things here,...
  10. Replies
    3
    Views
    169

    If you want to eliminate any transmission delays,...

    If you want to eliminate any transmission delays, you can call flush() after sending TCP data when using QNEthernet. It’s possible the ArduinoModbus API needs to be changed to support this. Without...
  11. Replies
    124
    Views
    11,179

    Under the hood, incoming data is handled with...

    Under the hood, incoming data is handled with callbacks, but with polling and not interrupts. The stack is polled for input every time Ethernet.loop() is called, which happens in a number of places...
  12. Replies
    124
    Views
    11,179

    Yes, that’s correct. I chose “buffer if it can”...

    Yes, that’s correct. I chose “buffer if it can” over “send always” because lwIP’s API is similar, so I basically just did a direct mapping. Plus there exists that flush() call in the Arduino API (I...
  13. Replies
    124
    Views
    11,179

    Call flush() to send any buffered data...

    Call flush() to send any buffered data immediately. For reference, see the “Write immediacy” section in the Readme.

    There’s no equivalent for setSocketSize() or setStackHeap(). Those are specific...
  14. Replies
    11
    Views
    236

    Do you feel like trying QNEthernet instead of...

    Do you feel like trying QNEthernet instead of NativeEthernet to see if the issue still exists?
  15. Replies
    24
    Views
    1,468

    I couldn’t promise a timeline, but if you send me...

    I couldn’t promise a timeline, but if you send me some hardware I could poke around with modifying QNEthernet. I think only lwip_t41.c would need to be modified.
  16. Replies
    19
    Views
    394

    Sounds like you’re specifying a static IP and not...

    Sounds like you’re specifying a static IP and not getting one through DHCP. If waitForLocalIP() returns false then no address was assigned via DHCP. (Using the Ethernet.begin() form.) I don’t think...
  17. Replies
    19
    Views
    394

    What does the return value of waitForLocalIP()...

    What does the return value of waitForLocalIP() give? You need to check that to see if an IP address was actually acquired.
  18. Replies
    124
    Views
    11,179

    There’s also wolfSSL.

    There’s also wolfSSL.
  19. Replies
    124
    Views
    11,179

    I believe TLS sits on top of TCP/IP. I have no...

    I believe TLS sits on top of TCP/IP. I have no current plans to add it to the library. (Let me see what lwIP has…)
  20. DMX512 uses a differential pair (RS-485) and is...

    DMX512 uses a differential pair (RS-485) and is not compatible with the Teensy serial ports (i.e. UART-style signalling). You need a transceiver. Something like this:...
  21. I just tested this on a Teensy 4.0 and it seems...

    I just tested this on a Teensy 4.0 and it seems to work as expected. Is it possible something isn't connected correctly?

    I tested your code and I tested with adding a `delay(10)` after the...
  22. Replies
    19
    Views
    394

    Well, then. I stand corrected on the DHCP server....

    Well, then. I stand corrected on the DHCP server. :)

    I always thought most modern Ethernet jacks don’t need crossover cables anymore. Is that not the case here?

    I did not know that about...
  23. Replies
    19
    Views
    394

    If you’re using the Ethernet.begin() form then it...

    If you’re using the Ethernet.begin() form then it will try DHCP. I have a feeling that your computer isn’t running a DHCP server, so by the time the 10-second wait time is over, there’s still no IP...
  24. Replies
    19
    Views
    394

    QNEthernet doesn’t block or wait on any of the...

    QNEthernet doesn’t block or wait on any of the begin() functions, even if there’s no cable plugged in. There are a few options for waiting for an address from DHCP. See the examples for more...
  25. Replies
    14
    Views
    915

    Another fun fact: Changing the toolchain from...

    Another fun fact: Changing the toolchain from version 1.50401.190816 (5.4.1) to version 1.90301.200702 (9.3.1) (using PlatformIO and a small test program) saves about 40k of RAM1 and about 45k of...
  26. Replies
    124
    Views
    11,179

    Try setting LWIP_DNS_SUPPORT_MDNS_QUERIES to 1 in...

    Try setting LWIP_DNS_SUPPORT_MDNS_QUERIES to 1 in lwipopts.h (line 148). I think I'll add this to the next release.

    Side point: the "(const char *)" casts aren't needed.
  27. Replies
    31
    Views
    14,140

    Some links about structs: *...

    Some links about structs:
    * https://stackoverflow.com/questions/5397447/struct-padding-in-c
    * http://www.catb.org/esr/structure-packing/

    The internal structure of structs is not standardized and...
  28. Replies
    124
    Views
    11,179

    I just released v0.14.0 of the library. The...

    I just released v0.14.0 of the library. The changes:



    ## [0.14.0]

    ### Added
    * Added a `util::StdioPrint` class, a `Print` decorator for stdio output files.
    It routes `Print` functions to...
  29. It looks like there are conflicting defines.

    It looks like there are conflicting defines.
  30. Here's my quickie test programs. I've never seen...

    Here's my quickie test programs. I've never seen it fail on the receiving Teensy. I always see "size=1" printed.
    Question: Once you see the packet size change to zero, does it ever go back to being...
  31. One major thing I noticed about the code is that...

    One major thing I noticed about the code is that you're printing strings without a guaranteed NUL terminator. `Udp.write("1")` only sends one byte. Then, when it's received into `data2` on the other...
  32. You’re saying that parsePacket() never returns...

    You’re saying that parsePacket() never returns non-zero when you send packets? Could you provide a simple example program that you know exhibits the problem?
  33. When using QNEthernet: What are you seeing for...

    When using QNEthernet: What are you seeing for the return value of endPacket()? Also beginPacket() and write()? For write(), does the return value match the number of bytes sent?
  34. This might help:...

    This might help: https://github.com/ssilverman/QNEthernet/blob/master/examples/SNTPClient/SNTPClient.ino
  35. Note that the EthernetFrame API won’t receive any...

    Note that the EthernetFrame API won’t receive any known frame types. These include IP (including UDP and TCP) and ARP.
  36. Replies
    34
    Views
    2,699

    What do you think of this instead: // Give...

    What do you think of this instead:


    // Give Ethernet some time to initialize
    #if USING_DHCP
    if (!Ethernet.waitForLocalIP(10000)) {
    // do stuff
    } else {
    // do other stuff
    }
  37. Gotcha. Sounds like the FTP server code could be...

    Gotcha. Sounds like the FTP server code could be more clever. Thanks for that update.
  38. Here's what I believe happened: The fault is in...

    Here's what I believe happened: The fault is in the FTP server library that likely opens sockets until they're all used up (because of the all the PASV requests), and then the client hung on to them,...
  39. A few points: 1. Change defines in lwipopts.h...

    A few points:

    1. Change defines in lwipopts.h instead of via build options in platformio.ini because lwIP may overwrite defines you put in the build command with the ones in the source code.
    2....
  40. Replies
    34
    Views
    2,699

    I think I figured it out; there appear to be two...

    I think I figured it out; there appear to be two factors:

    1. The "route error" (ERR_RTE=-4) is because the link isn't yet detected to be up when a connection is attempted. To solve this, after...
  41. Replies
    34
    Views
    2,699

    What are you setting the netmask and gateway to?...

    What are you setting the netmask and gateway to? Also, what are these values when using DHCP?
  42. Replies
    34
    Views
    2,699

    @khoih-prog What do you see when you change to a...

    @khoih-prog What do you see when you change to a static IP? Also, do you have a suggestion for the quickest way to create a WebSockets server (preferably on a Mac)? (I haven't looked much yet...)
  43. Replies
    34
    Views
    2,699

    I loaded the `Teensy41_Client` example and...

    I loaded the `Teensy41_Client` example and changed:
    1. The IP, subnet mask, gateway, and DNS to something suitable,
    2. Changed USING_DHCP to false,
    3. Commented out the <TeensyID.h> and <SPI.h>...
  44. Replies
    14
    Views
    915

    @danielkr I was able to move lwiIP's heap to...

    @danielkr I was able to move lwiIP's heap to RAM2, so this should clear up some space. See the latest on GitHub.

    If you're using PlatformIO, delete `.pio/libdeps/teensy41/QNEthernet`, make sure...
  45. Replies
    9
    Views
    936

    @DaniO: this might be relevant:...

    @DaniO: this might be relevant: https://forum.pjrc.com/threads/69613-NativeEthernet-socket-size-bug?p=301188&viewfull=1#post301188

    It talks about larger UDP packets and IP fragmentation. There's...
  46. Replies
    11
    Views
    1,334

    In the QNEthernet library, should someone find...

    In the QNEthernet library, should someone find this thread:

    1. There's full multicast support. See: https://github.com/ssilverman/QNEthernet#how-to-use-multicast
    2. In addition, you can find the...
  47. @hijomojo: This might be relevant:...

    @hijomojo: This might be relevant: https://forum.pjrc.com/threads/69613-NativeEthernet-socket-size-bug?p=301188&viewfull=1#post301188

    It talks about larger UDP packets and IP fragmentation....
  48. Thanks! It’s also accessible from the Arduino...

    Thanks! It’s also accessible from the Arduino library manager, plus via PlatformIO using the GitHub URL. I do think it’s Teensyduino installer-worthy, but that’s up to Paul, I suppose (I haven’t...
  49. @MartyBrown yes, this is my library :) I wrote it...

    @MartyBrown yes, this is my library :) I wrote it because I needed something that didn’t use a timer. Also, I figured that providing a library that used a different underlying stack (I also thought...
  50. Do you experience the same problem using the...

    Do you experience the same problem using the QNEthernet library? Note: the initialization is simpler than what you have in your demo code. See the examples for a few ways to initialize.
Results 1 to 50 of 481
Page 1 of 10 1 2 3 4