[Q] Perl and access to USB device - Android Q&A, Help & Troubleshooting

Hello, I would like to ask you for your help.
I have a digital multimeter VA18B with USB output. The output is actually optically separated USB to RS232 adapter. Link:
http://www.mastech.com.cn/html/en/products-va18b.htm
Since I have a phone with USB host support (Samsung Galaxy Nexus - latest AOKP), I had an idea that I could use it to record data from the multimeter. But I have no experience with Android software development.
The device itself seems to be supported on Android, because I can connect it and read some rubbish characters in intervals of measurement with this app:
https://play.google.com/store/apps/details?id=slickdevlabs.apps.usbtoserialterm
PC Drivers for this multimeter are very limited - only Windows up to XP. Because I primarily use Windows 7, I already use Linux and this script with my multimeter:
http://multimeter.schewe.com/
Source code is in the zip on that site, and also here: http://pastebin.com/iqKW3iFa
It is written in Perl, works on Linux and Android is "Linux". So my first thought was that it could probably be easy to use the same script on Android. I tried to find how to run Perl scripts on Android and found sl4a:
http://code.google.com/p/android-scripting/
After installing the Perl interpreter it can run my script but it doesn't work. The fact that I don't know Perl doesn't make it easier. The script fails to find the device. I thought it is caused by different naming on Android so I substituted the "/dev/ttyUSB0" thing by "/dev/bus/usb/001/033" which I have found in the already mentioned serial adapter app. But it still doesn't work. In both cases it ends complaining about "Can't open device ...".
Because of my level of knowledge I have no idea what to do next.
1) Can you please help me somehow?
2) Next step after making it work will be saving the data to file. That is another problem I would really appreciate your help with, because I did it just by output redirection in Linux and have no idea how to do it here.
I hope someone took the time to read this and perhaps will try to help me. Thank you very much.

Bump :angel:

Bump :angel:

Related

Folio Linux "Drivers Thread"

There are some people in this forum that have got success instaling ubuntu on Folio. I've got too.
Now i have a great question !!
Are our folios fully driver installed ??
For example, in my folio with ubuntu, i can't use bluetooth or i can't heard any sound because it doesn't run, or also i can't adjust brightness...
I have searched lot of pages and i haven't got success....
This thread is created for people who knows how install this kind of drivers can help us to make us happy !!
If you discovered how to install any kind of driver... or things for optimize ubuntu and make it more quickly please, post it !!
Also would be insteresting if people got success installing programs on our ARM architecture device like Dropbox, Foxit reader, Wine compatibility layer... that are based on i386 and AMD architectures post a how to do it.
Thanks in advance for all people that make that possible.
Hi,
I am working on sound driver. Just trying to find specs as running android do not give enough informations.
I will also try to integrate accelerated drivers as in AC100 build (but system may be unstable...)
Akta
When I installed Linux on my netbook, I haven't got bluetooth, go to software manager(ubuntu market) and search for bluetooth(drivers). May this help you
I'm working on sound too...
I guess there is an GPIO Chip inside the Folio, which manages sound in-/outputs..
I dont know whether the bluetooth and screen brightness are also part of it...
The GPIO has many inputs and outputs, but these are not fix...
So you have to build/run a program which tells them to be an output or input and what they have to do...
I ported the mach-tegra tree and the sound/soc/tegra tree from android-kernel-source to the folio source..
After that I ran nvrm_daemon in a chroot..
For that you'll have to do the following steps:
1. Create a new folder whereever you want (for me /home/ubuntu/Desktop/chroot)
2. mount /dev/mmcbkl0p1 and copy the bin & lib folders into your directory
3. create a folder called system inside your folder and move the lib folder into it
4. create the folders dev and proc
5. open a shell and cd to your directory
6. $ mount -o bind /dev dev/
7. $ mount -t proc /proc proc/
8. chroot ./ /bin/sh
9. nvrm_daemon
You should better run chroot/nvrm_daemon from a ssh shell on your laptop because sometimes the screen gets black, because of segmentation fault..
Then you can take a look @ dmesg..
There are some outputs given by nvrm_daemon.. Also for GPIO but they failed to change some pins because they are already in use..
And I guess thats the problem!
I also tested whats happening when the nvrm_daemon is not starting when android boots.
I removed it from the ramdisk.
After that the folio wasn't starting anymore...
Only after I started nvrm_daemon manually via adb shell the boot screen appers and the window manager starts..
So everything depends on the nvrm_daemon!
I hope you'll more lucky than me and findout why the nvrm_daemon is not starting correctly!
Regards
Thanks for the info.
Will look at that to begin with
Akta
I there, I have contacted Atheros to know which bluetooth chip is in our folio and they replied me that is 3011 or 3012 depending on the version.
I hope this helps to get bluetooth working early. I will try using ndiswrapper to install windows driver after the biggest brick ever!!!
I found the drivers for the gpu
I've gotten through the forums trimslice computer graphics chip drivers Tegra2
To download them here:
Code:
trimslice.com/download/drivers/nvidia-drivers.18.0004.tar.bz2
These drivers are valid for Debian and Ubuntu Maverick.
However, you must edit xorg.conf to make them work properly with the folio 100.
If someone can correctly configure xorg.conf. I would appreciate it also put him in these forums. Thanks
To install the drivers simply must enter the terminal from ubuntu and type the following commands:
Code:
cd /
sudo tar -jxf nvidia-drivers.18.0004.tar.bz2
jarre2 said:
I've gotten through the forums trimslice computer graphics chip drivers Tegra2
To download them here:
Code:
trimslice.com/download/drivers/nvidia-drivers.18.0004.tar.bz2
These drivers are valid for Debian and Ubuntu Maverick.
However, you must edit xorg.conf to make them work properly with the folio 100.
If someone can correctly configure xorg.conf. I would appreciate it also put him in these forums. Thanks
To install the drivers simply must enter the terminal from ubuntu and type the following commands:
Code:
cd /
sudo tar -jxf nvidia-drivers.18.0004.tar.bz2
Click to expand...
Click to collapse
Hey, I have installed this drivers and now I can't boot ubuntu !! Can you help me ? I send you a mp with my e-mail, we can speak on google talk chat i'm spanish !
thx !!
I had said before, it is necessary to create an xorg.conf file that is compatible with
toshiba screen folio 100.
It is the only way to have graphics acceleration.
Funny how nobody was interested in compiling the kernel with support for
ALSA (and there have been some drivers called tegra) But if you do not work
we can always choose to have sound through USB since.
no news ? aneybody have graphics acceleration ?
up please!!!
please why nobody reply ?

