USB Hub with separate on off switches

Everything relating to hacking, expanding and modifying the Joggler hardware.
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

USB Hub with separate on off switches

Post by hawsey »

Just had this drop in to my email from Dragonext Image
been looking for one of these for a while but didn't think they existed , it could take my breeding family of usb stick distros and just have one switched through at a time ; i wonder if this would change the booting issues tho :?:
http://www.dragonext.com/media/catalog/ ... 4_01_6.jpg
Happy Joggling
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

I have one like this - probably same factory in China - from EBuyer, but haven't tried it yet.

What booting issues do you have ? Are you booting Windows ?

Let us know what you'd like to try and I'll see what I can do - no promises on when though.

Actually I have another USB port from EBuyer that has 13 ports on it, I think, but just a single switch. I'll try and give that a try as well.

I'm guessing you'd like to have all your sticks plugged in, and then just switch on the one you want for boot, then after boot you could switch on any others that you wanted to use. This way you wouldn't have to plug in and out and would save on wear ?
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Yep , thats what i wanted , have xp , joli . Xubuntu , Android plugged in all at once
and maybee my mini mouse and keyboard , bluetooth etc then just switch on the distro required with the devices required ;
All nice and neat with no missing memory sticks , or left in the trousers ones come washing day :D .
Going to order one come pay day to have a fiddle with i think .

Thanks for the ebuyer info , i just had a look and it looks the same...
http://www.ebuyer.com/279681-xenta-7-po ... es-n-uh725

but black , and i think i would rather get from ebuyer anyway .
heres hoping it does what i want it to :D
Happy Joggling
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: USB Hub with separate on off switches

Post by pete »

Hawsey,

Have you tried that new USB hub yet?

Here wife has found this and that in trousers during wash day; so far no memory sticks though; the memory sticks though are all over the house lately though playing with this and that....
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Just ordered it tonight Pete of of ebuyer 6.99 will report back on my findings ;-)
Happy Joggling
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Well my little hub arrived this morning :D amazing service from Ebuyer , ordered late on Saturday night , arrived Monday morning in a sturdy box filled with air bags if you know what i mean , very impressed i was .
So down to a bit of testing , i plugged it straight in with a Linux Mint built booting straight in to XBMC with a wired tablet keyboard and mouse and all good so far .
I tried ICS android in all ports 1 to 7 switching each one on seperately and all ports booted no problem , also wired keyboard and mouse all good for Android too :)
Next i tried Dans XP 2003 build and uh urrrrr no good !!i tried various combos 1 through 7 switches all on and all off except the build port but no good :(
Bloody Joggler xp and hubs lol , i broke my mevi build XP so am busy downloading that right now to see if thats a goer or not .
I must say that the hub it looks very good with the Joggler , almost exactly the same lenghth and around 2.5 cm (1 inch old money) wide , the lights are blue , not red as in the sales literature and it comes with a power supply which i have not tried for the fear of zapping my precious as previously tried by others :shock:
I have a nice little photo to stick on here when i work out how to do it :oops:


Image
Image
Cracked it thanks Pete Polybytes did the trick
Last edited by hawsey on Wed Apr 04, 2012 12:11 am, edited 3 times in total.
Happy Joggling
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

Good to hear, Hawsey - and good write-up. I still havent got as far as opening the box yet - not the packaging the hub comes in but the actual cardboard box from EBuyer ! Still have a few like that - d*mned EBuyer special offers...

I'd like to try it on the Joggler and if my experience is any different will post. Did you try the power brick with it ? Just wondering if provides power back to the Joggler and there is white screen. May not be best to try straight on the Joggler - I use a sacrificial USB 1.1 hub which I know how behaves when power is sent back along the host cable for a powered USB hub. Maybe not the best way, and you may have some other solutions, but much less of a loss than a FooBarred joggler.
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

So i downloaded Mevis latest build and ran the with hub code , but no good so far !! i have tried it seperately in to each port and even the usually magic port 4 will not coax it to boot XP
, so unless i find otherwise it will be this cool little hub for ICS , Mint , Xubuntu , Joli ,Android 1.2.3 and then my trusty Trust wilko hub for XP which boots fine from port 4
:)
Happy Joggling
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Juggler wrote:Good to hear, Hawsey - and good write-up. I still havent got as far as opening the box yet - not the packaging the hub comes in but the actual cardboard box from EBuyer ! Still have a few like that - d*mned EBuyer special offers...

