Discussion

OTG does not work out of the box????

12 4467
Post Last Edited by roses2at at 2014-9-16 12:24

Why is there no functioning OTG out-of-the-box?

This for me is a MAJOR problem, a HUGE drawback and a big DISADVANTAGE with the B-Pi. (Cannot speak for the R-Pi as I never tried one. Does it even have OTG?? With 4 USB ports, probably not.)

I expected that I would be able to use my USB Thumb Drives and Wireless WiFi dongle and other USB devices (at least those that don't demand a lot of power anyway) immediately. But instead, according to another post in this forum that's not possible. You have to start editing script.bin (http://wiki.lemaker.org/Kernel_drivers_porting_and_configuration#Porting_USB_OTG_Driver)  and this involves fex2bin and bin2fex and a lot of other shenanigans. And what happens if you're not confident enough with CLI/Terminal commands in Linux to do all this? What happens if like me you only have a Windows computer and no Linux PC? I thought the B-Pi was about encouraging beginners - I'm not afraid of getting my hands dirty with a few sudo commands but all this is WAY above my head - and it's enough to make me want to give up with the B-Pi almost right from the off.

Please LeMaker, add this change into ALL your images in the download section. It was stated somewhere else that this was disabled by default, but it actually doesn't matter to me if it takes a little bit more CPU resources (twin core 1.0GHz should be enough anyway for most things anyway, isn't it???) Sorry, but this decision is the wrong way round if you want to have a successful product with wide appeal - ENABLE it by default, then those with the relevant knowledge can DISABLE if they want to if they find their CPU struggling or for other reasons only known to themselves.

So I refer you to Post #8 from sashijoseph in http://forum.lemaker.org/viewthread.php?tid=3077&highlight=otg
and download that file and unzip it. I suggest naming the resulting folder to something useful like "OTG activation" as - if you use many different B-Pi distros - you might be using it a lot.

It wasn't clear to me from this thread what to do next, but this below is how I did it. It's a lot of words, but it's no more complicated really than basic moving and copying/pasting and overwriting of files between Windows folders. (If you don't know how to that, then I would suggest politely that maybe this kind of computing isn't really for you.)

Inside the folder you'll see the necessary and already amended script.bin file that we need to get into our B-Pi. First, on your PC, format a thumb drive to FAT32 and copy the folder to it. Set up your B-Pi with the mouse USB plug on the bottom and the keyboard on the top. Boot it up into your distro (I was using Raspbian v3.0 at the time). To get the script folder into the B-Pi, unplug temporarily the keyboard and plug in the thumb drive. You should see its window opening on the desktop. Copy the folder on to the desktop. If this distro requires you to unmount the USB drive, do so. (Not all do - with some you can just physically pull it out with no ill effects.) Re-insert the keyboard.

Now to get the bin file into your root system. Again using File Manager, navigate to the root system designated by the forward slash /

Find where the script.bin file is located. This is different depending on the distro and sometimes even with different versions of the same distro. On my Raspbian v3.0 it was in the folder /bananapi (in the smaller boot partition, not the main rootfs one).

Now comes a slight problem. You need to copy your bin file and this is a system folder so you won't be allowed to do that without su/root privileges. If you know how to do that with Terminal, go ahead. But there's a simple way. Right click on the file and choose 'Open in Root Window'. Now right click on your 'OTG activation' folder and open that in a new window. Now it's just a case of cutting and pasting (or moving - but not copying as this will lose the original file) from one window to the other. To make sure, use View on each window to make both of them show full file details, and check the date/time of the existing file with that of the other one. Click on Overwrite. Both date-time stamps should match now (cos they're the same file).

Close all windows, reboot, and plug in your USB drive via the OTG cable to the OTG socket on the B-Pi. It should mount automatically and you will be able to see your files. If you're using NTFS formatted USB drives, you might need to install ntfs-3g as a kernel module but that is outside the scope of this post. (A euphemism for "I don't know how the hell to do that!!")

Perhaps someone could write a simple program that can be downloaded from LeMaker which does all of the above automatically with one mouse click.
Reply 1# roses2at

If you are only concerned about amending the script.bin file then you just need to plug in your sdcard (with burned image-which was burned using win32 disk manager) and then copy the script.bin file from root directory of the sdcard to some temporary location of your windows PC..then convert it to Fex file . And after you have made the required changes to fex file and reconverted fex back to bin then you simply copy this new bin file to root of sdcard and you are done (reboot to see what changes this newly amended script.bin file reflects)....during the process if something goes wrong or you mess up with scrip.bin settings then you just rework the fex file which was on your windows PC temporary location..convert that back to bin and copy again to sdcard root...this is how i do experimentation with different values on script.bin of many linux distros for Banana Pi.

Important :- to be on safer side...when you first copy the original script.bin file from sdcard to windows PC then also make a copy of this file somewhere else so that if everything goes out of control then you could at least restore system with this original file.

@ AASHITECH

Thanks for your advice, but your instructions are slightly lacking AFAIC.

