0

I am working with CANbus device configuration from my iPad application.

The Process is when i press one button command send to CANbus device with NMSSH channel to CANbus device. There are 3 commands that I am passing to CANbus device from our iPad application. But here our CANBus command pass request fast to CANbus device. And after request for response it takes 7 to 9 second time to respond to our request.

Following is the code that we are executing for session check and CANbus command for CANbus device.

1) For session check following command is executed.

NMSSHSession *session = [NMSSHSession connectToHost:<hostURL> withUsername:<Username>];

if(session.isConnected){
    [session authenticateByPassword:<password>];
}
if(session.isAuthorized){
    NSLog(@"Authentication success");
}

2) For execution of CANbus command on CANbus device is as follows:

NSError *error = nil;
NSString *response = [session.channel execute:<Some CANSend command> error:&error];

On the above response code i am getting Delay of 7 to 9 seconds after execution of CANbus device command.

Please help me to get this done.

Hrushikesh Betai
  • 2,227
  • 5
  • 33
  • 63
  • *Where* does the delay come from? What happens if you replace the "CANsend command" with some other, more simple command, like `ls`? – JimmyB Jan 15 '16 at 15:15
  • With ls i am able to get response fast. But when i execute CANSend command it takes time to respond. – Hrushikesh Betai Jan 15 '16 at 21:49
  • What if you execute the CANsend manually, i.e. via an interactive SSH or local shell? - Does the delay come from your SSH access code, or is it only the CANsend? If the latter, you may be looking in the wrong place right now. – JimmyB Jan 18 '16 at 08:53

0 Answers0