0

I am using mux drivers for GSM modem with android 4.0.4 and I executes using command on console:

./gsm0710muxd -s /dev/ttyUSB0 -b 115200 -n 3 

but I want to automate this, so I want to execute it during boot-up time so that my virtual ports may work with my gsm modem for calling functionalities but I am unable to automate this command, I have no idea how to do this because the command is complicated, I don't know how to use this as a whole to tell system serial port, baudrate, number of ports.

blackgreen
  • 34,072
  • 23
  • 111
  • 129
Adeel Khan
  • 17
  • 2

1 Answers1

0

You can do this by giving this command in init.rc. Here is an example from init.rc. You can add this in the boot section of init.rc where other services are also initialized.

service gsmmuxd /system/bin/logwrapper /system/bin/gsm0710muxd –s /dev/<serial_port> –n3 -v7 –mbasic class main user radio
group radio cache inet misc oneshot

Plus you will also need to change the device which is used in ril-daemon service. For instance, my RIL library is librapid-ril-core.so and I am using mux, the configuration would be the following:

service ril-daemon /system/bin/rild -l /system/lib/librapid-ril-core.so -- -a /dev/pts/0 -n /dev/pts/1

Here, if we were using USB, you would see /dev/ttyUSB0 and /dev/ttyUSB1 in your init.rc configurations.

I hope this helps. Please feel free to ask further questions.

Bilal Qamar
  • 322
  • 1
  • 2
  • 9