User Tools

Site Tools


tamiwiki:projects:thermalcam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tamiwiki:projects:thermalcam [2024/01/02 23:20] yairtamiwiki:projects:thermalcam [2024/02/19 23:07] (current) – [kernel driver] yair
Line 119: Line 119:
 TODO: TODO:
   * better programmable heat source, with wider thermal range   * better programmable heat source, with wider thermal range
 +
 +====== Linux ======
 +make sure all switches support (and dont block) jumbo frames. \\
 +enable jumbo frames on your device. 
 +
 +Jumbo Frames can enhance network performance by allowing larger packets of data to be sent.
 +
 +First, identify the network interface you wish to configure. You can list all available network interfaces using:
 +
 +<code>
 +ip link show
 +</code>
 +
 +To set the MTU to 9000, use the following command, replacing 'eth0' with your interface name:
 +
 +<code>
 +sudo ip link set eth0 mtu 9000
 +</code>
 +
 +After setting the MTU, verify the changes with:
 +
 +<code>
 +ip addr show eth0
 +</code>
 +
 +Look for the 'mtu 9000' in the output to confirm the setting.
 +
 +**Note:** These changes are temporary and will be reset after a system reboot. To make permanent changes, you need to edit the network configuration file, which varies based on the Linux distribution and network manager in use.
 +
 +==== hunting for adapters ====
 +alon/paul gave advice and grep to find usb ethernet adapters with Jumbo frame support. 
 +
 +<code>
 +drivers/net/usb$ git grep max_mtu
 +aqc111.c:       dev->net->max_mtu = 16334;
 +asix_devices.c: dev->net->max_mtu = 16384 - (dev->net->hard_header_len + 4);
 +ax88179_178a.c: dev->net->max_mtu = 4088;
 +cdc-phonet.c:   dev->max_mtu            = PHONET_MAX_MTU;
 +cdc_ncm.c:      dev->net->max_mtu = cdc_ncm_max_dgram_size(dev) - cdc_ncm_eth_hlen(dev);
 +lan78xx.c:      netdev->max_mtu = MAX_SINGLE_PACKET_SIZE;
 +qmi_wwan.c:             net->max_mtu = ETH_MAX_MTU;
 +r8152.c:                netdev->max_mtu = size_to_mtu(9 * 1024);
 +r8152.c:                netdev->max_mtu = size_to_mtu(15 * 1024);
 +r8152.c:                netdev->max_mtu = size_to_mtu(16 * 1024);
 +r8152.c:                netdev->max_mtu = ETH_DATA_LEN;
 +sierra_net.c:   dev->net->max_mtu = SIERRA_NET_MAX_SUPPORTED_MTU;
 +smsc75xx.c:     dev->net->max_mtu = MAX_SINGLE_PACKET_SIZE;
 +smsc95xx.c:     dev->net->max_mtu = ETH_DATA_LEN;
 +usbnet.c:       net->max_mtu = ETH_MAX_MTU;
 +</code>
 +
 +
 +this one id as a ''r8152'', and its [[https://github.com/torvalds/linux/blob/master/drivers/net/usb/r8152.c|on the list]]. \\
 +spec on the box looks great!
 +
 +{{tamiwiki:projects:pxl_20240108_102817262.jpg?x200}}
 +<code bash>
 +$ lsusb -v -d 0bda:8152
 +
 +Bus 001 Device 011: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter
 +Device Descriptor:
 +  bcdUSB               2.10 
 +  bMaxPacketSize0        64
 +  idVendor           0x0bda Realtek Semiconductor Corp.
 +  idProduct          0x8152 RTL8152 Fast Ethernet Adapter
 +  iManufacturer           1 Realtek
 +  iProduct                2 USB 10/100 LAN
 +  iSerial                 3 00E04C3643B9
 +</code>
 +
 +mybe we be lucky?\\
 +
 +<code bash>
 +$ sudo ip link set enp0s20u3 mtu 1501
 +Error: mtu greater than device maximum.
 +</code>
 +
 +{{:tamiwiki:projects:pasted:20240114-203259.png?x400}}
 +
 +the inside is a horid mess. 
 +
 +{{tamiwiki:projects:photo_2024-01-14_20-36-57.jpg?600}}{{tamiwiki:projects:photo_2024-01-14_20-36-59.jpg?x300}}
 +
 +
 +but!!!!
 +
 +stumbled on another canidate @post office, same case, almost kinda the same packaging, but no mention of jumbo frames on the small print.\\
 +doesnt phase me, if they all lie, it can go both ways, no?
 +
 +YES, its the ''RTL8153'' \\
 +{{tamiwiki:projects:photo_2024-01-14_19-50-02.jpg?600}}
 +{{tamiwiki:projects:photo_2024-01-14_19-49-58.jpg?x300}}\\
 +{{:tamiwiki:projects:pasted:20240114-194214.png?x300}}
 +
 +===== SOB =====
 +to get this thing mobile we will need to hook it up to some kind of System On Board. like the raspberry pi and the likes.
 +
 +==== raspi ====
 +the raspi5 has working jumbo frame (mtu>=6K)
 +
 +the RASPI 4/5 support cpi cards, jeff compiled a [[https://pipci.jeffgeerling.com/#network-cards-nics-and-wifi-adapters|nice list]] of netwrok cards you can use with adaptors. 
 +
 +==== jetson tx2 ====
 +we got one, or two. and they have a pci slot. 
 +
 +TODO\\
 +  * check status of mtu on its adaptor board. 
 +
 ===== Model 695800 ===== ===== Model 695800 =====
 {{tamiwiki:projects:video_2023-12-23_19-18-34.mp4 }}  {{tamiwiki:projects:video_2023-12-23_19-18-34.mp4 }} 
Line 137: Line 245:
 ====== downloads ====== ====== downloads ======
 {{tamiwiki:projects:ax88772c_772b_772a_772_win11_64bit_driver_v3.22.0.0.zip}} - apple usb ethernet dongle {{tamiwiki:projects:ax88772c_772b_772a_772_win11_64bit_driver_v3.22.0.0.zip}} - apple usb ethernet dongle
 +
 +====== kernel driver =====
 +
 +Rust in the kernel:
 +
 +- instructions neglect to mention you must turn off DEBUG_INFO_BTF
 +  - you can discover this by "make LLVM=1 xconfig", then Ctrl-F RUST, then look at the text showing that CONFIG_RUST=N and follow the options, then look at your .config and see that DEBUG_INFO_BTF is y. Turn it to n.
tamiwiki/projects/thermalcam.1704230419.txt.gz · Last modified: 2024/01/02 23:20 by yair