xiaoxiwu / jcoap Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jcoap
Automatically exported from code.google.com/p/jcoap
Hello,
I was looking for documentation on your CoAP implementation but I could not
find any. I was wondering: what features does jCoAP implement so far?
Thanks!
Original issue reported on code.google.com by [email protected]
on 5 Dec 2011 at 12:04
What steps will reproduce the problem?
1. Start from the CoapSampleResourceServer.java and BasicCoapClient.java
examples given with this package
2. Modify the request in BasicCoapClient.java to request an observe message
from the resource (i.e coapRequest.setObserveOption(0);
coapRequest.setUriPath("/test/light"); ). See included file for details
3. Run first the server, then the client.
What is the expected output? What do you see instead?
The expected output is:
- An updated light value received whenever the value changes on the server side
What I see is:
- A ClassCastException:
Exception in thread "Thread-0" java.lang.ClassCastException:
org.ws4d.coap.messages.CoapEmptyMessage cannot be cast to
org.ws4d.coap.interfaces.CoapRequest
at org.ws4d.coap.connection.BasicCoapClientChannel.sendMessage(BasicCoapClientChannel.java:140)
at org.ws4d.coap.connection.BasicCoapClientChannel.handleMessage(BasicCoapClientChannel.java:74)
at org.ws4d.coap.connection.BasicCoapSocketHandler$WorkerThread.handleIncommingMessage(BasicCoapSocketHandler.java:272)
at org.ws4d.coap.connection.BasicCoapSocketHandler$WorkerThread.run(BasicCoapSocketHandler.java:155)
What version of the product are you using? On what operating system?
Coap source checkout:
Commit: 020caefedb4c135829f550c803deebceb29f740f [020caef]
Parents: 789c5c0959
Author: Christian <[email protected]>
Date: Tuesday, 12 June, 2012 11:06:01
Labels: HEAD, origin/master, origin/HEAD, master
OS: Windows 8.1 Enterprise
Please provide any additional information below.
The bug can be fixed by adding a check for CoapRequest format, i.e in
BasicCoapClientChannel.java change the sendMessage function:
@Override
public void sendMessage(CoapMessage msg) {
super.sendMessage(msg);
//TODO: check
if(msg instanceof CoapRequest){
lastRequest = (CoapRequest) msg;
}
}
I suppose this is why the "//TODO: check" was here
Original issue reported on code.google.com by [email protected]
on 26 May 2015 at 8:08
Attachments:
What steps will reproduce the problem?
1. Send a core request with rt set
2. No resource returned
What is the expected output? What do you see instead?
Resources with that resource type specified in the query
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 13 May 2015 at 3:01
The optionType member variable was not getting set in CoapHeaderOption
constructor. When creating a response, the getToken method returns null because
the getter relies on this variable.
I pushed a change to my clone greg-mirabito-jcoap to fix this problem.
Original issue reported on code.google.com by [email protected]
on 1 May 2012 at 3:56
What steps will reproduce the problem?
1. Compile Proxy.java
2. Run Proxy.java
3. Get request undeer localhost:8080
What is the expected output? What do you see instead?
Response Payload of coap server. Instead i get error in coaprequesthandler.
What version of the product are you using? On what operating system?
Latest from git
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Mar 2012 at 9:36
this methods raise an exeception when executing the samples (client).
PS: the samples needs to be corrected (compilation errors) before they could
actually run (see issue#4 which I corrected in my branch)
Original issue reported on code.google.com by [email protected]
on 18 Nov 2011 at 2:01
Hi,
i would like to have a simple way to retrieve the ip address of a response's
sender. Maybe i'm wrong, but i used jcoap that way :
I have a class that use a ChannelManager : I have some URI, and i get a
ClientChannel for each URI.
I register my class as a Listener for each Channel, and send messages.
My problem is to retreive IP sender of received response.
Is it better to implement a method to get IP address ? or is it better to have
many listener, one for each channel (in that case, of cause, i know the
address) ?
I think it's still an issue, because i want some day use Jcoap on multicast
address to discover devices.. So i will send to a multicast address, and want
to get ip address of response's sender).
Thanks for your answer.
Original issue reported on code.google.com by [email protected]
on 12 May 2011 at 9:44
What steps will reproduce the problem?
1. Create a BasicCoapMessage
2. Set the contentType to exi
3. Call getContentType on the message and the wrong value is returned
What is the expected output? What do you see instead?
I expected to get content type exi but received text-plain instead
What version of the product are you using? On what operating system?
Please provide any additional information below.
I submitted a bug fix in my cloned instance. Please apply the patch when you
get a chance.
Original issue reported on code.google.com by [email protected]
on 11 May 2012 at 5:08
Hello,
i'm trying to write a litte coap server.
but i'am quite lost :
I think i have to implement CoapServerChannel.
I open a Datagram Socket, and i listen to port 61616. (in the listen method)
When established, i can deal with received data, put them in a CoapMessage.
But i think that i should in that method build a CoapChannel, if i want to use
it to send a response ?
Is there any examples of how to use your code ?
Thanks.
Original issue reported on code.google.com by [email protected]
on 19 May 2011 at 10:49
What steps will reproduce the problem?
1. Compile the samples (client)
What is the expected output? What do you see instead?
Expected: to compile and run smoothly
Actual: 5 compilation errors
I corrected these errors in my branch, which compiles and runs.
Original issue reported on code.google.com by [email protected]
on 18 Nov 2011 at 1:59
Hi,
According to the draft-coap-7 the optional length is split in length lower then
15 or hight for the next length field.
so,
length < 15 then the long length is 0,
but when the length > 15 then the over flowing length is placed into the long
length value - 15.
example:
total length = 17.
results into short length = 15, long length = 2
in the current implementation of jcoap this substraction isn't done.
bugfix can be done in the file CoapHeaderOptions function deserialize, line 78
tmpLength = tmp.getLongLength() + 15;
end for serialization :
CoapHeaderOption
line 37, longLength = value.length-15;
regards,
Original issue reported on code.google.com by [email protected]
on 7 Oct 2011 at 11:21
Looking for more documentation and any information on porting this to Android.
Thanks!
Original issue reported on code.google.com by [email protected]
on 23 Jan 2013 at 12:34
What steps will reproduce the problem?
1. clone latest version of jcoap
2. run jcap Proxy: org.ws4d.coap.proxy.Proxy
3. send http request to various ip-adresses
What is the expected output? What do you see instead?
When i send http://localhost:8080 I see a incomming HTTP Request.
But when i try it with an ipv6 adress of an connected sensor
http://[ipv6-ip]:8080 i can't see an incomming HTTP request, also doesn't work
with a simple ipv4 http request.
What version of the product are you using? On what operating system?
working with ubuntu, connected contiki rpl-boarder-router and a reachable
contiki based sensor
Please provide any additional information below.
netstat -tulpn output looks following:
tcp6 0 0 :::8080 :::* LISTEN
-
I don't know why only requests to localhost are arriving the http NIO server
Original issue reported on code.google.com by [email protected]
on 24 Apr 2013 at 8:30
I'd like to use Proxy in order to reach an isolated WSN from a remote station.
What steps will reproduce the problem?
1. My configuration is [ CoAP Client <---> Internet <---> jcoap Proxy - CoAP
WSN ]
2. From the "proxy" station I run Proxy.class; also it's directly connected to
the CoAP WSN.
3. From the "local station", in BasicCoapClient.java I set "fec0::2" (IPv6 of
the CoAP Node) to SERVER_ADDRESS constant; in addition I've tried to set both
of these properties:
coapRequest.setProxyUri("http://IP_Proxy:8080");
coapRequest.setProxyUri("coap://IP_Proxy:5683");
but, I've received a SocketException (Network is unreachable) because it tries
to directly connect to fec0::2.
What is the expected output? What do you see instead?
I expect to see a successful connection to my proxy, which can forward the CoAP
Client request to the Node.
What version of the product are you using? On what operating system?
Latest version (by git). My OSs are both Ubuntu 11.10.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 May 2012 at 4:02
What steps will reproduce the problem?
1. Running Proxy.java with Eclipse
What is the expected output? What do you see instead?
I cannot execute the proxy code because I get this error
13-jun-2012 21:41:27 net.sf.ehcache.config.ConfigurationFactory
parseConfiguration
WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml
found in the classpath:
jar:file:/home/fprado/Eclipse/jcoap/ws4d-jcoap-applications/Referenced%20Librari
es/ehcache-core-2.4.3.jar!/ehcache-failsafe.xml
What version of the product are you using? On what operating system?
Lastest from git. Ubuntu 11.10.
Please provide any additional information below.
I am a little bit lost about how to fix this problem :(
Original issue reported on code.google.com by [email protected]
on 13 Jun 2012 at 7:49
What steps will reproduce the problem?
1. I run the coapClient and Proxy on different computer
2. set the setProxyUri as ("http://ip:port") in theBasicCoapClient.java
3. run the wireshark,but the Proxy send a TCP package but not HTTP
What is the expected output? What do you see instead?
I want to transform HTTP to CoAP, I send a coap message to Proxy and it
transform it to CoAP
What version of the product are you using? On what operating system?
mac os x
Please provide any additional information below.
any document about the Proxy?
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 7:47
What steps will reproduce the problem?
1. Sending a message in blocks
2.
3.
What is the expected output? What do you see instead?
I send a 256 byte message with a maximum block size set at 64. Wireshark
captures only 1 UDP packet instead of 4.
What version of the product are you using? On what operating system?
Latest from GIT. OS X 10.8.
Please provide any additional information below.
Can you please provide me information if the block transfer is already working?
I am trying to figure out the code behind it, but if it doesn't work yet a
simple yes or no will save me a lot of work trying it out :). If I have time
left besides my own project I might try to implement the block wise transfer.
Thanks!
Original issue reported on code.google.com by [email protected]
on 12 Mar 2014 at 1:10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.