rjocoleman
Repos
249
Followers
110

Events

Created at 2 weeks ago
issue comment
Strip null bytes from strings and filter conditions.

It appears as though this change broke all my grids. When filtering none have any results (except ironically when the new NULL condition is added).

This appears to be due to:

# lib/Varien/Db/Adapter/Pdo/Mysql.php
/**
 * Prepare Sql condition
 *
 * @param  string $text Condition value
 * @param  mixed $value
 * @param  string $fieldName
 * @return string
 */
protected function _prepareQuotedSqlCondition($text, $value, $fieldName)
{
        $sql = $this->quoteInto($text, str_replace("\0", '', $value));
        return str_replace('{{fieldName}}', $fieldName, $sql);
}

Previously, $this->quoteInto was passed $value as a Zend_Db_Expr, now due to the str_replace it's a string.

The quote function will return Zend_Db_Expr as a string $value->__toString(), or send strings to the database to get quoted.

This leads to something like this when filtering product name for Dog:

$text = "at_name.value LIKE ?";
$value = new Zend_Db_Expr("'%Dog%'");
$fieldName = "at_name.value";

$text = str_replace('{{fieldName}}', $fieldName, $text);
$old = $this->quoteInto($text, $value);
# $old: "at_name.value LIKE '%Dog%'"

$sql = $this->quoteInto($text, str_replace("\0", '', $value));
$new = str_replace('{{fieldName}}', $fieldName, $sql);
# $new: "at_name.value LIKE '\'%Dog%\''"
Created at 2 weeks ago
issue comment
Work on initial LuCI and hardware configs

Additionally my waveshare board with the cm4 works well over MBIM with both of my EM7565 cards including PWM fan using openwrt 22.03. I am still toying with using QMI rather than MBIM to see if that has any impact. But this is low priority for me because the use-case is met.

I'd be happy to make a PR for my configs if that would be helpful (there's not much to it tbh)

Created at 3 weeks ago
issue comment
Work on initial LuCI and hardware configs

For what it's worth, I got a new Lenovo branded EM7565 yesterday and it had this old firmware on it too. I took my notes of a full upgrade unlock procedure, they're here if they are useful for anyone: https://gist.github.com/rjocoleman/7e2ca10c0e9e371411d1ca1fb21aa8ad I used libqmi and libqmi-utils and not the sierra wireless examples fwdlite, I also covered off removing FCC Auth.

Created at 3 weeks ago
issue comment
CM7V-T1A-32.768KHZ-9PF-20PPM-TA-QC

Ps. I'm planning to invest some time to writeup a readme.md and proper BOM. :) (as there seems some interest in this project)

Thanks @eflukx - nice work 😀

Created at 3 weeks ago

remove travis

make installable via composer

style fixes

Created at 3 weeks ago
issue comment
Get onboard Raspberry Pi CM4 WiFi module working

I installed your build but cant seem to connect to the cm4 at 192.168.1.1 not through browser or ssh.

You need to be connected to ETH0. The other interface is not yet configured in my build. It may not be handing out DHCP addresses, set a static ip in the 192.168.1.1/24 range e.g. 192.168.1.20. Drivers are specifically added for this carrier board, https://www.waveshare.com/cm4-dual-eth-4g-5g-base.htm and the cm4 lite.

Created at 4 weeks ago
issue comment
Get onboard Raspberry Pi CM4 WiFi module working

Attached is a build, it's not official and it's to be considered alpha!

It includes:

  • openwrt 22.03 from https://github.com/openwrt/openwrt openwrt-22.03 a couple of days ago
  • shayne's cm4io-fan patch
  • config for pi wlan external antenna
  • qmi, mbim, qserial, modemmanager, rtl8152 drivers, minicom
  • config hasn't been changed in the image from upstream - except /boot/config.txt for the fan and external antenna

It's kinda bare bones and specific to getting this router going well on the waveshare board.

openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz

Created at 4 weeks ago
issue comment
Get PWM control of Waveshare Fan-4010-PWM-12V in OpenWRT

this works well for me on the openwrt-22.03 branch (for kernel 5.10) with /boot/config.txt including:

dtparam=i2c_vc=on
dtoverlay=i2c_csi_dsi
dtoverlay=cm4io-fan,minrpm=1000,maxrpm=5000
Created at 1 month ago
opened issue
Docker volume for ssh key

@geerlingguy is the docker volume required for ~/.ssh/id_ed25519.

I don't have ssh keys there as they're all coming in via an ssh-agent, so the docker compose will fail to bring it up.

looks like the suggested docker attach openwrt-build obviates the need for this and it could be removed?

Else, what about a default password (shudder), not ideal but it's it's only used for the builder on a local machine not so high hazard? e.g.

diff --git a/Dockerfile b/Dockerfile
index 4717b64..ba9d11d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,6 +13,7 @@ RUN chmod 644 /root/.ssh
 
 # Add build user.
 RUN useradd -ms /bin/bash build
+RUN echo 'build:build' | chpasswd
 
 # Create build directory.
 RUN mkdir /build && chown build:build /build
diff --git a/docker-compose.yml b/docker-compose.yml
index 456cc75..41d2465 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,8 +13,6 @@ services:
     volumes:
       - linux:/build
       - ./images:/images
