trouble opening connection to ( | ThingSpeak API | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.

Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
trouble opening connection to (
No permission to create posts
March 25, 2012
10:58 pm
USA, Denver, Colorado
New Member
Forum Posts: 1
Member Since:
March 25, 2012
sp_UserOfflineSmall Offline

Hello.  I am using an Arduino Leonardo board to comm to a Roving Networks RN-171 module.  I have sucessfully joined my wireless network and can do TCP sessions on the network.  I tried to use the simple twitter post sketch from tutorial though I had to modify it since I'm not using Ethernet shield, and the communication is by serial rather than SPI.  No success yet.

I then tried to just do it manually by typing on my keyboard, using the serial connection to the RN-171 (I have a program that passes through serial from PC to a separate serial connection going to the RN-171).  Again, I am able to do TCP connections on my network this way so I know the channel is working. 

But when I try to open a connection I get a 400 message.

Keystroke capture from serial program is below:  My entry is the open command. Note that Roving Networks uses space as a command delimiter. Note that the RN-171 responds Connect to etc with a :80 for the port.

open 80

Connect to
<2.32> *OPEN*<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
So I'm not able to open the connection to even try the other stuff.  Any ideas?
Thanks,  Kerwin
March 26, 2012
2:06 am
Natick, MA

Forum Posts: 411
Member Since:
January 18, 2011
sp_UserOfflineSmall Offline

You need a "host" field when making a request to an IP address. This is to tell the web server the difference between API request or a normal website request.

You need to add this to the HTTP header of your request:


Let us know if that works.

April 17, 2012
10:41 pm
Parker, CO
New Member
Forum Posts: 1
Member Since:
April 17, 2012
sp_UserOfflineSmall Offline

Hey Kerwin,


Chances are the problem is that the Roving Networks chip sends the *OPEN* string once it has established a TCP connection.  Web servers don't know what this string means, nor do they expect it.  So you get a 400 error.  When you are setting up your Roving Networks chip, tell it "set comm remote 0" which will tell the chip not to send the *OPEN* string.  I don't know what you are using to configure your chip, but it looks like there might be a few other bits that need flipping along the way.

FWIW, how random was it to check out the ThingSpeak forum today and see your post?  I was once in a beginning electronics class you held the basement of your home.  Hope this response helps.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

JadeFloralde98, mgnthe54, Zain-Ul-Abidin, wellbeingcentresuk, Vamsi, frankmehlhop

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457