weird CC3000 library behavior: .connect() works but .connect(SPI1, B6, B7, B8) hangs #5333
Replies: 1 comment
-
Posted at 2016-05-24 by @gfwilliams Your first attempt: Seems like the correct one - but did you set up SPI1 beforehand? You'd need to use Unfortunately the software TI provides for their module is awful - if you initialise it with the wrong information, it just crashes and never returns (rather than erroring). Posted at 2016-05-24 by TheAlchemist Thanks for the quick reply, @gfwilliams! Unfortunately, setting up SPI1 doesn't fix it (that would be too easy). A At least now I know I'm not going crazy, and this is actually weird. I'm thinking of just getting an ESP8266, unless there's WiFi module folks recommend. Posted at 2016-05-25 by @gfwilliams I just tracked this down - it turns out that there was a regression which meant that If you use the latest Pico firmware from Git (which annoyingly doesn't come in a CC3000 flavour!) then it'll be fixed and the following will work:
I've put a working build at:
If you copy that link and paste it into the Web IDE's flasher, it should work fine. Posted at 2016-05-25 by TheAlchemist Wow, you're awesome, @gfwilliams! Unfortunately, http://www.espruino.com/tmp/espruino_1v85.139_pico_1r3.bin doesn't seem to exist (I get a 404). I can't wait to try it on pins other than B3-B8. :) Posted at 2016-05-25 by @gfwilliams Strange... try:
I just clicked on the link you pasted and it works, but mine doesn't! If not, just look in http://www.espruino.com/tmp for the file. Posted at 2016-05-25 by TheAlchemist There's a weird non-printable character in the URLs above. (To give credit where credit is due, I used https://hexed.it/ to inspect the URLs.) But, anyway, http://www.espruino.com/tmp/espruino_1v85.139_pico_1r3.bin doesn't seem to work on my Pico. :( The red LED is on when I plug it in after uploading the firmware, and the Web IDE can't connect to it (the Ports list is missing the Pico, even). Any ideas? Perhaps I flashed it wrong? I can upload a screencast, if that would help. Attachments: Posted at 2016-05-26 by @allObjects I used curl to get it, because I have a CC3000 from the 'old', non-ESP8266 days... and the file came down with 7k... I know something was not right, but did not have time to dig deeper. Now I know... Posted at 2016-05-26 by @gfwilliams Damn - sorry - I always forget about this. The Web IDE expects and image that includes the bootloader - and the image I posted didn't. I've just padded it out as:
Strange about the extra character - I think it's a bug in the forum's syntax highlighting code (IIRC it's a special 'break here' character). I had to change the Web IDE so that it ignored it in pasted code - it obviously doesn't do the same with URLs :) Posted at 2016-05-26 by TheAlchemist Sorry, @gfwilliams, no luck with Any ideas? I don't think my Pico is busted, because I just flashed it back with the regular firmware, and works fine. Posted at 2016-05-26 by @gfwilliams I just updated it with a new build. Maybe try now, with the same bootloader link. Posted at 2016-05-26 by TheAlchemist
I tried almost everything I could think of, including:
Just for the record, what's the proper syntax for
....or....
Thanks so much, @gfwilliams! :) Posted at 2016-05-26 by @gfwilliams And it works now? The first one is correct - I've been trying to use the second for new things as it is much more readable, but this particular bit of Espruino still uses the old way Posted at 2016-05-26 by TheAlchemist Yeah, works great! I'm using custom pins and everything. Thank you, you're awesome. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-05-24 by TheAlchemist
Hi everyone!
I'm trying to use my Pico + CC3000 using non-default pins (not B6-B8).
In failing to do this, I tried just this:
...which hangs!
But this:
...works great! Takes about four seconds.
Am I using the API incorrectly?
Thanks everyone!
P.S. I tried this too:
Also hangs.
Beta Was this translation helpful? Give feedback.
All reactions