Show Posts
Pages: [1] 2
1  Using Arduino / Networking, Protocols, and Devices / Re: nrf24L01+ strange behaviour on: April 09, 2014, 12:19:18 pm
please note that the problem is with gcopeland fork, original manicbug version had 500ms which is far higher than the max message send duration (a bit less than 30ms on my calculations) .
Anyway the timeout is there only to deal with local communication problem with the device which should never append.
But in gcopeland version timeout is too  small and reduce actual retries count.
2  Using Arduino / Networking, Protocols, and Devices / Re: DMX-512 over 433MHz WIRELESS cheap radio on: April 09, 2014, 10:35:37 am
I'm playing with nRF24L01+ now, it's said to be 2Mbps but that's air bit-rate without overheads, retries,... I actually achieve 140Kbps at 10m of usable payload..

Maybe by multiplexing 2 of 4 devices on different channels ?
It also exist amplified models that are said to have 1000m range, so it could do it at 100m.
3  Using Arduino / Networking, Protocols, and Devices / Re: nrf24L01+ strange behaviour on: April 09, 2014, 09:56:45 am
I got it working now, the cap is very useful to improve quality, but the problem had something good :
I think the rf24 library does not calculate timeout right, and then it cuts too early.
the formula used is :
(retransmit count +1) x Retransmit Delay

it does not take actual transmission time into account. I came with a formula that match pretty well :
Code:
(retransmit count +1) x ( Retransmit Delay +  (total message lenght + 10bits) / Datarate + 130us )
with total message length to be calculated from datasheet but max is 329 (58 bits + payload by default) if my calculation is good.
130us are for pll startup.
for the 10bits, I don't know but it work well at any rate.
4  Using Arduino / Networking, Protocols, and Devices / Re: Single Wire Interface Between Two Arduinos on: April 01, 2014, 03:24:36 am
I think there's not so much overhead in OneWire, (soft serial has its own costs) if there is only one slave, you don't even need to use addressing. About 14kbps can be achieve with very good reliability.
Maybe you could write your own protocol inspired by the time-slot mechanism used in 1-wire, i's quite simple.
5  Using Arduino / Networking, Protocols, and Devices / Re: MAC Address on: April 01, 2014, 01:28:45 am
mac is just an array of six bytes so :
byte mac[] = {  0x90, 0xA2, 0xDA, 0x0E, 0xFE, 0x16 }; but this is not mandatory, almost anything will work. This just has to have no duplicate on the local network, that's why you got an unique address on the package.

For the IP, this referer to a free address on your local network, (DHCP might not be an option, it's usually simpler to use a static IP for http servers.)
you will be able to see your web page at http://192.168.1.203 in you browser if you use the IP in the example you gave.
6  Using Arduino / Networking, Protocols, and Devices / Re: nrf24L01+ strange behaviour on: March 31, 2014, 05:39:18 pm
with the cap, the arduino nano fail to communicate with rf24.. thNO still work, I will try with a good 3.3 voltage.
7  Using Arduino / Networking, Protocols, and Devices / Re: MAC Address on: March 31, 2014, 05:34:19 pm
I use to do :
   for (byte i = 0; i < 6; i++){ mac = (i ) ? random(256) : ((random(256) & B11111110) | B00000010); }
may not be politically correct, but it works : the probability of duplicates is so small that it will never append.
after what, I store it in eeprom, to reuse the same after reboot.
the big advantage is you can use the same sketch with several devices without the need to take care of mac address.
8  Using Arduino / Networking, Protocols, and Devices / nrf24L01+ strange behaviour on: March 27, 2014, 12:08:12 pm
Hello,

I trying to use nrf24L01+ modules, I used maniacbug library.
At first, with default helloword I got many send errors, but packets got received many times. So I feel it's a problem with ack.
But the strange thing is, I tried to lower speed (250kbps) , and it got worse. so I tried 2Mbps and... it works with no errors at all !!!

I have an arduino nano and a duemilanove.

I tried lowering power, in case 3.3v on-board regulator is to weak. but did not change anything.

also tried coperland fork : https://github.com/gcopeland/RF24, that work a bit better at 1Mbps but still not well.

Anyone got that kind of problem ?
9  Development / Other Software Development / Re: Arduino Ethernet and ENC28J60 Module ? on: March 21, 2014, 09:23:27 am
I don't see why it would not work, what kind of error do you get ?
10  Development / Other Software Development / Re: Arduino Ethernet and ENC28J60 Module ? on: March 19, 2014, 03:28:37 am
that was in my first post, did you try it ?
11  Development / Other Software Development / Re: Arduino Ethernet and ENC28J60 Module ? on: March 18, 2014, 06:46:55 pm
Client::write returns void, not size_t like required by stream.
the library you use is dated, I think it was for pre-1.0 versions
12  Development / Other Software Development / Re: PSTR() flash string de-duplication -- a problem, a solution, and a question on: March 18, 2014, 07:43:37 am
Code:
template<typename T>
class A
{
public:
void test(T i) {
Serial.print(F("test :"));
Serial.print(i);
}
};

A<int> a1;
A<long> a2;

void setup()
{
Serial.begin(115200);
a1.test(1);
a2.test(2);
}

void loop()
{
}

that will return :
Code:
cc5kBwdD.s*:Assembler messages
cc5kBwdD.s*:symbol `PSTR_0' is already defined
Error compiling

I could solve my problem by taking the string out of the template.
13  Development / Other Software Development / Re: Arduino Ethernet and ENC28J60 Module ? on: March 18, 2014, 04:41:45 am
No, not with included one,
you must ether use :
https://github.com/jcw/ethercard : small footprint but does not share the same api as the legacy library

or

https://github.com/ntruchsess/arduino_uip : which share the same api so your application will be easier to port to W5100 but used to have bigger memory footprint, may not still be the case, due to recent optimizations.
14  Development / Other Software Development / Re: PSTR() flash string de-duplication -- a problem, a solution, and a question on: March 17, 2014, 07:02:45 pm
Hi,

very nice solution I needed for a long time !
But I encounter another compatibility issue with it :
If string are declared in a template I got that :
ccjjups6.s*:Assembler messages
ccjjups6.s*:symbol `PSTR_17' is already defined
for the second instantiation of the template.
 Might there be a workaround ?
15  Using Arduino / Installation & Troubleshooting / Re: Error Message: "avrdude: stk500_getsync(): not in sync: resp=0x0" on: January 13, 2013, 09:39:42 am
Hello,

Just got the same problem, with an old duemilanove.
It start doing so after uploading a buggy sketch that I try to debug.
The on-board led flash fast and reset button is no use.

but I could reflash the board with pressing the upload button just after the usb cable was plugged. I's a bit tricky to achieve cause too early the com does not exist, and too late the bootloader started up the buggy sketch.

Maybe it could help.
Pages: [1] 2