Shop OBEX P1 Docs P2 Docs Learn Events
Parallax-ESP Module Latest Hack - Page 11 — Parallax Forums

Parallax-ESP Module Latest Hack

15678911»

Comments

  • @"Clock Loop" ,

    To fix the reboot issue you need to look at the changes to "libesphttpd". These fixes are not in 1.2 and are not needed if you use 1024 for memory in stead of 4096.

    With 4096 you can only create about 2 connections before memory error show up. With 1024 you can create 4 connections.

    Mike

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 10:36

    Ok, so then my reboot issue perhaps is not related to the 1024 memory?
    Because I made that correction in the code.

    That means its some other code?

    I will do more testing with the latest Parallax-Esp repo compile, by changing the memory back to 1024, and making the changes you did, to make the 'D' poll reply work again.

    If I encounter the same restart error, I will post some debug logs and try to narrow the sequence of commands needed to reproduce it.

    Time to run my engine around the track for a few hours with 1.2 to test my spin code.
    Then I will try to test with the latest parallax-esp compile again after proving my spin code is not the actual problem.

  • If it helps, the version in this repo had the udp tweaks iseries posted in Oct2020, and I've just added the TCP tweak from March 20.
    Also, this is set in sscp.hu : #define SSCP_RX_BUFFER_MAX 1024

    If there are any other updates I'm happy to include them given a link to follow. Although I'm not the official maintainer, I try to keep that version updated with whatever I see here.

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 14:15

    @VonSzarvas said:
    If it helps, the version in this repo had the udp tweaks iseries posted in Oct2020, and I've just added the TCP tweak from March 20.
    Also, this is set in sscp.hu : #define SSCP_RX_BUFFER_MAX 1024

    If there are any other updates I'm happy to include them given a link to follow. Although I'm not the official maintainer, I try to keep that version updated with whatever I see here.

    Great, I will give it a try once my engine thaws out from my spin program test.
    It worked great except for the fact that the tracks kept freezing up, I don't have a battery or super large caps.
    https://forums.parallax.com/uploads/editor/2w/yk5oh90scbkx.mp4 :)

  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2021-03-24 14:22

    Wow! Fantastic train setup. The sounds are really authentic too.

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 15:26

    @VonSzarvas said:
    Wow! Fantastic train setup. The sounds are really authentic too.

    LoL, all are authentic, 100% real birds and snow.

    I get an error when compiling your repo.

    xtensa-lx106-elf-gcc: error: webpages.espfs.ld: No such file or directory
    make[1]: *** [Makefile:202: libwebpages-espfs.a] Error 1
    make[1]: Leaving directory '/Parallax-ESP/libesphttpd'
    make: *** [Makefile:245: libesphttpd] Error 2
    

    I am recompiling the esp-open-sdk repo, but i suspect that isn't my problem, nope, its not.

    The problem is you are using an old version of libesphttpd.?
    I series is using this:
    libesphttpd @ f428b84

    I just cloned iseries repo and deleted your libesphttpd and replaced it with the one in iseries repo.
    Then it compiled.

  • @VonSzarvas

    So far, it works good. I can't get the wx to crash at all from any webpage.

    Now to upload this firmware to all 4 wx modules to see if my railroad engine spin program can still induce a crash.

    Do you call this v1.3 due to the P2 features?

  • Thanks @"Clock Loop" for the details about libesphttpd. I'll check that. It does compile here, so maybe I have a more recent local copy than on Git! who knows!

    v1.3 ... yes, I bumped it for the P2 release. That repo version is waiting to be merged into the Parallax main Git, but time didn't align for that to happen just yet. Once 1.3 is re-tested with the latest edits, I'll try to get an audience with a permission holder to have the main repo updated.

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 16:56

    @VonSzarvas said:

    v1.3 ... yes, I bumped it for the P2 release.

    Are you sure you have the tag set proper?
    It says v1.2 for the version still,
    I just removed the 1.2 tag git tag -d v1.2
    And added a 1.3 tag for my local use git tag -a v1.3

    FYI, don't go above v1.9 ..... the v2.0 tag makes the proploader fail, because proploader requires versions under 2.
    Someone will need to eventually update proploader to allow versions 2 and up.

    I like those p2 features! I am looking into doing the railroad engine controller on the p2, because it has multi-channel sound playback(the p1 requires lots of hacks to get that same sound capability, so my p1 based engine still doesn't have any sound!
    I will need to find 600$ to get all the stuff I need to make a second engine but with a p2.

  • @VonSzarvas

    So far, this firmware is doing GREAT, no reboots, and no odd listener/connection/reboots.

    Looks like I will just run this from now on, and eventually get into the udp features!

    Thanks @VonSzarvas and @iseries

    I will be posting updated spin code, schematics in the engine controller thread.
    This new spin code and schematic uses a wx to talk to the control webpage.
    Then it also uses a second wx to talk to the caboose which has a wx and propeller in it.

    Initially when I only had 1 wx for both the webpage and wx to wx communications, it overloaded the connections and would drop the website, which was very bad since its the control for the engine.
    So I simply installed a second wx in the engine, and kept the webpage communications seperate from the wx to wx communcations.
    The cycle time is about 1 to 2 seconds for the caboose to talk to the engine which then talks to the webpage.

    So this is why I initially mentioned needing a faster way to do wx to wx communcations, and iseries made yet another method for me to try, udp instead of http.

    Now that the http method is smooth as butter, time to totally screw up my spin program in an attempt to make it use udp. eheheh..

  • @"Clock Loop" said:
    Now that the http method is smooth as butter, time to totally screw up my spin program in an attempt to make it use udp. eheheh..

    Have fun with that !!! :)

    (And thanks for the feedback. Glad that worked for you, and I'll get to checking the libesphttpd thing in a few days)

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 22:44

    Turns out when I went to reprogram a prop connected to this 1.3 firmware,
    it never uploads the program, communication is lost every time.

    On every module. I didn't realize it because I didn't change my program until now.

    So I am downgrading to v1.2 until someone can test downloading to a prop chip P1, with v1.3 from @VonSzarvas
    Did you test with a P1 after making P2 changes?

  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2021-03-24 22:49

    I did test p1 and p2 prior to the latest tcp fix.

    One idea.. Does the settings page show the correct reset pin? P2 changes it to cts. P1 typically uses dtr.

    Ps. I can try it in the morning and let you know what I find!

  • @VonSzarvas said:

    One idea.. Does the settings page show the correct reset pin? P2 changes it to cts. P1 typically uses dtr.

    Ps. I can try it in the morning and let you know what I find!

    I have two setups, one is the activity board wx and it uses DTR.
    I also have a manual prop setup that uses CTS.
    Neither work, even when changing the reset pins.
    Without doing anything but flashing back to 1.2, they work again.
    Good luck!

Sign In or Register to comment.