Project

General

Profile

XMMProtocolInterfaces » History » Version 18

Denis 'GNUtoo' Carikli, 01/04/2021 09:56 PM

1 1 Denis 'GNUtoo' Carikli
h1. XMMProtocolInterfaces
2
3 5 Denis 'GNUtoo' Carikli
{{>toc}}
4
5 10 Denis 'GNUtoo' Carikli
h2. usb_sel
6 3 Denis 'GNUtoo' Carikli
7 10 Denis 'GNUtoo' Carikli
h3. HowTO
8 3 Denis 'GNUtoo' Carikli
9 10 Denis 'GNUtoo' Carikli
First you need to get a root shell in the device as the commands need to be executed as root.
10 3 Denis 'GNUtoo' Carikli
11 10 Denis 'GNUtoo' Carikli
Once this is done you need to switch the USB connector to the modem USB. This can be done with the following command:
12 1 Denis 'GNUtoo' Carikli
<pre>
13 10 Denis 'GNUtoo' Carikli
echo MODEM > /sys/devices/virtual/sec/switch/usb_sel
14 1 Denis 'GNUtoo' Carikli
</pre>
15
16 10 Denis 'GNUtoo' Carikli
Then nothing will happen, you will still be able to login through adb.
17 1 Denis 'GNUtoo' Carikli
18 10 Denis 'GNUtoo' Carikli
To make the device switch to the modem USB you then need to unplug and replug the USB cable between your computer and the device.
19
20
At this point, if the modem was booted, you'll see a new USB device appearing.
21
Some serial ports will also appear.
22
23
Tested on Replicant 6.0 0004 RC3
24
25
| Device   | Distribution           | Modem status | USB ids                       | tty                          |
26 1 Denis 'GNUtoo' Carikli
| GT-I9100 | Replicant 6.0 0004 RC3 | Off          | None                          | N/A                          |
27 18 Denis 'GNUtoo' Carikli
| GT-I9100 | Replicant 6.0 0004 RC3 | Booted       | 1519:0020 Comneon HSIC Device | /dev/ttyACM0 -> /dev/ttyACM6 |
28 10 Denis 'GNUtoo' Carikli
| GT-I9300 | Replicant 6.0 0004 RC3 | Booted       | 1519:0020 Comneon HSIC Device | /dev/ttyACM0 -> /dev/ttyACM6 |
29
30 11 Denis 'GNUtoo' Carikli
h3. Protocols
31 12 Denis 'GNUtoo' Carikli
32 1 Denis 'GNUtoo' Carikli
| Device   | state        | UART         | Protocol                    |
33
| GT-I9100 | modem booted | /dev/ttyACM0 | AT: [[GTI9100ModemTTYACM0]] |
34 18 Denis 'GNUtoo' Carikli
| GT-I9100 | modem booted | /dev/ttyACM1 | Compatible with xgoldmon    |
35 15 Denis 'GNUtoo' Carikli
| GT-I9300 | modem booted | /dev/ttyACM0 | AT: [[GTI9300ModemTTYACM0]] |
36 3 Denis 'GNUtoo' Carikli
37 11 Denis 'GNUtoo' Carikli
h3. GT-I9100
38 1 Denis 'GNUtoo' Carikli
39 4 Denis 'GNUtoo' Carikli
Xgoldmon seem to display things on the GT-I9100:
40 1 Denis 'GNUtoo' Carikli
<pre>
41
# ./xgoldmon -vvvv -i localhost -t s2 -l /dev/ttyACM1
42
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<<
43
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<<
44 9 Denis 'GNUtoo' Carikli
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4007, battery_level=5<<
45
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
46
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666779<<
47
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4225<<
48
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4225, AvgBattVal_mv=4026, battery_level=5<<
49
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
50 1 Denis 'GNUtoo' Carikli
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<<
51
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<<
52
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4055, battery_level=5<<
53
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
54
</pre>
55
56
And when calling an (inexisting/invalid) number, the frames appear in Wireshark.