Closed shayne closed 2 years ago
Debug info:
❯ uname -a
❯ ls -l /dev/cdc*
❯ ls /dev/tty*
❯ lspci -vv
❯ lsusb -v
Thanks for posting this info—I also put an image in your original comment for visual reference. Excited to see 5G working here... without getting too much detail of course, what region of the world are you in, and can you share your carrier?
I also noticed Waveshare is selling the module here: https://www.waveshare.com/sim8200-m2.htm — did you buy from them or from another vendor? The price puts it out of the range for hobby projects and most IoT devices (4G is still the best fit there), but if you can sustain those speeds this could be a great Internet connection / backup connection, or be useful for other mobile applications where you need bandwidth.
Sure thing! Greater New York City area, T-Mobile
Bought one on Amazon and a second is on its way from Wave Share directly. It's pricey, but compared to other 5G cards it's relatively reasonable. See below...
(edit below)
5G modems and current prices:
Thanks for all the info—I'm going to close this issue out now, but feel free to post any other relevant updates as you continue using it! The card is up on the site now: https://pipci.jeffgeerling.com/cards_network/simcom-sim8200ea.html
@geerlingguy I saw you started work along these lines. I went ahead and updated the issue with my latest setup. It's been running great for me since June and the patch is done in a way where I can do a fresh clone and be up and running pretty quick!
Excellent, thanks for updating—I'm stuck in the hospital for some period of time and I decided my 'try to not be bored when not in pain' thing is trying to get everything working :)
I'm so sorry Jeff. I hope your health improves soon and I wish you well. Hopefully you find some of it interesting or even helpful in my patch.
Will do! I do have updates and a diff that can be applied to the latest release to add support. Will post when I’m able.
Hi shayne, was wondering if you could help me out with a clone of your compiled version of OpenWrt, ive been trying for weeks and still cant get a version to work. Any help would be really appreciated.
What version are you working with and what issues are you hitting?
openwrt-22.03.3. My system is insanely slow, it took over 24 hours for make to compile an image to flash, and a lot of the time my system is freezing while it does this or crashes. I have complied a few but openwrt wont even load.
Found a modified version of openwrt that with a little tweaking ive got to connect, but it drops out and speeds are very low.
I'm going to have another attempt to make my own, just thought if you had the image to hand, i could give it a go before i pull any more hair out. :D Also thank you for answering so quickly!
Here's the latest build I had lying around. I haven't built it in a while (It works, so I don't touch it, 🤷♀️)
openwrt-22.03.0-rc4-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
Hi @geerlingguy , It's wonderful and so nice of you to contribute for these modules and everything.
I just got a SIM8262E-M2 module (https://www.waveshare.com/wiki/SIM8262E-M2_5G_HAT) (https://www.simcom.com/product/SIM8262X-M2.html)
However I'm not able to get it work with raspberrypi 3 Model B v1.2 , the drivers mentioned in the waveshare page do not work.
pi@raspberrypi:~/src $ lsusb Bus 001 Device 004: ID 1e0e:9001 Qualcomm / Option SDXLEMUR-LITE-MTP _SN:1505A7A0
My Kernel version:
pi@raspberrypi:~/src $ uname -a Linux raspberrypi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
OS version:
pi@raspberrypi:~/src $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Output from dmesg:
```shell
[504984.108862] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[504984.211356] usb 1-1.4: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[504984.211405] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[504984.211429] usb 1-1.4: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[504984.211451] usb 1-1.4: Manufacturer: SIMCOM
[504984.211471] usb 1-1.4: SerialNumber: 0123456789ABCDEF
[506044.752757] usb 1-1.4: USB disconnect, device number 4
[506897.968885] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[506898.071265] usb 1-1.2: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[506898.071313] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[506898.071338] usb 1-1.2: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[506898.071359] usb 1-1.2: Manufacturer: SIMCOM
[506898.071380] usb 1-1.2: SerialNumber: 0123456789ABCDEF
I'm also not able to see the /dev/ttyUSB :
Is there any way to get it working ? This is a cool modem based on Snapdragon X62. Kindly let me know your thoughts on this.
EDIT:
This is fixed now, I changed the raspberrypi kernel to latest via (rpi-update).
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1639 SMP PREEMPT Fri Mar 24 17:02:53 GMT 2023 aarch64 GNU/Linux
Installed the following:
sudo apt install libmbim-utils udhcpc
How to connect to internet:
Create network conf file:
pi@raspberrypi:~ $ cat /etc/mbim-network.conf
APN=<your_apn>
PROXY=yes
sudo mbimcli --device=/dev/cdc-wdm0 --query-device-caps \\ Checks device capabilites
sudo mbim-network /dev/cdc-wdm0 start \\ Starts the internet connection
sudo mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration \\ check IP address
sudo udhcpc -i wwan0 \\ Add default routes to access internet via wwan0
route -n \\ check the route priority
# Stopping connection:
sudo mbim-network /dev/cdc-wdm0 stop
sudo ifmetric wwan0 50 (it'll change the route priority so that internet can be accessed by existing connection such as eth0)
route -n \\ check route priority again
How do you configure the modem to work in OpenWRT? I'm just using a simple USB adapter to test with I gave up on trying to compile for the time being. I can see the device in OpenWRT but QMI isn't the correct way to configure it? Any help would be appreciated. Can't seem to find much information about this device.
Is mbim the only way to connect?
This guy gives great advice about setting up a modem on the Pi but it's not a 1:1 and I'm not familiar enough with this space to adapt the information.
Also, don't buy the router WaveShare sells this with module. It has some ancient hacked version of OpenWRT which works mostly, but is buggy and sometimes requires a hard reset and they refuse to release information about how to apply your own custom firmware (I would also be interested in learning how to hack this device, I tried messing around with binwalk but no success.)
Forgive the ramble but I'm annoyed as this modem is the only way I have of connecting to the internet at the moment and having to switch these devices back and forth has me ready to use the hammer solution (:
EDIT: I was able to send a text message with AT commands through minicom so I know the device has connection out, at least for text but no luck on configuring it for sharing internet.
"Waiting for SIM initialization" is where I'm stuck at in the log files.
Works fine on current Pop!_OS out of the box no fiddling or anything just right click connect in the status bar. I could get it to work a little bit with modemmanager and rarely with qmi using the supplied image above but nothing stable or steady. Could I get a visual guide / configuration files of how you have this set up? @shayne
EDIT: Just got a successful build going. modemmanager is the winner for me. I'll do a write up later after sleep :)
Quick update: I've since switched to a Turris Omnia and am using modemmanager
. I am not even using a custom version of OpenWRT. I enabled their LTE support package, and to my surprise, everything has been working.
Come to find out, it's already baked into OpenWRT!
I took a quick look at the hack from SIMCom and I don't think there is anything of actual value in there.
This modem should work fine with the mainline qmi_wwan driver after commit 102cd9096356 ("qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID"), which was added in Linux v4.18.
https://forum.openwrt.org/t/sim8200ea-m2-being-natively-supported/167428/6?u=duckartes
Hello,
Very nice. Can I use this for the Tofu base board?
Thanks, Mic
qmi was not starting but my fix has now beeing merged and should be released soon: https://github.com/openwrt/openwrt/pull/13324 I've now a running 5G Hat integrated into my system. It's running very good with qmi
Hi @somu1795, I hope you are well. Have you applied any patch to the RASP OS kernel to get this working?
I am using the same module and hat but in an RPI 4 model B.
Thanks, Davi
Hello,
We are using the same combination of hardware in our IoT sensor build:
We are experiencing issues dialing up the modem via the standard kernel methods (RNDIS or ECM). When setting the modem to these modes, the LED indicator blinks, indicating that the modem itself has a network connection. Additionally, we see the usb0 interface on our Raspberry Pi with a valid IP-address, and the modem itself is pingable. However, using this network interface to ping through does not work - traffic is not forwarded to our Raspberry Pi.
Instead, we tried using the driver provided by Waveshare (NDIS dial-up), which works but sometimes fails to reconnect. It also interferes with port-forwarding along with an access point on our Raspberry Pi, as the driver conflicts with the network manager.
The OS on our RPi is: Debian GNU/Linux 11 (bullseye). Kernel Version: 6.1.21-v8+
Waveshare support has not been helpful so far. Does anyone here know how to address this issue? Any information can be helpful!
Setup: Board: Compute Module 4 (CM4) PoE 4G Board OS: Both the latest vanilla RPI OS and OpenWRT should both work without any special configuration Modem: SIM8200-EA
Hope this helps!
I could not for the life of me figure out why /dev/ttyUSB*
devices would not show up in either RPI OS or OpenWRT. I reached out to waveshare support, and they replied:
engineer said Pull down GPIO6
Being a newb I didn't know what that meant, so I replied for clarification and got:
The 4G module pulls down the GPIO6 and it can be started
Still confused, but with enough information to now dig, I was able to piece together instructions to get the /dev/ttyUSB*
devices to show up and talk to the modem.
Python3 Setup (Python Setup Reference)
sudo apt-get update
sudo apt-get install python3-pip python3-pil python3-numpy # Install likely requirements
python3 -m venv venv # Create venv to work in
venv/bin/pip install -U pip # Update pip
venv/bin/pip install RPi.GPIO # Install Python rpi GPIO library
venv/bin/python # Start Python Shell
Python3 Commands
import RPi.GPIO as GPIO # import library
GPIO.BCM # Print Mode Number
GPIO.setmode(GPIO.BCM) # Set Mode Number
GPIO.getmode() # Check Mode Number
GPIO.setup(6, GPIO.OUT) # Enable Modem (GPIO6)
GPIO.cleanup() # Cleanup when done (this will disable modem)
Minicom Commands (Common AT Commands)
sudo apt-get install minicom # Intall minicom
sudo minicom -D /dev/ttyUSB2 # Connect to modem (while modem is active); Why ttyUSB2, specifically? No idea
AT # AT Test
What's Next
Hi @geerlingguy , It's wonderful and so nice of you to contribute for these modules and everything.
I just got a SIM8262E-M2 module (https://www.waveshare.com/wiki/SIM8262E-M2_5G_HAT) (https://www.simcom.com/product/SIM8262X-M2.html)
However I'm not able to get it work with raspberrypi 3 Model B v1.2 , the drivers mentioned in the waveshare page do not work.
pi@raspberrypi:~/src $ lsusb Bus 001 Device 004: ID 1e0e:9001 Qualcomm / Option SDXLEMUR-LITE-MTP _SN:1505A7A0
My Kernel version:pi@raspberrypi:~/src $ uname -a Linux raspberrypi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
OS version:pi@raspberrypi:~/src $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye Output from dmesg: ```shell [504984.108862] usb 1-1.4: new high-speed USB device number 4 using dwc_otg [504984.211356] usb 1-1.4: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04 [504984.211405] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [504984.211429] usb 1-1.4: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0 [504984.211451] usb 1-1.4: Manufacturer: SIMCOM [504984.211471] usb 1-1.4: SerialNumber: 0123456789ABCDEF [506044.752757] usb 1-1.4: USB disconnect, device number 4 [506897.968885] usb 1-1.2: new high-speed USB device number 5 using dwc_otg [506898.071265] usb 1-1.2: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04 [506898.071313] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [506898.071338] usb 1-1.2: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0 [506898.071359] usb 1-1.2: Manufacturer: SIMCOM [506898.071380] usb 1-1.2: SerialNumber: 0123456789ABCDEF
I'm also not able to see the /dev/ttyUSB :
Is there any way to get it working ? This is a cool modem based on Snapdragon X62. Kindly let me know your thoughts on this.
EDIT: This is fixed now, I changed the raspberrypi kernel to latest via (rpi-update).
pi@raspberrypi:~ $ uname -a Linux raspberrypi 6.1.21-v8+ #1639 SMP PREEMPT Fri Mar 24 17:02:53 GMT 2023 aarch64 GNU/Linux
Installed the following:
sudo apt install libmbim-utils udhcpc
How to connect to internet: Create network conf file:pi@raspberrypi:~ $ cat /etc/mbim-network.conf APN=<your_apn> PROXY=yes
sudo mbimcli --device=/dev/cdc-wdm0 --query-device-caps \\ Checks device capabilites sudo mbim-network /dev/cdc-wdm0 start \\ Starts the internet connection sudo mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration \\ check IP address sudo udhcpc -i wwan0 \\ Add default routes to access internet via wwan0 route -n \\ check the route priority # Stopping connection: sudo mbim-network /dev/cdc-wdm0 stop sudo ifmetric wwan0 50 (it'll change the route priority so that internet can be accessed by existing connection such as eth0) route -n \\ check route priority again
did you find any firmware for this module ?
@QSM7 you will find the firmware and instructions in the link below.
Be careful while updating the firmware it can turn your device into brick
https://drive.google.com/drive/folders/1Ha2-fP3HoJa_0GnW-bnakgmZaGKgtmXy
thank you so much, is there any other firmwares i can try? في الخميس، 19 سبتمبر 2024 في 10:45 م تمت كتابة ما يلي بواسطة sinkingfund @.***>:
@QSM7 https://github.com/QSM7 you will find the firmware and instructions in the link below.
Be careful while updating the firmware it can turn your device into brick
https://drive.google.com/drive/folders/1Ha2-fP3HoJa_0GnW-bnakgmZaGKgtmXy
— Reply to this email directly, view it on GitHub https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/442#issuecomment-2362044979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMCV7QSZUZBH63FY3QKZW3ZXMSUPAVCNFSM6AAAAABLM6U3DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRSGA2DIOJXHE . You are receiving this because you were mentioned.Message ID: @.***>
I've pulled together the hardware and software required to run the SIM8200EA (8200) modem on a CM4 platform using the Waveshare CM4-DUAL-ETH-4G/5G-BASE (Base Board).
FWIW I've been running the following setup since June and everything has worked great! If you're looking to build an RPi router and have ideas or suggestions feel free to submit them here or tag me 😄
Steps:
https://git.openwrt.org/openwrt/openwrt.git
$ git clone --branch=v22.03.0-rc4 https://git.openwrt.org/openwrt/openwrt.git v22.03.0-rc4
Run commands from [official guide](https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem]
make -j $(nproc) defconfig download clean world V=s
./bin/targets/bcm27xx/bcm2711/openwrt-22.03.0-rc4-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
to internal storage or SD card for Pi CM4Hardware:
Software:
OpenWrt 21.02.3 - custom compiled withqmi_wwan_simcom
8200 specific driver supportResults: