Shop OBEX P1 Docs P2 Docs Learn Events
ESP-01 a transparent serial bridge for Propeller to Propeller communications? — Parallax Forums

ESP-01 a transparent serial bridge for Propeller to Propeller communications?

I have previously used Parallax's Xbee products for wireless serial communications. A cake walk. Absolutely fabulous. Rock solid... no muss
no fuss. So what's the problem?

I burned up a couple of Xbee modules using my own boards with off the shelf adapters. The Parallax boards that I know to work are (relatively)big, elegant and a bit pricey. Everyone should have a couple of Propeller Activity Boards for prototyping, but to implement actual systems, other boards need to be considered... the PropMini or P8XBlade2 for instance. Love them, want to see them in every corner of my house:)

A while back I started to watch the ESP8266 conversation but it was mostly concerned about iot type stuff and a new language for the ESP8266 family and I lost interest.
Having recently found more than one reason to get wireless serial going again, I ordered up some new units(yes I have plenty of old ESP-01's except they are made by someone else and are named something else...from a long time ago, which means any current info might be ... less than useful.)

I got the new units in yesterday, and with the help of references provided in the major thread linked above, I got them kicking in about 5 minutes...I said "AT" they said "OK"... 24 hours later, I am able to see both units as servers on my computer... and both units can see each other.

One of the references linked in the major thread was here.
and was very helpful... actually giving an example of a transparent connection... but I don't think it is exactly what I am trying to do.


This is a code snippet of the AT command sequence mostly from this example link (at the Propeller Serial Terminal)... ser2 is the ESP serial connection.
ser2.str(string("AT+GMR",cr,lf))
   wait_ser2
   debug.str(string("done",cr))
   ser2.str(string("AT+CWMODE=3",cr,lf))
   wait_ser2
   ser2.str(string("AT+CWLAP",cr,lf))
   wait_ser2
   ser2.str(string("AT+GMR",cr,lf))
   wait_ser2
   ser2.str(string("AT+CWJAP="))
   ser2.str(@quote)
   ser2.str(string("AI-THINKER_D1DC9A"))
   ser2.str(@quote)
   ser2.str(string(","))
   ser2.str(@quote)
   ser2.str(string("12345678"))
   ser2.str(@quote)
   ser2.tx(13)
   ser2.tx(10)
   wait_ser2
   ser2.str(string("AT+CIFSR",cr,lf))
   wait_ser2

The code works and I get all of the info back that references say I should get. I'm actually quite amazed!!!

Problem is... now I'm really stuck. I really don't have a clue how to get the final transparent connection I'm looking for. I know almost nothing about the iot of things and how to use the IP addresses (I clearly have available) seems to be a bridge too far.
347 x 547 - 17K
550 x 420 - 50K

Comments

  • rjo__rjo__ Posts: 2,114
    oops... almost forgot
  • Nice work there Rjo

    Now for your next distraction have a look at the recently released ESP3212's. These can handle wifi or bluetooth, dual core with lots more ram. Worth getting a pre-order in somewhere.
  • rjo__rjo__ Posts: 2,114
    I have a bag full of Nordic chips I am willing to trade:)
  • rjo__rjo__ Posts: 2,114
    edited 2016-09-08 07:28
    If I can't do it with AT commands I shouldn't even try. These soc's are great for polysyllabic engineers that have TCP stacks in their brains... but us homies need to stay true to our roots.

    It really is... just a nightmare for normals.

    Maybe after I sleep an LED will go off in my head.... fun stuff, but wish I had never thought about it:)
  • rjo__rjo__ Posts: 2,114
    edited 2016-09-08 07:27
    ok... I'm a sucker, but...

    look at the specs... Notice how much is already covered by the 8266 family... and how little is actually added by the new "soc"... and the chips are available NOW!!! in limited quantity.

    look at the specs... as a controller? Give me a break.

    AT commands now, At commands forever.

    804 x 412 - 66K
  • rjo__rjo__ Posts: 2,114
    I should add that my comments are about the stupid iot of things and not directed at my friend, Tubular.

  • rjo__rjo__ Posts: 2,114
    And are fairly reflective of my true feelings after staring at this ESP-01 for the last 24 hours:)
  • Ha!... yes I remember what that elated feeling is like. Spend a long weekend with some Telit modules many years ago and got a proof of concept up and running that went on to a product. Its all worth it...

  • rjo__rjo__ Posts: 2,114
    Woke up in a wonderful mood. I can talk to my browser... among a lot of errors and fits and starts and then restarting the router:)

    That's not the point... I don't want to talk to my browser, I want to talk to my Propeller.

    Does this mean that it is not possible?

  • Talk to the Propeller how?

    I used this around a year ago and it worked great - https://github.com/beckdac/ESP8266-transparent-bridge

    From what I've read the older no-name chips can be problematic with firmware changes.

    The link with the example of a station connecting to an access point doesn't really matter. There are other ways to accomplish the same thing.


  • rjo__rjo__ Posts: 2,114

    I'll take a look.

    Thanks
  • rjo__rjo__ Posts: 2,114
    Xanadu,

    So... it is totally possible. It is just a matter of getting it all set up right.
    I just spent the day digging out some HC05 modules and have them working like a clock.
    The ESP01 module takes up roughly 1/2 the real estate as the HC05, so it is worth pursuing again.

    I use essentially the same AT command interface code for programming both the ESP01 and HC-05.
    I ran into an issue while working with the HC-05 that I didn't know existed and still can't explain... having to do with automatically issuing commands from spin rather than entering them manually through the terminal. I still can't explain it, but now that I know the issue is there, maybe that was the hitch. When I have time, I'm going to post the code and see if anyone understands what is going on with that(it works in a lot of other AT contexts)... I certainly don't get it. The terminal bailed me out on the HC-05's

    Today Chip released a new version of the P2v. So that will have my attention for some time.
    I'll be back.

    Thanks again.
  • rjo__ wrote: »
    Xanadu,

    So... it is totally possible. It is just a matter of getting it all set up right.
    I just spent the day digging out some HC05 modules and have them working like a clock.
    The ESP01 module takes up roughly 1/2 the real estate as the HC05, so it is worth pursuing again.

    I use essentially the same AT command interface code for programming both the ESP01 and HC-05.
    I ran into an issue while working with the HC-05 that I didn't know existed and still can't explain... having to do with automatically issuing commands from spin rather than entering them manually through the terminal. I still can't explain it, but now that I know the issue is there, maybe that was the hitch. When I have time, I'm going to post the code and see if anyone understands what is going on with that(it works in a lot of other AT contexts)... I certainly don't get it. The terminal bailed me out on the HC-05's

    Today Chip released a new version of the P2v. So that will have my attention for some time.
    I'll be back.

    Thanks again.
    Can you tell me what you're doing with the ESP and what AT commands you are using? I'm working on ESP firmware and would be interested to know if what I'm doing can handle your use case.

  • rjo__rjo__ Posts: 2,114
    David,

    I'm glad you are looking at it!!!

    The calls and the order are in my post in the start_esp routine. What I am trying to do is to get an absolutely transparent serial bridge going between two props. I tried a lot more than what is there but for the life of my I don't remember exactly what:)

    My main problem is that I simply don't know where to go from what you see in the code... and I got exhausted trying to do it... still feeling hungover from it today:) Documentation and examples are fairly sparse. You can probably get more out of Xanadu's link than I can.

    Rich
  • Hmmm... I haven't considered that use case. My firmware can't handle that yet either. I'll have to think about it. Thanks for bringing this up.
  • rjo__rjo__ Posts: 2,114
    What was straightforward was to get the ESP01 talking to a browser... the main thread I referenced above was helpful. OBC even has an "instructible" tutorial on it. What I didn't find was THAT kind of material when it came to getting two way conversations going with two ESP01's. The one example that mentions transparency, that I linked above (and found through the major thread on the topic, see above) probably has 95% of what I need and maybe 100% that I just didn't follow correctly. I began to wonder if it were actually possible or if I was just chasing a dead end. Xanadu answered that.

    I will have the rug-rat until Monday afternoon... I'm going to give it another try then.

  • rjo__ wrote: »
    David,

    I'm glad you are looking at it!!!

    The calls and the order are in my post in the start_esp routine. What I am trying to do is to get an absolutely transparent serial bridge going between two props. I tried a lot more than what is there but for the life of my I don't remember exactly what:)

    My main problem is that I simply don't know where to go from what you see in the code... and I got exhausted trying to do it... still feeling hungover from it today:) Documentation and examples are fairly sparse. You can probably get more out of Xanadu's link than I can.

    Rich

    There could be a way to get two ESP chips talking using stock firmware but probably not transparently. Using this firmware it's a done deal.

    This is a good example of the entire process, you would use the firmware I posted instead of what they use - http://www.allaboutcircuits.com/projects/update-the-firmware-in-your-esp8266-wi-fi-module/

    The firmware has configuration instructions below the file list - https://github.com/beckdac/ESP8266-transparent-bridge

Sign In or Register to comment.