All I can see within Windows Vista when I click on the the icon for the SD card which is inserted into my card reader is the drive letter (N: in my case) but the folder is empty. Looking at the card in Computer Manager>>>Disk Management tells me this is actually the 56MB boot partition, although there is also a second partition of 3.36GB which I presume is for the rootfs. Both partitions are formatted for Linux (ext4??) so are therefore unreadable to Windows.

Are you telling me there's some way of reading and amending the contents of those partitions from Windows? Pray tell, sir.........................

If so, that's a much easier way than doing what I did.

Also, how do I do the conversion to fex in Windows and back again to bin?

Anyway, I achieved what I wanted to do although I admit it was fairly involved and convoluted.

Reply 3# roses2at
Dear
Whatever i said was for linux based images burned on the SD card (Android is different story as you can not see the partition info of android in a windows based PC`s file explorer without mounting it with some special mounting software utility..one among such utility is " Paragon_ExtFS_for_Windows "...but still root partition will not be visible where the script.bin file resides).... I am using windows XP-SP3 and using external card reader...below are few screen shots of same  >>

IMG_1.JPG IMG_2.JPG IMG_3.JPG

Below i attached the required folder containing all the tools you will need to convert BIN > FEX and FEX > BIN ....
it also contains a file editor JFE (Jens file editor...its a file editor with IDE functionality  which i regularly use for my Microcontroller projects development) ..... never edit a FEX file with simple notepad like applications as they may mess up with the fex file structure .. instead use JFE as provided inside below file....
BIN_TO_FEX_TO_BIN.rar (393.18 KB, Downloads: 23)

Reply 4# AASHITECH
Attachment file not found, please contact the administrator.


Also, I couldn't see any of your jpegs.


Not sure if that is an issue with my side of things, with the LeMaker server, or if they didn't upload properly at your end.


Thanks, I'll be certain to try your bin to fex program. Yes, I was aware not to use any kind of simple text editing software on these types of files but didn't know why till you just told me.


Just tried DragonFace (updated it as well) but couldn't get it to open any images, Android or Linux. Still early days for me in these areas I'm afraid and there's a lot to learn......................

Post Last Edited by roses2at at 2014-9-16 14:15

Correction to Reply 5#

OK, I did figure out how to open Android images with DragonFace. (But it's only for Android and not Linux distro images or.....?)
But what to do with it now (apart from basic things like changing boot pictures and animations) to make it work via my HDMI-DVI adapter into my PC monitor is anyone's guess.

Post Last Edited by roses2at at 2014-9-16 07:21
Reply  roses2at
Whatever i said was for linux based images burned on the SD card (Android is  ...
AASHITECH Posted at 2014-9-16 04:10


"My quote from the preceding post: All I can see within Windows Vista when I click on the the icon for the SD card which is inserted into my card reader is the drive letter (N: in my case) but the folder is empty."

Just to clarify, I was also referring to Linux images.

Post Last Edited by roses2at at 2014-9-16 07:36
Reply  roses2at
.one among such utility is " Paragon_ExtFS_for_Windows "..
AASHITECH Posted at 2014-9-16 04:10


Great, thanks for pointing me in the right direction.


Now installed Paragon (bit annoyed that I had to register my Email address with them just to get a product code and serial number simply to install the demo version...............but so la la).


And it does what it says on the tin. Windows still sees the boot partition as N: but allows me to examine and work with its ext4 formatted contents including script.bin.


Paragon assigns another disk letter (in my case F: ) to the next rootfs partition, and I can click on that drive letter in File Explorer and see its contents too (also ext4) with all its various folders from bin, boot, dev, etc all the way through to tmp, usr, var.


And from here it's a piece of cake to substitute different versions of files (eg script.bin) as per my original post, which I now see and fully accept was a complete waste of time. My bad, I apologise. (There's always more than one way to skin a fish, especially for the first time, but in my case I completely butchered it!)


Please try to upload the fex-bin/bin-fex RAR again, or alternatively ask Tony if he can host it on the LeMaker server in the Downloads section (is it open source and freely distributable?).

Reply 1#


But after all is said and done, I go back to the original point of this thread.

OTG should be ENABLED out of the box and left to those who know what they are doing to then DISABLE it if they so wish.

If I had bought my B-Pi solely to use as (for example) a headless server or a media centre with XBMC/Kodi and I wasn't really interested in getting my hands dirty with changing around script.bin files but just wanted to get it up and running as quickly as possible with the minimum of fuss, I would NOT be at all chuffed to find that the third and very vital USB socket was not working and that it was not easy to make it do so.

This is the sort of thing that can severely hamper sales and the popularity and potential of what is - let's face it - a very superior, if not the best SBC around.

Post Last Edited by AASHITECH at 2014-9-16 08:15

Post Last Edited by AASHITECH at 2014-9-16 08:13

Reply 9# roses2at

The Fex file structure and its various entries ( with definitions/explanations  ) can be found here  >>      http://linux-sunxi.org/Fex_Guide  ... and for display specific stuff  >>   http://linux-sunxi.org/Fex_Guide#.23disp_init_configuration

You have to log in before you can reply Login | Sign Up

Points Rules