Read the Health/Status of USB Modem - Linux - linux

I am using E8231 Huawei Modem.
I a currently debugging a network connectivity issue and a way to see the health of the USB Modem would be great.
The USB Modem has LED indicators on them which tell the status of the connection(Connecting/connected to 3g/3g+/offline).
I would like to know the same programmatically or from linux shell, what can I do?

you can use echo, putty, socat,... to send AT commands to the modem, see https://unix.stackexchange.com/questions/97242/how-to-send-at-commands-to-a-modem-in-linux , https://brunomgalmeida.wordpress.com/2012/04/06/send-at-commands-to-usb-modem , https://content.konekt.io/blog/using-at-commands-with-the-huawei-e303/
in http://www.zeeman.de/wp-content/uploads/2007/09/ubinetics-at-command-set.pdf is an AT command set for UbiNetics modem
in http://www.3g-modem-wiki.com/page/HUAWEI+AT-commands is a set of HUAWEI AT commands
USB modems are on /dev/ttyACMx or /dev/ttyUSBx (CDC device class, usually ACM sub-class, kernel module cdc_acm)

Related

Is it possible to connect to an i2c device through a USB to RS485 serial converter cable on Linux?

I currently have a sensor attached to a USB to RS485 Serial converter cable which is plugged in to a raspberry pi. I've tried using the ftdi d2xx drivers to connect to it, but so far I can't read any data and while the writes don't fail, I'm not sure they're working.
This setup works on Windows with the custom software provided by the manufacturer, but I can't find anything on getting it to work on a linux system. Is this possible?

MC7455 sierra wireless PCI not detected

Good day every body
I use MC7455 module in linux machine connected using PCI
but when i do : lspci , i didnt find it
and also with dmesg , it is not detected
Is this problem related to drivers missing ?
(For those wondering: This question is asking about the Sierra Wireless MC7455 LTE modem module)
Your modem card is a mini-PCI-e card, but that modem does not connect to the PCI bus. The mini-pci-e slot also connects to the USB bus. This modem card connects only to the USB bus, so it will not show up with lspci.
Instead is should show up as a USB device.
I have lots of experience with MC7304, assuming MC7455 works similar.
MC7455 has a miniPCIe interface, I assume your motherboard has such interface because you said the modem is connected. Have you installed SierraWireless driver? If not, Linux doesn't detect the modem. At least that's my case.
If you don't have a miniPCIe interface on the motherboard, you can use a miniPCIe to USB adaptor.
Once the modem is detected, for MC7304 at least, I can find modem in dmesg as well as by lspci.
Check this link: https://techship.com/faq/38/
I had exactly same issue with my Qotom Q355G4, the device was not detected at all. It was fixed by putting adhesive tape over pins #23, 25, 31, 33.

Enumerate commands available for a usb chip in fedora 24

I am learning to program a USB device (iBall 3.5g USB Dongle) using libusb.h header library.
Until now I am able to identify my device using the Vendor ID and also open the device for operation.
As a next step I would like to know the available commands (or the controls) for example : command to scan the surroundings for available GSM networks.
Obviously I will have to talk to the devices' firmware to extract the necessary information.
I tried to search for the technical datasheet for the 3g dongle, but couldn't find any.
The dongle is powered by a Qualcomm chip
Do you know any of the methods in which I can get the control commands for a usb device ?
Thanks in advance.
There is no simple procedure for figuring out what commands a USB device has. You need to use a combination of looking at the descriptors reported by the device, seeing if the device supports any particular USB device class, reading the USB specification, and maybe doing some reverse engineering using a protocol analyzer.
A good first step would be for you to use lsusb -v to print human-readable descriptions of the device's USB descriptors.

Raspberry PI - RT2870 (kernel module mt7601Usta) WiFi SUB dongle - Act as WiFi access point

