Show Posts
Pages: 1 2 [3] 4 5
31  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection on: May 11, 2012, 06:27:45 am
"Xbee Library"

In 'sendByte' function, when the it calculates the checksum it has to be:
"checksum = 0xff - (checksum & 0xff);"

But communication still fails!
32  Using Arduino / Networking, Protocols, and Devices / Re: PC Coordinator + XBee Arduino + API mode on: May 11, 2012, 06:25:31 am
In 'sendByte' function, when the it calculates the checksum it has to be:
"checksum = 0xff - (checksum & 0xff);"

But communication still fails!
33  Using Arduino / Networking, Protocols, and Devices / Re: PC Coordinator + XBee Arduino + API mode on: May 11, 2012, 02:31:30 am
Hi Fouad,

I have a similar issue.

I have debugged the sended frame from arduino and direct I/O, and they aren't the same.
I think the problem isn't in 'ZBTxRequest' function, instead it is in the XBee library 'send' function, where the frame is created.

I'm investigating this!

Regards.
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
36  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection on: April 19, 2012, 08:10:21 am
I tried it but there's no difference. It didn't work.

I'm thinking it could be a problem with 'send' instruction and the 'escape' character when it creates the frame.

I'm taking a look of the code.
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.
38  Using Arduino / General Electronics / Re: Arduino Mega2560 + Ion Lithium Battery on: April 13, 2012, 03:39:45 am
Thanks!!

I'm going to try it.
Also I'd like to use a mini-usb to connect the arduino to the PC, so I can read the values and charge the battery when it is discharged because the PC was switched off.

Regards!!
39  Using Arduino / General Electronics / Re: Arduino Mega2560 + Ion Lithium Battery on: April 10, 2012, 01:20:33 am
Hi,

Thanks!!

I'd expect I could make my own system to charge it. I'll have to look for another solution before get one of those chips.

Thanks again.

Regards.
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.
41  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection on: March 26, 2012, 01:30:17 am
To upload the code I switched jumpers to USB position, but for a right behaviour they must be at xbee position. Unless someone could tell me another thing...
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.
45  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Api connection on: March 20, 2012, 03:48:56 am
Captures are here, just checked them. They are atached.

The code I used is the one above.

Nothing more happens, they associated between themselves.
Pages: 1 2 [3] 4 5