Help with 3G USB Dongle - Android Software/Hacking General [Developers Only]

Hello.
I am triying to use a Huawei E173 HSPA Dongle in an APAD with Android 2.2 and kernel 2.6.32. When I insert the device it is not attached to the ttyUSB serial ports, but I can see in Terminal Emulator with the command lsusb. In Ubuntu I do sudo modprobe usbserial vendor=0xXXXX product= 0xXXXX and then the Dongle is attached to the serial ports and I can go to internet.
I was trying to do the same in android with Terminal Emulator but the problem is the module usbserial is not found. I don't have it.
I need advice in installing usbserial module in my android system. ¿do you think if I find the module file usbserial.ko compiled for 2.6.32 kernel and put it in my module folder will it work? ¿And where can I found it? ¿Anybody have it in his device?

Related

Minicom and USB to serial adapter

Im looking to test and potentially develop support for usb to serial adapters and for console connectivity with an app similar to or with Minicom. I'm a network administrator and would be able to use my Asus Transformer or other Android tablets with USB connectors to console into the equipment I manage.
Does anyone else have interest in a project like this?
Does anyone else know of a similar project?
Thanks
Sent from my Transformer TF101 using XDA Premium App
I think its a great idea.
Sent from my Transformer TF101 using Tapatalk
^x2
Sent from my SCH-I500 using Tapatalk
I've been searching around and have found that there are Bluetooth serial apadpters with software that should allow for connectivity. Reading reviews I get mixed results.
https://market.android.com/details?id=com.magicandroidapps.bluetoothterm&feature=search_result
http://www.magicandroidapps.com/wiki//index.php?title=Bluetooth_Serial_Adapters
Sent from my Transformer TF101 using XDA Premium App
that would be pretty cool, i am also a network manager and will proably buy also a transformer (just waiting for the new archos to see if they are anything good).
I think the rs323 cable approach would be better as there would be no power drain from the Bluetooth (i know its minumal but...).
I am new to android development (i am going to do my university final thesis based on a android software) but i would like to help
PS - if you connect a usb-rs232 adapter to the transformer and do "dmesg | tail" on a shell does it appear.
Also see if the last answer on this post helps htxxp://stackoverflow.com/questions/4621580/using-serial-port-rs-232-in-android
This is something I would pay a couple of english pounds for from the market.
My USB->Serial port adapter is based around the Prolific PL2303 chip which I think is pretty common, so may be a good place to start.
That would be amazing.
I am a network administrator and would love to see this on my device. Although I have an Acer A500 and not the Asus Transformer.
I plugged in my usb to serial adapter and ran dmesg. Here was the output :
Code:
usb 1-1: pl2303 converter now attached to ttyUSB0
Any idea of what app I could use to connect to that to test it out?
ipigi said:
I plugged in my usb to serial adapter and ran dmesg. Here was the output :
Code:
usb 1-1: pl2303 converter now attached to ttyUSB0
Any idea of what app I could use to connect to that to test it out?
Click to expand...
Click to collapse
If we had full GNU utilities on Android, you could use screen against /dev/ttyUSB0 and that should connect to the serial device.
Unfortunately, I don't know of any direct serial communication applications on Android.
I'm also an IT administration and could use a working rs232 solution for my tablet.
Asus Transformer 3.1 pwnd
www.MiiWiiChat.com
www.SnapSiteAdmins.com
Keyspan usb-serial adapters have drivers available in the kernel. Seems to me easiest thing to do would be to build the required kernel modules, install debian to a parition on the SD card, setup a chroot environment and install minicom/screen/serial terminal of choice. Alternatively instead of debian chroot, you could build a serial terminal client for use in the android linux environment.
Hi guys, I am a Acer Iconia A500 user but found this topic yesterday while trying to find a way to use my usb/rs232 adapter for my linux boxes at work. It seems like the only thing you need is kernel modules for the adapter you have (either prolific or ftdi) and busybox 1.19. I wrote a quick how-to for my Acer (http://forum.xda-developers.com/showpost.php?p=16703609&postcount=23) which I am also copying below. As long as you can find the kernel modules it should apply to Transformer as well:
Thanks to celsoffraga and also thor2002ro for the kernel modules, I can confirm that A500 can run a usb/serial (rs232) perfectly fine on the stock 3.1 kernel/rom.
Ingredients: Rooted, A500, kernel modules for your adapter, a terminal emulator, and busybox 1.19 which has a tool called microcom in it.
Install busybox 1.19 through this application (the other busybox installer app on the market installs a slightly different version of 1.19 that does not have microcom):
https://market.android.com/details?i...ybox.installer
Download usb2serial package for your kernel from the first post of (you can check your kernel version from Settings - About Tablet):
http://forum.xda-developers.com/show....php?t=1058713
Extract that usb2serial zip to somewhere in the tablet (I used /mnt/sdcard/modules/). There should be two files, one for Prolific chipset serial converter, pl2303.ko which is the most common one, the other one for the Fidi chipset, ftdi_sio.ko, which is what I had.
Now open your favorite terminal emulator (Both terminal emulator and connectbot works) and load the module you need, or you can load both:
Code:
insmod /mnt/sdcard/modules/ftdi_sio.ko
Now plug your usb/serial converter to the USB port, and type "dmesg" in terminal. You should see something like "FTDI USB Serial Device converter now attached to ttyUSB0" , which means everything is detected fine and attached to the correct device point in linux.
Now comes the serial terminal emulator, which is called "microcom".
In terminal, just type microcom and it should return a short help text. Our device name (TTY) is /dev/ttyUSB0 . So if I want to connect to a rs232 port with 9600 baud rate, the command should be:
Code:
microcom -s 9600 /dev/ttyUSB0
Tadaaa!​
If it means I no longer have to undock and lug my massive work laptop down to the datacentre every time, I'm all for it.
fincan - awesome, can't wait to get my dock to test that out. Thank you.
Very interested in ur app, keep me posted...
Thanks
Sent from my Transformer TF101 using Tapatalk
Tr
fincan said:
Hi guys, I am a Acer Iconia A500 user but found this topic yesterday while trying to find a way to use my usb/rs232 adapter for my linux boxes at work. It seems like the only thing you need is kernel modules for the adapter you have (either prolific or ftdi) and busybox 1.19. I wrote a quick how-to for my Acer (http://forum.xda-developers.com/showpost.php?p=16703609&postcount=23) which I am also copying below. As long as you can find the kernel modules it should apply to Transformer as well:
Thanks to celsoffraga and also thor2002ro for the kernel modules, I can confirm that A500 can run a usb/serial (rs232) perfectly fine on the stock 3.1 kernel/rom.
Ingredients: Rooted, A500, kernel modules for your adapter, a terminal emulator, and busybox 1.19 which has a tool called microcom in it.
Install busybox 1.19 through this application (the other busybox installer app on the market installs a slightly different version of 1.19 that does not have microcom):
https://market.android.com/details?i...ybox.installer
Download usb2serial package for your kernel from the first post of (you can check your kernel version from Settings - About Tablet):
http://forum.xda-developers.com/show....php?t=1058713
Extract that usb2serial zip to somewhere in the tablet (I used /mnt/sdcard/modules/). There should be two files, one for Prolific chipset serial converter, pl2303.ko which is the most common one, the other one for the Fidi chipset, ftdi_sio.ko, which is what I had.
Now open your favorite terminal emulator (Both terminal emulator and connectbot works) and load the module you need, or you can load both:
Code:
insmod /mnt/sdcard/modules/ftdi_sio.ko
Now plug your usb/serial converter to the USB port, and type "dmesg" in terminal. You should see something like "FTDI USB Serial Device converter now attached to ttyUSB0" , which means everything is detected fine and attached to the correct device point in linux.
Now comes the serial terminal emulator, which is called "microcom".
In terminal, just type microcom and it should return a short help text. Our device name (TTY) is /dev/ttyUSB0 . So if I want to connect to a rs232 port with 9600 baud rate, the command should be:
Code:
microcom -s 9600 /dev/ttyUSB0
Tadaaa!​
Click to expand...
Click to collapse
Tried on my Trasformer with Revolution 3.5 nd it work great. Now I can control my PLC application from tablet.
Thanks a lot.
fincan said:
Hi guys, I am a Acer Iconia A500 user but found this topic yesterday while trying to find a way to use my usb/rs232 adapter for my linux boxes at work. It seems like the only thing you need is kernel modules for the adapter you have (either prolific or ftdi) and busybox 1.19. I wrote a quick how-to for my Acer (http://forum.xda-developers.com/showpost.php?p=16703609&postcount=23) which I am also copying below. As long as you can find the kernel modules it should apply to Transformer as well:
Click to expand...
Click to collapse
Thanks for the tip and the links. I'm now able to connect my old Garmin GPS device to my Asus Transformer and use "pygarmin" Python scripts on SL4A : no need to carry a PC for my next vacations!
I was able to connect to a Oracle / SUN /T5220 server serial management port with the BlueTooth adaptor.
Ebay HC-06-D, Bluetooth to RS232 serial communication converter module, slave mode
DIYGSM Wholesale
I converted it from a DB9 serial to RJ45
DB9 PIN 2 TXD to RJ45 PIN 3 RXD
DB9 PIN 2 RXD to RJ45 PIN 6 TXD
Ground and black wire for the USB to PIN 5 of the RJ45.
USB connector supplies the DC to run the module.
Don't for get to pair the module with your Transformor password 1234.
Running ASUS Transformer TF101 B1 32GB Tablet Honeycomb ver. 3.2.1
Terminal Application SENA BTerm found on the Google market.
Hi
kerenoc01 said:
Thanks for the tip and the links. I'm now able to connect my old Garmin GPS device to my Asus Transformer and use "pygarmin" Python scripts on SL4A : no need to carry a PC for my next vacations!
Click to expand...
Click to collapse
Unfortunately, my video on demand provider (in France) uses an application that checks if the tablet is rooted. I had to unroot to be able to download and watch films and catchup TV.
Is there any hope to control a FTDI interface from user space (libusb, libftdi)?
Or could I install the .ko driver so that is survive the unroot process (using the Universal script)?
Regards
ICS update?
Has anyone got this to work in ICS? If so what kernel module are you using? Tried the one from the A500 link but I get an "Invalid Argument" while running insmod

[Q] Can I develop/put my own drivers onto Android. (To get USB peripherials working)

So I have many many things I want to do with (Specifically) USB devices on my TF101. It's my baby and I use it for almost everything now, but there's still a few problems I haven't been able to shake or get other answers too.
I have a USB-MIDI cable that doesn't work (isn't detected, I think driver issue/isn't supported) Could I make a driver to do this so I can connect my keyboard to my tf and record some jams?
More Important
I have a USB - 3.5 mm converter/cable, usb in, headphone port out. It's by logitech and works fine on computer to plug any 3.5mm headphones into, not at all on android though. My headphone port is broken so this would be an amazing thing to get working properly.
Any help or guidance would be greatly appreciated, even workarounds to get these things working.
Well actually when you are rooted, you can anything!
If nothing helps, you can write your own kernel module since you can compile yourself a custom kernel.
Therefore: yes, we can
conizius said:
Well actually when you are rooted, you can anything!
Click to expand...
Click to collapse
Alright then step 1 is complete I suppose! xD I am rooted and running the tastymehICS kernel.
Gratz good luck for everything else - access to the whole system is open now!
In my opinion guvours kernel is a bit better (got less - not to say no - SoD).
Sent from my HTC Vision using XDA
I've tried both and guevor's seemed a bit more unstable for long periods of usage --just my preference, but that's beside the point xD"
So does anyone know how I could go about creating + adding drivers to the system?
You need download kernel source from asus site and prepare build environment according google andriod development site. Then you can build your kernel a start to add new features and write new kernel modules
Sent from my HTC Desire S using xda premium
I have windows drivers, all I'd need to do is port them, not necessarily write a whole new kernel X3
you don't need write whole kernel, source code for current stock kernel are on asus web site. And you don't have sources for guevor or other kernel. Is not possible to port windows driver to andriod without source code.
Try find if linux driver for you device exist. If yes, it is easy to add it to asus kerenel for transformer. And later is possible to combine your device driver (module) with some other custom kernel.
(I have working USB dvb-t stick on my transformer)
Thanks, I misread what I thought you read when I posted (if that makes any sense x.x")
Ok, it's plug and play on my linux machine too, where could I find the driver to import? So how would I make a module + combine with the guevor/tastymehics kernel?
ok, if your device is plug and play in linux, install any terminal emulation application into transformer (if you not have now) and use "lsusb" then plug your device into usb and use lsusb command again.
You should see something like BUS 001 Device 001: ID 1a4b:0003.
Then use google and try find what module is needed for device 1a4b:0003
then you need environment for building kernel and use some comamnd to build yout kernel module.
1) make menuconfig - choice module needed for your device
2) make ARCH=arm CROSS_COMPILE=mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- modules
this comple kernel modules for your device. Or you can ask for help from one of developer of custom kernel what you use to comile module what you need from his suource. Kernel and kernel modules musbe compiled from same version.
then copy modules to transformer and use insmod command to load it into kernel. Then you can plug in your device and it should work. (use dmesg to check if device driver is loaded)
Please post "dmesg" output after you plug your device in.(e.g last 10 lines) and output from lsusb.
Take a look in the thread http://forum.xda-developers.com/showthread.php?t=1513490
There is a lot of possibilities to play with usb drivers.
crossik1 said:
Please post "dmesg" output after you plug your device in.(e.g last 10 lines) and output from lsusb.
Click to expand...
Click to collapse
Dmesg (relevant lines):
usb 1-1.2: new full speed USB device number 28 using tegra-ehci
usb 1-1.2: new usb device found, idvendor=046d, idproduct=0a17
usb 1-1.2: new usb device strings: mfr=1, product=2, Serialnumber=0
usb 1-1.2: Product: Logitech g330 Headset
usb 1-1.2: Manufacturer: Logitech
Lsusb:
Bus 001 Device 001: ID 1d6b:0002 <-- These were here already
Bus 001 Device 026: ID 05e3: 0610<-- These were here already
Bus 001 Device 028: ID 046d:0a17 <--- this is the new entry after plugging in
These are the log results asked for. I'm looking into the module now, thanks
At this point I have 4 options to fix my headphone port (that I know of)
1. Open it and try to sauter the port back together (best but, dangerous :/)
2. Get this driver stuff to work so I can use my adapter (great)
3. Bluetooth headphones (meh sound quality from my experience, but good if they work, also expensive)
4. HDMI-Out to Rca to 3.5mm to headphones. (UGH CABLES, but all I would need is the hdmi-rca cable.)

[Q] Kali Linux via Linux Deploy w/Alfa AWUS036NHA (Atheros AR9271) USB wifi adapter?

i can't seem to find a straight answer about this. i've got kali linux installed on my samsung note 8013 and launch it via linux deploy, i access the desktop environment by connecting via VNC over SSH. i want to get my Alfa AWUS036NHA USB wifi adapter working within kali linux on it. i have the alfa connected to a powered USB hub which is connected to the tablet via a USB OTG adapter. the wifi USB adapter is recognized both in android and in kali linux when i use the "lsusb" command in a terminal window. however, it is not showing up when i do an ifconfig or iwconfig.
i have read that external wifi adapters are disabled by default, and that in order to get external wifi to work, the internal wifi needs to be disabled. however, i'm not quite sure how to do this or how to get the ath9k drivers working with packet injection, either in android or linux. i'm pretty sure this requires some kernel modifications especially if the ath9k drivers are not enabled within the kernel by default (i'm running stock rooted jellybean 4.1.2 ROM), unless there's a script that can be run on linux deploy when launching kali that can enable the ath9k drivers and the external wifi, and turn off the internal wifi. if it requires kernel modifications, do i need to recompile the kernel for both android and linux, or is the linux one enough to get it working within my kali chroot environment?
also, i was wondering if there was a way to boot into kali linux natively without having to replace my recovery - on the official kali site there's a recovery.img you can flash to boot into kali by holding down certain keys during startup, but i'd prefer to keep TWRP or clockworkmod recovery. sorry, i know that's a totally different question. thanks!
eudemonics said:
i can't seem to find a straight answer about this. i've got kali linux installed on my samsung note 8013 and launch it via linux deploy, i access the desktop environment by connecting via VNC over SSH. i want to get my Alfa AWUS036NHA USB wifi adapter working within kali linux on it. i have the alfa connected to a powered USB hub which is connected to the tablet via a USB OTG adapter. the wifi USB adapter is recognized both in android and in kali linux when i use the "lsusb" command in a terminal window. however, it is not showing up when i do an ifconfig or iwconfig.
Click to expand...
Click to collapse
Hello, any progress with that? I'm struggle with wifi and bluetooth issue couple month and nothing..
AlA777 said:
Hello, any progress with that? I'm struggle with wifi and bluetooth issue couple month and nothing..
Click to expand...
Click to collapse
you need to compile a custom kernel with the drivers/firmware and flash it
eudemonics said:
you need to compile a custom kernel with the drivers/firmware and flash it
Click to expand...
Click to collapse
Yes, already done. Thank you!

FaaastJB v2.5 Allwinner A13

I've got the FasssstJB 2.5 ROM up and running, once I got the touch screen working its been great. I've got Kali loaded via Linux Deploy and I plan on using a AWUS036H wireless for Kali.
When I plug the USB wireless in; lsusb can see the device in both android and kali however ifconfig shows nothing so I'm missing the rtl8187 drivers.
I've tried a few rtl8187.ko drivers I've found but nothing for 4.2.2
Anyone have an rtl8187.ko driver for 4.2.2 they care to share?
I'm 99.9% to my goal if I could just get this driver running
Thanks

Linux-headers 3.10.49 (cyanogenmod)

Gud evening sir..!
I am using kali nethunter on my yureka plus and trying to install drivers of Netis WF2120 so that i can run it on my kali as i want to use it for wifite and aircrack.!
Let me post the result of when i type lsusb-:
[email protected]:~# lsusb
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Now the problem is that i am unable to compile its drivers as it says that some build files are missing.!I searched it for on google and found that some linux-headers files are missing.!But i am unable to find the kernel files for my device.!Let me post the result of when i type 'uname -r'
[email protected]:~# uname -r
3.10.49-cyanogenmod-g831fd3b
Apt-get dont provide any help.!So plz suggest me the right kernels for my device so that i can compile my drivers and finally run my Netis WF2120 usb on my kali nethunter.!
Thnx in advance.!
U will not able to install or update kernel through the nethunter installed Kali environment as it don't have sufficient permission as chroot further u can try some tp link based WiFi module which work very well .....
And some Yureka kernel are supporting well through.
As u what type of environment u installed through nethunter option

Categories

Resources