# ser2net



## andrewm659 (Dec 12, 2016)

Has anyone gotten ser2net working on FreeBSD?  If so how did you do it?  I've set it up on Linux but I'm confused as what serial device to point it too. (naming convention)

I am using a Serial2USB device as well. Two of them.

Also I'm running this on a Raspberry Pi 2.


----------



## SirDice (Dec 12, 2016)

```
FILES
     /dev/ttyu?       for callin ports
     /dev/ttyu?.init
     /dev/ttyu?.lock  corresponding callin initial-state and lock-state
                      devices

     /dev/cuau?       for callout ports
     /dev/cuau?.init
     /dev/cuau?.lock  corresponding callout initial-state and lock-state
                      devices
```
See uart(4).


----------



## andrewm659 (Dec 14, 2016)

I just added another USB2Serial and now i'm not getting anything from either device.  Not sure why.

Thanks again for all the help!


----------



## tingo (Dec 14, 2016)

What does `usbconfig` report for each device?


----------



## andrewm659 (Dec 14, 2016)

```
usbconfig
ugen0.1: <OTG Root HUB DWCOTG> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <product 0x9514 vendor 0x0424> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3: <product 0xec00 vendor 0x0424> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <USB-Serial Controller D Prolific Technology Inc.> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.5: <USB-Serial Controller D Prolific Technology Inc.> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.6: <802.11 bg WLAN Ralink> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (300mA)
```


----------



## kpa (Dec 14, 2016)

Those should be supported by the uplcom(4) driver if I'm reading right, try this and then look at the `dmesg` output if the devices get recognized:

`# kldload uplcom`


----------



## andrewm659 (Dec 14, 2016)

```
dmesg|grep -i uplcom
uplcom0: <Prolific Technology Inc. USB-Serial Controller D, class 0/0, rev 1.10/3.00, addr 4> on usbus0
uplcom1: <Prolific Technology Inc. USB-Serial Controller D, class 0/0, rev 1.10/3.00, addr 5> on usbus0
```


----------



## kpa (Dec 14, 2016)

Yep that looks good, now you just need to figure out how they appear as device nodes under /dev. You can add this to /boot/loader.conf to load the driver automatically on boot:


```
uplcom_load="YES"
```


----------



## andrewm659 (Dec 14, 2016)

```
Oct  8 22:56:00 asm-console01 ser2net: port number was invalid on line 109
Oct  8 22:56:00 asm-console01 ser2net: Unknown config item: rs485=rs485port1 on line 134
Oct  8 22:56:00 asm-console01 ser2net: Unknown config item: asdfasd on line 141
Oct  8 22:56:00 asm-console01 ser2net[578]: ser2net startup
```


----------



## kpa (Dec 14, 2016)

You seem to have configuration issues with the software, I can't assist any more because I'm not familiar with ser2net.


----------



## tingo (Dec 14, 2016)

To figure out which port a device matches to, you can use this `sysctl dev.uplcom.0.ttyname` for uplcom0 and `sysctl dev.uplcom.1.ttyname` for uplcom1.


----------



## andrewm659 (Dec 14, 2016)

Thank you!  Got it working, just need to figure out what to change on my switch to make it work with that.


----------

