XMMProtocolInterfaces » History » Version 22
Denis 'GNUtoo' Carikli, 01/04/2021 10:13 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 | 21 | Denis 'GNUtoo' Carikli | h3. HOWTO enable the modem usb interface |
8 | 3 | Denis 'GNUtoo' Carikli | |
9 | 21 | Denis 'GNUtoo' Carikli | The modem also has an USB port that can be routed to the smartphone/tablet USB port. |
10 | 1 | Denis 'GNUtoo' Carikli | |
11 | 21 | Denis 'GNUtoo' Carikli | To do that you first need to get a root shell in the device as the commands need to be executed as root. |
12 | |||
13 | 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: |
14 | 1 | Denis 'GNUtoo' Carikli | <pre> |
15 | 10 | Denis 'GNUtoo' Carikli | echo MODEM > /sys/devices/virtual/sec/switch/usb_sel |
16 | 1 | Denis 'GNUtoo' Carikli | </pre> |
17 | |||
18 | 10 | Denis 'GNUtoo' Carikli | Then nothing will happen, you will still be able to login through adb. |
19 | 1 | Denis 'GNUtoo' Carikli | |
20 | 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. |
21 | |||
22 | At this point, if the modem was booted, you'll see a new USB device appearing. |
||
23 | Some serial ports will also appear. |
||
24 | |||
25 | Tested on Replicant 6.0 0004 RC3 |
||
26 | |||
27 | 22 | Denis 'GNUtoo' Carikli | | Device | Distribution | Modem status | USB ids (lsusb from laptop) | tty | |
28 | 1 | Denis 'GNUtoo' Carikli | | GT-I9100 | Replicant 6.0 0004 RC3 | Off | None | N/A | |
29 | | GT-I9100 | Replicant 6.0 0004 RC3 | Booted | 1519:0020 Comneon HSIC Device | /dev/ttyACM0 -> /dev/ttyACM6 | |
||
30 | | GT-I9300 | Replicant 6.0 0004 RC3 | Booted | 1519:0020 Comneon HSIC Device | /dev/ttyACM0 -> /dev/ttyACM6 | |
||
31 | 21 | Denis 'GNUtoo' Carikli | |
32 | When running lsusb on the SOC on the Replicant 11 kernel on a GT-I9300, we also see @1519:0020 Comneon HSIC Device@ once the modem is booted. Once powered on and before booting, the USB ids seen in lsusb with that kernel are these ones: @058b:0041 Infineon Technologies Flash Loader utility@ instead. |
||
33 | |||
34 | As the modem isn't visible either when not powered on, we need to look if it's possible to boot the modem from a laptop for instance. |
||
35 | 10 | Denis 'GNUtoo' Carikli | |
36 | 11 | Denis 'GNUtoo' Carikli | h3. Protocols |
37 | 12 | Denis 'GNUtoo' Carikli | |
38 | 20 | Denis 'GNUtoo' Carikli | |_. Device |_. State |_. UART |_. Protocol | |
39 | | GT-I9100 | modem booted | /dev/ttyACM0 | AT: [[GTI9100ModemTTYACM0]] | |
||
40 | | GT-I9100 | modem booted | /dev/ttyACM1 | Compatible with xgoldmon | |
||
41 | | GT-I9300 | modem booted | /dev/ttyACM0 | AT: [[GTI9300ModemTTYACM0]] | |
||
42 | | GT-I9100 | modem booted | /dev/ttyACM1 | Xgoldmon waits for messages but nothing arrives | |
||
43 | 3 | Denis 'GNUtoo' Carikli | |
44 | 19 | Denis 'GNUtoo' Carikli | h3. Xgoldmon |
45 | 1 | Denis 'GNUtoo' Carikli | |
46 | 4 | Denis 'GNUtoo' Carikli | Xgoldmon seem to display things on the GT-I9100: |
47 | 1 | Denis 'GNUtoo' Carikli | <pre> |
48 | # ./xgoldmon -vvvv -i localhost -t s2 -l /dev/ttyACM1 |
||
49 | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<< |
||
50 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<< |
||
51 | 9 | Denis 'GNUtoo' Carikli | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4007, battery_level=5<< |
52 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
53 | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666779<< |
||
54 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4225<< |
||
55 | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4225, AvgBattVal_mv=4026, battery_level=5<< |
||
56 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
57 | 1 | Denis 'GNUtoo' Carikli | LOG:>>[HIGH]oembatt.c,310,[DISP] Thermistor : measured_value=1630666778<< |
58 | LOG:>>[HIGH]oembatt.c,137,[DISP] oem_set_batt_level : 4220<< |
||
59 | LOG:>>[HIGH]oembatt.c,236,[DISP] BATT : measured_value_mv=4220, AvgBattVal_mv=4055, battery_level=5<< |
||
60 | LOG:>>[LOW]oemdisplay.c,363,no change -> rssi:4, bat:5<< |
||
61 | </pre> |
||
62 | |||
63 | And when calling an (inexisting/invalid) number, the frames appear in Wireshark. |
||
64 | 19 | Denis 'GNUtoo' Carikli | |
65 | However on the GT-I9300 it waits for messages that never arrive. |
||
66 | And on the GT-I9100 there seem to be very few messages. |
||
67 | |||
68 | So maybe AT+TRACE=1 enables tracing but doesn't set the tracing verbosity. |