works perfect with my setup - device connected to receiver responds and turns on.
The question is - how can i control that from bash on router.
I tried with:
I'm not sure I can help, but I have experience using Tomato and WRT54g as a lawn sprinkler pump controller and I'm interested in what you're attempting.
As I understand it your using a router that has a usb host port into which you've plugged the Arduino? Or, you have wired up the router RX/TX outputs to Arduino. (which)
What does "Works perfect with my setup" mean? (Obviously not working perfect otherwise you would not be asking).
I suspect what may be missing is your understanding that there needs to be some Arduino code in setup() and loop() which will be looking to read characters from the serial port (which were sent by your bash script), interpreting them, and then sending something appropriate to "mySwitch". But I'm not quite sure, I may be misinterpreting what you've tried. Also, I am not familiar yet with RCSwitch so I'm not sure what type of commands you're wanting to send.
It might be as simple as (gross pseudcode):
void loop:
cumulate characters from serial
if I've received 10 characters:
split into first5chars and second5chars
mySerial.switchOn( first5chars, second5chars)