Go Down

Topic: dtostrf with 0 value give error when send http (Read 615 times) previous topic - next topic

smallpoul

Maybe that when it convert the 0 in the first bytes, bytes is null? Could that be my problem and if so could a byte be 0 not null.

majenko

Have you sniffed the network packets to see if the URL being transmitted is properly formed?

Have you tried manually interacting with the website to send a URL with a 0 value to see if it throws an error?
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

smallpoul

Mistake by me i always have bad request event if temp is more the 1 degree, If i put it manually like this everything is find and update:
Code: [Select]
ether.browseUrl(PSTR("/data_request?id=variableset&DeviceNum=48&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=7"), "", website, my_callback);

How the do i include the temerature after the=

PeterH

Code: [Select]

ether.browseUrl(PSTR("/data_request?id=variableset&DeviceNum=48&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value="), buffer, website, my_callback);


I don't recognise this browseUrl() method. I guess the first argument is a URL, and the URL you supply has a URL-encoded parameter ("Value") which does not have a value assigned, which could reasonably be deemed a bad request. You've put a value on the buffer variable. Was that supposed to be appended to your URL? If so, where do you think that happens?
I only provide help via the forum - please do not contact me for private consultancy.

Go Up