I'm facing quite a challenge.
I have a couple of Mega 2560s with RFM22 SparkFun RFM22 Shield - 434MHz - DEV-11018 - SparkFun Electronics 433Mhz radio shields on top of each.
I've established a serial bridge between the two - easy.
Now, it gets complicated then I'm trying to use serial event libraries, like CmdMessenger (GitHub - dreamcat4/CmdMessenger2: Fork of Neil Dudman's CmdMessenger. Serial messaging system for Arduino platform) or it's light weight version - SerialCommand (A Minimal Arduino Library for Processing Serial Commands – The inability to follow simple instructions)
Since RFM22 operates on SPI bus, serial events aren't processed, meaning radio packets bypass Hardware Serial library.
I wonder how difficult would it be to programatically inject every byte received from RFM22 chip (rf22.recvfrom()) into Hardware Serial's rx_buffer?
It looks like HardwareSerial.ccp doesn't have any public variables/methods to enable manipulation of the rx_buffer (Google Code Archive - Long-term storage for Google Code Project Hosting.)
I've currently physically interconnected Mega's Serial1->Serial0, and am writing RFM22 packets into Serial1, what fills Serial0 buffer and makes Serial event libraries to work, but that's a poor-man's approach
Any advices are welcome