Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-27-2010, 05:18 PM   #1
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Dreaming of usbnet

I've been trying to hack at the DR800SG to get usbnet working, so I could debug my software on a real device with stdout/stderr actually visible ... the emulator is awesome and I use it quite a bit, but it doesn't emulate the timing perfectly (or even close), it would be nice to be able to do the same level of debugging on the device itself. To that end, I compiled g_ether.ko, put it on the device, loaded it, and it worked ...

... well, it worked until sysd decided to kill it. I believe sysd to be the culprit because when I kill sysd before starting usbnet, everything works (modulo NetworkManager's own interference). Well, everything works except for sysd, which is to say that none of the normal software works, but I can ssh in and poke around the filesystem. This is good fun, but my goal was to develop software, not to poke around the filesystem, and developing software for the iRex without sysd running is pretty much impossible.

I looked a bit through the source of sysd, but got overwhelmed very quickly ... somehow, shortly after a gadget driver is loaded, it managed to signal the USB subsytem to disconnect guest mode entirely, so the host detects a disconnect, but the device is still running the g_ether driver and has a usb network (not connected to anything). I'm hoping that somebody with a bit more experience can point me in the right direction with regards to fooling sysd into not killing my network. I'd rather not change sysd, if possible.

PS: I am not trying to do this to tether the iRex. As evidence of this I will simply say that tethering was not difficult, and not something I'm going to actually use or tell you (for any value of "you") how to do, as it's horribly unethical, though as always it was fun to do to prove it could be done. sysd doesn't need to be running for the 3G network connection to be maintained, so there is no conflict. My conflict is with normal client software (e.g. oh, Idonno, TechPDF )

Last edited by GregorRichards; 04-27-2010 at 05:23 PM. Reason: Clarification
GregorRichards is offline   Reply With Quote
Old 04-27-2010, 05:46 PM   #2
Shaggy
Wizard
Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.
 
Shaggy's Avatar
 
Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
There's a really old thread somewhere on iRex's forum sort of along these lines. I don't remember if it dates back to the iLiad days or if it was from the DR1000 (definitely pre-dates DR800), but someone was asking about a similar capability.

My vague memory is that internally there is a connector that you can enable to see the terminal output. This is what iRex used for their own development. I think (this is going way back, so my memory is fuzzy) they also mentioned that if someone had a specific need and goals in mind, they would be willing to work with them to help get it working. I don't know if that offer still stands, or if a similar connector even exists in the DR800, but you could try sending a PM to Matthijs and see if he can offer any suggestions.
Shaggy is offline   Reply With Quote
Advert
Old 04-27-2010, 05:56 PM   #3
Shaggy
Wizard
Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.
 
Shaggy's Avatar
 
Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
Found it. It applied to the iLiad, which is a different architecture, and was regarding porting the 2.6 kernel to the device. But, the interesting part is that they seemed to have been willing to work with a serious developer to hook them up with a serial/console enabled device (on loan) for certain projects.

I don't know if they'd still be willing to do that, or if the DR800 is even capable of it, but it can't hurt to ask.

Here's the thread I was thinking of (almost 3 years ago, no wonder it was a fuzzy memory).

http://forum.irexnet.com/viewtopic.p...er=asc&start=0
Shaggy is offline   Reply With Quote
Old 04-27-2010, 06:37 PM   #4
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
I have a really awful habit of posting problems mere minutes before I find the solution :P

Turns out sysd finds when USB is connected by polling /sys/devices. By doing a mount -o bind over /sys/devices, I harmlessly disable its polling without breaking anything important. And I can just umount the binding when I'm done

Have I mentioned that I am absolutely in love with the hackability of the DR?

I'll post a runnable program of it for other would-be devs to have fun with, once I have it a bit more cemented.
GregorRichards is offline   Reply With Quote
Old 04-27-2010, 06:44 PM   #5
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
(Mind you, getting a real console would be cool too, but it's not my immediate concern)
GregorRichards is offline   Reply With Quote
Advert
Old 06-07-2011, 05:14 AM   #6
rvs
Groupie
rvs has a complete set of Star Wars action figures.rvs has a complete set of Star Wars action figures.rvs has a complete set of Star Wars action figures.rvs has a complete set of Star Wars action figures.
 
Posts: 181
Karma: 364
Join Date: Oct 2009
Device: DR1000s, Hanlin V5
For those interested: I found out that the connection is reset when the DR goes into idle mode. More specifically: when sysd calls idle.sh.

To circumvent this you can disable idle mode when using usbnet:

gconftool-2 -s /apps/er/sys/power/idle_mode FALSE -t bool

Using this instead of the "mount -o bind" over /sys/devices will give it more normal functionality while using usbnet. This setting is reset after a restart though, so doing an xserver restart will kill the connection.
rvs is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DR800 usbnet (USB networking to make development easier) for DR800 GregorRichards iRex 40 07-20-2011 09:38 PM
Dreaming of resolution... LDBoblo General Discussions 12 06-17-2010 07:18 PM
Dreaming of ereaders owlrigh Lounge 15 09-03-2009 10:27 PM


All times are GMT -4. The time now is 09:13 AM.


MobileRead.com is a privately owned, operated and funded community.