[Q] send commands to printer via USB - Nexus 4 Q&A, Help & Troubleshooting

Morning all, Only got my nexus a month ago after being die hard Blackberry for a number of years, due to being usless with touch screens.
I work as an engineer in the printing industry and would love to be able to interact with our machines via USB.
We can use comands called "prescribe" on our machines, they will understand said comands if sent in a .txt file.
I have busy box, im all rooted. also have manny linux tools installed.
So I am looking for a command to ether send my .txt files from my phone via USB.
If I could enter sytax direct into terminal and then use a command to send as a .txt would be even better.
Any help would be much appreciated !

Shameless bump
Sent from my Nexus 4 using xda app-developers app

you would need the usb OTG kernel and an external power adapter for the otg cable. If you have that I'm sure your linux magic tricks would make it work

The Nexus 4 doesn't support USB OTG (or any other Host Mode) as I understand.

blackthund3r said:
The Nexus 4 doesn't support USB OTG (or any other Host Mode) as I understand.
Click to expand...
Click to collapse
It does. You need to supply the power yourself externally and a custom kernel.
Sent from Halo.

exb0 said:
It does. You need to supply the power yourself externally and a custom kernel.
Sent from Halo.
Click to expand...
Click to collapse
That's very interesting! Has anyone done it?
Sent from my Nexus 4 using Tapatalk 4 Beta

Many have.... See zippys thread over in Development.

Thanks for the response guys. Just decided to try and build it into an app instead. Thanks
Sent from my Nexus 4 using xda app-developers app

Related

[Q] What is the best way to transfer files from Nexus 4 to your PC

I am trying to connect my phone to my PC but they won't communicate. tried to go to recovery 6.0.1.9 but I still mount storage didn't work for me.
Any help will be greatly appreciated.
Sent from my Nexus 4 using xda app-developers app
Boot in to android or do it through fastboot
Sent from my Nexus 4 using Tapatalk 2
Transferring files from or to pc
darius0519 said:
I am trying to connect my phone to my PC but they won't communicate. tried to go to recovery 6.0.1.9 but I still mount storage didn't work for me.
Any help will be greatly appreciated.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Already installed drivers for the N4? Using correct data cable?
Even tried wireless solutions as air droid?
But before you do all these things, is your N4 visible in your pc- explorer?
For further questions just contact me. I'm willing to support you.
Try rebooting. That's what fixed it for me lol. You could also try changing USB Storage mode to PTP or MTP from whatever it's on now.
Chemobrain said:
Already installed drivers for the N4? Using correct data cable?
Even tried wireless solutions as air droid?
But before you do all these things, is your N4 visible in your pc- explorer?
For further questions just contact me. I'm willing to support you.
Click to expand...
Click to collapse
Yup my PC can't recognize my N4.
Sent from my Nexus 4 using xda app-developers app
Try turning off USB debugging.
Sent from my Nexus 4 using xda premium
Try WiFi transfer pro
Sent from my Nexus 4 16GB using Tapatalk 2
Had the same problem. I was able to connect it as a camera, but not in mtp mode. I moved all my files into the dcim folder under then used root explorer to get them out of there.
Sent from my Nexus 4 using xda app-developers app
Airdroid all the way.
Sent from my Nexus 4 using xda premium
USB debugging....
Ngo93 said:
Airdroid all the way.
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
+1 for AirDroid. So simple and reliable that even my 70 year old father uses it.
+1 for AirDroid.
Sent from my Nexus 4 using Tapatalk 2
I use FolderSync. I have it scheduled to automatically back up anything I care about every night at 2am. It just happens and I don't even have to think about it. AirDroid also works fine.
hfuizo said:
I use FolderSync. I have it scheduled to automatically back up anything I care about every night at 2am. It just happens and I don't even have to think about it. AirDroid also works fine.
Click to expand...
Click to collapse
That sounds awesome! but I guess you have to leave your computer ON all night, ain't that right?
I just use ES File Explorer and just transfer them to my Windows shared folder on my network. I rarely use USB cables to transfer files at home unless they're massive.
deltatux
Has anyone successfully connected their nexus 4 to their PC using USB? My desktop unfortunately don't have wireless.
Sent from my Nexus 4 using xda app-developers app
darius0519 said:
Has anyone successfully connected their nexus 4 to their PC using USB? My desktop unfortunately don't have wireless.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
I have. Make sure USB Fast charge isn't enabled.
Sent from my Nexus 4 using xda premium
darius0519 said:
Has anyone successfully connected their nexus 4 to their PC using USB? My desktop unfortunately don't have wireless.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
I connect mine all the time to my windows 7 PC. You have to remember that it connects as an MTP device so it doesn't get assigned a drive letter but it should show up as a device that you can explore.
I use Windows 8 and I use the USB to transfere files between the SD Card and the Laptop.
Connect your phone up to pc while booted into android. Now check your PC's device manager for a failed mtp entry.
If you find one I'll tell you how to fix it.