I'd like to try it on the Joggler and if my experience is any different will post. Did you try the power brick with it ? Just wondering if provides power back to the Joggler and there is white screen. May not be best to try straight on the Joggler - I use a sacrificial USB 1.1 hub which I know how behaves when power is sent back along the host cable for a powered USB hub. Maybe not the best way, and you may have some other solutions, but much less of a loss than a FooBarred joggler.
Cheers
Erm no , wont be trying the power pack lol
Happy Joggling
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: USB Hub with separate on off switches

Post by pete »

Nice write up hawsey.

On one of the Home automation forums they are trying (and it works) connecting multiple USB sound dongles to a similar device such that you can have a kind of "zoned" audio connecting each audio output to a separate amplifier. It appears to be working well.

How the the switchable USB hub look to a USB sniffer or in Linux? Yes; I was interested in how the power flowed in the device.

I use a very simple photo editor do all program called Polybytes. Been using it for years. I resize the pictures with it. I typically grab them with Polybytes; then I copy them over to Visio (usually a group of pictures) then copy the group of pictures back to Polybytes. Polybytes also takes a whole directory of pictures and converts all in one shot.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Cheers for that Polybytes info , that worked a treat , the image was just too big i think !.

So a few more experiments
I thought i would try my known working XP Trust hub back in just to confirm all was ok and it was ; so then just for daft i tried my Trust hub with XP stick in port 4 in to port 1 of the new switchable hub with everything else turned off and voilla , Xp booted no problem ;
once it booted fully i flicked the switch for both my wired keyboard and mouse and they worked no problem also,
so i now have all my sticks working on the new hub all be it with an XP dongle lol
Happy Joggling
User avatar
Mevi
Posts: 774
Joined: Tue Oct 25, 2011 4:39 pm

Re: USB Hub with separate on off switches

Post by Mevi »

the hub booting behaviour I suspect is in Eric's EFI boot code. Over on his blog he has released the source code, so anyone with knowledge of these things, ie not me :D, they can have a poke about.

http://hi.baidu.com/eric_huang_zh/blog

Scroll down to XOJ (XP On Joggler).
I've Got The Moves Like Joggler

Windows XP Professional SP3 plus Tablet PC for O2 Joggler
http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=305

How to build your own Windows XP for the Joggler
http://www.jogglerwiki.com/wiki/WindowsXP
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

Mevi wrote:the hub booting behaviour I suspect is in Eric's EFI boot code. Over on his blog he has released the source code, so anyone with knowledge of these things, ie not me :D, they can have a poke about.

http://hi.baidu.com/eric_huang_zh/blog

Scroll down to XOJ (XP On Joggler).
Thanks Mevi, I got the lot !

Just been having a look at it - seems there is "debugging" output written in some of the code, so it may be possible to turn this on and maybe get a bit closer to finding out why XOJ only boots from certain hubs and ports on those.

Haven't really looked that hard - but have looked through the following files in the file "xoj_v0.2_src.rar", which is the right one ?

xoj_v0.2_src.rar\xoj\xom\efi_gop.c

xoj_v0.2_src.rar\xoj\xom\xoj.c

I think I need to get an XOJ image going again, so I can see the stage it fails at.

It looks like the code is compiled in MS C++ (VC++), but what is written is really just C, as far as I can see !

Also if we could ask Eric or the XOM people about the debugging options on the code they have written, this could be most useful.
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

File :

xoj_v0.2_src.rar\xoj\xom\dbg.c

has several debugging options. Look for :

