HOPERF 433Mhz Transceivers
I acquired a pair of HM-TR TTL 433Mhz transceivers from HOPERF and have been spinning my wheels for 3 days trying to get some documentation and make them work. Without docs, I have succeeded to some extent and am able to send characters across the link but there is still a lot I don't understand about how these things work. My test bed consists of the stingray with both transceivers mounted on the breadboard. The software launches two cogs each one controls one of the transceivers and I am simply sending one character across the link. By setting a flag I can tell one of the cogs to display the character on the terminal. I have uploaded the project archive in the hope that someone with more knowledge than I can help me take this to the next level so that we can have an object fit for the exchange.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never force anything - Always get a bigger hammer.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never force anything - Always get a bigger hammer.
Comments
http://www.open.com.au/mikem/arduino/HopeRF/HopeRF.pdf
Jax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If a robot has a screw then it must be romoved and hacked into..
I have seen this particular document before. It is based on the Arduino library that I am not familiar with and my C skills are not good enough to be able to determine the timing and fine details needed to control the transceiver.
After several frustrating days I'm taking this as a challenge and my head is just spinning with questions, in spite of the success I have had.
I see that the library has a packet send function does that mean that the module can buffer multiple characters.. What is the timing between send and receive, How do we know when it is in receive mode or transmit mode? How do they synchronize modules between sender and receiver. How fast can I send.
My test package manages to garble a character every once in awhile and then shuts off after a random number of characters have been sent for reasons that are not clear to me. I'm pretty sure this is due to not having the protocol and or the timing right.
Are you aware of any other documents? A protocol document would be most helpful.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never force anything - Always get a bigger hammer.
I don't think you need to do any setup. Yes, there is a setup program but the more you fiddle with settings the less likely it is to work. The default settings work fine.
One thing worth noting - most modules won't work if less than 1 metre apart.
Re packet send, well now that is starting to get complicated. I've been writing that sort of code for some time.
Firstly, if you send a single byte to a hope module, it will buffer that byte for (I think) about 30 milliseconds and then send it on.
If you send n bytes where n is the size of the hope's buffer it sends them on as soon as the buffer is full. I think the hope might have a 32 byte buffer (I'm using Yishi modules now as they have a 256 byte buffer and I need >132 bytes for xmodem file transfers).
Modules are in receive all the time and can be listening to both RF and to characters being sent in ready for transmitting. If they are listening to RF and you are trying to fill up the transmit buffer then the module may lose some characters if the transmit buffer fills up.
Also - if you send out a byte and another module happens to send out a byte at the same time then both will get garbled in the aether.
So you need protocols. Transmit. Listen. Transmit. Listen
Xmodem is such a protocol. It takes a file, sends out single characters till it gets a response, then it sends 128 bytes plus a checksum, the remote unit gets that packet, checks the checksum, and sends back an ACK character or a NAK (negative acknowledge) character. Then the first module either resends the packet or goes on to the next packet.
I'm also working in CP/M with remote control. Send a command to CP/M, like DIR. Then wait till everything comes back.
To keep things simple though, maybe just send tiny little packets of just a few bytes. eg TX123410 where TX is a header so you can search for that, 1234 are 4 data bytes, and 10 is the sum of 1,2,3,4 so you know that the packet is valid.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
These links have the programming info for AVR and PIC-C, but without the heavy library burden (i.e. they are much easier to port to a different language).