USB OTG and Nexus 7

Am I correct in saying that OTG cables will not work with an unrooted device? I've google'd around a bit and that is the conclusion I've come up with. Please someone prove me wrong and tell me how to get it to work without rooting.
Sent from my Nexus 7 using Tapatalk 2
I think it is a mixed bag depending on the type of device. For instance, I don't know why a standard USB keyboard wouldn't work with a stock, unrooted tablet. Hard drive or USB key, though? Perhaps not without root.
The USB Media Importer app claims that it doesn't need root (but then I also see some ymmv comments about Nexus 7 and 4.2.2 there). I haven't used this app so I can't say one way or another. Maybe someone that has can add some commentary.
For storage I think otg access to read is available without root with a few 3rd party apps but to write to them I think you need to give them root access.
Other usb devices would depend on if drivers are in the rom/kernel.If it says it works with linux it usually works for android devices.
Sent from my SGH-I927 using xda app-developers app
Thank you guys. I just would like to be able to transfer files via USB stick if I could without having to alter my Nexus.
Sent from my Nexus 7 using Tapatalk 2

Regular OTG cable (not the Y type)

Did anyone manage to use a usb thumb drive with the regular OTG? I have one laying around in my room and AFAIK I need a custom rom to make the OTG feature to work. Since I am waiting for the official CM 10.2, I still run stock, I just wanna know if I have to buy the Y type...
Sent from my Nexus 4 using Tapatalk 2
The Nexus 4 cannot output 5v through the micro USB port.
The Y cable is your only way.
Look for the one with a male and female micro USB also with a female USB.
Sent from my Nexus 4 using Tapatalk 4
You should be able to use the cable you have but you would need to run it through a powered USB hub
Sent from my Nexus 4 using xda app-developers app
Can someone tell me if this could work with OTG on nexus 4?? http://viewitem.eim.ebay.gr/I9500-I...B-Host-OTG-HUB--CARD-READER/161105862553/item
no it will not the nexus 4 simply put does not put enough power out to power anything
OfficialTylerBig said:
no it will not the nexus 4 simply put does not put enough power out to power anything
Click to expand...
Click to collapse
If you answer to my post i have to thank you but i also have to comment that this hub has AC plug in for power!!!
http://forum.xda-developers.com/showthread.php?t=2181820&page=80
Look at post #795. If your linked device is like marhensa's, it should work. However, it's hard to determine exactly.
Of course you need to flash ziddey's kernel for any OTG to work.
Sent from my Nexus 4 using Tapatalk 4

no usb host!!!

