Opened 9 years ago
Last modified 8 years ago
#12631 assigned enhancement
UDP serial debug interface
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This ticket logs some ideas PulkoMandy and landonf had in irc about solutions to the "no serial on a lot of new devices" issue.
Debugging Haiku on new hardware can be troublesome, especially if no serial interface is available (common on most modern hardware)
Other operating systems like OS X and windows offer serial debugging via UDP packets. Debugging over UDP would greatly assist users in troubleshooting KDL's, boot issues, or Debugger on system kits.
15:22 < landonf> Ethernet debugging for FreeBSD is actually on my TODO list, so if that coincides with FreeBSD compat driver support on the Haiku side ... | 15:22 <@kallisti5> landonf: any specs out there for serial over ethernet? | 15:22 <@kallisti5> something next to tcp | 15:23 <@PulkoMandy> just use UDP frames, broadcast on some random port | 15:23 < landonf> Most implementations just send ethernet frames | 15:23 <@PulkoMandy> or I've seen it done with ARP or ICMP headers or whatever | 15:23 <@PulkoMandy> just raw ethernet works as well with appropriate software on the other side of the link anyway | 15:23 <@kallisti5> http://stackoverflow.com/questions/25317140/serial-data-over-udp-sockets-in-python | 15:23 < bslsk05> stackoverflow.com: Serial data over UDP Sockets in Python - Stack Overflow | 15:24 <@PulkoMandy> so… python in the kernel? :D | 15:24 <@kallisti5> http://www.andrewhazelden.com/blog/2012/03/setting-up-a-udp-based-network-serial-port-on-a-linksys-wrt54g-router/#Step_2_Copy_the_files_to_your_Linksys_router | 15:24 < bslsk05> www.andrewhazelden.com: Setting up a UDP based network serial port on a Linksys WRT54GS router. | Andrew Hazelden's Blog | 15:27 < landonf> http://xref.plausible.coop/source/xref/macosx-10.10.1/xnu-2782.1.97/osfmk/kdp/ | 15:27 < landonf> This is the kernel-side implementation of the protocol OS X uses | 15:28 <@kallisti5> I think just getting kdl into that would be a huge jump | 15:28 <@kallisti5> you can extract syslogs from there | 15:28 <@PulkoMandy> well, if you get the basic frame send/receive working you could even plug our gdb stub to it | 15:30 <@kallisti5> what about ethernet drivers after kdl? | 15:30 <@kallisti5> don't they lock up? | 15:30 < landonf> kdp_udp.c provides the UDP implementation of the Kernel Debugging Protocol (KDP). The network driver is polled for packets, on top of which is implemented a *very* minimal ARP/IP/UDP stack. | 15:31 < landonf> This is what the driver interface looks like: http://xref.plausible.coop/source/xref/macosx-10.10.1/IONetworkingFamily-101/IONetworkController.h#1337 | 15:31 < landonf> kallisti5: You have to provide direct/pollled access to read/write of ethernet frames | 15:32 < landonf> So ethernet drivers have to be extended. | 15:32 < landonf> And it's not a great solution for debugging the ethernet driver you're using for the debugging interface :)
Note:
See TracTickets
for help on using tickets.