switch (cmd) {
case 'q':

and then look down at all the cases on that switch. But this all seems very low level - even doing disassembly...

Actually there is not that much code, so I'm hoping to have a quick look through it all to see if there is anything obvious on the hub problem. I hope I'm looking through the right stuff, but even if not it it interesting stuff...
danfoshizzle
Posts: 1271
Joined: Sun May 29, 2011 2:08 am
Location: somewhere near Rochester castle.

Re: USB Hub with separate on off switches

Post by danfoshizzle »

I have trouble booting linux unless its the right port aswell.
Fullscreen squeezeplay windows, server 2003, foshiz mini v1 and v2, (and a few broken builds) :P so far.....
more to come!!

Jogglers " Obi Wan" according to Pete_c :D
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

danfoshizzle wrote:I have trouble booting linux unless its the right port aswell.
Using BuZz's distros, I've been able to boot off any port I've plugged a stick or hard drive into. This is on 3 hubs, from a £1, mouse mat attached, 3 port hub up to a Sumvision, powered, Sata to USB docking station and off the 2 USB ports on this docking station too.

What would be good is to know if and how debugging/tracing/logging could be turned on so that it may shed some light on what it is that enables a boot and what prevents it. Maybe, if we knew the right areas, we could add some extra output to find out more what is going on.

Looked a little bit more at Eric's and XOM's code and there is quite a bit of console output code in there. Maybe the best file to look in is :

xoj_v0.2_src.rar\xoj\xom\xom.c

There are quite a lot of logging lines in there...

Seems like the file xoj_v0.2_src.rar\xoj\bin\log.txt contains output from a logged use of the software - this is just based on looking at the code that produced the version log lines "XpOnMac v0.01 (C) JLA 2006." and "XpOnJoggler V0.2 eric_huang foxmail.com 2011."

Code :

Print(L"XpOnMac v0.01 (C) JLA 2006.\n");
Print(L"XpOnJoggler " XOJ_VERSION L" eric_huang foxmail.com 2011.\n");

File xoj_v0.2_src.rar\xoj\bin\log.txt

command line args :
arg[0] : fs1:boot
[video] GOP: keeping mode 0
[video] GOP: initialising FB @ ? 532676608x800x480
[video] GOP: Success
EFI GOP init success.
XpOnMac v0.01 (C) JLA 2006.
XpOnJoggler V0.2 eric_huang foxmail.com 2011.
Using resolution 800x480x32@0. ScanLineSize=0x0C80. Video=2, fb=0x1FC00000
Warning: Unknown video card 2...
Unable to locate SMBios table: Not Found
ACPI 2.0 table at 0x1FA08F90, (0xD8100)
cr0 == 0x11
old_gdtr : base=0x1FA0FE90, limit=0x27
new_gdtr : base=0x1725310, limit=0x3F
load gdt done.
GDT Address: 01725310 Limit: 0000003F.
Creating 16-bit code selectors 30, 38
krnIDT: 017D0200
mem[0] : 0009E000, base=00000000, size=000A0000, type=7
mem[1] : 0009E014, base=00100000, size=00F00000, type=7
mem[2] : 0009E028, base=01000000, size=00100000, type=4
mem[3] : 0009E03C, base=01100000, size=00100000, type=2
mem[4] : 0009E050, base=01200000, size=00075000, type=4
mem[5] : 0009E064, base=01275000, size=00003000, type=3
mem[6] : 0009E078, base=01278000, size=00008000, type=4
mem[7] : 0009E08C, base=01280000, size=00003000, type=3
mem[8] : 0009E0A0, base=01283000, size=00062000, type=4
mem[9] : 0009E0B4, base=012E5000, size=00002000, type=3
mem[10] : 0009E0C8, base=012E7000, size=00008000, type=4
mem[11] : 0009E0DC, base=012EF000, size=00001000, type=3
mem[12] : 0009E0F0, base=012F0000, size=00001000, type=4
mem[13] : 0009E104, base=012F1000, size=00005000, type=3
mem[14] : 0009E118, base=012F6000, size=00005000, type=4
mem[15] : 0009E12C, base=012FB000, size=00004000, type=3
mem[16] : 0009E140, base=012FF000, size=00006000, type=4
mem[17] : 0009E154, base=01305000, size=00005000, type=3
mem[18] : 0009E168, base=0130A000, size=00001000, type=4
mem[19] : 0009E17C, base=0130B000, size=00002000, type=3
mem[20] : 0009E190, base=0130D000, size=00005000, type=4
mem[21] : 0009E1A4, base=01312000, size=00002000, type=3
mem[22] : 0009E1B8, base=01314000, size=0000A000, type=4
mem[23] : 0009E1CC, base=0131E000, size=00004000, type=3
mem[24] : 0009E1E0, base=01322000, size=0000A000, type=4
mem[25] : 0009E1F4, base=0132C000, size=00005000, type=3
mem[26] : 0009E208, base=01331000, size=0000A000, type=4
mem[27] : 0009E21C, base=0133B000, size=00002000, type=3
mem[28] : 0009E230, base=0133D000, size=0000B000, type=4
mem[29] : 0009E244, base=01348000, size=00001000, type=3
mem[30] : 0009E258, base=01349000, size=00005000, type=4
mem[31] : 0009E26C, base=0134E000, size=0000A000, type=3
mem[32] : 0009E280, base=01358000, size=00002000, type=4
mem[33] : 0009E294, base=0135A000, size=00006000, type=3
mem[34] : 0009E2A8, base=01360000, size=00009000, type=4
mem[35] : 0009E2BC, base=01369000, size=00003000, type=3
mem[36] : 0009E2D0, base=0136C000, size=0000C000, type=4
mem[37] : 0009E2E4, base=01378000, size=00001000, type=3
mem[38] : 0009E2F8, base=01379000, size=00002000, type=4
mem[39] : 0009E30C, base=0137B000, size=00001000, type=3
mem[40] : 0009E320, base=0137C000, size=00004000, type=4
mem[41] : 0009E334, base=01380000, size=00007000, type=3
mem[42] : 0009E348, base=01387000, size=00002000, type=4
mem[43] : 0009E35C, base=01389000, size=00002000, type=3
mem[44] : 0009E370, base=0138B000, size=00002000, type=4
mem[45] : 0009E384, base=0138D000, size=00002000, type=3
mem[46] : 0009E398, base=0138F000, size=00003000, type=4
mem[47] : 0009E3AC, base=01392000, size=00004000, type=3
mem[48] : 0009E3C0, base=01396000, size=00012000, type=4
mem[49] : 0009E3D4, base=013A8000, size=00007000, type=3
mem[50] : 0009E3E8, base=013AF000, size=0001B000, type=4
mem[51] : 0009E3FC, base=013CA000, size=0000A000, type=3
mem[52] : 0009E410, base=013D4000, size=0002D000, type=4
mem[53] : 0009E424, base=01401000, size=0003B000, type=3
mem[54] : 0009E438, base=0143C000, size=00241000, type=4
mem[55] : 0009E44C, base=0167D000, size=00001000, type=2
mem[56] : 0009E460, base=0167E000, size=00001000, type=4
mem[57] : 0009E474, base=0167F000, size=00006000, type=3
mem[58] : 0009E488, base=01685000, size=0008F000, type=4
mem[59] : 0009E49C, base=01714000, size=0000F000, type=2
mem[60] : 0009E4B0, base=01723000, size=00001000, type=7
mem[61] : 0009E4C4, base=01724000, size=00002000, type=2
mem[62] : 0009E4D8, base=01726000, size=0000A000, type=4
mem[63] : 0009E4EC, base=01730000, size=00001000, type=7
mem[64] : 0009E500, base=01731000, size=00006000, type=2
mem[65] : 0009E514, base=01737000, size=00039000, type=1
mem[66] : 0009E528, base=01770000, size=00024000, type=4
mem[67] : 0009E53C, base=01794000, size=00033000, type=7
mem[68] : 0009E550, base=017C7000, size=00037000, type=1
mem[69] : 0009E564, base=017FE000, size=1E1BF000, type=7
mem[70] : 0009E578, base=1F9BD000, size=00026000, type=10
mem[71] : 0009E58C, base=1F9E3000, size=00001000, type=6
mem[72] : 0009E5A0, base=1F9E4000, size=00006000, type=5
mem[73] : 0009E5B4, base=1F9EA000, size=0000F000, type=0
mem[74] : 0009E5C8, base=1F9F9000, size=00001000, type=6
mem[75] : 0009E5DC, base=1F9FA000, size=00002000, type=5
mem[76] : 0009E5F0, base=1F9FC000, size=00001000, type=10
mem[77] : 0009E604, base=1F9FD000, size=00001000, type=6
mem[78] : 0009E618, base=1F9FE000, size=00003000, type=5
mem[79] : 0009E62C, base=1FA01000, size=00005000, type=9
mem[80] : 0009E640, base=1FA06000, size=00001000, type=10
mem[81] : 0009E654, base=1FA07000, size=00002000, type=9
mem[82] : 0009E668, base=1FA09000, size=00008000, type=10
mem[83] : 0009E67C, base=1FA11000, size=00001000, type=5
mem[84] : 0009E690, base=1FA12000, size=00013000, type=6
mem[85] : 0009E6A4, base=1FA25000, size=00005000, type=5
mem[86] : 0009E6B8, base=1FA2A000, size=00002000, type=6
mem[87] : 0009E6CC, base=1FA2C000, size=000B9000, type=3
mem[88] : 0009E6E0, base=1FAE5000, size=00001000, type=4
mem[89] : 0009E6F4, base=1FAE6000, size=0000A000, type=3
mem[90] : 0009E708, base=1FAF0000, size=00010000, type=0
mem[91] : 0009E71C, base=1FB00000, size=60500000, type=0
mem[92] : 0009E730, base=E0000000, size=10000000, type=11
mem[93] : 0009E744, base=FEC00000, size=00086000, type=11
mem[94] : 0009E758, base=FED00000, size=00001000, type=11
mem[95] : 0009E76C, base=FED1C000, size=00004000, type=11
mem[96] : 0009E780, base=FEE00000, size=00100000, type=11
mem[97] : 0009E794, base=FF000000, size=01000000, type=11
BiosMap : 0x0009E000, 0x0009E7A8


The code is very low level in places. I guess in essence it is providing a layer between what windows expects to be there and the USB hardware, image and EFI stuff that is there. I cant easily see anything related to USB or hubs, but I'm not sure what I'm looking for, haven't got a build environment, etc. But sometimes these are luxuries and you just have to work with whatever you can get.

Given the difficulty most JogglerWiKi users seems to have with this and especially with Windows, I wonder if there is any useful stuff from the XOM community, and the Chinese Joggler community must have same / similar problems.

Oh looks like Eric is using MS VC++ v6, but I may be wrong.

Final thing - I may be off completely and it could be some entirely different code that deals with the USB boot, hubs and stuff. Havent been through it all yet, but will keep looking...

PS - edited a bit to change email addresses - don't really want Eric to get loads of spam...
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

FYI

in xoj_v0.2_src.rar\xoj\xom\xom.c

function InitializeXpOnMac

is where the code starts (Entry Point)

EFI_STATUS
InitializeXpOnMac (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// Initialize the Library.
//
InitJLAEFI(ImageHandle, SystemTable);

pKeyboard = SystemTable->ConIn;
pScreen = SystemTable->ConOut;
BS->SetWatchdogTimer(0, 0, 0, 0);

parserCommandLine();

// Banner
Print(L"XpOnMac v0.01 (C) JLA 2006.\n");

Print(L"XpOnJoggler " XOJ_VERSION L" eric_huang foxmail.com 2011.\n");

// Determine iMac type
xomDetectHardware();

// Boot legacy
xomBootLegacy();

return EFI_SUCCESS;
}


and just after this function is :

void xomEnableConsole() {
if (!enableConsole) {
consoleControl(0);
enableConsole = 1;
}
}

so looks like there may be a switch to get console output while it's running...

edit - email addresses
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

More digging...

xoj_v0.2_src.rar\ntldr_tiamo\osloader\entry.cpp

has a lot of good stuff on booting...
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: USB Hub with separate on off switches

Post by Juggler »

Just having a look at :

xoj_v0.2_src.rar\xoj\bin\joggler\xoj.efi

Looking at it in a hex editor, all the interesting strings start at offset 1000C or there abouts.

So this efi file is built with VC++ and MASM - seems Eric has included the assembler with the source too (in the tools directory)...

Am I right in thinking that the Joggler, if it can see this file, will execute it at boot time ?

Are there some good articles on the Joggler EFI boot process ? (being a bit lazy here...)
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: USB Hub with separate on off switches

Post by hawsey »

Totally over my head but following with interest.
Happy Joggling
Post Reply