I have a nexus 7 WiFi 16 gig refurbished from wallmart. Using for a car install, tried 3 different otg cables confirmed working on n7 2013 and made my own cable with external power and no go. Host mode will not trigger. No mouse, USB ,SD........ I get no notification that host mode is entered. Tried USB ROM, vanir, cm11, bs harmony, stock, every kernel. Still get nothing. Any ideas? Have power and volume soldered to some momentary switches. Any ideas I was thinking of trying to trigger host by shorting the pins on the tablet itself! Bad idea? All connections in the tablet look good.I am at a loss. Any suggestions are appreciated!!
Download stickmount.
Sent from my Nexus 7 using XDA Premium 4 mobile app
What you are looking for is a kernel that provides simultaneous otg/host mode charging. Unfortunately, if you are running a rom newer than 4.2.2, you cant get it. All kernels that gave this capability were based on the work by Timur. He left that scene and never brought the hack to 4.3 +. If you install a 4.2.2 rom, you can still do it. If you google "Timur kernel" it will take you to his rootzwiki thread. He has a standalone kernel, or an entire rom dedicated to your very situation. Most people on the thread are car install users. Tons of great info there.
To the reply above me, the op is referring to being able to mount otg and charge at the same time, so stickmount would do no good.
Sent from my SGH-I997 using XDA Premium 4 mobile app
rebel1699 said:
What you are looking for is a kernel that provides simultaneous otg/host mode charging. Unfortunately, if you are running a rom newer than 4.2.2, you cant get it. All kernels that gave this capability were based on the work by Timur. He left that scene and never brought the hack to 4.3 +. If you install a 4.2.2 rom, you can still do it. If you google "Timur kernel" it will take you to his rootzwiki thread. He has a standalone kernel, or an entire rom dedicated to your very situation. Most people on the thread are car install users. Tons of great info there.
To the reply above me, the op is referring to being able to mount otg and charge at the same time, so stickmount would do no good.
Sent from my SGH-I997 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Isn't this a stock feature? My N7 in stock 4.4.2 has no OTG problems whatsoever, and provides energy without problrms.
No, not a stock feature. Exactly how are you charging and mounting otg simultaneously, cable wise?
Sent from my SGH-I997 using XDA Premium 4 mobile app
rebel1699 said:
No, not a stock feature. Exactly how are you charging and mounting otg simultaneously, cable wise?
Sent from my SGH-I997 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I use a generic OTG cable i got for like 5 bucks (it doesn't supply any kind of power). Mouse, gamepad and keyboards works as soon as i connect them. For drives and SD cards, i use Nexus Media Importer. All in stock ROM and kernel (4.4.2), without using root.
The op is referring to charging the N7, and connecting otg devices at the same time. The reason his otg is not working is because he connected the charging circuit first, which blocks host mode (otg functionality) from registering. The same happens if otg is hooked first, charging will not occur. It takes a kernel with those certain abilities to use otg and charge the n7 at the same time (host mode charging). Likewise, it takes a special cord, which has either 2 male usb and one female, or 1 micro usb, 1 male usb, and 1 female usb. Everything you need to know about this is here http://mehrvarz.github.io/usb-host-mode-power-management-nexus7/
Sent from my SGH-I997 using XDA Premium 4 mobile app
tried it all
I have tried usb rom and stick mount,and nexus medis importer ect...... my problem is no usb host at all. not even a usb mouse. i have tried diffrent roms and kernels. i think maybe a hardware problem. i made my own usb host cable it works with my n7 2013 note 3 , but not my 2012 n7. nothing does. i also bought a few cables from amazon, no go. the tablet doesnt enter host mode. i tried usb diagostic app from chainfire. support is the for host in the kenels but host mode will not trigger.. just tring to see if anyone had similar issue and found a fix.. thanks for the suggestions.. kang-aroo kernel has timurs patches synced for 4.4.2 so does bricked and m kernel. OTG and charging IS NOT my issue, its no host at all. tablet will not recognize anything i plug in with external power or without....
As i thought the tablet was defective,recieved my new one no problems with usb host......
Awesome, glad you got it replaced. I use usb host mode charging, so I know how valuable it is. But, I am glad you posted your issue, because I was unaware of the existance of the kang-aroo kernel till you mentioned it. Running it on all 4 roms on my N7, and really happy with it.
Sent from my Nexus 7 using XDA Premium 4 mobile app
rebel1699 said:
Awesome, glad you got it replaced. I use usb host mode charging, so I know how valuable it is. But, I am glad you posted your issue, because I was unaware of the existance of the kang-aroo kernel till you mentioned it. Running it on all 4 roms on my N7, and really happy with it.
Sent from my Nexus 7 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Kangaroo is a great kernel , try oxydo has the same features but it also has doubletap2wake and s2w it's not enabled by default but trickster mod will turn it on or by editing a few files in the sys folder.In the kangaroo thread there is a manager app like USB rom has for a car install. Works on both kernels. Are you using multirom. I haven't tried it yet. Any issues?
Been using multirom since it was released over a year ago, and never had an issue. I cant imagine my N7 without it.
Sent from my Nexus 7 using XDA Premium 4 mobile app

[Q] USB otg + charging?

I have the galaxy tab 4 10.1 installed in the dash of my truck. I need to be able to charge and use USB otg at the same time. Is there any way to do this? I was able to use a USB otg Y cable to do this with my old nexus 7 bit it doesn't work on this tablet. I've tried googling for answers bit have found anything.
Sent from my Nexus 6 using XDA Free mobile app
jeb192004 said:
I have the galaxy tab 4 10.1 installed in the dash of my truck. I need to be able to charge and use USB otg at the same time. Is there any way to do this? I was able to use a USB otg Y cable to do this with my old nexus 7 bit it doesn't work on this tablet. I've tried googling for answers bit have found anything.
Sent from my Nexus 6 using XDA Free mobile app
Click to expand...
Click to collapse
Try the Lava Adapters: http://lavalink.com/products/samsun...bs-2/usb-otg-host-charge-adapter-tab4-tabpro/
Thanks. I'll give that a try.
Sent from my Nexus 6 using XDA Free mobile app
Just thought I would share what I found. Not sure if I will get in trouble for this but if you go to bestbuy's website and paste this at the end
site/samsung-usb-connection-kit/2837365.p?id=1218363393359&skuId=2837365
It brings you to a link of a usb host piece that is compatible with all samsung devices. I am thinking of buying one to test it out and would be happy to report back if it does work.
I bought the that Meditato posted. I can confirm that it works. Only prob I ran into tho is when removing the power and plugging it back in, the keyboard connected/disconnected flashes back and fourth. The keyboard does work while its doing that...
Sent from my Nexus 6 using XDA Free mobile app

Categories

Resources