Show Posts
|
|
Pages: 1 2 [3] 4 5
|
|
34
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: April 24, 2012, 12:04:36 pm
|
|
Hi,
I've been doing more attempts today. I modified the 'send' function when it adds '2' to the frame length because the didn't be equal as the length of my frame. But it doesn't matters it didn't work yet.
So, I was looking for another thing, and I did the next things: - I was sending data in AT mode and the coordinator received it in api mode (AP2). - Instead an arduino mega2560 I used an arduino UNO, but the behaviour was the same as in the mega ones. - I tried to send the data in the API mode (AP2), and received it by coordinator in AT mode, but coordinator didn't get anything. - And, finally, I checked if it could be because of the serial. How I did this? Ok, I switched the jumpers to USB mode, and tried again to send data by terminal (x-ctu). It worked! Coordinator get the message. But when I switched back the jumpers to XBEE mode, the router didn't send anything once more.
I'm using the examples in the xbee library for API modes, and for AT modes I only printed the next message: Serial.print("HELLO");
So, it wouldn't be because of the serial. But I don't know what more to try. Also I updated the ZB modules firmwate, but they don't work yet.
Regards
|
|
|
|
|
35
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: April 24, 2012, 12:04:17 pm
|
|
Hi,
thanks!!
The Xbees are setted by X-CTU to AP2.
I was checking the library and in the XBee.cpp, at 'sendByte' function I substituted the 'write' instructions for 'Serial.print(xxx, HEX)', where xxx are 'ESCAPE', 'b^20' or 'b'. And it shows the frame to send, but this frame is wrong (I know that when a byte is '00', it only shows one '0').
I couldn't tell you if it because of the 'Serial.print' instruction this wrong behaviour, but how I told you before if I send the frame manually, the mesage is delivered to the receiver (in my case the coordinator).
Regards
|
|
|
|
|
37
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: April 18, 2012, 05:29:02 am
|
|
The problem is in 'send side'.
- I tried making the frames by myself and send them by x-ctu software, and it works fine!! - Moreover, I send the handmade frame by x-ctu (from router) and I receive it (to coordinator). [I have problems showing the entire data, but this is my fault]. - In the other way, sending data with API and receiving it without it, it doesn't work.
I can't find what is the code problem. I think it might be because of the S2B chips , which are different from the S2 ones.
|
|
|
|
|
40
|
Using Arduino / General Electronics / Arduino Mega2560 + Ion Lithium Battery
|
on: April 09, 2012, 03:56:50 am
|
|
Hi dudes,
I'm working with arduino mega2560 and I have a ion lithium battery of 3.7 V. It works perfectly until battery is discharged.
So, I have a doubt, how can I do to charge the battery through the arduino??
I'd like to use it autonomously.
* Now, I connect the battery to arduino by external reference pins.
|
|
|
|
|
42
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: March 23, 2012, 06:53:34 am
|
|
One more thing... I work with xbee shield so, when I upload my code to arduino, I have to switch the jumpers from xbee shield to xbee position. Is this right??
Or is there another configuration to improve the communication?? (I tried different ones but even though it didn't work).
|
|
|
|
|
43
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: March 23, 2012, 02:51:58 am
|
|
Ok, I'll try to explain my logic, sure I'm wrong but if Serial.print is the problem I don't understand why it is happening.
I think that if I'm using xbee modules in api 2 mode, and also I'm working with xbee library, so Serial.print doesn't must interfere with xbee.send or xbee.readPacket instructions. They must work in a different way in this case.
And one more doubt I have is when I launch 'xbee.send' from one module, the other doesn't receive anything even when it sends to MAC address.
It is a strange behaviour and I' m forgetting something but I haven't caught the point.
Regards.
PD: Now I'm trying to receive the packet without any 'Serial.print' instructions on the sender side and only one in the receiver side to show data however there's no response, so it never shows anything. Instructions like 'readPacket', 'xbee.getResponse().isAvailable()', or this one 'xbee.getResponse().getApiId() == ZB_RX_RESPONSE' never works fine, and I think there would be the problem.
|
|
|
|
|
44
|
Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection
|
on: March 21, 2012, 02:38:59 am
|
|
Hi,
thanks!!
But I have been doing some tests and I think the reason is another one.
I set the xbee shields in USB mode, and open two x-ctu, with the 'digi API fram maker' web app, I created also the send frame as the receive one, and send it by x-ctu terminal. And how surprise!! It works!!
So, I realised that the problem is in the library or the examples, because I only tried to use them.
|
|
|
|
|