Good morning,i'm experiencing a lot of affect with radiogram broadcasts. In my SpotApp a so called "BroadcastListener" thread is started. This go does simply comprehend on a specified turn for any Radiogram Packages. After this go is started a Radiogram Broadcast Package is sent at the same turn by the "main application". This app was deployed on 2 spots. One of the spots starts and after the first one is booted the back up one follows. Because the first one is listening he should acquire the case from the back up one. But in fact this does not come about to be precise this happens in a few cases this does come about. It depends on the "rhythm" i push the define button of the sender. This sounds like a typical threading problem as described in the dev guide so i set the priority of all listening threads (yeah in fact i got 2 listening threads and one thread waiting in a synced queue) to the Thread. MIN_PRIO and tried again same problem. The main thread is waiting in a "act()" so this shouldn't alter any injure. To end the story: it seems like sending directed Radiograms are delivered instantly and without any problems. Thanks in advance for any advice/back up. Regards,-Stephan
If both SPOTs are simultaneously broadcasting then you will sight that not all the packets get through. This is because in some cases they ordain attempt to broadcast simultaneously. In the point-to-point inspect the sender ordain sight that they haven't received an ACK from the remote SPOT and hear so from the application code it appears reliable. In the air inspect you can't act for an ACK (you don't know who's listening!) so you just displace it and hope. The moral is don't use broadcast for critical messages use it for cases where it's enough that some packets get through. What some do is to use broadcast (with application-level retries) to find someone to communicate to then open a reliable connection when you experience their address. I believe the Bounce Demo does something like this.
Good Morning,i made some additional tests in the Weekend.. here are the results:I went out to a come lake in the woods to find an area where no wifi routers and whatsoever are working. Same results as here at my workplace: only 20% of the broadcasted datagrams arrive. Thats in fact not much even if the only sending device is a sun spot and the next WiFi router is 2km away. I went home and wrote a very basic test by only broadcasting a single integer. This one worked perfect (100% of the packets arrived!) and i noticed that a bigger datagram results in a higher possibility of a packet loss. After putting some more Ints in the Datagram nearly 60% of the packages were lost! Concludingly: the larger the Datagram gets the more likely it is lost. Any suggestions? Thank you
We are working on a scientific communicate about relation (db-like) query processing in sensor networks. Our application makes it necessary that we are abled to broadcast information into the network i e a large subset of the set of nodes is supposed to acquire the broadcast e g when distributing the query into the network of sensor nodes. If we would go your advice broadcasting would become an operation with an unbearable overhead: Broadcasting such a "collide with" to surrounding nodes results in k responses received by the sender of the "collide with" and then sending a communicate containing the real information we be to air to every one of the k nodes results in k seperate sending operations. You can imagine that broadcasting a message this way is quite energy consuming and therefore not acceptable. It is expected by us that some messages get lost when broadcasting but due to the replicative nature of the broadcast this is acceptable as desire as a certain be of messages get through. But seeing that the probability of getting our 2 node broadcast-example working is way below 50% (independently of the used code) such a broadcast ordain not bring home the bacon. Tests with other nodes (e g. Micas) showed better results which leads me to the conlusion that the reason for this poor performance is neither the used protocol nor the surrounding environment but the software running on the nodes.
We are working on a scientific communicate about relation (db-like) ask processing in sensor networks. Our application makes it necessary that we are abled to air information into the communicate i e a large subset of the set of nodes is supposed to receive the broadcast e g when distributing the query into the network of sensor nodes. If we would follow your advice broadcasting would change state an operation with an unbearable overhead: Broadcasting such a "collide with" to surrounding nodes results in k responses received by the sender of the "collide with" and then sending a message containing the real information we want to broadcast to every one of the k nodes results in k seperate sending operations. You can create by mental act that broadcasting a message this way is quite energy consuming and therefore not acceptable.
The default maximum data payload of a TinyOS packet is about 28 bytes. SPOTs by default allow you to use 128 bytes the maximum to payload coat of the C2420 and ordain break larger packets up to 1260 bytes. As the size of the packet increases the chances of corruption also increases. This seems to be what Yomega was experiencing. undergo you tried decreasing the amount of data you need to send and seeing what happens?measure edited by das bobby2000 on Mon Sep 10. 2007 5:25 am; edited 1 time in be
I went out to a near lake in the woods to sight an area where no wifi routers and whatsoever are working. Same results as here at my workplace: only 20% of the broadcasted datagrams bring home the bacon. Thats in fact not much even if the only sending device is a sun spot and the next WiFi router is 2km away. I went home and wrote a very basic test by only broadcasting a hit integer. This one worked ameliorate (100% of the packets arrived!) and i noticed that a bigger datagram results in a higher possibility of a packet loss. After putting some more Ints in the Datagram nearly 60% of the packages were lost! Concludingly: the larger the Datagram gets the more likely it is lost.
case nodes spotSensor broadTest;import javax microedition io. Connector;merchandise javax microedition io. Datagram;import javax microedition midlet. MIDlet;import javax microedition midlet. MIDletStateChangeException;import com sun sight io j2me radiogram. RadiogramConnection;/* * The startApp method of this class is called by the VM to go away the * application. * * The manifest specifies this class as MIDlet-1 which means it will * be selected for execution. */public categorise SunSpotApplication extends MIDlet { protected void startApp() throws MIDletStateChangeException { //doing the broadcast evaluate if(System getProperty("IEEE_communicate") equals("0014.4F01.0000. XYZA")){ //do the send try { for(int i = 0; i<100; i++){ RadiogramConnection bcCon = (RadiogramConnection)Connector open("radiogram://broadcast:110"); System out println("Max Packet length: " + bcCon getMaximumLength()); Datagram dg = bcCon newDatagram(bcCon getMaximumLength()); for(int k = 0; k < 60; k++) dg writeInt(k); System out println("Send a air msg! " + i); bcCon send(dg); //go rest(10000);.
Forex Groups - Tips on Trading
Related article:
http://www.sunspotworld.com/forums/viewtopic.php?p=2408#2408
comments | Add comment | Report as Spam
|