What USB devices can be used with the G-Tab?

Is there a list of functions that can be used with the GTab USB? For example: can I mount a digital camera as a USB drive?
Pretty much all storage devices work. People have had success with 3g usb adapter. Mouse and keyboard also work. I haven't tried printer yet.
Has any research been done with usb wifi adapters? I've searched but with no success as I'm sure the issue would be driver related.
The kernel controls what can and cannot be used via USB first.. If there is kernel support for your do-dad, you're good to go at least for the first step... after that, the rest of the Android framework needs to allow you to do something useful with the thing, which may or may not stop it from helping... or may require apps, or additional libraries, or pixie dust.
Right out of the box, if it looks like a HID (keyboard/mouse) or storage, something encouraging will happen on most of the g-tab roms, even the stock rom. If its storage but a format that's not supported by your kernel, you may need additional modules, or it may never work.
Everything else, who knows. Use a custom kernel, and get the source, and build one that supports what you want. Check for linux support - if its supported in linux, odds are way way better...
user mode usb driver support?
I would like to write a "virtual Control Panel" application to communicate with a propriatery device via USB. Under Windows XP, I wrote a device driver, DLL and C++ application.
Now I am sure the linux kernel does not support the proprietary protocol of my device. However I understand that some linux systems support user mode device drivers for USB devices.
Is this the case with Android 2.3?
If so, can a user mode device driver be written with the Android SDK?

[Q] AOCOS PX102- Attempting to root, but having issues finding the device via ADB

Hello All,
So there is very little documentation on the PX102 online as of yet, let alone AOCOS products in general (at least on english sites which I have scoured). First off, I'm currently using OSX 10.6.8 and have the current Android developer tools package that was downloaded from their site about three hours ago (just to be clear). The PX102 is running 4.1.1 and the tablet is a fresh restore (I had a number of apps downloaded but considered that some may have been interfering...).
I will be attempting to root via psneuter exploit from SuperOneClick v2.3.3, however in the terminal when I execute "adb devices" it returns "List of devices attached" with blank space underneath...
I have tried to kill/restart server, run "adb usb", and a couple other small things to no avail.
Yes, usb debugging mode is enabled as well.
I would really like to attempt/execute this all via OSX, however name an OS and I have it at my disposal...
I admit- I am a noob in various ways, especially to android as this is my first android device. Hoever, I also consider myself to be rather self sufficient in terms of sourcing knowledge and troubleshooting, which is why I humbly ask for guidance in this endeavor.
Also, feel free to ask me any questions about the PX102 (via PM only please! I dislike threads being fuddled with asides...).
I'm not seeing too many people claiming to have these tablets though there is quite a bit of interest in them.
Anyone?
For windows you can try rkbatchtool v1.5 to get the correct drivers
Rooted mine
I rooted mine, wasn't easy though.
First problem, you need a adb driver that works on this rockchip tablet that doesn't have a built in ADB driver. Also I didn't have much luck on the chinese language AOCOS forum.
The only way I found to get one is:
1) download and install the morborobo phone manager software from moborobo.com. Yes this is a risk to your pc. God knows what else it did to my pc.
2) let IT find a driver. It will download and install two unsigned drivers.
3) those drivers aren't enough. You need to generate adb_usb.ini in c:/Users/%username%/.android/adb_usb.ini (if you're on windows 7)
Installing the SDK does that automatically otherwise you need to run "android update adb" or something to generate it
4) put the vendor id at the end of adb_usb.ini in the case of AOCOS the vendor is 0x2207
I tried using a premade adb_usb.ini with all of the vendor ids. That didn't work. It worked when I put the right on only.
NOTE, that vendor ID exists nowhere online. I had to find it by reading it directly from the device using USBVIEW from http://digital.ni.com/public.nsf/allkb/335A90747734097886257070006415B9
5) Now you should have a working adb driver. Plug the machine in and type "adb devices". It should see yours
6) now comes the rooting.
Follow the instructions here:
http://forum.xda-developers.com/showthread.php?t=1886460
The script is here: http://uploaded.net/file/0fpyh5c5
the videos showing how are here http://forum.xda-developers.com/showthread.php?p=33470626#post33470626
Note there IS a hacked adb driver that doesn't need a vendor ID, BUT it doesn't work for rooting, it's too old to have the restore feature you need for a jelly bean root.
The PX102 is cool, but mine has some problems:
1) the keyboard charge connector is bad, I have to send it back
2) the battery sucks... I'm sending back the tablet too, hopefully that will fix it
3) never drop one of these, mine only fell a couple feet and it's flaky now. :/
4) the camera is fake. It's not the 2mega pixels it says. It's super low quality and maybe vga. They put in bull**** fractal interpolation software to try to fake higher res
The keyboard is no where near as nice as a transformer, the tablet only rests on the keyboard and can fall off.
Still it's a nice machine. I have my memory cards formatted ext2 (from a previous tablet). I can mount them but the machine won't boot with an ext2 card plugged in. I have to take the card out, boot the machine, then plug it in and mount it.
I even managed to install GNU Gcc/ gnu tools
You can also try this: http://www.androidtablets.net/forum/rockchip-rk3066-tablets/46964-root-your-rockchip-3066-a.html
Or this: http://valentijn.sessink.nl/?p=382

