XMMProtocolInterfaces » History » Version 20
Denis 'GNUtoo' Carikli, 01/04/2021 10:01 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 | 20 | Denis 'GNUtoo' Carikli | |_. Device |_. State |_. UART |_. Protocol | |
33 | | GT-I9100 | modem booted | /dev/ttyACM0 | AT: [[GTI9100ModemTTYACM0]] | |
||
34 | | GT-I9100 | modem booted | /dev/ttyACM1 | Compatible with xgoldmon | |
||
35 | | GT-I9300 | modem booted | /dev/ttyACM0 | AT: [[GTI9300ModemTTYACM0]] | |
||
36 | | GT-I9100 | modem booted | /dev/ttyACM1 | Xgoldmon waits for messages but nothing arrives | |
||
37 | 3 | Denis 'GNUtoo' Carikli | |
38 | 19 | Denis 'GNUtoo' Carikli | h3. Xgoldmon |
39 | 1 | Denis 'GNUtoo' Carikli | |
40 | 4 | Denis 'GNUtoo' Carikli | Xgoldmon seem to display things on the GT-I9100: |
41 | 1 | Denis 'GNUtoo' Carikli | <pre> |
42 | # ./xgoldmon -vvvv -i localhost -t s2 -l /dev/ttyACM1 |
||
43 | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<< |
||
44 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<< |
||
45 | 9 | Denis 'GNUtoo' Carikli | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4007, battery_level=5<< |
46 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
47 | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666779<< |
||
48 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4225<< |
||
49 | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4225, AvgBattVal_mv=4026, battery_level=5<< |
||
50 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
51 | 1 | Denis 'GNUtoo' Carikli | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<< |
52 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<< |
||
53 | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4055, battery_level=5<< |
||
54 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
55 | </pre> |
||
56 | |||
57 | And when calling an (inexisting/invalid) number, the frames appear in Wireshark. |
||
58 | 19 | Denis 'GNUtoo' Carikli | |
59 | However on the GT-I9300 it waits for messages that never arrive. |
||
60 | And on the GT-I9100 there seem to be very few messages. |
||
61 | |||
62 | So maybe AT+TRACE=1 enables tracing but doesn't set the tracing verbosity. |