-      # Mount local user's SSH key into container.
-      - ~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
 
 volumes:
   linux:
Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

@geerlingguy mind sharing your interface configs please? I have the same hardware now and I'm not able to get modemmanager to move to state registered

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Sorry I'm away from my desk in the middle of nowhere and can't really read everything until Monday!

Low power mode is AT!PCINFO?

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Did you check that it wasn't low power mode? Unlock the bands etc?

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

This person has the same firmware and problem: https://forum.sierrawireless.com/t/em7565-cant-upgrade-fw/27550

MBPL could be interesting

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Aside: would it be faster to try to upgrade it on a Windows PC?

Never did that no idea sorry!

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs
# apt install -y libqmi-utils
# qmi-firmware-update --update --cdc-wdm=/dev/cdc-wdm0 ./swi_fw0105/SWI9X50C_01.05.01.00.cwe ./swi_fw0105/SWI9X50C_01.05.01.00_GENERIC_001.028_000.nvu
loading device information before the update...
setting firmware preference:
  firmware version: '01.05.01.00'
  config version:   '001.028_000'
  carrier:          'GENERIC'
rebooting in download mode...
error: error waiting for TTY: waiting for device at '/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-3' timed out

Then if I run it again:

loading device information before the update...
error: couldn't open QMI device: Operation timed out: device is closed

What's the vender id and product id of the device in this state? What interfaces does it have open?

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

These cards are really nice, but the ones I got (admittedly "cheap") also had super old firmware on them and they were terrible to deal with until I upgraded!

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

hmmm https://forum.sierrawireless.com/t/solved-em7565-firmware-update-from-01-00-02-00-to-01-07-00-00/13010/2

"If possible I’d recommend connecting the modem by USB2 when upgrading from an older firmware. Use an external enclosure with a USB2 cable, or temporarily cover the USB3 pins if you have no other way to disable USB3 on the m.2 slot."

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

libqmi, I can't say I've used Pi OS but it's in debian package repos if it's debian based

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Maybe I have a cursed modem!

haha, I think they are all cursed when they have the lower firmwares.

You could try qmi-firmware-update this worked for me to unbrick when fwdwl-lite did not.

Or, maybe upgrading through lower firmwares. Something vaguely sticks in my memory about this but I can't find a source that confirms this.

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

AT!USBCOMP=1,3,0000100D should be enough to give you the interfaces to flash 😀

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

what's lsusb show at the moment for PID and VID?

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Hmm... that gave a open_port: Unable to open TTY - : Permission denied — maybe I have to do as sudo?

ah yes, all sudo all the time - you need root access to the port

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

could be worth doing a factory reset AT!RMARESET=1

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

It seems to just hang after it prints the Write: *.nvu line:

modem manager is stopped? any messages in the dmesg?

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

FYI

/* error Codes */
enum litefw_fwdwl_error_codes
{
    eSDP_FWDWL_SUCCESS = 0,             //       Success
    eSDP_FWDWL_ERR_GENERAL = 100,       // 100 - Generic FW download error
    eSDP_FWDWL_ERR_SDK,                 // 101 - SDK specific error. Please check syslog for SDK error codes
    eSDP_FWDWL_ERR_SET_CBK,             // 102 - Error in setting SDK callbacks
    eSDP_FWDWL_ERR_PATH_TOO_LONG,       // 103 - Path is too long
    eSDP_FWDWL_ERR_PATH_NOT_SPECIFIED,  // 104 - Mandatory SDK/FW path not set
    eSDP_FWDWL_ERR_FW_UPGRADE,          // 105 - Post FW download check indicates that the FW upgrade has failed. 
                                        //       For example, PRI not updated as expected, FW version not updated etc
    eSDP_FWDWL_ERR_INVALID_DEV,         // 106 - Invalid device
    eSDP_FWDWL_ERR_INVALID_PATH,        // 107 - Invalid Path or No valid firmware or nvu file exist in the path
    eSDP_FWDWL_ERR_TIMEOUT,             // 108 - Download Process Timeout
    eSDP_FWDWL_ERR_FAIL,                // 109 - Download Process Fail
    eSDP_FWDWL_ERR_PRI_FAIL,            // 110 - Download PRI Fail
    eSDP_FWDWL_ERR_FW_VERSION_FAIL,     // 111 - Download Fail Version Not Match
    eSDP_FWDWL_ERR_SDP_TIMEOUT,         // 112 - SSDP mode timeout
    eFIREHOSE_ERR_SECBOOT_INVALID_CERT_CHAIN,// 113 - Secure boot invalid certificate chain
    eFIREHOSE_ERR_RC7611_RETRY_TEST,// 114 - RC7611 swtich to firehose mode fail
    eLITE_FWDWL_APP_ERR_RC7611_ERROR_AFTER_RETRY,// 115 RC7611 switch to firehose mode failed after retry
    eSDP_FWDWL_ERR_END
};
Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

Trying again with fwdldarm64le, I get an error with the syntax; apparently it's changed quite a bit. So I expanded the entire QMI SDK:

fwdwl-litehost is what I've been using, not fwdl unsure if these are different

Created at 1 month ago
issue comment
Work on initial LuCI and hardware configs

hmmm, is it actually an ARMv8 executable? qmi-firmware-update should be able to do the same things.

Created at 1 month ago