[Q] Is it possible to turn an Android installation into a Linux distribution? How?

Hello everyone,
In brief I was wondering if I could somehow turn an Android installation into a GNU/Linux distribution, given that Android uses the Linux kernel. Maybe I can install the GNU libraries and the rest of a distribution on top of the kernel, then deactivate the Android libraries that get on its way? I'm thinking of doing this because the Linux kernel already has all the required drivers for my device so perhaps the only thing that I should do is to tweak some files.
Here is my story:
At work I was given an old and unsupported industrial touchscreen module from a largely unknown company. The screen itself is connected to a computer module in the back, which has connectors for several peripherals, an embedded ARMv7 processor, and runs Android 2.2 (rooted) as its operating system.
I was given the task of finding out in a short time if I can install another operating system in the computer (say, Debian) to use it as a PC.
So I looked for information about this device, but I could only find the document attached.
So far, I have been able to turn it on, to connect it to the internet, to get it to read an SD card, and to connect USB peripherals such as a mouse and a keyboard.
But as for installing a different operating system, I haven't had any luck. I've tried different things. For example, I tried to boot into recovery mode by pushing several combinations of keys, but with no success so far. I've looked at the circuit board, but I haven't seen anything illuminating.
Also, I think that installing a Linux distribution from scratch would be painful, even impossible, because this device is not supported in any form and it doesn't come with a user guide or a software package, so it would be impractical to get the drivers for the device, as they are most likely non-standard.
I mean, is it even possible to accomplish this? Is it practical? How should I proceed? I think it is technically possible, but I'm not a Linux expert, not an Android expert, and not an embedded systems expert so I may be wrong.
I have also looked into other options. For example, the "Complete Linux Installer" Android app. I don't think this would work. The device only has ~100MB of free space in the internal flash memory.
There is also a way to install a GNU/Linux distribution that runs on chroot simultaneously with Android and communicates with it via VNC, called "Linux Deploy", but this sounds like it is not optimal. I don't think it would be a good option because of the limited resources of the device.
Any help will be appreciated.

[Serial Port API] - Connection can not be opened

Hello,
I am writing here to see if somebody faced this problem before. I am trying to control a very specific Hardware from an Android device using the android-serialport-api lib: code.google.com/archive/p/android-serialport-api/
My hardware uses a RS232 connector and I connect it to Android with a USB to RS232 adapter, just as it shows on the "solution 2" of this image: code.google.com/archive/p/android-serialport-api/wikis/android_to_rs232_guideline.wiki (Solution 4 seems to be the ideal one, but I do not understand it, I will appreciate any indication here as well)
When I try to open a connection to the port, I always get an error indicating the the connection can not be open. The problem with this approach is, as the wiki mentions, you "may need to root your device in order to change /dev/ttyUSB0 file permission, and to load a kernel module.".
Does anybody had to root their device in order to be able to open tty connections? The tablet I am using is a HANNSpree HSG1351 (which I could not find any rooting guide).
Thanks
I will answer myself here just in case it can be useful for someone else in the future:
I ended up using this serial controller for Android, which makes read / write operations easy: github.com/felHR85/UsbSerial
Before being able to open a serial connection with the device, you should give permissions to the USB as it is explained here: developer.android.com/guide/topics/connectivity/usb/accessory.html#permission-a
Just to clarify, this is generic for any device, doesn't matter if it is rooted or not.

Categories

Resources