Hi everyone,
I looked over the examples in Adafruit_CC3000_Library and could not find a Client class to perform high levels of the HTTP protocol such as connect, GET and POST.
Some folks over at Spark Fun has created a similar library for their version of the CC3000. This library includes a Client class which performs what I want. Their library is located at https://github.com/sparkfun/SFE_CC3000_Library
Unfortunately, I am running into some problems with getting my module to run with their lib. I've created an issue at https://github.com/sparkfun/SFE_CC3000_Library/issues/4. I am pretty sure it's either a compatibility issue or a software bug since I have no problems running the Adafruit_CC3000 library examples.
Has anyone successfully used SFE_CC3000's module with the Adafruit_CC3000 board?
Does Adafruit plan to release a Client class for their version of the CC3000 board?
Adafruit CC3000 Client?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Adafruit CC3000 Client?
Code: Select all
/* Try connecting to the website */
Adafruit_CC3000_Client www = cc3000.connectTCP(ip, 80);
if (www.connected()) {
www.fastrprint(F("GET "));
www.fastrprint(WEBPAGE);
www.fastrprint(F(" HTTP/1.0\r\n"));
www.fastrprint(F("Host: ")); www.fastrprint(WEBSITE); www.fastrprint(F("\n"));
www.fastrprint(F("Connection: close\n"));
www.fastrprint(F("\n"));
www.println();
} else {
Serial.println(F("Connection failed"));
return;
}
- BrianEh
- Posts: 3
- Joined: Thu Oct 09, 2014 1:25 pm
Re: Adafruit CC3000 Client?
I too am attempting to adapt a Sparkfun cc3000 library to the Adafruit cc3000 library.
One thing that that the Sketch I am working with does with the Sparkfun library that I have not been able to resolve is this definition of a client object:
SFE_CC3000 wifi = SFE_CC3000(CC3000_INT, CC3000_EN, CC3000_CS);
SFE_CC3000_Client client = SFE_CC3000_Client(wifi);
The 'client' object is then fed to another library.
I have the first line verifying just fine using;
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, SPI_CLOCK_DIV2);
It is that second one I can't figure out how to rectify between the two.
One thing that that the Sketch I am working with does with the Sparkfun library that I have not been able to resolve is this definition of a client object:
SFE_CC3000 wifi = SFE_CC3000(CC3000_INT, CC3000_EN, CC3000_CS);
SFE_CC3000_Client client = SFE_CC3000_Client(wifi);
The 'client' object is then fed to another library.
I have the first line verifying just fine using;
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, SPI_CLOCK_DIV2);
It is that second one I can't figure out how to rectify between the two.
Please be positive and constructive with your questions and comments.