I'm making some testing with a JeeLink v2 plugged into my PC USB port and a JeeNode with some sample RF12 code. What is the RAW data that I have to send so that the JeeLink plugged into my PC can receive, so that I can see it in hyperterminal?
Thanks in advance,
Pedro
RAW data block
(10 posts) (2 voices)-
Posted 16/11/2009 22:22:17
-
You mean use the JL with s/w as is but not using the RF12 driver on the JeeNode? I'll document the packet format a bit further tomorrow, but basically it's: 3x 0xAA lead-in, 0x2D, GROUP, HEADER, COUNT, data..., CRC1, CRC2
GROUP has to match what is set in the JeeLink with the g command, default is 212. For testing, try HEADER = 0, COUNT is whatever number of bytes you want to send, and then simply add CRC1 and CRC2 both zero. The JeeLink will report the packet, but with bad crc (as "?" i.s.o. "OK").
Is that what you're after?
Posted 17/11/2009 00:02:52 -
Yes, exactly, thats the info I wanted.
I tried it but the JeeLink is not receiving it... I must be doing something wrong...void TestTransmit()
{
// Read status register
rf12xfer(0x0000);
// Activate transmit
rf12xfer(0x8239);RF12Send(0xAA);
RF12Send(0xAA);
RF12Send(0xAA);RF12Send(0x2D);
RF12Send(0xD4);RF12Send(0x00);
RF12Send(0x02);
RF12Send('A');
RF12Send('B');
RF12Send(0x00);
RF12Send(0x00);// Deactivate transmit
rf12xfer(0x8209);
}Well, its late... I'll check this tomorrow...
Posted 17/11/2009 00:42:29 -
Try adding another 0xAA at the end, so the transmitter isn't turned off before the last checksum bit has been sent.
Posted 17/11/2009 10:22:48 -
Haha, I knew I already had that packet info somewhere... http://news.jeelabs.org/docs/rf12.html
So rule #1 is: document it. Rule #2 is no doubt: keep it up to date. But rule #3 has to be: make sure it can be found :)
I try to keep the documentation tree as flat as possible. Everything should be one, occasionally two, clicks away from the main documentation page at http://news.jeelabs.org/docs/ - also linked as "DOCS" in the header of each weblog page.
Posted 17/11/2009 17:39:25 -
Still doesn't work... :-|
How do you construct the HDR byte? In the documentation I can see:
HDR = src/dst/ack packet header
I'm sending 0x00 in the HDR byte, maybe that's the problem...?Posted 17/11/2009 21:53:07 -
I've placed a demo on the wiki which should work - see http://wiki.jeelabs.net/p/38
Posted 18/11/2009 14:48:21 -
Ok, thanks JC. I'll try it tonight. Last night I was tired so didn't make too much testing.
Another quick question (well, if I look around in your forum I should easily find the answer...) can we program the JeeLink v2 directly from the USB port? I'm not using Arduino hardware...Posted 18/11/2009 15:19:48 -
That's the whole point of the Arduino bootloader, IMO: debug console, re-flashing, and 5V power - all via the same USB cable. Here's one example that works for me (on a Mac, in my case):
avrdude -c stk500v1 -P /dev/tty.usbserial-A60060J8 -b 57600 -p atmega328p -qDeuV -U flash:w:main.hex:i
Posted 18/11/2009 17:26:10 -
Its working now! :-)
Your sample code works, I've compiled it and tested it. My code was also working, thanks to your last comments. The only difference is that my code was using the 433MHz band and your code was using the 868MHz band. My JeeLink is configured for the 433MHz but only receives the 868MHz band. If I configure the JeeLink to the 868MHz band it also works. So it looks like the JeeLink is always using the 868MHz band, independently of the band configuration (<n>b command).Posted 18/11/2009 21:14:04
