diff options
author | Alex Elder <elder@linaro.org> | 2022-06-30 18:13:30 -0500 |
---|---|---|
committer | Alex Elder <elder@linaro.org> | 2022-06-30 18:13:30 -0500 |
commit | ba0388ef555e38bfc8f8f156d1101c398bd557e4 (patch) | |
tree | a38460d8a14542db9579ca45ee01ffa4ba866d11 | |
parent | 8dce05b263a8f016afe85789cb277aed5d4126af (diff) |
Add README
Add a file that describes how to configure the modem to use its IPA
connection to the AP in loopback mode.
Signed-off-by: Alex Elder <elder@linaro.org>
-rw-r--r-- | README | 110 |
1 files changed, 110 insertions, 0 deletions
@@ -0,0 +1,110 @@ +Thu Jun 30 05:43:09 PM CDT 2022 + +To put the modem in loopback mode, you must configure it using "NV" +(non-volatile) data on the target. + +With "newer" systems (not sure how that's defined), loopback is +configured by placing a "text file" configuration into a spot in the +modem's "EFS" file system. That's the focus of this document. + +I have yet to discover how to install this configuration without the +use of a Qualcomm Windows tool. More on that below; first a summary. + +The location in the file system is: + /nv/item_files/modem/data/3gpp/ps/loopback_config.txt + +Initially, this much exists: + /nv/item_files/modem/ +And that directory contains other information, but no "data" +subdirectory. So the remaining directory path must be created: + data/3gpp/ps/ +And the configuration file must be placed into that. + loopback_config.txt + +The configuration file I have looks like this (ignore leading tabs): + LOOPBACK_ENABLED:1; + L2_LOOPBACK_ENABLED:0; + SYS MODE:9; + REP_FACTOR:1; + NR5G_ONLY:1; +(Note: each line is terminated with '\r\n, except the last which is +not terminated. This might not matteri.) + +So you use a Qualcomm tool to create the directory to contain the +loopback config, then copy the config file into that directory. +After that, you must sync and reboot the target system. + +----- + +The Windows system must have direct access to the target machine. +I do this using Ethernet, using a crossover cable. (It's possible a +"normal" Ethernet cable would work, but that depends on hardware.) + +----------- ---------- +| | | | +| Windows +============+ Target | +| | ^ | | +----------- | ---------- + | + Ethernet crossover cable + +The Windows Ethernet adapter will automatically get a link-local IP +address assigned, if it doesn't have a fixed IP set up and doesn't +find a DHCP server. If you run "ipconfig" in a command window +you'll see "Ethernet adapter Ethernet". The top two bytes are +169.254, and the lower two bytes will based on your hardware. Mine +shows up as 169.254.156.89. + +Because there is nothing else on the network, you can safely pick +whatever link-local IP address you want for the target. So I use +169.254.1.1. Run this on the target: + ifconfig eth0 169.254.1.1 + +At this point you should be able to verify this crossover connection +works: + ping 169.254.1.1 # On Windows + ping 169.254.156.89 # On the target + +----- + +The Qualcomm tool I use to write the config file is "EFS Explorer", +which is part of the "QPST" package. I assume you'll be able to get +this installed on a Windows system. + +You need to be running "diag-router" on the target, and tell it +where to find the server. Run this on the target: + + diag-router -s 169.254.156.89 & <- Windows link-local IP + +Then open "EFS Explorer on Windows. It should show a "Phone +Selection" dialog, and if all goes well, you should see an entry +below the "Phone ESN (etc.)" headers. Select that. + +At that point a new window opens, saying "Please Wait..." and +showing that it's retrieving the embedded file system contents. +This takes a little while. + +Once that's done, the EFS Explorer window shows two panels, with the +left showing the file path hierarchy, and the right showing what's +in the currently-selected path element. + +Traverse the left panel, selecting "nv", then "item-files", then +"modem". With that selected, select "File->New->Directory..." and +add to the path shown, so the box shows: + /nv/item_files/modem/data/3gpp/ps +Click OK. Those directiories are created, and "ps" should be +selected as the current path element. + +Now copy in the file (it might be possible to enter it manually, but +I've always just had a copy in the Windows file system and browsed +to it). Select "File->New->File..." and click on the "Browse..." +button in the top text box. (Make sure the second text box shows +the full path to the "ps" directory.) Select "loopback_config.txt" +and click the "Open" button. The file should get created. + +Finally, you can quit "EFS Explorer" and then sync and reboot the +target system. + +Once this NV configuration is in place, you should be able to use +QMI requests and "ip" commands to bring up the modem interface in +loopback mode. |