Project

General

Profile

XMMProtocolInterfaces » History » Version 14

Denis 'GNUtoo' Carikli, 01/04/2021 09:54 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
| GT-I9100 | Replicant 6.0 0004 RC3 | Booted       | TODO                          | /dev/ttyACM0 -> /dev/ttyACM6 |
27
| GT-I9100 | Replicant 6.0 0004 RC3 | Off          | None                          | N/A                          |
28
| 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 11 Denis 'GNUtoo' Carikli
| Device   | state        | UART         | Protocol                    |
33 1 Denis 'GNUtoo' Carikli
| GT-I9100 | modem booted | /dev/ttyACM0 | AT: [[GTI9100ModemTTYACM0]] |
34 13 Denis 'GNUtoo' Carikli
| GT-I9100 | modem booted | /dev/ttyACM1 | Compatible with xgoldmon    |
35 3 Denis 'GNUtoo' Carikli
36 11 Denis 'GNUtoo' Carikli
h3. GT-I9100
37 1 Denis 'GNUtoo' Carikli
38 4 Denis 'GNUtoo' Carikli
Xgoldmon seem to display things on the GT-I9100:
39 1 Denis 'GNUtoo' Carikli
<pre>
40
# ./xgoldmon -vvvv -i localhost -t s2 -l /dev/ttyACM1
41
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<<
42
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<<
43 9 Denis 'GNUtoo' Carikli
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4007, battery_level=5<<
44
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
45
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666779<<
46
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4225<<
47
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4225, AvgBattVal_mv=4026, battery_level=5<<
48
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
49 1 Denis 'GNUtoo' Carikli
LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<<
50
LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<<
51
LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4055, battery_level=5<<
52
LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<<
53
</pre>
54
55
And when calling an (inexisting/invalid) number, the frames appear in Wireshark.