Can ModemManager be used with tethered cell phones or just with dongles? - modem

I haven't tried ModemManager yet, but it seems to me that it won't work with a phone plugged into the laptop, unless there is some software running on the phone that acts as a middle-man between ModemManager and the phone's modem.

If the phone is plugged in a laptop it may happen that it already exposes an "already connected" eth over usb (and therefore ModemManager won't be used) or instead an AT-capable serial port (which ModemManager can use to get a connection).

Related

Assign and Pin USB device to COM port

Much like DHCP and LAN IP addresses, I would like to configure a Win10 laptop to reserve and assign a USB device to COM15. If you have successfully done this before, please state this in your response and any lessons learned. I look forward to any references / examples. Thank you
If your device reports a USB serial number in its descriptors, then Windows will remember the device and always assign it to the same COM port number. You can change the COM port by going to the Device Manager (devmgmt.msc), double-clicking on the COM port, going to the "Port Settings" tab, and clicking "Advanced...".
If your device does not have a serial number in its descriptors, then you need to repeat the procedure above for every USB port on your computer that you might want to plug the device into. The reason for this is that the device's Device Instance Id, instead of including the serial number, will have some sort of string with ampersands in it that depends on what port the device is plugged into. This ID is what gets associated with a COM port, so you need to make sure all of the possible IDs of the device are associated with the same COM port.

usb sniffing with wireshark

at the moment I am using usbmon to sniff usb. for better understandability I want to use wireshark. I've used wireshark before for sniffing ethernet packets. But what to capture to sniff USB Packets ? I meant I need to start by selecting which interface to capture in wireshark. but what wold I select there for usb ?
Grab newest wireshark.
Use lsusb before and after plugin in device so You know which usb bus its plugged into.
type in terminal:
su -c "modprobe usbmon" && su -c "wireshark"
(First load kernel module that allow for usb sniffing for root, second load wireshark as root)
Than select usbmonX, where X stand for usb bus number (lsusb show those numbers).
After than you still need to filter packets for device / vendor id, or something else device specific, as wireshark will show all packets from all devices plugged into that bus. (Again lsusb before/after plugging you device will help).
Have you taken a look at the documentation for that on the Wireshark website?
In libpcap 1.0.x, the devices for capturing on USB have the name usbn, where n is the number of the bus. In libpcap 1.1.0 and later, they have the name usbmonn.
a quick notice since I just started using wireshark to sniff usb packets on linux. as I understand you need usbmon module loaded (which if you are using it should be). Additionally I seem to recall that while wireshark can be setup to let non root users sniff ethernet packets, some limitation required root access for usb packs (at least at the time of writting).
Similar to what others have said, on my system, Ubuntu 12.10, the usb interfaces have names like "usbmon1 USB bus number 1" and so forth.
(you might look at http://biot.com/blog/usb-sniffing-on-linux)
the link listed has an image showing a filter which can be used to select only traffic to from a device number (from lsusb).
I hope thats helpful
#przemo_li You want to filter by device address to see the communication from both the host and the device. The filter for that is usb.device_address ==.

Can my iphone app communicate with a connected computer?

Preferably, this would be a computer connected via cable, but if there's a way to do it over wifi then this would also be useful. I'm wondering if it's possible to send messages between them?
Or if i had a mac app and an iPhone app, could I communicate between them over wifi or a usb connection, rather than using a server or something?
Connecting over WiFi is possible, cable connection however isn't possible (certainly not in the documented API) unless the phone is jailbroken.
For wifi you're just going to connect to a TCP/IP host/socket. Have a look at CocoaAsyncSocket. The computer would need to be hosting some sort of server software. This is how iTunes Remote and AirMouse work.
There are some "permitted" (non-cracked phone) ways to send data to the iPhone from a device that's physically plugged in. There are several barcode readers - like the Linēa-pro used in US Apple stores - and magstripe readers for credit cards (e.g., the Macally Quikswipe) that can send limited amounts of data to/from the iPhone.
If your computer is a small embedded device and your data requirements are meager, it may be possible.

Using USB telbox (USB-B2K) for calling over PSTN from PC

This one is a longshot but I'll give it a try anyway.
I recently bought this USB Telbox device (AKA yealink USB-B2K). It's a device that connects to a PC over USB and to the PSTN (home telephony) and regular phone device over RJ11 cable. The device is used to direct incoming PSTN calls to the skype client running on the PC and to make calls over skype by simply dialing the keypad on the regular phone device.
This is all nice, but I was wondering if it would be somehow possible to use this device to make calls from the PC over PSTN. Now, the device can make PSTN calls when dialing on the regular phone's keypad (hitting '*' on the phone's keypad make it switch from calling over skype to calling over PSTN). My question is whether it would be possible to control the device from the PC over USB and make it make a call on the PSTN.
Asterisk has a usbb2k module that has been reported to work. (You do realize that Skype has security issues, such as punching holes through your firewall, right?)

How to detect that Symbian phone is being used as a modem?

I have a Nokia Symbian Series 60 3rd edition phone. I can use it as a GPRS / 3G modem either using Bluetooth, USB or IR.
Is there a way to programmatically detect when the phone is being used as a modem?
Please note I don't want to detect when a GPRS / 3G connection comes up (such as when you use the phone browser), but when a GPRS / 3G connection comes up that is the result of the phone being used as tethered modem via BT / IR / USB.
So the user has set up a dial up networking connection on their laptop, for instance, which uses the modem in the phone. They then launch that connection because they want to make a 3G wireless internet connection from their laptop via the phone. That's what I'd like to be able to detect from the phone.
I don't believe there's any public interface that you could use for this. You could probably use internal APIs to check what is creating the data connection, or more crudely check which processes are running when a data connection is created - probably quite easy to fool this method, depends why you want to know?
I can see network operators wanting to do this to block and/or charge extra for tethering usage. Easiest way to do that would be network side though, checking the browser UA header (also possible to fool, but not without harming your browsing experience a bit on the laptop).