I have a problem with USB WiFi dongle RT2870 on Raspberry Pi. This is KOM0640 (Quer) model, successfully detected by Linux Kernel mt7601Usta.ko module.
Specification of my Raspberry:
Latest Linux Raspbian distro with kernel 3.12.35+
WiFi dongle 148f:7601 Ralink Technology, Corp.
WiFi dongle is successfuly detected and can be used as client (connect with available access points).
My problem is to switch this USB WiFi dongle to AP (access-point) mode and enable HotSpot mode on Raspberry Pi. Here is result of iwconfig - I've tried to set access point mode by hand from command line:
root#raspberrypi:~/# iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.
I have read a lot of web pages with a lots of hints, but without success.
If you have any positive results on this issue, please let me know.
Thanks in advance!
Mediatek drivers dont support nl80211 and cant be used with hostapd.
Original drivers from mediatek.com site doesnt contain AP function. You have to compile driver from eywalink github repo.
After compiling/installing driver you can insert mt7601uap module and configure AP settings in /etc/Wireless/RT2870AP/RT2870AP.dat
You need a driver that supports master mode. You can get one from https://github.com/muratdemirtas/MT7601u. Good luck

Can I use a USB-to-serial adapter to talk to my development board from VMWare Fusion?

I have a Linux virtual machine running on VMWare Fusion (on Mac OS X) that I intend to use as a development environment for an embedded system. Would it be possible for my Linux VM to talk to my embedded system's serial port using a USB-to-serial adapter? Any recommendations for what sort of adapter I should get?
There are two ways to do it:
Your host-OS supports your USB<->serial converter (very likely). If so you can just allow your VM to talk to the serial port. If so the VM will see a standard serial port and everything will be fine.
Your guest-os in the VM supports the USB<->serial converter, AND your host-OS allows raw USB forwarding.
All in all the chances are good that it works..
Btw: there are good and bad USB<->Serial converters. If you find out that the serial connection seems to work (everything detects/works as expected for a couple of seconds), but you can't get a reliable connection for a longer time, then it's very possible that the usb<->serial dongle sucks....
You get what you pay for... When buying these things I'd check comp.arch.embedded and ask which usb dongles are known to just work, and which not. (My recommendation is to stick with products from Assmann. You can order them at digikey).
I've found USB serial adaptors to be a bit hit & miss with embedded work. One thing to be aware of is that the buffering tends to work differently from "real" serial ports, and latency of characters through the system can be quite variable. Some embedded development systems (think bootloaders, cheap JTAG probes etc) can be quite sensitive to this and will give timeouts and so on.
Note this doesn't only apply to USB serial adaptors, I've had similar problems with high end multi-port serial cards, but usually with those you can tweak the FIFO / IRQ settings to get something working.
I have experienced that a USB to serial adapter with a FTDI chipset and drivers is more reliable and compatible with more devices than the Prolific chipset
Depends upon the VM software, but VMWare Fusion does support USB devices. The question becomes, does your IDE support talking to a USB device instead of an old-fashioned serial port? With Linux, probably yes.
I had no problems whit serial adapters from ATEN.
USB serial adapter is USB standard device (just like mass storage) that mean that any USB compliant adapter should work.
pl2303: I have found this device to be very reliable and are often in the generic and cheap USB to RS232 adapters. I've seen expensive adapters fail and my generic adapter from geeks.com work great.
I just picked up a USB 1.1 - RS232 adapter (Digitus DA-70119) from WeirdStuff for 10 bucks. I plugged it into my Mac mini and VMWare Fusion showed me this.
Once I clicked on the USB icon, my Ubuntu 9.10 VM had no trouble seeing it
$ lsusb
Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
$ dmesg
usb 2-1: new full speed USB device using uhci_hcd and address 4
usb 2-1: configuration #1 chosen from 1 choice
pl2303 2-1:1.0: pl2303 converter detected
usb 2-1: pl2303 converter now attached to ttyUSB0
I can now use /dev/ttyUSB0 in my Linux VM to talk to my target system.

Resources