Yes, I'm italian. Of course you can! This is a very complicated topic and sharing efforts and ideas is the only way to sort things out!
First of all, than you so much for the script and I was able to setup the FM350-GL on my router.
However, now there is one minor issue I am experieincing. It appears the hotplug script is not working properly. After each router reboot, or after I plug the module off and back on, the router doesn't automatically assign generic nor option driver. I have to manually do "echo ..." through SSH to correctly setup the module.
Update: I did some check and it appears the problem results from the "fm350.status" file persists in /tmp folder even after system restart. which makes the script to unable to do its work...
Strange that fm350.status
is not deleted after system restart.
You can delete the fm350.status
check from the hotplug script.
Delete && [ ! -f /tmp/fm350.status ]
from /etc/hotplug.d/usb/50-fm350_driver
# Hotplug script for loading serial USB driver to Fibocom FM350-GL modem
# 0e8d:7126 and 0e8d:7127
if ([ "$PRODUCT" = 'e8d/7126/1' ] || [ "$PRODUCT" = 'e8d/7127/1' ]) && [ "$ACTION" = add ] && [ ! -f /tmp/fm350.status ]
then
if [ "$PRODUCT" = 'e8d/7126/1' ]
then
echo '0e8d 7126' > /sys/bus/usb-serial/drivers/option1/new_id
# echo '0e8d 7126' > /sys/bus/usb-serial/drivers/generic/new_id
elif [ "$PRODUCT" = 'e8d/7127/1' ]
then
echo '0e8d 7127' > /sys/bus/usb-serial/drivers/option1/new_id
# echo '0e8d 7127' > /sys/bus/usb-serial/drivers/generic/new_id
fi
echo 'boot' > /tmp/fm350.status
logger -t fm350-gl 'Serial USB driver loaded for 0e8d:'${PRODUCT:4:4}
fi
BTW, in kernel version 6.6, and onwards, the hotplug script is not needed. FM350 is detected by the kernel.
Hi mrhaav, many thanks for your work. I am currently using your atc script on DW5931e with the latest firmware (29.23.06).
I am having a small issue when used with Telekom Germany.
The AT+CGACT=1,1
command direct after session disconnected by the network often returns me +CME ERROR: 5847
, and then the modem stops working.
I tried to add the following on your script to rerun AT+CGACT=1,1
once getting this CME ERROR and seems like it helped.
Modifications on atc.sh
'+CME ERROR' )
...
[ $OK_received -eq 10 ] && {
COMMAND='AT+CGACT=1,1' gcom -d "$device" -s /etc/gcom/at.gcom
}
;;
logs with the modified script
on Nov 18 18:44:54 2024 daemon.notice netifd: modem0 (3374): +EONSNWNAME: 1, 0, "Telekom.de", 0, "Telekom.de"
Mon Nov 18 18:44:55 2024 daemon.notice netifd: modem0 (3374): +CEREG: 0,"xxxx","xxxxx",13,0,19
Mon Nov 18 18:44:55 2024 daemon.notice netifd: modem0 (3374): registered -> notRegistered, TAC:xxxxx eNodeB:xxxxx- - Reject cause: 19
Mon Nov 18 18:45:06 2024 daemon.notice netifd: modem0 (3374): +CEREG: 1,"xxxx","xxxx",13,0,0
Mon Nov 18 18:45:06 2024 daemon.notice netifd: modem0 (3374): notRegistered -> registered - home network, TAC:xxxx eNodeB:xxxxxx-2
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): AT+CGACT?
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): OK
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): Session diconnected by the network
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): Activate session
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): AT+CGACT=1,1
Mon Nov 18 18:45:07 2024 daemon.notice netifd: modem0 (3374): +CME ERROR: 5847
Mon Nov 18 18:45:08 2024 daemon.notice netifd: modem0 (3374): AT+CGACT=1,1
Mon Nov 18 18:45:08 2024 daemon.notice netifd: modem0 (3374): +CGEV: ME PDN ACT 1
Mon Nov 18 18:45:08 2024 daemon.notice netifd: modem0 (3374): OK
I am not sure why the modem gives me this CME ERROR, can't really find any information about it, do you maybe have some ideas for this?
Hi No1Alien
I have seen this as well and I´m using FW 29.23.06.
I don´t know why the modem send this error message. I will try to ask Fibocom.
I did a similar modification as you did.
'+CME ERROR' )
[ "$atc_debug" -gt 1 ] && echo $URCline
[ "$URCvalue" = '5847' ] && {
COMMAND='AT+CGACT=1,1' gcom -d "$device" -s /etc/gcom/at.gcom
}
[ "$URCvalue" = 'Requested service option not subscribed (#33)' ] && {
echo 'Activate session failed, check your APN settings'
proto_notify_error "$interface" SESSION_FAILED
proto_block_restart "$interface"
return 1
}
;;
I thought it was something wrong with my modem. Good to know that you had the same problem. I will update the script on my github page as well.
Hi,
The latest snapshot for bpi-r3 mini uses APK instead of opkg, can I just unzip your .ipk files and put the files in the right places?
Br
/Neppe
Hi
I have compiled apk files. Available at: https://github.com/mrhaav/openwrt/tree/master/atc
You need to install with: apk add --allow-untrusted </path/file>
Hi! Thanks for the help! I was on kernal 5.4 so I guess I still need the script for now...
I did the change and it is now partially working. I don't have to use ssh to pass "echo ..." now, but I have to manually replug the usb to let the script run. It appears there is no "ADD" event on system startup and I have to trigger that by replugging the modem.
Greate Thanks!
/J
You can add a small logger script to /etc/hotplug.d/usb/
that will print all hotplug environmental variables to syslog.
Reboot your router and maybe you can see why the FM350 usb script is not triggered.
/etc/hotplug.d/usb/00-logger
logger -t hotplug $(env)
@PMGZED
Did you ever get this resolved?
I just purchased an HP variant of the FM350-GL,, and my modem does the same as what you describe here. The modem actually works fine . It is just that you have to power off,then power back on,for the modem,,to appear at boot up.
No only switching to usb helped for me
for me even in usb mode , the modem doest work on reboot.need to uplug power to restore my 5G connections
Do you mind me asking how you got the modem into USB mode from PCIe mode?
When I run command AT+GTDIPCMODE?
returns 1,2,2,2,5,13
in other words the modem is not in dual ipc mode it is in "PCIe advanced mode"
I have this in a pcie to m.2 adapter which also has USB 3.0 plugin. The USB 3.0 dual wire is plugged into the adapter as well.
If i pull the adapter up out of the pcie slot,no usb ports are shown on reboot.
When i try and change into '3' mode which is dual mode,, i always get errors.
I always get errors,,trying to change imei as well.
Is there an AT command you have to run before attempting to make edits to the modem,,like on Sierr Wireless cards?
I have a couple of the AT Commands PDF's but never see any mention of this.
This is the HP variant of the modem,,just for completeness.
TIA
i have not found any solution to switch it with at commands.
I have dissabled my pcie over the dts file of my router so the card switch automatic to usb after some seconds
@PMGZED
Thank You for the info. You lost me on the dts file?
I am curious if yours does this,,,,will go into USB,,, and your modem,is in Mode 1 ,,, why when i pull my card out of the pcie slot,,,and i only have it powered by the USB cable connected to the back of the pcie card,,,mine never shows anything in lsusb.
Im wondering if the card I have will go into 'true' usb?
It gets a blue led,,,then eventually gets a red led,,,which it does the same sequence in the pcie slot.
I sold all my sleds a few months ago,,,cleaning house,,I was going to get away from messing with the cell modems,,and here I am,,,
Thanks