ESP32 Command Station

Atani Dec 10, 2017

  1. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Jut tried it again having run the clean command, and got the following failure:

    Seems to be having issues on the HC12.
     
  2. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    And then immediately below:

     
  3. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    I specified Pin 27 TX and Pin 35 RX, and didn't make any other changes here.
     
  4. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    It should be automatically detected and used.

    You have run into a path length limitation on windows. Move the esp-idf directory from your desktop to C:\esp-idf and re-run export.bat from that new location (it should set IDF_PATH variable to that new location).

    For the error about CONFIG_HC12_TX_PIN, remove the last ) and it should work. I'm pushing an update for the same.
     
    AndyH likes this.
  5. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    So close...

    I reinstalled idf so that everything was outside of the Windows directory, and made the amendment to the HC12 code. What now?

    And thank you so much for your perseverance and help on this. Do you have a gofundme or anything? I know that this is freeware, but you have gone so far above what is the norm on freeware.
     
  6. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Was there more to the error? It looks like there may still be a lingering reference to a long path but I can't say for certain from the posted snippet.

    Thanks but I'd decline the donation at this time and suggest instead to donate it to those who truly need it during this very odd time we are living in.
     
    AndyH likes this.
  7. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Is this any better?

     
  8. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Yup, I'll have a fix shortly. It looks like a couple missing include lines.

    EDIT: Add the following lines below the one include line in HC12Radio.cpp:
    Code:
    #include <fcntl.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <utils/StringPrintf.hxx>
    
     
    Last edited: Jan 23, 2021
    AndyH likes this.
  9. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Success on the build. Now to flash.

     
    Atani likes this.
  10. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Verify that it is in fact using COM7 and that the ESP32 is plugged in.
     
  11. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Device Manager is showing the USB to UART bridge as on COM7
    VSCode identified it as COM7 as well.
    And Arduino ide.

    VSCode failed to connect to the board as well though. Am I missing a driver or something?
     
  12. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    I'm not certain, but make sure nothing else is using the device
     
  13. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    I appear to have made an error in the command - I didn't need the brackets around COM7. However, still won't connect.

     
  14. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Hold the boot button and press reset. Then retry upload. Some esp32 boards have trouble entering download mode automatically.

    Sent from my ONEPLUS A5010 using Tapatalk
     
    AndyH likes this.
  15. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Found it. A little google searching shows that I was flashing incorrectly (ooh err Mrs). Turn board off with switch. Plug in USB. Hold boot button down. Turn board on. Release boot button. Flashed fine.



    Just saw you post the same as soon as I had hit reply.

    Now to hardware test.
     
    Atani likes this.
  16. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Great... Killed/cooked my board somehow. Possibly too high a current draw somewhere, or the screen tried to play 5v with it. Either way, I've had to go to my spare board which, despite a scratch on the back exposing some of the copper traces (and no TF reader), has loaded the code fine, and seems to play nicely (my burned out T8 nearly killed my USB port with power draw, so seems to have a short somewhere), as in it launches the wifi signal fine, and I can connect.

    I can connect fine to the CS with JMRI, but connecting from an external android programme (digitrains/engine driver) doesn't seem to work. My understanding was that the CS should launch a JMRI web server that I can connect to with ipad/android. Is that not the case? I am using it in softAP mode (but can change it to a different setting if that works as I expect).
     
  17. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Those programs require usage of WiThrottle server which the CS does not yet implement. I'll be working on the WiThrottle support soon though.

    Open a browser and navigate to any website and it should redirect you to the CS webpage which has a built-in throttle. I've got an update to the throttle which improves performance and reliability which will be merged to master soon.
     
  18. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    So we're turning on fine, I've set up to connect to an existing network, all is fine, setting the fixed ip address fine, jmri connecting fine.

    I'm adding bits of hardware one module at a time to check that things are working ok. I've got a 128*32 oled because I could pick one up on the UK relatively cheaply. It's working fine (albeit last digit of the ip address has been chopped off).

    However, I've now added the l298 programming track. I didn't connect the current sense wire for the test. 5v power to the l298, feeds straight off the cs board through the transistor and resistors circuit (2n222a transistors). And nothing (prog track showing as on in jmri). No ac voltage across the output despite 16v dc going in, verified at the driver. And the oled was showing the ops track as on, not the Prog track.

    Any suggestions? Thanks.



    Sent from my SM-N976B using Tapatalk
     
  19. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Verify all connections between the ESP32 and the L298. It sounds like the EN pin is not connected.
     
  20. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Missed this part, the PROG track will *ONLY* be ON when it is actively in use. This is internally managed by the command station as a safety measure.
     

Share This Page